OLD | NEW |
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-autogrow-textarea/iron-autogrow-textarea.html"> | 11 <link rel="import" href="../iron-autogrow-textarea/iron-autogrow-textarea.html"> |
12 <link rel="import" href="../iron-form-element-behavior/iron-form-element-behavio
r.html"> | |
13 <link rel="import" href="paper-input-behavior.html"> | 12 <link rel="import" href="paper-input-behavior.html"> |
14 <link rel="import" href="paper-input-container.html"> | 13 <link rel="import" href="paper-input-container.html"> |
15 <link rel="import" href="paper-input-error.html"> | 14 <link rel="import" href="paper-input-error.html"> |
16 <link rel="import" href="paper-input-char-counter.html"> | 15 <link rel="import" href="paper-input-char-counter.html"> |
17 | 16 |
18 <!-- | 17 <!-- |
19 `<paper-textarea>` is a multi-line text field with Material Design styling. | 18 `<paper-textarea>` is a multi-line text field with Material Design styling. |
20 | 19 |
21 <paper-textarea label="Textarea label"></paper-textarea> | 20 <paper-textarea label="Textarea label"></paper-textarea> |
22 | 21 |
(...skipping 18 matching lines...) Expand all Loading... |
41 | 40 |
42 <iron-autogrow-textarea id="input" class="paper-input-input" | 41 <iron-autogrow-textarea id="input" class="paper-input-input" |
43 bind-value="{{value}}" | 42 bind-value="{{value}}" |
44 autocomplete$="[[autocomplete]]" | 43 autocomplete$="[[autocomplete]]" |
45 autofocus$="[[autofocus]]" | 44 autofocus$="[[autofocus]]" |
46 inputmode$="[[inputmode]]" | 45 inputmode$="[[inputmode]]" |
47 name$="[[name]]" | 46 name$="[[name]]" |
48 placeholder$="[[placeholder]]" | 47 placeholder$="[[placeholder]]" |
49 readonly$="[[readonly]]" | 48 readonly$="[[readonly]]" |
50 required$="[[required]]" | 49 required$="[[required]]" |
51 maxlength$="[[maxlength]]"></iron-autogrow-textarea> | 50 maxlength$="[[maxlength]]" |
| 51 autocapitalize$="[[autocapitalize]]"></iron-autogrow-textarea> |
52 | 52 |
53 <template is="dom-if" if="[[errorMessage]]"> | 53 <template is="dom-if" if="[[errorMessage]]"> |
54 <paper-input-error>[[errorMessage]]</paper-input-error> | 54 <paper-input-error>[[errorMessage]]</paper-input-error> |
55 </template> | 55 </template> |
56 | 56 |
57 <template is="dom-if" if="[[charCounter]]"> | 57 <template is="dom-if" if="[[charCounter]]"> |
58 <paper-input-char-counter></paper-input-char-counter> | 58 <paper-input-char-counter></paper-input-char-counter> |
59 </template> | 59 </template> |
60 | 60 |
61 </paper-input-container> | 61 </paper-input-container> |
62 | 62 |
63 </template> | 63 </template> |
64 | 64 |
65 </dom-module> | 65 </dom-module> |
66 | 66 |
67 <script> | 67 <script> |
68 | 68 |
69 (function() { | 69 (function() { |
70 | 70 |
71 Polymer({ | 71 Polymer({ |
72 | 72 |
73 is: 'paper-textarea', | 73 is: 'paper-textarea', |
74 | 74 |
75 behaviors: [ | 75 behaviors: [ |
76 Polymer.PaperInputBehavior, | 76 Polymer.PaperInputBehavior |
77 Polymer.IronFormElementBehavior | |
78 ], | 77 ], |
79 | 78 |
80 properties: { | 79 properties: { |
81 | 80 |
82 _ariaLabelledBy: { | 81 _ariaLabelledBy: { |
83 observer: '_ariaLabelledByChanged', | 82 observer: '_ariaLabelledByChanged', |
84 type: String | 83 type: String |
85 }, | 84 }, |
86 | 85 |
87 _ariaDescribedBy: { | 86 _ariaDescribedBy: { |
88 observer: '_ariaDescribedByChanged', | 87 observer: '_ariaDescribedByChanged', |
89 type: String | 88 type: String |
90 } | 89 } |
91 | 90 |
92 }, | 91 }, |
93 | 92 |
94 _ariaLabelledByChanged: function(ariaLabelledBy) { | 93 _ariaLabelledByChanged: function(ariaLabelledBy) { |
95 this.$.input.textarea.setAttribute('aria-labelledby', ariaLabelledBy); | 94 this.$.input.textarea.setAttribute('aria-labelledby', ariaLabelledBy); |
96 }, | 95 }, |
97 | 96 |
98 _ariaDescribedByChanged: function(ariaDescribedBy) { | 97 _ariaDescribedByChanged: function(ariaDescribedBy) { |
99 this.$.input.textarea.setAttribute('aria-describedby', ariaDescribedBy); | 98 this.$.input.textarea.setAttribute('aria-describedby', ariaDescribedBy); |
100 } | 99 } |
101 | 100 |
102 }); | 101 }); |
103 | 102 |
104 })(); | 103 })(); |
105 | 104 |
106 </script> | 105 </script> |
OLD | NEW |