2 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
3 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
4 The complete set of authors may be found at http://polymer.github.io/AUTHORS
5 The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
6 Code distributed by Google as part of the polymer project is also
7 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
11 `paper-input` is a single- or multi-line text field where user can enter input.
12 It can optionally have a label.
16 <paper-input label="Your Name"></paper-input>
17 <paper-input multiline label="Enter multiple lines here"></paper-input>
22 Set `CoreStyle.g.paperInput.focusedColor` and `CoreStyle.g.paperInput.invalidColor` to theme
23 the focused and invalid states.
30 <link href=
"../polymer/polymer.html" rel=
"import">
31 <link href=
"../core-input/core-input.html" rel=
"import">
32 <link href=
"../core-style/core-style.html" rel=
"import">
34 <core-style id=
"paper-input">
37 #floatedLabel.focused {
38 color: {{g.paperInput.focusedColor}};
41 #underlineHighlight.focused,
43 background-color: {{g.paperInput.focusedColor}};
47 :host(.invalid) #label.focused,
48 :host(.invalid) #floatedLabel.focused {
49 color: {{g.paperInput.invalidColor}};
51 :host(.invalid) #underlineHighlight.focused,
52 :host(.invalid) #caretInner {
53 background-color: {{g.paperInput.invalidColor}};
58 <polymer-element name=
"paper-input" extends=
"core-input" attributes=
"label floatingLabel maxRows error" on-down=
"{{downAction}}" on-up=
"{{upAction}}" assetpath=
"">
62 <link href=
"paper-input.css" rel=
"stylesheet">
64 <core-style ref=
"paper-input"></core-style>
66 <div id=
"floatedLabel" class=
"hidden" hidden?=
"{{!floatingLabel}}"><span id=
"floatedLabelSpan">{{label}}
</span></div>
68 <div id=
"container" on-transitionend=
"{{transitionEndAction}}" on-webkittransitionend=
"{{transitionEndAction}}">
70 <div id=
"label"><span id=
"labelSpan">{{label}}
</span></div>
72 <div id=
"inputContainer">
75 <span id=
"inputCloneSpan" aria-hidden=
"true"> </span>
78 <template if=
"{{multiline}}">
79 <div id=
"minInputHeight"></div>
80 <div id=
"maxInputHeight"></div>
87 <div id=
"underlineContainer">
88 <div id=
"underline"></div>
89 <div id=
"underlineHighlight" class=
"focusedColor"></div>
93 <div id=
"caretInner" class=
"focusedColor"></div>
98 <div id=
"errorContainer">
99 <div id=
"error" role=
"alert" aria-hidden=
"{{!invalid}}">{{error || validationMessage}}
</div>
100 <div id=
"errorIcon"></div>
108 <script src=
"paper-input-extracted.js"></script>