@statistikzh/leu 0.21.1 → 0.22.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/.github/workflows/release-please.yml +1 -2
- package/.nvmrc +1 -1
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +16 -0
- package/README.md +15 -10
- package/dist/Accordion.js +1 -1
- package/dist/Button.d.ts +1 -1
- package/dist/Button.js +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/ChartWrapper.js +1 -1
- package/dist/Checkbox.d.ts +1 -1
- package/dist/Checkbox.js +1 -1
- package/dist/CheckboxGroup.js +1 -1
- package/dist/Chip.d.ts +1 -7
- package/dist/Chip.js +7 -5
- package/dist/ChipGroup.d.ts +17 -36
- package/dist/ChipGroup.js +35 -33
- package/dist/ChipLink.d.ts +5 -21
- package/dist/ChipLink.js +14 -15
- package/dist/ChipRemovable.d.ts +4 -15
- package/dist/ChipRemovable.js +7 -9
- package/dist/ChipSelectable.d.ts +14 -37
- package/dist/ChipSelectable.js +24 -28
- package/dist/Dialog.d.ts +7 -18
- package/dist/Dialog.js +15 -18
- package/dist/Dropdown.d.ts +16 -24
- package/dist/Dropdown.js +23 -21
- package/dist/FileInput.d.ts +2 -1
- package/dist/FileInput.js +19 -5
- package/dist/Icon.d-itcQ94ym.d.ts +151 -0
- package/dist/Icon.d.ts +4 -156
- package/dist/Icon.js +1 -4
- package/dist/Input.d.ts +73 -141
- package/dist/Input.js +91 -88
- package/dist/{LeuElement-BLUQU9Eu.js → LeuElement-DfsEye-A.js} +1 -1
- package/dist/Menu.d.ts +2 -8
- package/dist/Menu.js +7 -9
- package/dist/MenuItem.d.ts +31 -59
- package/dist/MenuItem.js +30 -33
- package/dist/Message.d.ts +1 -1
- package/dist/Message.js +1 -1
- package/dist/Pagination.d.ts +1 -1
- package/dist/Pagination.js +1 -1
- package/dist/Placeholder.js +1 -1
- package/dist/Popup.js +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/Radio.js +1 -1
- package/dist/RadioGroup.js +1 -1
- package/dist/Range.d.ts +22 -65
- package/dist/Range.js +36 -37
- package/dist/ScrollTop.d.ts +5 -7
- package/dist/ScrollTop.js +10 -15
- package/dist/Select.d.ts +2 -1
- package/dist/Select.js +1 -1
- package/dist/Spinner.js +1 -1
- package/dist/Table.d.ts +1 -1
- package/dist/Table.js +1 -1
- package/dist/Tag.js +1 -1
- package/dist/VisuallyHidden.js +1 -1
- package/dist/components/chart-wrapper/leu-chart-wrapper.d.ts +5 -0
- package/dist/components/chart-wrapper/leu-chart-wrapper.d.ts.map +1 -1
- package/dist/components/chip/Chip.d.ts +1 -7
- package/dist/components/chip/Chip.d.ts.map +1 -1
- package/dist/components/chip/ChipGroup.d.ts +15 -35
- package/dist/components/chip/ChipGroup.d.ts.map +1 -1
- package/dist/components/chip/ChipLink.d.ts +4 -20
- package/dist/components/chip/ChipLink.d.ts.map +1 -1
- package/dist/components/chip/ChipRemovable.d.ts +3 -14
- package/dist/components/chip/ChipRemovable.d.ts.map +1 -1
- package/dist/components/chip/ChipSelectable.d.ts +13 -36
- package/dist/components/chip/ChipSelectable.d.ts.map +1 -1
- package/dist/components/chip/stories/chip-group.stories.d.ts +1 -1
- package/dist/components/chip/stories/chip-group.stories.d.ts.map +1 -1
- package/dist/components/chip/stories/chip-link.stories.d.ts.map +1 -1
- package/dist/components/chip/stories/chip-selectable.stories.d.ts.map +1 -1
- package/dist/components/dialog/Dialog.d.ts +5 -17
- package/dist/components/dialog/Dialog.d.ts.map +1 -1
- package/dist/components/dropdown/Dropdown.d.ts +14 -23
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/stories/dropdown.stories.d.ts.map +1 -1
- package/dist/components/file-input/FileInput.d.ts +1 -0
- package/dist/components/file-input/FileInput.d.ts.map +1 -1
- package/dist/components/file-input/leu-file-input.d.ts +5 -0
- package/dist/components/file-input/leu-file-input.d.ts.map +1 -1
- package/dist/components/file-input/stories/file-input.stories.d.ts +4 -0
- package/dist/components/file-input/stories/file-input.stories.d.ts.map +1 -1
- package/dist/components/icon/Icon.d.ts +0 -6
- package/dist/components/icon/Icon.d.ts.map +1 -1
- package/dist/components/input/Input.d.ts +73 -140
- package/dist/components/input/Input.d.ts.map +1 -1
- package/dist/components/menu/Menu.d.ts +1 -7
- package/dist/components/menu/Menu.d.ts.map +1 -1
- package/dist/components/menu/MenuItem.d.ts +30 -57
- package/dist/components/menu/MenuItem.d.ts.map +1 -1
- package/dist/components/message/leu-message.d.ts +5 -0
- package/dist/components/message/leu-message.d.ts.map +1 -1
- package/dist/components/placeholder/leu-placeholder.d.ts +5 -0
- package/dist/components/placeholder/leu-placeholder.d.ts.map +1 -1
- package/dist/components/progress-bar/leu-progress-bar.d.ts +5 -0
- package/dist/components/progress-bar/leu-progress-bar.d.ts.map +1 -1
- package/dist/components/range/Range.d.ts +22 -65
- package/dist/components/range/Range.d.ts.map +1 -1
- package/dist/components/scroll-top/ScrollTop.d.ts +4 -6
- package/dist/components/scroll-top/ScrollTop.d.ts.map +1 -1
- package/dist/components/tag/leu-tag.d.ts +5 -0
- package/dist/components/tag/leu-tag.d.ts.map +1 -1
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -4
- package/dist/leu-accordion.js +1 -1
- package/dist/leu-button-group.js +1 -1
- package/dist/leu-button.d.ts +1 -1
- package/dist/leu-button.js +1 -1
- package/dist/leu-chart-wrapper.d.ts +10 -1
- package/dist/leu-chart-wrapper.js +1 -1
- package/dist/leu-checkbox-group.js +1 -1
- package/dist/leu-checkbox.d.ts +1 -1
- package/dist/leu-checkbox.js +1 -1
- package/dist/leu-chip-group.d.ts +2 -0
- package/dist/leu-chip-group.js +5 -1
- package/dist/leu-chip-link.js +3 -1
- package/dist/leu-chip-removable.d.ts +1 -1
- package/dist/leu-chip-removable.js +3 -3
- package/dist/leu-chip-selectable.js +3 -1
- package/dist/leu-dialog.d.ts +2 -1
- package/dist/leu-dialog.js +3 -3
- package/dist/leu-dropdown.d.ts +2 -1
- package/dist/leu-dropdown.js +3 -3
- package/dist/leu-file-input.d.ts +11 -2
- package/dist/leu-file-input.js +11 -4
- package/dist/leu-icon.d.ts +1 -1
- package/dist/leu-icon.js +1 -1
- package/dist/leu-input.d.ts +2 -1
- package/dist/leu-input.js +3 -3
- package/dist/leu-menu-item.d.ts +2 -2
- package/dist/leu-menu-item.js +3 -3
- package/dist/leu-menu.d.ts +1 -1
- package/dist/leu-menu.js +3 -3
- package/dist/leu-message.d.ts +11 -2
- package/dist/leu-message.js +1 -1
- package/dist/leu-pagination.d.ts +1 -1
- package/dist/leu-pagination.js +1 -1
- package/dist/leu-placeholder.d.ts +10 -1
- package/dist/leu-placeholder.js +1 -1
- package/dist/leu-popup.js +1 -1
- package/dist/leu-progress-bar.d.ts +10 -1
- package/dist/leu-progress-bar.js +1 -1
- package/dist/leu-radio-group.js +1 -1
- package/dist/leu-radio.js +1 -1
- package/dist/leu-range.js +3 -1
- package/dist/leu-scroll-top.d.ts +1 -1
- package/dist/leu-scroll-top.js +3 -3
- package/dist/leu-select.d.ts +2 -1
- package/dist/leu-select.js +1 -1
- package/dist/leu-spinner.js +1 -1
- package/dist/leu-table.d.ts +1 -1
- package/dist/leu-table.js +1 -1
- package/dist/leu-tag.d.ts +10 -1
- package/dist/leu-tag.js +1 -1
- package/dist/leu-visually-hidden.js +1 -1
- package/dist/vscode.html-custom-data.json +115 -111
- package/dist/vue/index.d.ts +116 -131
- package/dist/web-types.json +303 -303
- package/package.json +1 -1
- package/scripts/generate-component/templates/[namespace]-[name].ts +6 -0
- package/src/components/chart-wrapper/leu-chart-wrapper.ts +6 -0
- package/src/components/chip/Chip.ts +3 -9
- package/src/components/chip/ChipGroup.ts +26 -39
- package/src/components/chip/ChipLink.ts +7 -18
- package/src/components/chip/ChipRemovable.ts +4 -11
- package/src/components/chip/ChipSelectable.ts +21 -35
- package/src/components/chip/stories/chip-group.stories.ts +4 -7
- package/src/components/chip/stories/chip-link.stories.ts +2 -4
- package/src/components/chip/stories/chip-selectable.stories.ts +4 -6
- package/src/components/chip/test/chip-group.test.ts +34 -31
- package/src/components/dialog/Dialog.ts +9 -22
- package/src/components/dropdown/Dropdown.ts +20 -24
- package/src/components/dropdown/stories/dropdown.stories.ts +6 -2
- package/src/components/dropdown/test/dropdown.test.ts +14 -2
- package/src/components/file-input/FileInput.ts +12 -1
- package/src/components/file-input/leu-file-input.ts +6 -0
- package/src/components/file-input/stories/file-input.stories.ts +7 -0
- package/src/components/icon/Icon.ts +0 -4
- package/src/components/input/Input.ts +108 -105
- package/src/components/menu/Menu.ts +3 -12
- package/src/components/menu/MenuItem.ts +37 -41
- package/src/components/message/leu-message.ts +6 -0
- package/src/components/placeholder/leu-placeholder.ts +6 -0
- package/src/components/progress-bar/leu-progress-bar.ts +6 -0
- package/src/components/range/Range.ts +51 -59
- package/src/components/scroll-top/ScrollTop.ts +8 -15
- package/src/components/tag/leu-tag.ts +6 -0
- package/src/index.ts +11 -0
package/dist/Icon.d.ts
CHANGED
|
@@ -1,156 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
type IconPathName = keyof typeof paths;
|
|
6
|
-
declare const paths: {
|
|
7
|
-
addNew: string;
|
|
8
|
-
alert: string;
|
|
9
|
-
angleDropDown: string;
|
|
10
|
-
angleDropUp: string;
|
|
11
|
-
angleLeft: string;
|
|
12
|
-
angleRight: string;
|
|
13
|
-
arrowDown: string;
|
|
14
|
-
arrowLeft: string;
|
|
15
|
-
arrowRight: string;
|
|
16
|
-
arrowUp: string;
|
|
17
|
-
backward: string;
|
|
18
|
-
block: string;
|
|
19
|
-
calendar: string;
|
|
20
|
-
camera: string;
|
|
21
|
-
caution: string;
|
|
22
|
-
cc: string;
|
|
23
|
-
chart: string;
|
|
24
|
-
chatMessage: string;
|
|
25
|
-
check: string;
|
|
26
|
-
clear: string;
|
|
27
|
-
close: string;
|
|
28
|
-
comment: string;
|
|
29
|
-
conference: string;
|
|
30
|
-
confirm: string;
|
|
31
|
-
confirmPlain: string;
|
|
32
|
-
conversation: string;
|
|
33
|
-
copy: string;
|
|
34
|
-
delete: string;
|
|
35
|
-
download: string;
|
|
36
|
-
earth: string;
|
|
37
|
-
edit: string;
|
|
38
|
-
email: string;
|
|
39
|
-
file: string;
|
|
40
|
-
fileCsv: string;
|
|
41
|
-
fileOutline: string;
|
|
42
|
-
filePdf: string;
|
|
43
|
-
fileXml: string;
|
|
44
|
-
files: string;
|
|
45
|
-
filter: string;
|
|
46
|
-
floppy: string;
|
|
47
|
-
folder: string;
|
|
48
|
-
forward: string;
|
|
49
|
-
getInformation: string;
|
|
50
|
-
hide: string;
|
|
51
|
-
home: string;
|
|
52
|
-
image: string;
|
|
53
|
-
income: string;
|
|
54
|
-
launch: string;
|
|
55
|
-
levelUp: string;
|
|
56
|
-
like: string;
|
|
57
|
-
link: string;
|
|
58
|
-
list: string;
|
|
59
|
-
location: string;
|
|
60
|
-
lock: string;
|
|
61
|
-
login: string;
|
|
62
|
-
logout: string;
|
|
63
|
-
love: string;
|
|
64
|
-
emailOpen: string;
|
|
65
|
-
map: string;
|
|
66
|
-
mapLocateMe: string;
|
|
67
|
-
mapNavigation: string;
|
|
68
|
-
mapPin: string;
|
|
69
|
-
menu: string;
|
|
70
|
-
menuOverflow: string;
|
|
71
|
-
minus: string;
|
|
72
|
-
money: string;
|
|
73
|
-
moneyIncome: string;
|
|
74
|
-
organisation: string;
|
|
75
|
-
overflow: string;
|
|
76
|
-
paperplane: string;
|
|
77
|
-
paragraph: string;
|
|
78
|
-
passport: string;
|
|
79
|
-
phoneCall: string;
|
|
80
|
-
piechart: string;
|
|
81
|
-
pill: string;
|
|
82
|
-
pin: string;
|
|
83
|
-
plus: string;
|
|
84
|
-
print: string;
|
|
85
|
-
refresh: string;
|
|
86
|
-
remove: string;
|
|
87
|
-
repost: string;
|
|
88
|
-
resizeText: string;
|
|
89
|
-
ruler: string;
|
|
90
|
-
search: string;
|
|
91
|
-
securities: string;
|
|
92
|
-
setting: string;
|
|
93
|
-
share: string;
|
|
94
|
-
show: string;
|
|
95
|
-
smileyDevastated: string;
|
|
96
|
-
smileyIndifferent: string;
|
|
97
|
-
smileySad: string;
|
|
98
|
-
smileySmile: string;
|
|
99
|
-
smileyThrilled: string;
|
|
100
|
-
swissId: string;
|
|
101
|
-
time: string;
|
|
102
|
-
upload: string;
|
|
103
|
-
user: string;
|
|
104
|
-
userMultiple: string;
|
|
105
|
-
vote: string;
|
|
106
|
-
zoom: string;
|
|
107
|
-
zoomOut: string;
|
|
108
|
-
fastForward: string;
|
|
109
|
-
fastRewind: string;
|
|
110
|
-
fullScreen: string;
|
|
111
|
-
next: string;
|
|
112
|
-
pause: string;
|
|
113
|
-
play: string;
|
|
114
|
-
playButton: string;
|
|
115
|
-
previous: string;
|
|
116
|
-
skipNext: string;
|
|
117
|
-
skipPrevious: string;
|
|
118
|
-
stop: string;
|
|
119
|
-
facebook: string;
|
|
120
|
-
google: string;
|
|
121
|
-
instagram: string;
|
|
122
|
-
kununu: string;
|
|
123
|
-
linkedin: string;
|
|
124
|
-
snapchat: string;
|
|
125
|
-
tiktok: string;
|
|
126
|
-
twitter: string;
|
|
127
|
-
xing: string;
|
|
128
|
-
youtube: string;
|
|
129
|
-
youtubeLogo: string;
|
|
130
|
-
};
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* A component to render all defined zhWeb icons.
|
|
134
|
-
* The `fill` of the icon is set to `currentColor` and
|
|
135
|
-
* can be overriden by setting the css `color` property.
|
|
136
|
-
* If the icon name is not found, a placeholder will be displayed.
|
|
137
|
-
*
|
|
138
|
-
* @tagname leu-icon
|
|
139
|
-
* @cssprop --leu-icon-size - The size of the icon.
|
|
140
|
-
*/
|
|
141
|
-
declare class LeuIcon extends LeuElement {
|
|
142
|
-
static styles: lit.CSSResultGroup[];
|
|
143
|
-
static properties: {
|
|
144
|
-
name: {
|
|
145
|
-
type: StringConstructor;
|
|
146
|
-
reflect: boolean;
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
/**
|
|
150
|
-
* The name of the icon to display.
|
|
151
|
-
*/
|
|
152
|
-
name: IconPathName | "";
|
|
153
|
-
render(): lit_html.TemplateResult<1>;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export { LeuIcon };
|
|
1
|
+
import 'lit-html';
|
|
2
|
+
import 'lit';
|
|
3
|
+
import './LeuElement.d-BevHqLUu.js';
|
|
4
|
+
export { L as LeuIcon } from './Icon.d-itcQ94ym.js';
|
package/dist/Icon.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as __decorate } from './_tslib-CNEFicEt.js';
|
|
2
2
|
import { css, html, svg } from 'lit';
|
|
3
3
|
import { property } from 'lit/decorators.js';
|
|
4
|
-
import { L as LeuElement } from './LeuElement-
|
|
4
|
+
import { L as LeuElement } from './LeuElement-DfsEye-A.js';
|
|
5
5
|
|
|
6
6
|
var css_248z = css`:host {
|
|
7
7
|
display: contents;
|
|
@@ -182,9 +182,6 @@ class LeuIcon extends LeuElement {
|
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
LeuIcon.styles = [LeuElement.styles, css_248z];
|
|
185
|
-
LeuIcon.properties = {
|
|
186
|
-
name: { type: String, reflect: true },
|
|
187
|
-
};
|
|
188
185
|
__decorate([
|
|
189
186
|
property({ type: String, reflect: true })
|
|
190
187
|
], LeuIcon.prototype, "name", void 0);
|
package/dist/Input.d.ts
CHANGED
|
@@ -1,37 +1,18 @@
|
|
|
1
1
|
import * as lit_html from 'lit-html';
|
|
2
|
+
import * as lit_html_directives_ref_js from 'lit-html/directives/ref.js';
|
|
2
3
|
import * as lit from 'lit';
|
|
3
4
|
import { nothing } from 'lit';
|
|
4
5
|
import { L as LeuElement } from './LeuElement.d-BevHqLUu.js';
|
|
5
|
-
import { LeuIcon } from './Icon.js';
|
|
6
|
+
import { L as LeuIcon, I as IconPathName } from './Icon.d-itcQ94ym.js';
|
|
6
7
|
|
|
7
8
|
declare const SIZES: Readonly<{
|
|
8
9
|
SMALL: "small";
|
|
9
10
|
REGULAR: "regular";
|
|
10
11
|
}>;
|
|
12
|
+
type InputType = "date" | "datetime-local" | "email" | "month" | "number" | "password" | "search" | "tel" | "text" | "time" | "week";
|
|
11
13
|
/**
|
|
12
14
|
* A text input element.
|
|
13
15
|
*
|
|
14
|
-
* @prop {boolean} disabled - Disables the input element.
|
|
15
|
-
* @prop {boolean} required - Marks the input element as required.
|
|
16
|
-
* @prop {boolean} clearable - Adds a button to clear the input element.
|
|
17
|
-
* @prop {string} value - The value of the input element.
|
|
18
|
-
* @prop {string} name - The name of the input element.
|
|
19
|
-
* @prop {string} label - The label of the input element.
|
|
20
|
-
* @prop {string} error - A custom error that is completely independent of the validity state. Useful for displaying server side errors.
|
|
21
|
-
* @prop {string} size - The size of the input element.
|
|
22
|
-
* @prop {string} icon - The icon that is displayed at the end of the input element.
|
|
23
|
-
* @prop {string} prefix - A prefix that relates to the value of the input (e.g. CHF).
|
|
24
|
-
* @prop {string} suffix - A suffix that relates to the value of the input (e.g. mm).
|
|
25
|
-
* @prop {string} pattern - A regular expression that the value is checked against.
|
|
26
|
-
* @prop {string} type - The type of the input element.
|
|
27
|
-
* @prop {string} min - The minimum value of the input element.
|
|
28
|
-
* @prop {string} max - The maximum value of the input element.
|
|
29
|
-
* @prop {string} minlength - The minimum length of the input element.
|
|
30
|
-
* @prop {string} maxlength - The maximum length of the input element.
|
|
31
|
-
* @prop {object} validationMessages - Custom validation messages. The key is the name of the validity state and the value is the message.
|
|
32
|
-
* @prop {boolean} novalidate - Disables the browser's validation.
|
|
33
|
-
* @prop {string} step - The step value of the input element.
|
|
34
|
-
*
|
|
35
16
|
* @fires {CustomEvent} input - Dispatched when the value of the input element changes.
|
|
36
17
|
* @fires {CustomEvent} change - Dispatched when the value of the input element changes and the input element loses focus.
|
|
37
18
|
*
|
|
@@ -53,92 +34,49 @@ declare class LeuInput extends LeuElement {
|
|
|
53
34
|
customElements?: CustomElementRegistry;
|
|
54
35
|
registry?: CustomElementRegistry;
|
|
55
36
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
icon: {
|
|
98
|
-
type: StringConstructor;
|
|
99
|
-
reflect: boolean;
|
|
100
|
-
};
|
|
101
|
-
pattern: {
|
|
102
|
-
type: StringConstructor;
|
|
103
|
-
reflect: boolean;
|
|
104
|
-
};
|
|
105
|
-
type: {
|
|
106
|
-
type: StringConstructor;
|
|
107
|
-
reflect: boolean;
|
|
108
|
-
};
|
|
109
|
-
min: {
|
|
110
|
-
type: StringConstructor;
|
|
111
|
-
reflect: boolean;
|
|
112
|
-
};
|
|
113
|
-
max: {
|
|
114
|
-
type: StringConstructor;
|
|
115
|
-
reflect: boolean;
|
|
116
|
-
};
|
|
117
|
-
maxlength: {
|
|
118
|
-
type: StringConstructor;
|
|
119
|
-
reflect: boolean;
|
|
120
|
-
};
|
|
121
|
-
minlength: {
|
|
122
|
-
type: StringConstructor;
|
|
123
|
-
reflect: boolean;
|
|
124
|
-
};
|
|
125
|
-
validationMessages: {
|
|
126
|
-
type: ObjectConstructor;
|
|
127
|
-
};
|
|
128
|
-
novalidate: {
|
|
129
|
-
type: BooleanConstructor;
|
|
130
|
-
reflect: boolean;
|
|
131
|
-
};
|
|
132
|
-
step: {
|
|
133
|
-
type: StringConstructor;
|
|
134
|
-
reflect: boolean;
|
|
135
|
-
};
|
|
136
|
-
_validity: {
|
|
137
|
-
state: boolean;
|
|
138
|
-
};
|
|
139
|
-
};
|
|
37
|
+
/** Disables the input element. */
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
/** Marks the input element as required */
|
|
40
|
+
required: boolean;
|
|
41
|
+
/** Adds a button to clear the input element */
|
|
42
|
+
clearable: boolean;
|
|
43
|
+
/** The value of the input element. */
|
|
44
|
+
value: string;
|
|
45
|
+
/** The name of the input element. */
|
|
46
|
+
name: string;
|
|
47
|
+
/** A custom error that is completely independent of the validity state. Useful for displaying server side errors. */
|
|
48
|
+
error: string;
|
|
49
|
+
/** The label of the input element */
|
|
50
|
+
label: string;
|
|
51
|
+
/** A prefix that relates to the value of the input (e.g. CHF) */
|
|
52
|
+
prefix: string;
|
|
53
|
+
/** A suffix that relates to the value of the input (e.g. mm). */
|
|
54
|
+
suffix: string;
|
|
55
|
+
/** The size of the input element */
|
|
56
|
+
size: "small" | "regular";
|
|
57
|
+
/** The icon that is displayed at the end of the input element */
|
|
58
|
+
icon: IconPathName;
|
|
59
|
+
/** A regular expression that the value is checked against. */
|
|
60
|
+
pattern: string;
|
|
61
|
+
/** The type of the input element. */
|
|
62
|
+
type: InputType;
|
|
63
|
+
/** The minimum value of the input element. */
|
|
64
|
+
min: number;
|
|
65
|
+
/** The maximum value of the input element. */
|
|
66
|
+
max: number;
|
|
67
|
+
/** The step value of the input element. */
|
|
68
|
+
step: number;
|
|
69
|
+
/** The maximum length of the input element. */
|
|
70
|
+
maxlength: number;
|
|
71
|
+
/** The minimum length of the input element. */
|
|
72
|
+
minlength: number;
|
|
73
|
+
/** Custom validation messages. The key is the name of the validity state and the value is the message. */
|
|
74
|
+
validationMessages: Record<string, string>;
|
|
75
|
+
/** Disables the browser's validation. */
|
|
76
|
+
novalidate: boolean;
|
|
77
|
+
_validity: ValidityState | null;
|
|
140
78
|
static resolveErrorMessage(message: any, refernceValue: any): any;
|
|
141
|
-
|
|
79
|
+
protected _inputRef: lit_html_directives_ref_js.Ref<HTMLInputElement>;
|
|
142
80
|
get valueAsNumber(): number;
|
|
143
81
|
/**
|
|
144
82
|
* Method for handling the click event of the wrapper element.
|
|
@@ -147,56 +85,47 @@ declare class LeuInput extends LeuElement {
|
|
|
147
85
|
* looks like the input element. But the actual input field does not
|
|
148
86
|
* completely fill the wrapper element. Keyboard events don't need to be
|
|
149
87
|
* handled because the actual input element is focusable.
|
|
150
|
-
* @private
|
|
151
|
-
* @param {MouseEvent|PointerEvent} event
|
|
152
|
-
* @returns {void}
|
|
153
88
|
*/
|
|
154
|
-
handleWrapperClick(event:
|
|
89
|
+
protected handleWrapperClick(event: MouseEvent | PointerEvent): void;
|
|
155
90
|
/**
|
|
156
91
|
* Method for handling the blur event of the input element.
|
|
157
92
|
* Checks validity of the input element and sets the validity state.
|
|
158
|
-
* @private
|
|
159
|
-
* @param {FocusEvent & {target: HTMLInputElement}} event
|
|
160
|
-
* @returns {void}
|
|
161
93
|
*/
|
|
162
|
-
handleBlur(event:
|
|
94
|
+
protected handleBlur(event: FocusEvent & {
|
|
95
|
+
target: HTMLInputElement;
|
|
96
|
+
}): void;
|
|
163
97
|
/**
|
|
164
98
|
* Method for handling the invalid event of the input element.
|
|
165
99
|
* Sets the validity state.
|
|
166
|
-
* @private
|
|
167
|
-
* @param {Event} event
|
|
168
|
-
* @returns {void}
|
|
169
100
|
*/
|
|
170
|
-
handleInvalid(event:
|
|
101
|
+
protected handleInvalid(event: Event & {
|
|
102
|
+
target: HTMLInputElement;
|
|
103
|
+
}): void;
|
|
171
104
|
/**
|
|
172
105
|
* Method for handling the change event of the input element.
|
|
173
106
|
* Sets the value property and dispatches a change event so that
|
|
174
107
|
* the event can be handled outside the shadow DOM.
|
|
175
|
-
* @private
|
|
176
|
-
* @param {Event} event
|
|
177
108
|
* @fires {CustomEvent} change
|
|
178
|
-
* @returns {void}
|
|
179
109
|
*/
|
|
180
|
-
handleChange(event:
|
|
110
|
+
protected handleChange(event: Event & {
|
|
111
|
+
target: HTMLInputElement;
|
|
112
|
+
}): void;
|
|
181
113
|
/**
|
|
182
114
|
* Method for handling the input event of the input element.
|
|
183
115
|
* Sets the value property and dispatches an input event so that
|
|
184
116
|
* the event can be handled outside the shadow DOM.
|
|
185
|
-
* @private
|
|
186
|
-
* @param {Event} event
|
|
187
|
-
* @returns {void}
|
|
188
117
|
*/
|
|
189
|
-
handleInput(event:
|
|
118
|
+
protected handleInput(event: Event & {
|
|
119
|
+
target: HTMLInputElement;
|
|
120
|
+
}): void;
|
|
190
121
|
/**
|
|
191
122
|
* Method for clearing the input element.
|
|
192
123
|
* Sets the value property to an empty string and dispatches
|
|
193
124
|
* an input and a change event.
|
|
194
|
-
* @private
|
|
195
|
-
* @returns {void}
|
|
196
125
|
* @fires {CustomEvent} input
|
|
197
126
|
* @fires {CustomEvent} change
|
|
198
127
|
*/
|
|
199
|
-
clear(): void;
|
|
128
|
+
protected clear(): void;
|
|
200
129
|
/**
|
|
201
130
|
* Merge custom and default validation messages.
|
|
202
131
|
* A validation message can be a function or a string.
|
|
@@ -205,29 +134,32 @@ declare class LeuInput extends LeuElement {
|
|
|
205
134
|
* e.g.
|
|
206
135
|
* `tooLong(this.maxlength)`
|
|
207
136
|
* This way the framework user can create reasonable validation messages
|
|
208
|
-
*
|
|
209
|
-
* @returns {Object} validationMessages
|
|
210
137
|
*/
|
|
211
|
-
getValidationMessages():
|
|
138
|
+
protected getValidationMessages(): {
|
|
139
|
+
badInput: string;
|
|
140
|
+
patternMismatch: string;
|
|
141
|
+
rangeOverflow: (max: any) => string;
|
|
142
|
+
rangeUnderflow: (min: any) => string;
|
|
143
|
+
stepMismatch: string;
|
|
144
|
+
tooLong: (maxlength: any) => string;
|
|
145
|
+
tooShort: (minlength: any) => string;
|
|
146
|
+
typeMismatch: string;
|
|
147
|
+
valueMissing: string;
|
|
148
|
+
};
|
|
212
149
|
isInvalid(): boolean;
|
|
213
150
|
/**
|
|
214
151
|
* Check input validation
|
|
215
|
-
* @returns {boolean} if valid or not
|
|
216
152
|
*/
|
|
217
|
-
checkValidity():
|
|
153
|
+
checkValidity(): boolean;
|
|
218
154
|
/**
|
|
219
155
|
* Creates an error list with an item for the given validity state.
|
|
220
|
-
* @returns {import("lit").TemplateResult | nothing}
|
|
221
156
|
*/
|
|
222
|
-
renderErrorMessages(): typeof nothing | lit_html.TemplateResult<1>;
|
|
157
|
+
protected renderErrorMessages(): typeof nothing | lit_html.TemplateResult<1>;
|
|
223
158
|
/**
|
|
224
159
|
* Determines the content that is displayed after the input element.
|
|
225
160
|
* This can be either an icon, a clear button or an error indicator icon.
|
|
226
|
-
*
|
|
227
|
-
* @private
|
|
228
|
-
* @returns {import("lit").TemplateResult | nothing}
|
|
229
161
|
*/
|
|
230
|
-
renderAfterContent(): typeof nothing | lit_html.TemplateResult<1>;
|
|
162
|
+
protected renderAfterContent(): typeof nothing | lit_html.TemplateResult<1>;
|
|
231
163
|
render(): lit_html.TemplateResult<1>;
|
|
232
164
|
}
|
|
233
165
|
|