Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Side by Side Diff: third_party/polymer/v1_0/components/paper-input/paper-input-behavior.html

Issue 1221923003: Update bower.json for Polymer elements and add PRESUBMIT.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!-- 1 <!--
2 @license 2 @license
3 Copyright (c) 2015 The Polymer Project Authors. All rights reserved. 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.g ithub.io/LICENSE.txt 4 This code may only be used under the BSD style license found at http://polymer.g ithub.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.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/CONTRI BUTORS.txt 6 The complete set of contributors may be found at http://polymer.github.io/CONTRI BUTORS.txt
7 Code distributed by Google as part of the polymer project is also 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/PATEN TS.txt 8 subject to an additional IP rights grant found at http://polymer.github.io/PATEN TS.txt
9 --> 9 -->
10 <link rel="import" href="../polymer/polymer.html"> 10 <link rel="import" href="../polymer/polymer.html">
11 <link rel="import" href="../iron-behaviors/iron-control-state.html">
11 12
12 <script> 13 <script>
13 14
14 /** 15 /**
15 * Use `Polymer.PaperInputBehavior` to implement inputs with `<paper-input-con tainer>`. This 16 * Use `Polymer.PaperInputBehavior` to implement inputs with `<paper-input-con tainer>`. This
16 * behavior is implemented by `<paper-input>`. It exposes a number of properti es from 17 * behavior is implemented by `<paper-input>`. It exposes a number of properti es from
17 * `<paper-input-container>` and `<input is="iron-input">` and they should be bound in your 18 * `<paper-input-container>` and `<input is="iron-input">` and they should be bound in your
18 * template. 19 * template.
19 * 20 *
20 * The input element can be accessed by the `inputElement` property if you nee d to access 21 * The input element can be accessed by the `inputElement` property if you nee d to access
21 * properties or methods that are not exposed. 22 * properties or methods that are not exposed.
22 * @polymerBehavior 23 * @polymerBehavior Polymer.PaperInputBehavior
23 */ 24 */
24 Polymer.PaperInputBehavior = { 25 Polymer.PaperInputBehaviorImpl = {
25 26
26 properties: { 27 properties: {
27 28
28 /** 29 /**
29 * The label for this input. Bind this to `<paper-input-container>`'s `lab el` property. 30 * The label for this input. Bind this to `<paper-input-container>`'s `lab el` property.
30 */ 31 */
31 label: { 32 label: {
32 type: String 33 type: String
33 }, 34 },
34 35
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 78
78 /** 79 /**
79 * The type of the input. The supported types are `text`, `number` and `pa ssword`. Bind this 80 * The type of the input. The supported types are `text`, `number` and `pa ssword`. Bind this
80 * to the `<input is="iron-input">`'s `type` property. 81 * to the `<input is="iron-input">`'s `type` property.
81 */ 82 */
82 type: { 83 type: {
83 type: String 84 type: String
84 }, 85 },
85 86
86 /** 87 /**
88 * The datalist of the input (if any). This should match the id of an exis ting <datalist>. Bind this
89 * to the `<input is="iron-input">`'s `list` property.
90 */
91 list: {
92 type: String
93 },
94
95 /**
87 * A pattern to validate the `input` with. Bind this to the `<input is="ir on-input">`'s 96 * A pattern to validate the `input` with. Bind this to the `<input is="ir on-input">`'s
88 * `pattern` property. 97 * `pattern` property.
89 */ 98 */
90 pattern: { 99 pattern: {
91 type: String 100 type: String
92 }, 101 },
93 102
94 /** 103 /**
95 * Set to true to mark the input as required. Bind this to the `<input is= "iron-input">`'s 104 * Set to true to mark the input as required. Bind this to the `<input is= "iron-input">`'s
96 * `required` property. 105 * `required` property.
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 labelledBy = label.id; 316 labelledBy = label.id;
308 } else { 317 } else {
309 labelledBy = 'paper-input-label-' + new Date().getUTCMilliseconds(); 318 labelledBy = 'paper-input-label-' + new Date().getUTCMilliseconds();
310 label.id = labelledBy; 319 label.id = labelledBy;
311 } 320 }
312 this._ariaLabelledBy = labelledBy; 321 this._ariaLabelledBy = labelledBy;
313 } 322 }
314 323
315 }; 324 };
316 325
326 Polymer.PaperInputBehavior = [Polymer.IronControlState, Polymer.PaperInputBeha viorImpl];
327
317 </script> 328 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698