forked from PolymerElements/paper-input
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpaper-input.d.ts
More file actions
83 lines (79 loc) · 3.01 KB
/
paper-input.d.ts
File metadata and controls
83 lines (79 loc) · 3.01 KB
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
/**
* 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):
* paper-input.html
*/
/// <reference path="../polymer/types/polymer.d.ts" />
/// <reference path="../iron-form-element-behavior/iron-form-element-behavior.d.ts" />
/// <reference path="../iron-input/iron-input.d.ts" />
/// <reference path="paper-input-behavior.d.ts" />
/// <reference path="paper-input-char-counter.d.ts" />
/// <reference path="paper-input-container.d.ts" />
/// <reference path="paper-input-error.d.ts" />
/**
* Material design: [Text fields](https://www.google.com/design/spec/components/text-fields.html)
*
* `<paper-input>` is a single-line text field with Material Design styling.
*
* <paper-input label="Input label"></paper-input>
*
* It may include an optional error message or character counter.
*
* <paper-input error-message="Invalid input!" label="Input label"></paper-input>
* <paper-input char-counter label="Input label"></paper-input>
*
* It can also include custom prefix or suffix elements, which are displayed
* before or after the text input itself. In order for an element to be
* considered as a prefix, it must have the `prefix` attribute (and similarly
* for `suffix`).
*
* <paper-input label="total">
* <div prefix>$</div>
* <paper-icon-button slot="suffix" icon="clear"></paper-icon-button>
* </paper-input>
*
* A `paper-input` can use the native `type=search` or `type=file` features.
* However, since we can't control the native styling of the input (search icon,
* file button, date placeholder, etc.), in these cases the label will be
* automatically floated. The `placeholder` attribute can still be used for
* additional informational text.
*
* <paper-input label="search!" type="search"
* placeholder="search for cats" autosave="test" results="5">
* </paper-input>
*
* See `Polymer.PaperInputBehavior` for more API docs.
*
* ### Focus
*
* To focus a paper-input, you can call the native `focus()` method as long as the
* paper input has a tab index. Similarly, `blur()` will blur the element.
*
* ### Styling
*
* See `Polymer.PaperInputContainer` for a list of custom properties used to
* style this element.
*
* The following custom properties and mixins are available for styling:
*
* Custom property | Description | Default
* ----------------|-------------|----------
* `--paper-input-container-ms-clear` | Mixin applied to the Internet Explorer reveal button (the eyeball) | {}
*/
interface PaperInputElement extends Polymer.Element, Polymer.PaperInputBehavior, Polymer.IronFormElementBehavior {
value: string|null|undefined;
/**
* Returns a reference to the focusable element. Overridden from
* PaperInputBehavior to correctly focus the native input.
*/
readonly _focusableElement: HTMLElement;
beforeRegister(): void;
_onIronInputReady(): void;
}
interface HTMLElementTagNameMap {
"paper-input": PaperInputElement;
}