@maggioli-design-system/mds-input 1.0.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/dist/cjs/index-3aa055da.js +1207 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/mds-input.cjs.entry.js +162 -0
- package/dist/cjs/mds-input.cjs.js +19 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/mds-input/mds-input.css +482 -0
- package/dist/collection/components/mds-input/mds-input.js +586 -0
- package/dist/collection/components/mds-input/meta/interfaces.js +1 -0
- package/dist/collection/components/mds-input/test/mds-input.stories.js +165 -0
- package/dist/collection/dictionary/autocomplete.js +59 -0
- package/dist/collection/dictionary/button.js +26 -0
- package/dist/collection/dictionary/color.js +19 -0
- package/dist/collection/dictionary/icon.js +3 -0
- package/dist/collection/dictionary/input-text-type.js +13 -0
- package/dist/collection/dictionary/loading.js +5 -0
- package/dist/collection/dictionary/typography.js +43 -0
- package/dist/collection/dictionary/variant.js +65 -0
- package/dist/collection/fixtures/cities.js +110 -0
- package/dist/collection/interface/input-value.js +1 -0
- package/dist/collection/types/autocomplete.js +1 -0
- package/dist/collection/types/button.js +1 -0
- package/dist/collection/types/form-rel.js +1 -0
- package/dist/collection/types/input-text-type.js +1 -0
- package/dist/collection/types/input-value-type.js +1 -0
- package/dist/collection/types/loading.js +1 -0
- package/dist/collection/types/typography.js +1 -0
- package/dist/collection/types/variant.js +1 -0
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +1 -0
- package/dist/components/mds-input.d.ts +11 -0
- package/dist/components/mds-input.js +200 -0
- package/dist/esm/index-2cdf06e7.js +1179 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/mds-input.entry.js +158 -0
- package/dist/esm/mds-input.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm-es5/index-2cdf06e7.js +1 -0
- package/dist/esm-es5/index.js +0 -0
- package/dist/esm-es5/loader.js +1 -0
- package/dist/esm-es5/mds-input.entry.js +1 -0
- package/dist/esm-es5/mds-input.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/mds-input/index.esm.js +0 -0
- package/dist/mds-input/mds-input.esm.js +1 -0
- package/dist/mds-input/mds-input.js +130 -0
- package/dist/mds-input/p-132bdeae.system.entry.js +1 -0
- package/dist/mds-input/p-275873d7.entry.js +1 -0
- package/dist/mds-input/p-50ea2036.system.js +1 -0
- package/dist/mds-input/p-8bdf82a6.js +1 -0
- package/dist/mds-input/p-91d946fe.system.js +1 -0
- package/dist/mds-input/p-992602db.system.js +1 -0
- package/dist/stats.json +1424 -0
- package/dist/types/components/mds-input/meta/interfaces.d.ts +4 -0
- package/dist/types/components.d.ts +218 -0
- package/dist/types/dictionary/autocomplete.d.ts +2 -0
- package/dist/types/dictionary/button.d.ts +5 -0
- package/dist/types/dictionary/color.d.ts +3 -0
- package/dist/types/dictionary/icon.d.ts +2 -0
- package/dist/types/dictionary/input-text-type.d.ts +2 -0
- package/dist/types/dictionary/loading.d.ts +2 -0
- package/dist/types/dictionary/typography.d.ts +6 -0
- package/dist/types/dictionary/variant.d.ts +9 -0
- package/dist/types/fixtures/cities.d.ts +2 -0
- package/dist/types/interface/input-value.d.ts +4 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/types/autocomplete.d.ts +2 -0
- package/dist/types/types/button.d.ts +4 -0
- package/dist/types/types/form-rel.d.ts +1 -0
- package/dist/types/types/input-text-type.d.ts +1 -0
- package/dist/types/types/input-value-type.d.ts +1 -0
- package/dist/types/types/loading.d.ts +1 -0
- package/dist/types/types/typography.d.ts +5 -0
- package/dist/types/types/variant.d.ts +10 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +46 -0
- package/readme.md +97 -0
- package/src/components/mds-input/css/mds-input-variant.css +65 -0
- package/src/components/mds-input/mds-input.css +133 -0
- package/src/components/mds-input/mds-input.tsx +294 -0
- package/src/components/mds-input/meta/interfaces.ts +5 -0
- package/src/components/mds-input/readme.md +77 -0
- package/src/components/mds-input/test/mds-input.e2e.ts +12 -0
- package/src/components/mds-input/test/mds-input.spec.tsx +19 -0
- package/src/components/mds-input/test/mds-input.stories.js +165 -0
- package/src/components.d.ts +218 -0
- package/src/dictionary/autocomplete.ts +62 -0
- package/src/dictionary/button.ts +35 -0
- package/src/dictionary/color.ts +24 -0
- package/src/dictionary/icon.ts +5 -0
- package/src/dictionary/input-text-type.ts +17 -0
- package/src/dictionary/loading.ts +9 -0
- package/src/dictionary/typography.ts +54 -0
- package/src/dictionary/variant.ts +82 -0
- package/src/fixtures/cities.ts +116 -0
- package/src/interface/input-value.ts +5 -0
- package/src/types/autocomplete.ts +69 -0
- package/src/types/button.ts +24 -0
- package/src/types/form-rel.ts +11 -0
- package/src/types/input-text-type.ts +11 -0
- package/src/types/input-value-type.ts +5 -0
- package/src/types/loading.ts +3 -0
- package/src/types/typography.ts +41 -0
- package/src/types/variant.ts +73 -0
- package/www/build/index.esm.js +0 -0
- package/www/build/mds-input.esm.js +1 -0
- package/www/build/mds-input.js +130 -0
- package/www/build/p-132bdeae.system.entry.js +1 -0
- package/www/build/p-275873d7.entry.js +1 -0
- package/www/build/p-50ea2036.system.js +1 -0
- package/www/build/p-8bdf82a6.js +1 -0
- package/www/build/p-91d946fe.system.js +1 -0
- package/www/build/p-992602db.system.js +1 -0
- package/www/host.config.json +15 -0
|
@@ -0,0 +1,586 @@
|
|
|
1
|
+
import { Component, Element, Event, Host, Method, Prop, State, Watch, h, } from '@stencil/core';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
export class MdsInput {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.hasFocus = false;
|
|
6
|
+
/**
|
|
7
|
+
* Specifies whether the element should have autocomplete enabled
|
|
8
|
+
*/
|
|
9
|
+
this.autocomplete = 'off';
|
|
10
|
+
/**
|
|
11
|
+
* Specifies that the element should automatically get focus when the page loads
|
|
12
|
+
*/
|
|
13
|
+
this.autofocus = false;
|
|
14
|
+
/**
|
|
15
|
+
* If true, the element is displayed as disabled
|
|
16
|
+
*/
|
|
17
|
+
this.disabled = false;
|
|
18
|
+
/**
|
|
19
|
+
* Specifies that the element is read-only
|
|
20
|
+
*/
|
|
21
|
+
this.readonly = false;
|
|
22
|
+
/**
|
|
23
|
+
* Specifies that the element must be filled out before submitting the form
|
|
24
|
+
*/
|
|
25
|
+
this.required = false;
|
|
26
|
+
/**
|
|
27
|
+
* Specifies the type of input element
|
|
28
|
+
*/
|
|
29
|
+
this.type = 'text';
|
|
30
|
+
/**
|
|
31
|
+
* Specifies the value of the input element
|
|
32
|
+
*/
|
|
33
|
+
this.value = '';
|
|
34
|
+
this.onInput = (ev) => {
|
|
35
|
+
const input = ev.target;
|
|
36
|
+
if (input) {
|
|
37
|
+
this.value = input.value || '';
|
|
38
|
+
}
|
|
39
|
+
this.keyDownEvent.emit(ev);
|
|
40
|
+
};
|
|
41
|
+
this.onBlur = () => {
|
|
42
|
+
this.hasFocus = false;
|
|
43
|
+
this.blurEvent.emit();
|
|
44
|
+
};
|
|
45
|
+
this.onFocus = (ev) => {
|
|
46
|
+
const input = ev.target;
|
|
47
|
+
this.hasFocus = true;
|
|
48
|
+
this.focusEvent.emit();
|
|
49
|
+
if (this.readonly) {
|
|
50
|
+
// setTimeout to avoid Safari 14.1.2
|
|
51
|
+
// to unselect text when mouse is clicked slowly
|
|
52
|
+
setTimeout(() => {
|
|
53
|
+
input.select();
|
|
54
|
+
}, 10);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
componentWillLoad() {
|
|
59
|
+
// If the mds-input has a tabindex attribute we get the value
|
|
60
|
+
// and pass it down to the native input, then remove it from the
|
|
61
|
+
// mds-input to avoid causing tabbing twice on the same element
|
|
62
|
+
if (this.el.hasAttribute('tabindex')) {
|
|
63
|
+
const tabindex = this.el.getAttribute('tabindex');
|
|
64
|
+
this.tabindex = tabindex !== null ? parseInt(tabindex) : undefined;
|
|
65
|
+
this.el.removeAttribute('tabindex');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Emits the change event when the component value changes
|
|
70
|
+
*/
|
|
71
|
+
valueChanged() {
|
|
72
|
+
this.changeEvent.emit({ value: this.value === null ? this.value : this.value.toString() });
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Sets focus on the specified `my-input`.
|
|
76
|
+
* Use this method instead
|
|
77
|
+
* of the global `input.focus()`.
|
|
78
|
+
*/
|
|
79
|
+
async setFocus() {
|
|
80
|
+
if (this.nativeInput !== null) {
|
|
81
|
+
this.nativeInput.focus();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Returns the native `<input>` element used under the hood.
|
|
86
|
+
*/
|
|
87
|
+
getInputElement() {
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
89
|
+
return Promise.resolve(this.nativeInput);
|
|
90
|
+
}
|
|
91
|
+
getValue() {
|
|
92
|
+
return typeof this.value === 'number' ? this.value.toString() : (this.value || '').toString();
|
|
93
|
+
}
|
|
94
|
+
render() {
|
|
95
|
+
const value = this.getValue();
|
|
96
|
+
return (h(Host, null,
|
|
97
|
+
this.type === 'textarea'
|
|
98
|
+
? h("textarea", { class: clsx('input', this.icon && 'has-icon'), autoFocus: this.autofocus, disabled: this.disabled, maxLength: this.maxlength, minLength: this.minlength, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, placeholder: this.placeholder || '', readOnly: this.readonly, ref: input => (this.nativeInput = input), required: this.required, tabIndex: this.tabindex, value: value })
|
|
99
|
+
: h("input", { class: clsx('input', this.icon && 'has-icon'), autoComplete: this.autocomplete, autoFocus: this.autofocus, disabled: this.disabled, max: this.max, maxLength: this.maxlength, min: this.min, minLength: this.minlength, name: this.name, onBlur: this.onBlur, onFocus: this.onFocus, onInput: this.onInput, pattern: this.pattern, list: this.datalist && 'datalist', placeholder: this.placeholder || '', readOnly: this.readonly, ref: input => (this.nativeInput = input), required: this.required, step: this.step, tabIndex: this.tabindex, type: this.type, value: value }),
|
|
100
|
+
this.required && h("mds-text", { typography: "option", class: "tip top-1 required" }, "Obbligatorio"),
|
|
101
|
+
this.disabled && h("mds-text", { typography: "option", class: "tip top-1 disabled" }, "Disabilitato"),
|
|
102
|
+
this.readonly && h("mds-text", { typography: "option", class: "tip top-1 read-only" }, "Sola lettura"),
|
|
103
|
+
this.variant && this.variantTip && h("mds-text", { typography: "option", class: "tip-variant bottom-1" }, this.variantTip),
|
|
104
|
+
this.datalist &&
|
|
105
|
+
h("datalist", { id: "datalist", class: "datalist" }, this.datalist.forEach(element => {
|
|
106
|
+
h("option", { value: element });
|
|
107
|
+
})),
|
|
108
|
+
this.icon && h("mds-icon", { class: clsx('icon', this.variant), name: this.icon })));
|
|
109
|
+
}
|
|
110
|
+
static get is() { return "mds-input"; }
|
|
111
|
+
static get encapsulation() { return "shadow"; }
|
|
112
|
+
static get originalStyleUrls() { return {
|
|
113
|
+
"$": ["mds-input.css"]
|
|
114
|
+
}; }
|
|
115
|
+
static get styleUrls() { return {
|
|
116
|
+
"$": ["mds-input.css"]
|
|
117
|
+
}; }
|
|
118
|
+
static get properties() { return {
|
|
119
|
+
"autocomplete": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"mutable": false,
|
|
122
|
+
"complexType": {
|
|
123
|
+
"original": "AutocompleteType",
|
|
124
|
+
"resolved": "\"additional-name\" | \"address\" | \"address-level1\" | \"address-level2\" | \"address-level3\" | \"address-level4\" | \"address-line1\" | \"address-line2\" | \"address-line3\" | \"bday\" | \"bday-day\" | \"bday-month\" | \"bday-year\" | \"cc-additional-name\" | \"cc-csc\" | \"cc-exp\" | \"cc-exp-month\" | \"cc-exp-year\" | \"cc-family-name\" | \"cc-given-name\" | \"cc-name\" | \"cc-number\" | \"cc-type\" | \"country\" | \"country-name\" | \"current-password\" | \"email\" | \"family-name\" | \"given-name\" | \"honorific-prefix\" | \"honorific-suffix\" | \"impp\" | \"language\" | \"name\" | \"new-password\" | \"nickname\" | \"off\" | \"on\" | \"one-time-code\" | \"organization\" | \"organization-title\" | \"photo\" | \"postal-code\" | \"sex\" | \"street-address\" | \"tel\" | \"tel-area-code\" | \"tel-country-code\" | \"tel-extension\" | \"tel-local\" | \"tel-national\" | \"transaction-amount\" | \"transaction-currency\" | \"url\" | \"username\"",
|
|
125
|
+
"references": {
|
|
126
|
+
"AutocompleteType": {
|
|
127
|
+
"location": "import",
|
|
128
|
+
"path": "../../types/autocomplete"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"required": false,
|
|
133
|
+
"optional": true,
|
|
134
|
+
"docs": {
|
|
135
|
+
"tags": [],
|
|
136
|
+
"text": "Specifies whether the element should have autocomplete enabled"
|
|
137
|
+
},
|
|
138
|
+
"attribute": "autocomplete",
|
|
139
|
+
"reflect": false,
|
|
140
|
+
"defaultValue": "'off'"
|
|
141
|
+
},
|
|
142
|
+
"autofocus": {
|
|
143
|
+
"type": "boolean",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "boolean",
|
|
147
|
+
"resolved": "boolean",
|
|
148
|
+
"references": {}
|
|
149
|
+
},
|
|
150
|
+
"required": false,
|
|
151
|
+
"optional": true,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": "Specifies that the element should automatically get focus when the page loads"
|
|
155
|
+
},
|
|
156
|
+
"attribute": "autofocus",
|
|
157
|
+
"reflect": false,
|
|
158
|
+
"defaultValue": "false"
|
|
159
|
+
},
|
|
160
|
+
"datalist": {
|
|
161
|
+
"type": "unknown",
|
|
162
|
+
"mutable": false,
|
|
163
|
+
"complexType": {
|
|
164
|
+
"original": "string[]",
|
|
165
|
+
"resolved": "string[]",
|
|
166
|
+
"references": {}
|
|
167
|
+
},
|
|
168
|
+
"required": false,
|
|
169
|
+
"optional": true,
|
|
170
|
+
"docs": {
|
|
171
|
+
"tags": [],
|
|
172
|
+
"text": "A list of search terms to be searched from the input field,\nit should be used with type=\"search\" input."
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"disabled": {
|
|
176
|
+
"type": "boolean",
|
|
177
|
+
"mutable": false,
|
|
178
|
+
"complexType": {
|
|
179
|
+
"original": "boolean",
|
|
180
|
+
"resolved": "boolean",
|
|
181
|
+
"references": {}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": true,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": "If true, the element is displayed as disabled"
|
|
188
|
+
},
|
|
189
|
+
"attribute": "disabled",
|
|
190
|
+
"reflect": false,
|
|
191
|
+
"defaultValue": "false"
|
|
192
|
+
},
|
|
193
|
+
"icon": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"mutable": false,
|
|
196
|
+
"complexType": {
|
|
197
|
+
"original": "string",
|
|
198
|
+
"resolved": "string",
|
|
199
|
+
"references": {}
|
|
200
|
+
},
|
|
201
|
+
"required": false,
|
|
202
|
+
"optional": true,
|
|
203
|
+
"docs": {
|
|
204
|
+
"tags": [],
|
|
205
|
+
"text": "An icon displayed at the right of the input"
|
|
206
|
+
},
|
|
207
|
+
"attribute": "icon",
|
|
208
|
+
"reflect": false
|
|
209
|
+
},
|
|
210
|
+
"max": {
|
|
211
|
+
"type": "number",
|
|
212
|
+
"mutable": false,
|
|
213
|
+
"complexType": {
|
|
214
|
+
"original": "number",
|
|
215
|
+
"resolved": "number",
|
|
216
|
+
"references": {}
|
|
217
|
+
},
|
|
218
|
+
"required": false,
|
|
219
|
+
"optional": true,
|
|
220
|
+
"docs": {
|
|
221
|
+
"tags": [],
|
|
222
|
+
"text": "Specifies the maximum value\nuse it with input type=\"number\" or type=\"date\"\nExample: max=\"180\", max=\"2046-12-04\""
|
|
223
|
+
},
|
|
224
|
+
"attribute": "max",
|
|
225
|
+
"reflect": false
|
|
226
|
+
},
|
|
227
|
+
"maxlength": {
|
|
228
|
+
"type": "number",
|
|
229
|
+
"mutable": false,
|
|
230
|
+
"complexType": {
|
|
231
|
+
"original": "number",
|
|
232
|
+
"resolved": "number",
|
|
233
|
+
"references": {}
|
|
234
|
+
},
|
|
235
|
+
"required": false,
|
|
236
|
+
"optional": true,
|
|
237
|
+
"docs": {
|
|
238
|
+
"tags": [],
|
|
239
|
+
"text": "Specifies the maximum number of characters allowed in an element\nuse it with input type=\"number\""
|
|
240
|
+
},
|
|
241
|
+
"attribute": "maxlength",
|
|
242
|
+
"reflect": false
|
|
243
|
+
},
|
|
244
|
+
"min": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"mutable": false,
|
|
247
|
+
"complexType": {
|
|
248
|
+
"original": "string",
|
|
249
|
+
"resolved": "string",
|
|
250
|
+
"references": {}
|
|
251
|
+
},
|
|
252
|
+
"required": false,
|
|
253
|
+
"optional": true,
|
|
254
|
+
"docs": {
|
|
255
|
+
"tags": [],
|
|
256
|
+
"text": "Specifies the minimum value\nuse it with input type=\"number\" or type=\"date\"\nExample: min=\"-3\", min=\"1988-04-15\""
|
|
257
|
+
},
|
|
258
|
+
"attribute": "min",
|
|
259
|
+
"reflect": false
|
|
260
|
+
},
|
|
261
|
+
"minlength": {
|
|
262
|
+
"type": "number",
|
|
263
|
+
"mutable": false,
|
|
264
|
+
"complexType": {
|
|
265
|
+
"original": "number",
|
|
266
|
+
"resolved": "number",
|
|
267
|
+
"references": {}
|
|
268
|
+
},
|
|
269
|
+
"required": false,
|
|
270
|
+
"optional": true,
|
|
271
|
+
"docs": {
|
|
272
|
+
"tags": [],
|
|
273
|
+
"text": "Specifies the minimum number of characters allowed in an element\nuse it with input type=\"number\""
|
|
274
|
+
},
|
|
275
|
+
"attribute": "minlength",
|
|
276
|
+
"reflect": false
|
|
277
|
+
},
|
|
278
|
+
"name": {
|
|
279
|
+
"type": "string",
|
|
280
|
+
"mutable": false,
|
|
281
|
+
"complexType": {
|
|
282
|
+
"original": "string",
|
|
283
|
+
"resolved": "string",
|
|
284
|
+
"references": {}
|
|
285
|
+
},
|
|
286
|
+
"required": false,
|
|
287
|
+
"optional": true,
|
|
288
|
+
"docs": {
|
|
289
|
+
"tags": [],
|
|
290
|
+
"text": "Is needed to reference the form data after the form is submitted"
|
|
291
|
+
},
|
|
292
|
+
"attribute": "name",
|
|
293
|
+
"reflect": false
|
|
294
|
+
},
|
|
295
|
+
"pattern": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"mutable": false,
|
|
298
|
+
"complexType": {
|
|
299
|
+
"original": "string",
|
|
300
|
+
"resolved": "string",
|
|
301
|
+
"references": {}
|
|
302
|
+
},
|
|
303
|
+
"required": false,
|
|
304
|
+
"optional": true,
|
|
305
|
+
"docs": {
|
|
306
|
+
"tags": [],
|
|
307
|
+
"text": "Specifies a regular expression that element\\'s value is checked against"
|
|
308
|
+
},
|
|
309
|
+
"attribute": "pattern",
|
|
310
|
+
"reflect": false
|
|
311
|
+
},
|
|
312
|
+
"placeholder": {
|
|
313
|
+
"type": "string",
|
|
314
|
+
"mutable": false,
|
|
315
|
+
"complexType": {
|
|
316
|
+
"original": "string",
|
|
317
|
+
"resolved": "string",
|
|
318
|
+
"references": {}
|
|
319
|
+
},
|
|
320
|
+
"required": false,
|
|
321
|
+
"optional": true,
|
|
322
|
+
"docs": {
|
|
323
|
+
"tags": [],
|
|
324
|
+
"text": "Specifies a short hint that describes the expected value of the element"
|
|
325
|
+
},
|
|
326
|
+
"attribute": "placeholder",
|
|
327
|
+
"reflect": false
|
|
328
|
+
},
|
|
329
|
+
"readonly": {
|
|
330
|
+
"type": "boolean",
|
|
331
|
+
"mutable": false,
|
|
332
|
+
"complexType": {
|
|
333
|
+
"original": "boolean",
|
|
334
|
+
"resolved": "boolean",
|
|
335
|
+
"references": {}
|
|
336
|
+
},
|
|
337
|
+
"required": false,
|
|
338
|
+
"optional": true,
|
|
339
|
+
"docs": {
|
|
340
|
+
"tags": [],
|
|
341
|
+
"text": "Specifies that the element is read-only"
|
|
342
|
+
},
|
|
343
|
+
"attribute": "readonly",
|
|
344
|
+
"reflect": false,
|
|
345
|
+
"defaultValue": "false"
|
|
346
|
+
},
|
|
347
|
+
"required": {
|
|
348
|
+
"type": "boolean",
|
|
349
|
+
"mutable": false,
|
|
350
|
+
"complexType": {
|
|
351
|
+
"original": "boolean",
|
|
352
|
+
"resolved": "boolean",
|
|
353
|
+
"references": {}
|
|
354
|
+
},
|
|
355
|
+
"required": false,
|
|
356
|
+
"optional": true,
|
|
357
|
+
"docs": {
|
|
358
|
+
"tags": [],
|
|
359
|
+
"text": "Specifies that the element must be filled out before submitting the form"
|
|
360
|
+
},
|
|
361
|
+
"attribute": "required",
|
|
362
|
+
"reflect": false,
|
|
363
|
+
"defaultValue": "false"
|
|
364
|
+
},
|
|
365
|
+
"variant": {
|
|
366
|
+
"type": "string",
|
|
367
|
+
"mutable": false,
|
|
368
|
+
"complexType": {
|
|
369
|
+
"original": "ThemeStatusVariantType",
|
|
370
|
+
"resolved": "\"error\" | \"info\" | \"success\" | \"warning\"",
|
|
371
|
+
"references": {
|
|
372
|
+
"ThemeStatusVariantType": {
|
|
373
|
+
"location": "import",
|
|
374
|
+
"path": "../../types/variant"
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
"required": false,
|
|
379
|
+
"optional": true,
|
|
380
|
+
"docs": {
|
|
381
|
+
"tags": [],
|
|
382
|
+
"text": "Sets the variant of the input field"
|
|
383
|
+
},
|
|
384
|
+
"attribute": "variant",
|
|
385
|
+
"reflect": true
|
|
386
|
+
},
|
|
387
|
+
"variantTip": {
|
|
388
|
+
"type": "string",
|
|
389
|
+
"mutable": false,
|
|
390
|
+
"complexType": {
|
|
391
|
+
"original": "string",
|
|
392
|
+
"resolved": "string",
|
|
393
|
+
"references": {}
|
|
394
|
+
},
|
|
395
|
+
"required": false,
|
|
396
|
+
"optional": true,
|
|
397
|
+
"docs": {
|
|
398
|
+
"tags": [],
|
|
399
|
+
"text": "Sets the word(s) of the variant of the input field"
|
|
400
|
+
},
|
|
401
|
+
"attribute": "variant-tip",
|
|
402
|
+
"reflect": false
|
|
403
|
+
},
|
|
404
|
+
"step": {
|
|
405
|
+
"type": "string",
|
|
406
|
+
"mutable": false,
|
|
407
|
+
"complexType": {
|
|
408
|
+
"original": "string",
|
|
409
|
+
"resolved": "string",
|
|
410
|
+
"references": {}
|
|
411
|
+
},
|
|
412
|
+
"required": false,
|
|
413
|
+
"optional": true,
|
|
414
|
+
"docs": {
|
|
415
|
+
"tags": [],
|
|
416
|
+
"text": "Specifies the interval between legal numbers in an input field"
|
|
417
|
+
},
|
|
418
|
+
"attribute": "step",
|
|
419
|
+
"reflect": false
|
|
420
|
+
},
|
|
421
|
+
"type": {
|
|
422
|
+
"type": "string",
|
|
423
|
+
"mutable": false,
|
|
424
|
+
"complexType": {
|
|
425
|
+
"original": "InputTextType",
|
|
426
|
+
"resolved": "\"date\" | \"email\" | \"number\" | \"password\" | \"search\" | \"tel\" | \"text\" | \"textarea\" | \"time\" | \"url\"",
|
|
427
|
+
"references": {
|
|
428
|
+
"InputTextType": {
|
|
429
|
+
"location": "import",
|
|
430
|
+
"path": "../../types/input-text-type"
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
},
|
|
434
|
+
"required": false,
|
|
435
|
+
"optional": false,
|
|
436
|
+
"docs": {
|
|
437
|
+
"tags": [],
|
|
438
|
+
"text": "Specifies the type of input element"
|
|
439
|
+
},
|
|
440
|
+
"attribute": "type",
|
|
441
|
+
"reflect": false,
|
|
442
|
+
"defaultValue": "'text'"
|
|
443
|
+
},
|
|
444
|
+
"value": {
|
|
445
|
+
"type": "any",
|
|
446
|
+
"mutable": false,
|
|
447
|
+
"complexType": {
|
|
448
|
+
"original": "InputValueType",
|
|
449
|
+
"resolved": "number | string",
|
|
450
|
+
"references": {
|
|
451
|
+
"InputValueType": {
|
|
452
|
+
"location": "import",
|
|
453
|
+
"path": "../../types/input-value-type"
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
"required": false,
|
|
458
|
+
"optional": true,
|
|
459
|
+
"docs": {
|
|
460
|
+
"tags": [],
|
|
461
|
+
"text": "Specifies the value of the input element"
|
|
462
|
+
},
|
|
463
|
+
"attribute": "value",
|
|
464
|
+
"reflect": false,
|
|
465
|
+
"defaultValue": "''"
|
|
466
|
+
}
|
|
467
|
+
}; }
|
|
468
|
+
static get states() { return {
|
|
469
|
+
"hasFocus": {}
|
|
470
|
+
}; }
|
|
471
|
+
static get events() { return [{
|
|
472
|
+
"method": "changeEvent",
|
|
473
|
+
"name": "changeEvent",
|
|
474
|
+
"bubbles": true,
|
|
475
|
+
"cancelable": true,
|
|
476
|
+
"composed": true,
|
|
477
|
+
"docs": {
|
|
478
|
+
"tags": [],
|
|
479
|
+
"text": "Emits an InputChangeEventDetail when the value of the input element changes"
|
|
480
|
+
},
|
|
481
|
+
"complexType": {
|
|
482
|
+
"original": "InputValue",
|
|
483
|
+
"resolved": "InputValue",
|
|
484
|
+
"references": {
|
|
485
|
+
"InputValue": {
|
|
486
|
+
"location": "import",
|
|
487
|
+
"path": "./meta/interfaces"
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}, {
|
|
492
|
+
"method": "keyDownEvent",
|
|
493
|
+
"name": "keyDownEvent",
|
|
494
|
+
"bubbles": true,
|
|
495
|
+
"cancelable": true,
|
|
496
|
+
"composed": true,
|
|
497
|
+
"docs": {
|
|
498
|
+
"tags": [],
|
|
499
|
+
"text": "Emits a KeyboardEvent when a keboard key is pressed on the focused input element"
|
|
500
|
+
},
|
|
501
|
+
"complexType": {
|
|
502
|
+
"original": "KeyboardEvent",
|
|
503
|
+
"resolved": "KeyboardEvent",
|
|
504
|
+
"references": {
|
|
505
|
+
"KeyboardEvent": {
|
|
506
|
+
"location": "global"
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}, {
|
|
511
|
+
"method": "blurEvent",
|
|
512
|
+
"name": "blurEvent",
|
|
513
|
+
"bubbles": true,
|
|
514
|
+
"cancelable": true,
|
|
515
|
+
"composed": true,
|
|
516
|
+
"docs": {
|
|
517
|
+
"tags": [],
|
|
518
|
+
"text": "Emits a void event when input element is blurred"
|
|
519
|
+
},
|
|
520
|
+
"complexType": {
|
|
521
|
+
"original": "void",
|
|
522
|
+
"resolved": "void",
|
|
523
|
+
"references": {}
|
|
524
|
+
}
|
|
525
|
+
}, {
|
|
526
|
+
"method": "focusEvent",
|
|
527
|
+
"name": "focusEvent",
|
|
528
|
+
"bubbles": true,
|
|
529
|
+
"cancelable": true,
|
|
530
|
+
"composed": true,
|
|
531
|
+
"docs": {
|
|
532
|
+
"tags": [],
|
|
533
|
+
"text": "Emits a void event when input element is focused"
|
|
534
|
+
},
|
|
535
|
+
"complexType": {
|
|
536
|
+
"original": "void",
|
|
537
|
+
"resolved": "void",
|
|
538
|
+
"references": {}
|
|
539
|
+
}
|
|
540
|
+
}]; }
|
|
541
|
+
static get methods() { return {
|
|
542
|
+
"setFocus": {
|
|
543
|
+
"complexType": {
|
|
544
|
+
"signature": "() => Promise<void>",
|
|
545
|
+
"parameters": [],
|
|
546
|
+
"references": {
|
|
547
|
+
"Promise": {
|
|
548
|
+
"location": "global"
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
"return": "Promise<void>"
|
|
552
|
+
},
|
|
553
|
+
"docs": {
|
|
554
|
+
"text": "Sets focus on the specified `my-input`.\nUse this method instead\nof the global `input.focus()`.",
|
|
555
|
+
"tags": []
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
"getInputElement": {
|
|
559
|
+
"complexType": {
|
|
560
|
+
"signature": "() => Promise<HTMLInputElement | HTMLTextAreaElement>",
|
|
561
|
+
"parameters": [],
|
|
562
|
+
"references": {
|
|
563
|
+
"Promise": {
|
|
564
|
+
"location": "global"
|
|
565
|
+
},
|
|
566
|
+
"HTMLInputElement": {
|
|
567
|
+
"location": "global"
|
|
568
|
+
},
|
|
569
|
+
"HTMLTextAreaElement": {
|
|
570
|
+
"location": "global"
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
"return": "Promise<HTMLInputElement | HTMLTextAreaElement>"
|
|
574
|
+
},
|
|
575
|
+
"docs": {
|
|
576
|
+
"text": "Returns the native `<input>` element used under the hood.",
|
|
577
|
+
"tags": []
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}; }
|
|
581
|
+
static get elementRef() { return "el"; }
|
|
582
|
+
static get watchers() { return [{
|
|
583
|
+
"propName": "value",
|
|
584
|
+
"methodName": "valueChanged"
|
|
585
|
+
}]; }
|
|
586
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|