forked from PolymerElements/iron-autogrow-textarea
-
Notifications
You must be signed in to change notification settings - Fork 0
/
iron-autogrow-textarea.d.ts
136 lines (116 loc) · 3.34 KB
/
iron-autogrow-textarea.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/**
* DO NOT EDIT
*
* This file was automatically generated by
* https://github.com/Polymer/gen-typescript-declarations
*
* To modify these typings, edit the source file(s):
* iron-autogrow-textarea.html
*/
/// <reference path="../polymer/types/polymer.d.ts" />
/// <reference path="../iron-behaviors/iron-control-state.d.ts" />
/// <reference path="../iron-flex-layout/iron-flex-layout.d.ts" />
/// <reference path="../iron-validatable-behavior/iron-validatable-behavior.d.ts" />
/**
* `iron-autogrow-textarea` is an element containing a textarea that grows in height as more
* lines of input are entered. Unless an explicit height or the `maxRows` property is set, it will
* never scroll.
*
* Example:
*
* <iron-autogrow-textarea></iron-autogrow-textarea>
*
* ### Styling
*
* The following custom properties and mixins are available for styling:
*
* Custom property | Description | Default
* ----------------|-------------|----------
* `--iron-autogrow-textarea` | Mixin applied to the textarea | `{}`
* `--iron-autogrow-textarea-placeholder` | Mixin applied to the textarea placeholder | `{}`
*/
interface IronAutogrowTextareaElement extends Polymer.Element, Polymer.IronValidatableBehavior, Polymer.IronControlState {
/**
* Use this property instead of `bind-value` for two-way data binding.
*/
value: string|number;
/**
* This property is deprecated, and just mirrors `value`. Use `value` instead.
*/
bindValue: string|number;
/**
* The initial number of rows.
*/
rows: number|null|undefined;
/**
* The maximum number of rows this element can grow to until it
* scrolls. 0 means no maximum.
*/
maxRows: number|null|undefined;
/**
* Bound to the textarea's `autocomplete` attribute.
*/
autocomplete: string|null|undefined;
/**
* Bound to the textarea's `autofocus` attribute.
*/
autofocus: boolean|null|undefined;
/**
* Bound to the textarea's `inputmode` attribute.
*/
inputmode: string|null|undefined;
/**
* Bound to the textarea's `placeholder` attribute.
*/
placeholder: string|null|undefined;
/**
* Bound to the textarea's `readonly` attribute.
*/
readonly: string|null|undefined;
/**
* Set to true to mark the textarea as required.
*/
required: boolean|null|undefined;
/**
* The minimum length of the input value.
*/
minlength: number|null|undefined;
/**
* The maximum length of the input value.
*/
maxlength: number|null|undefined;
/**
* Bound to the textarea's `aria-label` attribute.
*/
label: string|null|undefined;
/**
* Returns the underlying textarea.
*/
readonly textarea: HTMLTextAreaElement;
/**
* Returns textarea's selection start.
*/
selectionStart: number;
/**
* Returns textarea's selection end.
*/
selectionEnd: number;
/**
* Returns true if `value` is valid. The validator provided in `validator`
* will be used first, if it exists; otherwise, the `textarea`'s validity
* is used.
*
* @returns True if the value is valid.
*/
validate(): boolean;
attached(): void;
_bindValueChanged(bindValue: any): void;
_valueChanged(value: any): void;
_onInput(event: any): void;
_constrain(tokens: any): any;
_valueForMirror(): any;
_updateCached(): void;
}
interface HTMLElementTagNameMap {
"iron-autogrow-textarea": IronAutogrowTextareaElement;
}