polymer-gold-rails 1.0.0.pre.rc.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +36 -0
  3. data/Rakefile +1 -0
  4. data/app/assets/components/gold-cc-cvc-input/README.md +24 -0
  5. data/app/assets/components/gold-cc-cvc-input/bower.json +39 -0
  6. data/app/assets/components/gold-cc-cvc-input/cvc_hint.png +0 -0
  7. data/app/assets/components/gold-cc-cvc-input/cvc_hint_amex.png +0 -0
  8. data/app/assets/components/gold-cc-cvc-input/demo/index.html +54 -0
  9. data/app/assets/components/gold-cc-cvc-input/gold-cc-cvc-input.html +195 -0
  10. data/app/assets/components/gold-cc-cvc-input/hero.svg +36 -0
  11. data/app/assets/components/gold-cc-cvc-input/index.html +26 -0
  12. data/app/assets/components/gold-cc-cvc-input/test/basic.html +125 -0
  13. data/app/assets/components/gold-cc-cvc-input/test/index.html +25 -0
  14. data/app/assets/components/gold-cc-expiration-input/README.md +10 -0
  15. data/app/assets/components/gold-cc-expiration-input/bower.json +40 -0
  16. data/app/assets/components/gold-cc-expiration-input/date-input.html +157 -0
  17. data/app/assets/components/gold-cc-expiration-input/date-validator.html +38 -0
  18. data/app/assets/components/gold-cc-expiration-input/demo/index.html +53 -0
  19. data/app/assets/components/gold-cc-expiration-input/gold-cc-expiration-input.html +131 -0
  20. data/app/assets/components/gold-cc-expiration-input/hero.svg +58 -0
  21. data/app/assets/components/gold-cc-expiration-input/index.html +28 -0
  22. data/app/assets/components/gold-cc-expiration-input/test/basic.html +126 -0
  23. data/app/assets/components/gold-cc-expiration-input/test/index.html +25 -0
  24. data/app/assets/components/gold-cc-input/README.md +9 -0
  25. data/app/assets/components/gold-cc-input/bower.json +39 -0
  26. data/app/assets/components/gold-cc-input/cc-validator.js +192 -0
  27. data/app/assets/components/gold-cc-input/demo/index.html +48 -0
  28. data/app/assets/components/gold-cc-input/gold-cc-input.html +215 -0
  29. data/app/assets/components/gold-cc-input/hero.svg +52 -0
  30. data/app/assets/components/gold-cc-input/images/amex.png +0 -0
  31. data/app/assets/components/gold-cc-input/images/diners_club.png +0 -0
  32. data/app/assets/components/gold-cc-input/images/discover.png +0 -0
  33. data/app/assets/components/gold-cc-input/images/jcb.png +0 -0
  34. data/app/assets/components/gold-cc-input/images/mastercard.png +0 -0
  35. data/app/assets/components/gold-cc-input/images/visa.png +0 -0
  36. data/app/assets/components/gold-cc-input/index.html +28 -0
  37. data/app/assets/components/gold-cc-input/test/basic.html +136 -0
  38. data/app/assets/components/gold-cc-input/test/index.html +25 -0
  39. data/app/assets/components/gold-elements/README.md +12 -0
  40. data/app/assets/components/gold-elements/bower.json +42 -0
  41. data/app/assets/components/gold-elements/demo/complex-form.html +127 -0
  42. data/app/assets/components/gold-elements/demo/index.html +94 -0
  43. data/app/assets/components/gold-elements/demo/item-card.html +59 -0
  44. data/app/assets/components/gold-elements/demo/simple-form.css +55 -0
  45. data/app/assets/components/gold-elements/demo/simple-form.html +93 -0
  46. data/app/assets/components/gold-elements/screenshot.png +0 -0
  47. data/app/assets/components/gold-email-input/README.md +8 -0
  48. data/app/assets/components/gold-email-input/bower.json +40 -0
  49. data/app/assets/components/gold-email-input/demo/index.html +46 -0
  50. data/app/assets/components/gold-email-input/email-validator.html +31 -0
  51. data/app/assets/components/gold-email-input/gold-email-input.html +108 -0
  52. data/app/assets/components/gold-email-input/hero.svg +59 -0
  53. data/app/assets/components/gold-email-input/index.html +28 -0
  54. data/app/assets/components/gold-email-input/test/basic.html +97 -0
  55. data/app/assets/components/gold-email-input/test/index.html +25 -0
  56. data/app/assets/components/gold-phone-input/README.md +13 -0
  57. data/app/assets/components/gold-phone-input/bower.json +39 -0
  58. data/app/assets/components/gold-phone-input/demo/index.html +53 -0
  59. data/app/assets/components/gold-phone-input/gold-phone-input.html +197 -0
  60. data/app/assets/components/gold-phone-input/hero.svg +63 -0
  61. data/app/assets/components/gold-phone-input/index.html +28 -0
  62. data/app/assets/components/gold-phone-input/test/basic.html +117 -0
  63. data/app/assets/components/gold-phone-input/test/index.html +25 -0
  64. data/app/assets/components/gold-zip-input/README.md +8 -0
  65. data/app/assets/components/gold-zip-input/bower.json +40 -0
  66. data/app/assets/components/gold-zip-input/demo/index.html +54 -0
  67. data/app/assets/components/gold-zip-input/gold-zip-input.html +113 -0
  68. data/app/assets/components/gold-zip-input/hero.svg +43 -0
  69. data/app/assets/components/gold-zip-input/index.html +28 -0
  70. data/app/assets/components/gold-zip-input/test/basic.html +116 -0
  71. data/app/assets/components/gold-zip-input/test/index.html +25 -0
  72. data/app/assets/components/gold-zip-input/zip-validator.html +32 -0
  73. data/app/assets/components/iron-autogrow-textarea/README.md +24 -0
  74. data/app/assets/components/iron-autogrow-textarea/bower.json +37 -0
  75. data/app/assets/components/iron-autogrow-textarea/demo/index.html +81 -0
  76. data/app/assets/components/iron-autogrow-textarea/hero.svg +33 -0
  77. data/app/assets/components/iron-autogrow-textarea/index.html +30 -0
  78. data/app/assets/components/iron-autogrow-textarea/iron-autogrow-textarea.html +263 -0
  79. data/app/assets/components/iron-autogrow-textarea/test/basic.html +94 -0
  80. data/app/assets/components/iron-autogrow-textarea/test/index.html +25 -0
  81. data/app/assets/components/iron-flex-layout/README.md +4 -0
  82. data/app/assets/components/iron-flex-layout/bower.json +21 -0
  83. data/app/assets/components/iron-flex-layout/classes/iron-flex-layout.html +307 -0
  84. data/app/assets/components/iron-flex-layout/classes/iron-shadow-flex-layout.html +302 -0
  85. data/app/assets/components/iron-flex-layout/demo/index.html +40 -0
  86. data/app/assets/components/iron-flex-layout/demo/x-app.html +106 -0
  87. data/app/assets/components/iron-flex-layout/iron-flex-layout.html +313 -0
  88. data/app/assets/components/iron-form-element-behavior/README.md +2 -0
  89. data/app/assets/components/iron-form-element-behavior/bower.json +27 -0
  90. data/app/assets/components/iron-form-element-behavior/demo/index.html +53 -0
  91. data/app/assets/components/iron-form-element-behavior/demo/simple-element.html +27 -0
  92. data/app/assets/components/iron-form-element-behavior/demo/simple-form.html +42 -0
  93. data/app/assets/components/iron-form-element-behavior/index.html +30 -0
  94. data/app/assets/components/iron-form-element-behavior/iron-form-element-behavior.html +50 -0
  95. data/app/assets/components/iron-icon/README.md +56 -0
  96. data/app/assets/components/iron-icon/bower.json +29 -0
  97. data/app/assets/components/iron-icon/demo/index.html +28 -0
  98. data/app/assets/components/iron-icon/demo/location.png +0 -0
  99. data/app/assets/components/iron-icon/hero.svg +19 -0
  100. data/app/assets/components/iron-icon/index.html +26 -0
  101. data/app/assets/components/iron-icon/iron-icon.html +187 -0
  102. data/app/assets/components/iron-icon/test/index.html +31 -0
  103. data/app/assets/components/iron-icon/test/iron-icon.html +120 -0
  104. data/app/assets/components/iron-input/README.md +16 -0
  105. data/app/assets/components/iron-input/bower.json +36 -0
  106. data/app/assets/components/iron-input/demo/index.html +87 -0
  107. data/app/assets/components/iron-input/hero.svg +19 -0
  108. data/app/assets/components/iron-input/index.html +30 -0
  109. data/app/assets/components/iron-input/iron-input.html +235 -0
  110. data/app/assets/components/iron-input/test/index.html +24 -0
  111. data/app/assets/components/iron-input/test/iron-input.html +139 -0
  112. data/app/assets/components/iron-input/test/letters-only.html +30 -0
  113. data/app/assets/components/iron-meta/README.md +46 -0
  114. data/app/assets/components/iron-meta/bower.json +28 -0
  115. data/app/assets/components/iron-meta/demo/index.html +45 -0
  116. data/app/assets/components/iron-meta/hero.svg +33 -0
  117. data/app/assets/components/iron-meta/index.html +27 -0
  118. data/app/assets/components/iron-meta/iron-meta.html +352 -0
  119. data/app/assets/components/iron-meta/test/basic.html +48 -0
  120. data/app/assets/components/iron-meta/test/index.html +30 -0
  121. data/app/assets/components/iron-meta/test/iron-meta.html +186 -0
  122. data/app/assets/components/iron-validatable-behavior/README.md +3 -0
  123. data/app/assets/components/iron-validatable-behavior/bower.json +35 -0
  124. data/app/assets/components/iron-validatable-behavior/demo/cats-only.html +46 -0
  125. data/app/assets/components/iron-validatable-behavior/demo/index.html +71 -0
  126. data/app/assets/components/iron-validatable-behavior/demo/validatable-input.html +46 -0
  127. data/app/assets/components/iron-validatable-behavior/index.html +30 -0
  128. data/app/assets/components/iron-validatable-behavior/iron-validatable-behavior.html +101 -0
  129. data/app/assets/components/iron-validatable-behavior/test/index.html +35 -0
  130. data/app/assets/components/iron-validatable-behavior/test/iron-validatable-behavior.html +52 -0
  131. data/app/assets/components/iron-validatable-behavior/test/test-validatable.html +28 -0
  132. data/app/assets/components/iron-validator-behavior/README.md +4 -0
  133. data/app/assets/components/iron-validator-behavior/bower.json +34 -0
  134. data/app/assets/components/iron-validator-behavior/demo/cats-only.html +46 -0
  135. data/app/assets/components/iron-validator-behavior/demo/index.html +144 -0
  136. data/app/assets/components/iron-validator-behavior/index.html +30 -0
  137. data/app/assets/components/iron-validator-behavior/iron-validator-behavior.html +61 -0
  138. data/app/assets/components/iron-validator-behavior/test/index.html +34 -0
  139. data/app/assets/components/iron-validator-behavior/test/iron-validator-behavior.html +47 -0
  140. data/app/assets/components/iron-validator-behavior/test/simple-validator.html +26 -0
  141. data/app/assets/components/paper-input/README.md +5 -0
  142. data/app/assets/components/paper-input/all-imports.html +12 -0
  143. data/app/assets/components/paper-input/bower.json +44 -0
  144. data/app/assets/components/paper-input/demo/index.html +96 -0
  145. data/app/assets/components/paper-input/demo/ssn-input.html +94 -0
  146. data/app/assets/components/paper-input/demo/ssn-validator.html +31 -0
  147. data/app/assets/components/paper-input/hero.svg +19 -0
  148. data/app/assets/components/paper-input/index.html +28 -0
  149. data/app/assets/components/paper-input/paper-input-addon-behavior.html +47 -0
  150. data/app/assets/components/paper-input/paper-input-behavior.html +317 -0
  151. data/app/assets/components/paper-input/paper-input-char-counter.html +95 -0
  152. data/app/assets/components/paper-input/paper-input-container.html +495 -0
  153. data/app/assets/components/paper-input/paper-input-error.html +99 -0
  154. data/app/assets/components/paper-input/paper-input.html +126 -0
  155. data/app/assets/components/paper-input/paper-textarea.html +106 -0
  156. data/app/assets/components/paper-input/test/index.html +28 -0
  157. data/app/assets/components/paper-input/test/letters-only.html +30 -0
  158. data/app/assets/components/paper-input/test/paper-input-char-counter.html +112 -0
  159. data/app/assets/components/paper-input/test/paper-input-container.html +237 -0
  160. data/app/assets/components/paper-input/test/paper-input-error.html +60 -0
  161. data/app/assets/components/paper-input/test/paper-input.html +213 -0
  162. data/app/assets/components/paper-input/test/paper-textarea.html +169 -0
  163. data/app/assets/components/paper-styles/README.md +3 -0
  164. data/app/assets/components/paper-styles/bower.json +27 -0
  165. data/app/assets/components/paper-styles/classes/global.html +96 -0
  166. data/app/assets/components/paper-styles/classes/shadow-layout.html +302 -0
  167. data/app/assets/components/paper-styles/classes/shadow.html +39 -0
  168. data/app/assets/components/paper-styles/classes/typography.html +171 -0
  169. data/app/assets/components/paper-styles/color.html +333 -0
  170. data/app/assets/components/paper-styles/default-theme.html +39 -0
  171. data/app/assets/components/paper-styles/demo-pages.html +72 -0
  172. data/app/assets/components/paper-styles/demo.css +25 -0
  173. data/app/assets/components/paper-styles/paper-styles-classes.html +14 -0
  174. data/app/assets/components/paper-styles/paper-styles.html +17 -0
  175. data/app/assets/components/paper-styles/shadow.html +61 -0
  176. data/app/assets/components/paper-styles/typography.html +240 -0
  177. data/app/assets/components/polymer/LICENSE.txt +27 -0
  178. data/app/assets/components/polymer/bower.json +26 -0
  179. data/app/assets/components/polymer/build.log +27 -0
  180. data/app/assets/components/polymer/polymer-micro.html +523 -0
  181. data/app/assets/components/polymer/polymer-mini.html +1368 -0
  182. data/app/assets/components/polymer/polymer.html +3768 -0
  183. data/app/assets/components/webcomponentsjs/CustomElements.js +956 -0
  184. data/app/assets/components/webcomponentsjs/CustomElements.min.js +11 -0
  185. data/app/assets/components/webcomponentsjs/HTMLImports.js +1078 -0
  186. data/app/assets/components/webcomponentsjs/HTMLImports.min.js +11 -0
  187. data/app/assets/components/webcomponentsjs/MutationObserver.js +344 -0
  188. data/app/assets/components/webcomponentsjs/MutationObserver.min.js +11 -0
  189. data/app/assets/components/webcomponentsjs/README.md +125 -0
  190. data/app/assets/components/webcomponentsjs/ShadowDOM.js +4414 -0
  191. data/app/assets/components/webcomponentsjs/ShadowDOM.min.js +15 -0
  192. data/app/assets/components/webcomponentsjs/bower.json +14 -0
  193. data/app/assets/components/webcomponentsjs/build.log +33 -0
  194. data/app/assets/components/webcomponentsjs/package.json +31 -0
  195. data/app/assets/components/webcomponentsjs/webcomponents-lite.js +2300 -0
  196. data/app/assets/components/webcomponentsjs/webcomponents-lite.min.js +13 -0
  197. data/app/assets/components/webcomponentsjs/webcomponents.js +7112 -0
  198. data/app/assets/components/webcomponentsjs/webcomponents.min.js +15 -0
  199. data/lib/polymer-gold-rails.rb +2 -0
  200. data/lib/polymer-gold-rails/enigne.rb +4 -0
  201. data/lib/polymer-gold-rails/version.rb +3 -0
  202. metadata +312 -0
@@ -0,0 +1,313 @@
1
+ <!--
2
+ @license
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.github.io/LICENSE.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/CONTRIBUTORS.txt
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/PATENTS.txt
9
+ -->
10
+
11
+ <link rel="import" href="../polymer/polymer.html">
12
+
13
+ <style is="custom-style">
14
+
15
+ :root {
16
+
17
+ --layout: {
18
+ display: -ms-flexbox;
19
+ display: -webkit-flex;
20
+ display: flex;
21
+ };
22
+
23
+ --layout-inline: {
24
+ display: -ms-inline-flexbox;
25
+ display: -webkit-inline-flex;
26
+ display: inline-flex;
27
+ };
28
+
29
+ --layout-horizontal: {
30
+ /* @apply(--layout); */
31
+ display: -ms-flexbox;
32
+ display: -webkit-flex;
33
+ display: flex;
34
+
35
+ -ms-flex-direction: row;
36
+ -webkit-flex-direction: row;
37
+ flex-direction: row;
38
+ };
39
+
40
+ --layout-horizontal-reverse: {
41
+ -ms-flex-direction: row-reverse;
42
+ -webkit-flex-direction: row-reverse;
43
+ flex-direction: row-reverse;
44
+ };
45
+
46
+ --layout-vertical: {
47
+ /* @apply(--layout); */
48
+ display: -ms-flexbox;
49
+ display: -webkit-flex;
50
+ display: flex;
51
+
52
+ -ms-flex-direction: column;
53
+ -webkit-flex-direction: column;
54
+ flex-direction: column;
55
+ };
56
+
57
+ --layout-vertical-reverse: {
58
+ -ms-flex-direction: column-reverse;
59
+ -webkit-flex-direction: column-reverse;
60
+ flex-direction: column-reverse;
61
+ };
62
+
63
+ --layout-wrap: {
64
+ -ms-flex-wrap: wrap;
65
+ -webkit-flex-wrap: wrap;
66
+ flex-wrap: wrap;
67
+ };
68
+
69
+ --layout-wrap-reverse: {
70
+ -ms-flex-wrap: wrap-reverse;
71
+ -webkit-flex-wrap: wrap-reverse;
72
+ flex-wrap: wrap-reverse;
73
+ };
74
+
75
+ --layout-flex-auto: {
76
+ -ms-flex: 1 1 auto;
77
+ -webkit-flex: 1 1 auto;
78
+ flex: 1 1 auto;
79
+ };
80
+
81
+ --layout-flex-none: {
82
+ -ms-flex: none;
83
+ -webkit-flex: none;
84
+ flex: none;
85
+ };
86
+
87
+ --layout-flex: {
88
+ -ms-flex: 1 1 0.000000001px;
89
+ -webkit-flex: 1;
90
+ flex: 1;
91
+ -webkit-flex-basis: 0.000000001px;
92
+ flex-basis: 0.000000001px;
93
+ };
94
+
95
+ --layout-flex-2: {
96
+ -ms-flex: 2;
97
+ -webkit-flex: 2;
98
+ flex: 2;
99
+ };
100
+
101
+ --layout-flex-3: {
102
+ -ms-flex: 3;
103
+ -webkit-flex: 3;
104
+ flex: 3;
105
+ };
106
+
107
+ --layout-flex-4: {
108
+ -ms-flex: 4;
109
+ -webkit-flex: 4;
110
+ flex: 4;
111
+ };
112
+
113
+ --layout-flex-5: {
114
+ -ms-flex: 5;
115
+ -webkit-flex: 5;
116
+ flex: 5;
117
+ };
118
+
119
+ --layout-flex-6: {
120
+ -ms-flex: 6;
121
+ -webkit-flex: 6;
122
+ flex: 6;
123
+ };
124
+
125
+ --layout-flex-7: {
126
+ -ms-flex: 7;
127
+ -webkit-flex: 7;
128
+ flex: 7;
129
+ };
130
+
131
+ --layout-flex-8: {
132
+ -ms-flex: 8;
133
+ -webkit-flex: 8;
134
+ flex: 8;
135
+ };
136
+
137
+ --layout-flex-9: {
138
+ -ms-flex: 9;
139
+ -webkit-flex: 9;
140
+ flex: 9;
141
+ };
142
+
143
+ --layout-flex-10: {
144
+ -ms-flex: 10;
145
+ -webkit-flex: 10;
146
+ flex: 10;
147
+ };
148
+
149
+ --layout-flex-11: {
150
+ -ms-flex: 11;
151
+ -webkit-flex: 11;
152
+ flex: 11;
153
+ };
154
+
155
+ --layout-flex-12: {
156
+ -ms-flex: 12;
157
+ -webkit-flex: 12;
158
+ flex: 12;
159
+ };
160
+
161
+ /* alignment in cross axis */
162
+
163
+ --layout-start: {
164
+ -ms-flex-align: start;
165
+ -webkit-align-items: flex-start;
166
+ align-items: flex-start;
167
+ };
168
+
169
+ --layout-center: {
170
+ -ms-flex-align: center;
171
+ -webkit-align-items: center;
172
+ align-items: center;
173
+ };
174
+
175
+ --layout-end: {
176
+ -ms-flex-align: end;
177
+ -webkit-align-items: flex-end;
178
+ align-items: flex-end;
179
+ };
180
+
181
+ /* alignment in main axis */
182
+
183
+ --layout-start-justified: {
184
+ -ms-flex-pack: start;
185
+ -webkit-justify-content: flex-start;
186
+ justify-content: flex-start;
187
+ };
188
+
189
+ --layout-center-justified: {
190
+ -ms-flex-pack: center;
191
+ -webkit-justify-content: center;
192
+ justify-content: center;
193
+ };
194
+
195
+ --layout-end-justified: {
196
+ -ms-flex-pack: end;
197
+ -webkit-justify-content: flex-end;
198
+ justify-content: flex-end;
199
+ };
200
+
201
+ --layout-around-justified: {
202
+ -ms-flex-pack: around;
203
+ -webkit-justify-content: space-around;
204
+ justify-content: space-around;
205
+ };
206
+
207
+ --layout-justified: {
208
+ -ms-flex-pack: justify;
209
+ -webkit-justify-content: space-between;
210
+ justify-content: space-between;
211
+ };
212
+
213
+ --layout-center-center: {
214
+ /* @apply(--layout-center --layout-center-justified); */
215
+ -ms-flex-align: center;
216
+ -webkit-align-items: center;
217
+ align-items: center;
218
+ -ms-flex-pack: center;
219
+ -webkit-justify-content: center;
220
+ justify-content: center;
221
+ };
222
+
223
+ /* self alignment */
224
+
225
+ --layout-self-start: {
226
+ -ms-align-self: flex-start;
227
+ -webkit-align-self: flex-start;
228
+ align-self: flex-start;
229
+ };
230
+
231
+ --layout-self-center: {
232
+ -ms-align-self: center;
233
+ -webkit-align-self: center;
234
+ align-self: center;
235
+ };
236
+
237
+ --layout-self-end: {
238
+ -ms-align-self: flex-end;
239
+ -webkit-align-self: flex-end;
240
+ align-self: flex-end;
241
+ };
242
+
243
+ --layout-self-stretch: {
244
+ -ms-align-self: stretch;
245
+ -webkit-align-self: stretch;
246
+ align-self: stretch;
247
+ };
248
+
249
+ /*******************************
250
+ Other Layout
251
+ *******************************/
252
+
253
+ --layout-block: {
254
+ display: block;
255
+ };
256
+
257
+ --layout-invisible: {
258
+ visibility: hidden !important;
259
+ };
260
+
261
+ --layout-relative: {
262
+ position: relative;
263
+ };
264
+
265
+ --layout-fit: {
266
+ position: absolute;
267
+ top: 0;
268
+ right: 0;
269
+ bottom: 0;
270
+ left: 0;
271
+ };
272
+
273
+ --layout-scroll: {
274
+ -webkit-overflow-scrolling: touch;
275
+ overflow: auto;
276
+ };
277
+
278
+ /* fixed position */
279
+
280
+ --layout-fixed-bottom:,
281
+ --layout-fixed-left:,
282
+ --layout-fixed-right:,
283
+ --layout-fixed-top: {
284
+ position: fixed;
285
+ };
286
+
287
+ --layout-fixed-top: {
288
+ top: 0;
289
+ left: 0;
290
+ right: 0;
291
+ };
292
+
293
+ --layout-fixed-right: {
294
+ top: 0;
295
+ right: 0;
296
+ bottom: 0;
297
+ };
298
+
299
+ --layout-fixed-bottom: {
300
+ right: 0;
301
+ bottom: 0;
302
+ left: 0;
303
+ };
304
+
305
+ --layout-fixed-left: {
306
+ top: 0;
307
+ bottom: 0;
308
+ left: 0;
309
+ };
310
+
311
+ }
312
+
313
+ </style>
@@ -0,0 +1,2 @@
1
+ # iron-form-element-behavior
2
+ Behavior that allows an element to be tracked by an iron-form
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "iron-form-element-behavior",
3
+ "version": "1.0.1",
4
+ "license": "http://polymer.github.io/LICENSE.txt",
5
+ "private": true,
6
+ "main": "iron-form-element-behavior",
7
+ "authors": "The Polymer Authors",
8
+ "description": "Enables a custom element to be included in an iron-form",
9
+ "keywords": [
10
+ "web-components",
11
+ "polymer",
12
+ "form"
13
+ ],
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git://github.com/PolymerElements/iron-form-element-behavior.git"
17
+ },
18
+ "dependencies": {
19
+ "polymer": "Polymer/polymer#^1.0.0"
20
+ },
21
+ "devDependencies": {
22
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
23
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
24
+ "web-component-tester": "*",
25
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
26
+ }
27
+ }
@@ -0,0 +1,53 @@
1
+ <!doctype html>
2
+ <!--
3
+ @license
4
+ Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
5
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
6
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8
+ Code distributed by Google as part of the polymer project is also
9
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
10
+ -->
11
+ <html>
12
+ <head>
13
+
14
+ <title>iron-form-element-behavior demo</title>
15
+
16
+ <meta charset="utf-8">
17
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
18
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
19
+
20
+ <script src="../../webcomponentsjs/webcomponents-lite.js"></script>
21
+
22
+ <link rel="import" href="simple-form.html">
23
+ <link rel="import" href="simple-element.html">
24
+
25
+ </head>
26
+ <body>
27
+
28
+ <form is="simple-form" id="form">
29
+ Element the form is tracking: <input is="simple-element" type="text" name="one" value="one">
30
+ <br>
31
+ Element the form isn't tracking: <input type="text" name="two" value="two">
32
+ <br>
33
+ Another one the form is tracking: <input is="simple-element" type="text" name="three" value="three">
34
+
35
+ </form>
36
+
37
+ <h4>Elements tracked by the form: </h4>
38
+ <ul id="output">
39
+ </ul>
40
+ </body>
41
+ <script>
42
+ var output = document.getElementById('output');
43
+ var elements = document.getElementById('form').formElements;
44
+
45
+ for (var i = 0; i < elements.length; i++) {
46
+ var li = document.createElement('li');
47
+ var text = document.createTextNode(elements[i].value);
48
+ li.appendChild(text);
49
+ output.appendChild(li);
50
+ }
51
+ </script>
52
+
53
+ </html>
@@ -0,0 +1,27 @@
1
+ <!--
2
+ @license
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.github.io/LICENSE.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/CONTRIBUTORS.txt
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/PATENTS.txt
9
+ -->
10
+ <link rel="import" href="../../polymer/polymer.html">
11
+ <link rel="import" href="../iron-form-element-behavior.html">
12
+
13
+ <script>
14
+
15
+ Polymer({
16
+
17
+ is: 'simple-element',
18
+
19
+ extends: 'input',
20
+
21
+ behaviors: [
22
+ Polymer.IronFormElementBehavior
23
+ ]
24
+
25
+ });
26
+
27
+ </script>
@@ -0,0 +1,42 @@
1
+ <!--
2
+ @license
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.github.io/LICENSE.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/CONTRIBUTORS.txt
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/PATENTS.txt
9
+ -->
10
+ <link rel="import" href="../../polymer/polymer.html">
11
+
12
+ <script>
13
+
14
+ Polymer({
15
+
16
+ is: 'simple-form',
17
+
18
+ extends: 'form',
19
+
20
+ properties: {
21
+ formElements: {
22
+ type: Object,
23
+ notify: true
24
+ }
25
+ },
26
+
27
+ listeners: {
28
+ 'iron-form-element-register': '_elementRegistered'
29
+ },
30
+
31
+ ready: function() {
32
+ this.formElements = [];
33
+ },
34
+
35
+ _elementRegistered: function(e) {
36
+ this.formElements.push(e.target);
37
+ this.fire('element-registered');
38
+ }
39
+
40
+ });
41
+
42
+ </script>