Skip to content

Commit b804029

Browse files
committed
Merge pull request #307 from PolymerElements/fix-docs
add more deets to the behaviour docs
2 parents 8ca01ac + 8395b87 commit b804029

File tree

1 file changed

+87
-47
lines changed

1 file changed

+87
-47
lines changed

paper-input-behavior.html

Lines changed: 87 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,19 @@
3232
*/
3333

3434
/**
35-
* The label for this input. Bind this to `<label>`'s content and `hidden` property, e.g.
35+
* The label for this input. If you're using PaperInputBehavior to
36+
* implement your own paper-input-like element, bind this to
37+
* `<label>`'s content and `hidden` property, e.g.
3638
* `<label hidden$="[[!label]]">[[label]]</label>` in your `template`
3739
*/
3840
label: {
3941
type: String
4042
},
4143

4244
/**
43-
* The value for this input. Bind this to the `<input is="iron-input">`'s `bindValue`
45+
* The value for this input. If you're using PaperInputBehavior to
46+
* implement your own paper-input-like element, bind this to
47+
* the `<input is="iron-input">`'s `bindValue`
4448
* property, or the value property of your input that is `notify:true`.
4549
*/
4650
value: {
@@ -49,18 +53,20 @@
4953
},
5054

5155
/**
52-
* Set to true to disable this input. Bind this to both the `<paper-input-container>`'s
53-
* and the input's `disabled` property.
56+
* Set to true to disable this input. If you're using PaperInputBehavior to
57+
* implement your own paper-input-like element, bind this to
58+
* both the `<paper-input-container>`'s and the input's `disabled` property.
5459
*/
5560
disabled: {
5661
type: Boolean,
5762
value: false
5863
},
5964

6065
/**
61-
* Returns true if the value is invalid. Bind this to both the `<paper-input-container>`'s
62-
* and the input's `invalid` property.
63-
*
66+
* Returns true if the value is invalid. If you're using PaperInputBehavior to
67+
* implement your own paper-input-like element, bind this to both the
68+
* `<paper-input-container>`'s and the input's `invalid` property.
69+
*
6470
* If `autoValidate` is true, the `invalid` attribute is managed automatically,
6571
* which can clobber attempts to manage it manually.
6672
*/
@@ -71,57 +77,65 @@
7177
},
7278

7379
/**
74-
* Set to true to prevent the user from entering invalid input. Bind this to the
75-
* `<input is="iron-input">`'s `preventInvalidInput` property.
80+
* Set to true to prevent the user from entering invalid input. If you're
81+
* using PaperInputBehavior to implement your own paper-input-like element,
82+
* bind this to `<input is="iron-input">`'s `preventInvalidInput` property.
7683
*/
7784
preventInvalidInput: {
7885
type: Boolean
7986
},
8087

8188
/**
82-
* Set this to specify the pattern allowed by `preventInvalidInput`. Bind this to the
83-
* `<input is="iron-input">`'s `allowedPattern` property.
89+
* Set this to specify the pattern allowed by `preventInvalidInput`. If
90+
* you're using PaperInputBehavior to implement your own paper-input-like
91+
* element, bind this to the `<input is="iron-input">`'s `allowedPattern`
92+
* property.
8493
*/
8594
allowedPattern: {
8695
type: String
8796
},
8897

8998
/**
90-
* The type of the input. The supported types are `text`, `number` and `password`. Bind this
91-
* to the `<input is="iron-input">`'s `type` property.
99+
* The type of the input. The supported types are `text`, `number` and `password`.
100+
* If you're using PaperInputBehavior to implement your own paper-input-like element,
101+
* bind this to the `<input is="iron-input">`'s `type` property.
92102
*/
93103
type: {
94104
type: String
95105
},
96106

97107
/**
98-
* The datalist of the input (if any). This should match the id of an existing `<datalist>`. Bind this
99-
* to the `<input is="iron-input">`'s `list` property.
108+
* The datalist of the input (if any). This should match the id of an existing `<datalist>`.
109+
* If you're using PaperInputBehavior to implement your own paper-input-like
110+
* element, bind this to the `<input is="iron-input">`'s `list` property.
100111
*/
101112
list: {
102113
type: String
103114
},
104115

105116
/**
106-
* A pattern to validate the `input` with. Bind this to the `<input is="iron-input">`'s
107-
* `pattern` property.
117+
* A pattern to validate the `input` with. If you're using PaperInputBehavior to
118+
* implement your own paper-input-like element, bind this to
119+
* the `<input is="iron-input">`'s `pattern` property.
108120
*/
109121
pattern: {
110122
type: String
111123
},
112124

113125
/**
114-
* Set to true to mark the input as required. Bind this to the `<input is="iron-input">`'s
115-
* `required` property.
126+
* Set to true to mark the input as required. If you're using PaperInputBehavior to
127+
* implement your own paper-input-like element, bind this to
128+
* the `<input is="iron-input">`'s `required` property.
116129
*/
117130
required: {
118131
type: Boolean,
119132
value: false
120133
},
121134

122135
/**
123-
* The error message to display when the input is invalid. Bind this to the
124-
* `<paper-input-error>`'s content, if using.
136+
* The error message to display when the input is invalid. If you're using
137+
* PaperInputBehavior to implement your own paper-input-like element,
138+
* bind this to the `<paper-input-error>`'s content, if using.
125139
*/
126140
errorMessage: {
127141
type: String
@@ -136,35 +150,39 @@
136150
},
137151

138152
/**
139-
* Set to true to disable the floating label. Bind this to the `<paper-input-container>`'s
140-
* `noLabelFloat` property.
153+
* Set to true to disable the floating label. If you're using PaperInputBehavior to
154+
* implement your own paper-input-like element, bind this to
155+
* the `<paper-input-container>`'s `noLabelFloat` property.
141156
*/
142157
noLabelFloat: {
143158
type: Boolean,
144159
value: false
145160
},
146161

147162
/**
148-
* Set to true to always float the label. Bind this to the `<paper-input-container>`'s
149-
* `alwaysFloatLabel` property.
163+
* Set to true to always float the label. If you're using PaperInputBehavior to
164+
* implement your own paper-input-like element, bind this to
165+
* the `<paper-input-container>`'s `alwaysFloatLabel` property.
150166
*/
151167
alwaysFloatLabel: {
152168
type: Boolean,
153169
value: false
154170
},
155171

156172
/**
157-
* Set to true to auto-validate the input value. Bind this to the `<paper-input-container>`'s
158-
* `autoValidate` property.
173+
* Set to true to auto-validate the input value. If you're using PaperInputBehavior to
174+
* implement your own paper-input-like element, bind this to
175+
* the `<paper-input-container>`'s `autoValidate` property.
159176
*/
160177
autoValidate: {
161178
type: Boolean,
162179
value: false
163180
},
164181

165182
/**
166-
* Name of the validator to use. Bind this to the `<input is="iron-input">`'s `validator`
167-
* property.
183+
* Name of the validator to use. If you're using PaperInputBehavior to
184+
* implement your own paper-input-like element, bind this to
185+
* the `<input is="iron-input">`'s `validator` property.
168186
*/
169187
validator: {
170188
type: String
@@ -173,45 +191,52 @@
173191
// HTMLInputElement attributes for binding if needed
174192

175193
/**
176-
* Bind this to the `<input is="iron-input">`'s `autocomplete` property.
194+
* If you're using PaperInputBehavior to implement your own paper-input-like
195+
* element, bind this to the `<input is="iron-input">`'s `autocomplete` property.
177196
*/
178197
autocomplete: {
179198
type: String,
180199
value: 'off'
181200
},
182201

183202
/**
184-
* Bind this to the `<input is="iron-input">`'s `autofocus` property.
203+
* If you're using PaperInputBehavior to implement your own paper-input-like
204+
* element, bind this to the `<input is="iron-input">`'s `autofocus` property.
185205
*/
186206
autofocus: {
187207
type: Boolean
188208
},
189209

190210
/**
191-
* Bind this to the `<input is="iron-input">`'s `inputmode` property.
211+
* If you're using PaperInputBehavior to implement your own paper-input-like
212+
* element, bind this to the `<input is="iron-input">`'s `inputmode` property.
192213
*/
193214
inputmode: {
194215
type: String
195216
},
196217

197218
/**
198-
* Bind this to the `<input is="iron-input">`'s `minlength` property.
219+
* The minimum length of the input value.
220+
* If you're using PaperInputBehavior to implement your own paper-input-like
221+
* element, bind this to the `<input is="iron-input">`'s `minlength` property.
199222
*/
200223
minlength: {
201224
type: Number
202225
},
203226

204227
/**
205-
* The maximum length of the input value. Bind this to the `<input is="iron-input">`'s
206-
* `maxlength` property.
228+
* The maximum length of the input value.
229+
* If you're using PaperInputBehavior to implement your own paper-input-like
230+
* element, bind this to the `<input is="iron-input">`'s `maxlength` property.
207231
*/
208232
maxlength: {
209233
type: Number
210234
},
211235

212236
/**
213237
* The minimum (numeric or date-time) input value.
214-
* Bind this to the `<input is="iron-input">`'s `min` property.
238+
* If you're using PaperInputBehavior to implement your own paper-input-like
239+
* element, bind this to the `<input is="iron-input">`'s `min` property.
215240
*/
216241
min: {
217242
type: String
@@ -220,22 +245,25 @@
220245
/**
221246
* The maximum (numeric or date-time) input value.
222247
* Can be a String (e.g. `"2000-1-1"`) or a Number (e.g. `2`).
223-
* Bind this to the `<input is="iron-input">`'s `max` property.
248+
* If you're using PaperInputBehavior to implement your own paper-input-like
249+
* element, bind this to the `<input is="iron-input">`'s `max` property.
224250
*/
225251
max: {
226252
type: String
227253
},
228254

229255
/**
230256
* Limits the numeric or date-time increments.
231-
* Bind this to the `<input is="iron-input">`'s `step` property.
257+
* If you're using PaperInputBehavior to implement your own paper-input-like
258+
* element, bind this to the `<input is="iron-input">`'s `step` property.
232259
*/
233260
step: {
234261
type: String
235262
},
236263

237264
/**
238-
* Bind this to the `<input is="iron-input">`'s `name` property.
265+
* If you're using PaperInputBehavior to implement your own paper-input-like
266+
* element, bind this to the `<input is="iron-input">`'s `name` property.
239267
*/
240268
name: {
241269
type: String
@@ -251,15 +279,17 @@
251279
},
252280

253281
/**
254-
* Bind this to the `<input is="iron-input">`'s `readonly` property.
282+
* If you're using PaperInputBehavior to implement your own paper-input-like
283+
* element, bind this to the `<input is="iron-input">`'s `readonly` property.
255284
*/
256285
readonly: {
257286
type: Boolean,
258287
value: false
259288
},
260289

261290
/**
262-
* Bind this to the `<input is="iron-input">`'s `size` property.
291+
* If you're using PaperInputBehavior to implement your own paper-input-like
292+
* element, bind this to the `<input is="iron-input">`'s `size` property.
263293
*/
264294
size: {
265295
type: Number
@@ -268,44 +298,54 @@
268298
// Nonstandard attributes for binding if needed
269299

270300
/**
271-
* Bind this to the `<input is="iron-input">`'s `autocapitalize` property.
301+
* If you're using PaperInputBehavior to implement your own paper-input-like
302+
* element, bind this to the `<input is="iron-input">`'s `autocapitalize` property.
272303
*/
273304
autocapitalize: {
274305
type: String,
275306
value: 'none'
276307
},
277308

278309
/**
279-
* Bind this to the `<input is="iron-input">`'s `autocorrect` property.
310+
* If you're using PaperInputBehavior to implement your own paper-input-like
311+
* element, bind this to the `<input is="iron-input">`'s `autocorrect` property.
280312
*/
281313
autocorrect: {
282314
type: String,
283315
value: 'off'
284316
},
285317

286318
/**
287-
* Bind this to the `<input is="iron-input">`'s `autosave` property, used with type=search.
319+
* If you're using PaperInputBehavior to implement your own paper-input-like
320+
* element, bind this to the `<input is="iron-input">`'s `autosave` property,
321+
* used with type=search.
288322
*/
289323
autosave: {
290324
type: String
291325
},
292326

293327
/**
294-
* Bind this to the `<input is="iron-input">`'s `results` property, used with type=search.
328+
* If you're using PaperInputBehavior to implement your own paper-input-like
329+
* element, bind this to the `<input is="iron-input">`'s `results` property,
330+
* used with type=search.
295331
*/
296332
results: {
297333
type: Number
298334
},
299335

300336
/**
301-
* Bind this to the `<input is="iron-input">`'s `accept` property, used with type=file.
337+
* If you're using PaperInputBehavior to implement your own paper-input-like
338+
* element, bind this to the `<input is="iron-input">`'s `accept` property,
339+
* used with type=file.
302340
*/
303341
accept: {
304342
type: String
305343
},
306344

307345
/**
308-
* Bind this to the `<input is="iron-input">`'s `multiple` property, used with type=file.
346+
* If you're using PaperInputBehavior to implement your own paper-input-like
347+
* element, bind this to the`<input is="iron-input">`'s `multiple` property,
348+
* used with type=file.
309349
*/
310350
multiple: {
311351
type: Boolean

0 commit comments

Comments
 (0)