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,58 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
6
+ <g id="background" display="none">
7
+ <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
8
+ </g>
9
+ <g id="label">
10
+ </g>
11
+ <g id="art">
12
+ <rect x="64" y="67" width="24" height="2"/>
13
+ <g>
14
+ <path d="M73.9,59.6c0,0.6-0.1,1.1-0.2,1.6c-0.1,0.5-0.3,0.8-0.6,1.1c-0.3,0.3-0.6,0.5-0.9,0.7s-0.8,0.2-1.3,0.2
15
+ c-0.5,0-0.9-0.1-1.3-0.2c-0.4-0.2-0.7-0.4-0.9-0.7c-0.3-0.3-0.5-0.7-0.6-1.1s-0.2-1-0.2-1.6v-2.2c0-0.6,0.1-1.1,0.2-1.6
16
+ s0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1.2c0.1,0.5,0.3,0.9,0.6,1.2c0.3,0.3,0.7,0.4,1.2,0.4c0.3,0,0.5,0,0.7-0.1c0.2-0.1,0.4-0.2,0.5-0.4s0.2-0.4,0.3-0.6
48
+ c0.1-0.3,0.1-0.5,0.1-0.8c0-0.3,0-0.5-0.1-0.8c-0.1-0.2-0.2-0.5-0.3-0.6s-0.3-0.3-0.6-0.4c-0.2-0.1-0.5-0.2-0.8-0.2
49
+ c-0.2,0-0.4,0-0.5,0c-0.1,0-0.3,0.1-0.4,0.1c-0.1,0-0.2,0.1-0.3,0.2c-0.1,0.1-0.2,0.2-0.3,0.2L149.9,58.5z"/>
50
+ </g>
51
+ <path d="M102,77H49V44h53V77z M51,75h49V46H51V75z"/>
52
+ <path d="M175,77h-68V44h68V77z M109,75h64V46h-64V75z"/>
53
+ <g id="ic_x5F_add_x0D_">
54
+ </g>
55
+ </g>
56
+ <g id="Guides">
57
+ </g>
58
+ </svg>
@@ -0,0 +1,28 @@
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
+ <meta charset="utf-8">
15
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
16
+
17
+ <title>gold-cc-expiration-input</title>
18
+
19
+ <script src="../webcomponentsjs/webcomponents-lite.js"></script>
20
+ <link rel="import" href="../iron-component-page/iron-component-page.html">
21
+
22
+ </head>
23
+ <body>
24
+
25
+ <iron-component-page></iron-component-page>
26
+
27
+ </body>
28
+ </html>
@@ -0,0 +1,126 @@
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>gold-cc-expiration-input tests</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
+ <script src="../../web-component-tester/browser.js"></script>
23
+ <script src="../../test-fixture/test-fixture-mocha.js"></script>
24
+
25
+ <script src="../../iron-test-helpers/test-helpers.js"></script>
26
+
27
+ <link rel="import" href="../../test-fixture/test-fixture.html">
28
+ <link rel="import" href="../gold-cc-expiration-input.html">
29
+
30
+ </head>
31
+ <body>
32
+
33
+ <test-fixture id="basic">
34
+ <template>
35
+ <gold-cc-expiration-input auto-validate required error-message="error"></gold-cc-expiration-input>
36
+ </template>
37
+ </test-fixture>
38
+
39
+ <script>
40
+
41
+ suite('basic', function() {
42
+ test('invalid input is not ok', function() {
43
+ var input = fixture('basic');
44
+ input.value='1234';
45
+ forceXIfStamp(input);
46
+
47
+ var container = Polymer.dom(input.root).querySelector('paper-input-container');
48
+ assert.ok(container, 'paper-input-container exists');
49
+ assert.isTrue(container.invalid);
50
+ });
51
+
52
+ test('misformed dates are not ok', function() {
53
+ var input = fixture('basic');
54
+ input.value='33/33';
55
+ forceXIfStamp(input);
56
+
57
+ var container = Polymer.dom(input.root).querySelector('paper-input-container');
58
+ assert.ok(container, 'paper-input-container exists');
59
+ assert.isTrue(container.invalid);
60
+ });
61
+
62
+ test('past dates are not ok', function() {
63
+ var input = fixture('basic');
64
+ input.value='11/00';
65
+ forceXIfStamp(input);
66
+
67
+ var container = Polymer.dom(input.root).querySelector('paper-input-container');
68
+ assert.ok(container, 'paper-input-container exists');
69
+ assert.isTrue(container.invalid);
70
+ });
71
+
72
+ test('future dates are ok', function() {
73
+ var input = fixture('basic');
74
+ // Note: this test will start failing in 2099. Apologies, future maintainers.
75
+ input.value='11/99';
76
+ forceXIfStamp(input);
77
+
78
+ var container = Polymer.dom(input.root).querySelector('paper-input-container');
79
+ assert.ok(container, 'paper-input-container exists');
80
+ assert.isFalse(container.invalid);
81
+ assert.equal(input.value, '11/99')
82
+ });
83
+
84
+ test('value is updated correctly ', function() {
85
+ var input = fixture('basic');
86
+ input.querySelector('.paper-input-input').month = 11;
87
+ input.querySelector('.paper-input-input').year = 15;
88
+ assert.equal(input.value, '11/15');
89
+ });
90
+
91
+ test('empty required input shows error', function() {
92
+ var input = fixture('basic');
93
+ forceXIfStamp(input);
94
+
95
+ var error = Polymer.dom(input.root).querySelector('paper-input-error');
96
+ assert.ok(error, 'paper-input-error exists');
97
+ assert.notEqual(getComputedStyle(error).display, 'none', 'error is not display:none');
98
+ });
99
+
100
+ });
101
+
102
+ suite('a11y', function() {
103
+
104
+ test('has aria-labelledby', function() {
105
+ var input = fixture('basic');
106
+ var month = input.querySelectorAll('input')[0];
107
+ var year = input.querySelectorAll('input')[1];
108
+ var label = Polymer.dom(input.root).querySelector('label').id;
109
+
110
+ assert.ok(month);
111
+ assert.ok(year);
112
+
113
+ assert.isTrue(month.hasAttribute('aria-labelledby'));
114
+ assert.isTrue(year.hasAttribute('aria-labelledby'));
115
+
116
+ assert.equal(month.getAttribute('aria-labelledby'), label + ' monthLabel');
117
+ assert.equal(year.getAttribute('aria-labelledby'), label + ' yearLabel');
118
+ });
119
+
120
+ });
121
+
122
+
123
+ </script>
124
+
125
+ </body>
126
+ </html>
@@ -0,0 +1,25 @@
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
+ <meta charset="UTF-8">
14
+ <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
15
+ <title>gold-cc-expiration-input tests</title>
16
+ <script src="../../web-component-tester/browser.js"></script>
17
+ </head>
18
+ <body>
19
+ <script>
20
+ WCT.loadSuites([
21
+ 'basic.html'
22
+ ]);
23
+ </script>
24
+ </body>
25
+ </html>
@@ -0,0 +1,9 @@
1
+ # gold-cc-input
2
+
3
+ `gold-cc-input` is a Material Design field for entering a credit card number.
4
+
5
+ Example:
6
+
7
+ ```html
8
+ <gold-cc-input></gold-cc-input>
9
+ ```
@@ -0,0 +1,39 @@
1
+ {
2
+ "name": "gold-cc-input",
3
+ "version": "1.0.3",
4
+ "description": "A credit card input field",
5
+ "authors": [
6
+ "The Polymer Authors"
7
+ ],
8
+ "keywords": [
9
+ "web-components",
10
+ "polymer",
11
+ "input"
12
+ ],
13
+ "main": [
14
+ "gold-cc-input.html"
15
+ ],
16
+ "private": true,
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git://github.com/PolymerElements/gold-cc-input.git"
20
+ },
21
+ "license": "http://polymer.github.io/LICENSE.txt",
22
+ "homepage": "https://github.com/PolymerElements/gold-cc-input",
23
+ "ignore": [],
24
+ "dependencies": {
25
+ "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
26
+ "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0",
27
+ "iron-icon": "PolymerElements/iron-icon#^1.0.0",
28
+ "paper-input": "PolymerElements/paper-input#^1.0.0",
29
+ "paper-styles": "PolymerElements/paper-styles#^1.0.0",
30
+ "polymer": "Polymer/polymer#^1.0.0"
31
+ },
32
+ "devDependencies": {
33
+ "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
34
+ "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
35
+ "test-fixture": "PolymerElements/test-fixture#^1.0.0",
36
+ "web-component-tester": "*",
37
+ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
38
+ }
39
+ }
@@ -0,0 +1,192 @@
1
+ /*
2
+ jQuery Credit Card Validator 1.0
3
+
4
+ Copyright 2012-2015 Pawel Decowski
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software
11
+ is furnished to do so, subject to the following conditions:
12
+ The above copyright notice and this permission notice shall be included
13
+ in all copies or substantial portions of the Software.
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17
+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20
+ IN THE SOFTWARE.
21
+ */
22
+
23
+ (function(global) {
24
+ 'use strict';
25
+
26
+ function validateCreditCard (input) {
27
+ var __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
28
+ var bind, card, card_type, card_types, get_card_type, is_valid_length, is_valid_luhn, normalize, validate, validate_number, _i, _len, _ref;
29
+ card_types = [
30
+ {
31
+ name: 'amex',
32
+ icon: 'images/amex.png',
33
+ pattern: /^3[47]/,
34
+ valid_length: [15]
35
+ }, {
36
+ name: 'diners_club',
37
+ icon: 'images/diners_club.png',
38
+ pattern: /^30[0-5]/,
39
+ valid_length: [14]
40
+ }, {
41
+ name: 'diners_club',
42
+ icon: 'images/diners_club.png',
43
+ pattern: /^36/,
44
+ valid_length: [14]
45
+ }, {
46
+ name: 'jcb',
47
+ icon: 'images/jcb.png',
48
+ pattern: /^35(2[89]|[3-8][0-9])/,
49
+ valid_length: [16]
50
+ }, {
51
+ name: 'laser',
52
+ pattern: /^(6304|670[69]|6771)/,
53
+ valid_length: [16, 17, 18, 19]
54
+ }, {
55
+ name: 'visa_electron',
56
+ pattern: /^(4026|417500|4508|4844|491(3|7))/,
57
+ valid_length: [16]
58
+ }, {
59
+ name: 'visa',
60
+ icon: 'images/visa.png',
61
+ pattern: /^4/,
62
+ valid_length: [16]
63
+ }, {
64
+ name: 'mastercard',
65
+ icon: 'images/mastercard.png',
66
+ pattern: /^5[1-5]/,
67
+ valid_length: [16]
68
+ }, {
69
+ name: 'maestro',
70
+ pattern: /^(5018|5020|5038|6304|6759|676[1-3])/,
71
+ valid_length: [12, 13, 14, 15, 16, 17, 18, 19]
72
+ }, {
73
+ name: 'discover',
74
+ icon: 'images/discover.png',
75
+ pattern: /^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,
76
+ valid_length: [16]
77
+ }
78
+ ];
79
+
80
+ var options = {};
81
+
82
+ if (options.accept == null) {
83
+ options.accept = (function() {
84
+ var _i, _len, _results;
85
+ _results = [];
86
+ for (_i = 0, _len = card_types.length; _i < _len; _i++) {
87
+ card = card_types[_i];
88
+ _results.push(card.name);
89
+ }
90
+ return _results;
91
+ })();
92
+ }
93
+ _ref = options.accept;
94
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
95
+ card_type = _ref[_i];
96
+ if (__indexOf.call((function() {
97
+ var _j, _len1, _results;
98
+ _results = [];
99
+ for (_j = 0, _len1 = card_types.length; _j < _len1; _j++) {
100
+ card = card_types[_j];
101
+ _results.push(card.name);
102
+ }
103
+ return _results;
104
+ })(), card_type) < 0) {
105
+ throw "Credit card type '" + card_type + "' is not supported";
106
+ }
107
+ }
108
+
109
+ get_card_type = function(number) {
110
+ var _j, _len1, _ref1;
111
+ _ref1 = (function() {
112
+ var _k, _len1, _ref1, _results;
113
+ _results = [];
114
+ for (_k = 0, _len1 = card_types.length; _k < _len1; _k++) {
115
+ card = card_types[_k];
116
+ if (_ref1 = card.name, __indexOf.call(options.accept, _ref1) >= 0) {
117
+ _results.push(card);
118
+ }
119
+ }
120
+ return _results;
121
+ })();
122
+ for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
123
+ card_type = _ref1[_j];
124
+ if (number.match(card_type.pattern)) {
125
+ return card_type;
126
+ }
127
+ }
128
+ return null;
129
+ };
130
+
131
+ is_valid_luhn = function(number) {
132
+ var digit, n, sum, _j, _len1, _ref1;
133
+ sum = 0;
134
+ _ref1 = number.split('').reverse();
135
+ for (n = _j = 0, _len1 = _ref1.length; _j < _len1; n = ++_j) {
136
+ digit = _ref1[n];
137
+ digit = +digit;
138
+ if (n % 2) {
139
+ digit *= 2;
140
+ if (digit < 10) {
141
+ sum += digit;
142
+ } else {
143
+ sum += digit - 9;
144
+ }
145
+ } else {
146
+ sum += digit;
147
+ }
148
+ }
149
+ return sum % 10 === 0;
150
+ };
151
+
152
+ is_valid_length = function(number, card_type) {
153
+ var _ref1;
154
+ return _ref1 = number.length, __indexOf.call(card_type.valid_length, _ref1) >= 0;
155
+ };
156
+
157
+ validate_number = (function(_this) {
158
+ return function(number) {
159
+ var length_valid, luhn_valid;
160
+ card_type = get_card_type(number);
161
+ luhn_valid = false;
162
+ length_valid = false;
163
+ if (card_type != null) {
164
+ luhn_valid = is_valid_luhn(number);
165
+ length_valid = is_valid_length(number, card_type);
166
+ }
167
+ return {
168
+ card_type: card_type,
169
+ valid: luhn_valid && length_valid,
170
+ luhn_valid: luhn_valid,
171
+ length_valid: length_valid
172
+ };
173
+ };
174
+ })(this);
175
+
176
+ normalize = function(number) {
177
+ return number.replace(/[ -]/g, '');
178
+ };
179
+
180
+ validate = (function(_this) {
181
+ return function() {
182
+ return validate_number(normalize(input));
183
+ };
184
+ })(this);
185
+
186
+ return validate(input);
187
+ };
188
+
189
+ global.CreditCardValidator = {
190
+ validate: validateCreditCard
191
+ };
192
+ })(this);