ApplicationImpl cleanup, part 1:
[chromium-blink-merge.git] / third_party / polymer / v1_0 / components-chromium / paper-input / paper-input.html
blobaa5be24b5276d1a194c9254e25e0e8962a6a6778
1 <!--
2 @license
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9 --><html><head><link rel="import" href="../polymer/polymer.html">
10 <link rel="import" href="../iron-input/iron-input.html">
11 <link rel="import" href="../iron-form-element-behavior/iron-form-element-behavior.html">
12 <link rel="import" href="paper-input-behavior.html">
13 <link rel="import" href="paper-input-container.html">
14 <link rel="import" href="paper-input-error.html">
15 <link rel="import" href="paper-input-char-counter.html">
17 <!--
18 `<paper-input>` is a single-line text field with Material Design styling.
20 <paper-input label="Input label"></paper-input>
22 It may include an optional error message or character counter.
24 <paper-input error-message="Invalid input!" label="Input label"></paper-input>
25 <paper-input char-counter label="Input label"></paper-input>
27 See `Polymer.PaperInputBehavior` for more API docs.
29 ### Styling
31 See `Polymer.PaperInputContainer` for a list of custom properties used to
32 style this element.
34 @group Paper Elements
35 @element paper-input
36 @hero hero.svg
37 @demo demo/index.html
38 -->
40 </head><body><dom-module id="paper-input">
42 <style>
44 :host {
45 display: block;
48 input::-webkit-input-placeholder {
49 color: var(--paper-input-container-color, --secondary-text-color);
52 input:-moz-placeholder {
53 color: var(--paper-input-container-color, --secondary-text-color);
56 input::-moz-placeholder {
57 color: var(--paper-input-container-color, --secondary-text-color);
60 input:-ms-input-placeholder {
61 color: var(--paper-input-container-color, --secondary-text-color);
64 </style>
66 <template>
68 <paper-input-container no-label-float="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]">
70 <label hidden$="[[!label]]">[[label]]</label>
72 <input is="iron-input" id="input" aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" disabled$="[[disabled]]" bind-value="{{value}}" invalid="{{invalid}}" prevent-invalid-input="[[preventInvalidInput]]" allowed-pattern="[[allowedPattern]]" validator="[[validator]]" type$="[[type]]" pattern$="[[pattern]]" maxlength$="[[maxlength]]" required$="[[required]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" minlength$="[[minlength]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" list$="[[list]]" size$="[[size]]" autocapitalize$="[[autocapitalize]]" autocorrect$="[[autocorrect]]">
74 <template is="dom-if" if="[[errorMessage]]">
75 <paper-input-error>[[errorMessage]]</paper-input-error>
76 </template>
78 <template is="dom-if" if="[[charCounter]]">
79 <paper-input-char-counter></paper-input-char-counter>
80 </template>
82 </paper-input-container>
84 </template>
86 </dom-module>
88 <script src="paper-input-extracted.js"></script></body></html>