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

Side by Side Diff: third_party/polymer/v1_0/components-chromium/paper-input/paper-input-behavior-extracted.js

Issue 1287713002: [MD settings] merge polymer 1.0.11; hack for settings checkbox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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
3 /**
4 * Use `Polymer.PaperInputBehavior` to implement inputs with `<paper-input-con tainer>`. This 2 * Use `Polymer.PaperInputBehavior` to implement inputs with `<paper-input-con tainer>`. This
5 * behavior is implemented by `<paper-input>`. It exposes a number of properti es from 3 * behavior is implemented by `<paper-input>`. It exposes a number of properti es from
6 * `<paper-input-container>` and `<input is="iron-input">` and they should be bound in your 4 * `<paper-input-container>` and `<input is="iron-input">` and they should be bound in your
7 * template. 5 * template.
8 * 6 *
9 * The input element can be accessed by the `inputElement` property if you nee d to access 7 * The input element can be accessed by the `inputElement` property if you nee d to access
10 * properties or methods that are not exposed. 8 * properties or methods that are not exposed.
11 * @polymerBehavior Polymer.PaperInputBehavior 9 * @polymerBehavior Polymer.PaperInputBehavior
12 */ 10 */
13 Polymer.PaperInputBehaviorImpl = { 11 Polymer.PaperInputBehaviorImpl = {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 /** 89 /**
92 * Set to true to mark the input as required. Bind this to the `<input is= "iron-input">`'s 90 * Set to true to mark the input as required. Bind this to the `<input is= "iron-input">`'s
93 * `required` property. 91 * `required` property.
94 */ 92 */
95 required: { 93 required: {
96 type: Boolean, 94 type: Boolean,
97 value: false 95 value: false
98 }, 96 },
99 97
100 /** 98 /**
101 * The maximum length of the input value. Bind this to the `<input is="iro n-input">`'s
102 * `maxlength` property.
103 */
104 maxlength: {
105 type: Number
106 },
107
108 /**
109 * The error message to display when the input is invalid. Bind this to th e 99 * The error message to display when the input is invalid. Bind this to th e
110 * `<paper-input-error>`'s content, if using. 100 * `<paper-input-error>`'s content, if using.
111 */ 101 */
112 errorMessage: { 102 errorMessage: {
113 type: String 103 type: String
114 }, 104 },
115 105
116 /** 106 /**
117 * Set to true to show a character counter. 107 * Set to true to show a character counter.
118 */ 108 */
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 }, 171 },
182 172
183 /** 173 /**
184 * Bind this to the `<input is="iron-input">`'s `minlength` property. 174 * Bind this to the `<input is="iron-input">`'s `minlength` property.
185 */ 175 */
186 minlength: { 176 minlength: {
187 type: Number 177 type: Number
188 }, 178 },
189 179
190 /** 180 /**
181 * The maximum length of the input value. Bind this to the `<input is="iro n-input">`'s
182 * `maxlength` property.
183 */
184 maxlength: {
185 type: Number
186 },
187
188 /**
189 * The minimum (numeric or date-time) input value.
190 * Bind this to the `<input is="iron-input">`'s `min` property.
191 */
192 min: {
193 type: String
194 },
195
196 /**
197 * The maximum (numeric or date-time) input value.
198 * Can be a String (e.g. `"2000-1-1"`) or a Number (e.g. `2`).
199 * Bind this to the `<input is="iron-input">`'s `max` property.
200 */
201 max: {
202 type: String
203 },
204
205 /**
206 * Limits the numeric or date-time increments.
207 * Bind this to the `<input is="iron-input">`'s `step` property.
208 */
209 step: {
210 type: String
211 },
212
213 /**
191 * Bind this to the `<input is="iron-input">`'s `name` property. 214 * Bind this to the `<input is="iron-input">`'s `name` property.
192 */ 215 */
193 name: { 216 name: {
194 type: String 217 type: String
195 }, 218 },
196 219
197 /** 220 /**
198 * A placeholder string in addition to the label. If this is set, the labe l will always float. 221 * A placeholder string in addition to the label. If this is set, the labe l will always float.
199 */ 222 */
200 placeholder: { 223 placeholder: {
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 } else { 368 } else {
346 labelledBy = 'paper-input-label-' + new Date().getUTCMilliseconds(); 369 labelledBy = 'paper-input-label-' + new Date().getUTCMilliseconds();
347 label.id = labelledBy; 370 label.id = labelledBy;
348 } 371 }
349 this._ariaLabelledBy = labelledBy; 372 this._ariaLabelledBy = labelledBy;
350 } 373 }
351 374
352 }; 375 };
353 376
354 /** @polymerBehavior */ 377 /** @polymerBehavior */
355 Polymer.PaperInputBehavior = [Polymer.IronControlState, Polymer.PaperInputBeha viorImpl]; 378 Polymer.PaperInputBehavior = [Polymer.IronControlState, Polymer.PaperInputBeha viorImpl];
356
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698