OLD | NEW |
1 <!-- Copyright 2015 The Chromium Authors. All rights reserved. | 1 <!-- Copyright 2015 The Chromium Authors. All rights reserved. |
2 Use of this source code is governed by a BSD-style license that can be | 2 Use of this source code is governed by a BSD-style license that can be |
3 found in the LICENSE file. --> | 3 found in the LICENSE file. --> |
4 | 4 |
5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> |
6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-input/iron-input.h
tml"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-input/iron-input.h
tml"> |
7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
-container.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
-container.html"> |
8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
-error.html"> | 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input
-error.html"> |
9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html
"> | 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html
"> |
10 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> | 10 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> |
(...skipping 16 matching lines...) Expand all Loading... |
27 'isInvalid' - whether input data is invalid. Note: it is not changed | 27 'isInvalid' - whether input data is invalid. Note: it is not changed |
28 automatically. Can be changed manually or with checkValidity() | 28 automatically. Can be changed manually or with checkValidity() |
29 method. | 29 method. |
30 'required' - whether empty field is invalid. | 30 'required' - whether empty field is invalid. |
31 | 31 |
32 Methods: | 32 Methods: |
33 'focus' - focuses input field. | 33 'focus' - focuses input field. |
34 'checkValidity' - returns current validity state of the input form. Updates | 34 'checkValidity' - returns current validity state of the input form. Updates |
35 'isInvalid' at the end. | 35 'isInvalid' at the end. |
36 --> | 36 --> |
37 <dom-module name="gaia-input"> | 37 <dom-module id="gaia-input"> |
38 <link rel="stylesheet" href="gaia_input.css"> | 38 <link rel="stylesheet" href="gaia_input.css"> |
39 | 39 |
40 <template> | 40 <template> |
41 <paper-input-container id="decorator" on-tap="onTap" | 41 <paper-input-container id="decorator" on-tap="onTap" |
42 invalid="[[isInvalid]]" disabled$="[[disabled]]"> | 42 invalid="[[isInvalid]]" disabled$="[[disabled]]"> |
43 <label><span>[[label]]</span></label> | 43 <label><span>[[label]]</span></label> |
44 <div id="container" class="horizontal layout"> | 44 <div id="container" class="horizontal layout"> |
45 <input id="input" is="iron-input" on-keydown="onKeyDown" | 45 <input id="input" is="iron-input" on-keydown="onKeyDown" |
46 bind-value="{{value}}" invalid="[[isInvalid]]" | 46 bind-value="{{value}}" invalid="[[isInvalid]]" |
47 required$="[[required]]" disabled$="[[disabled]]" class="flex"> | 47 required$="[[required]]" disabled$="[[disabled]]" class="flex"> |
48 <span id="domainLabel">[[domain]]</span> | 48 <span id="domainLabel">[[domain]]</span> |
49 </div> | 49 </div> |
50 <template is="dom-if" if="[[error]]"> | 50 <template is="dom-if" if="[[error]]"> |
51 <paper-input-error>[[error]]</paper-input-error> | 51 <paper-input-error>[[error]]</paper-input-error> |
52 </template> | 52 </template> |
53 </paper-input-container> | 53 </paper-input-container> |
54 </template> | 54 </template> |
55 </dom-module> | 55 </dom-module> |
OLD | NEW |