polymer-gold-rails 1.0.0.pre.rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/README.md +36 -0
- data/Rakefile +1 -0
- data/app/assets/components/gold-cc-cvc-input/README.md +24 -0
- data/app/assets/components/gold-cc-cvc-input/bower.json +39 -0
- data/app/assets/components/gold-cc-cvc-input/cvc_hint.png +0 -0
- data/app/assets/components/gold-cc-cvc-input/cvc_hint_amex.png +0 -0
- data/app/assets/components/gold-cc-cvc-input/demo/index.html +54 -0
- data/app/assets/components/gold-cc-cvc-input/gold-cc-cvc-input.html +195 -0
- data/app/assets/components/gold-cc-cvc-input/hero.svg +36 -0
- data/app/assets/components/gold-cc-cvc-input/index.html +26 -0
- data/app/assets/components/gold-cc-cvc-input/test/basic.html +125 -0
- data/app/assets/components/gold-cc-cvc-input/test/index.html +25 -0
- data/app/assets/components/gold-cc-expiration-input/README.md +10 -0
- data/app/assets/components/gold-cc-expiration-input/bower.json +40 -0
- data/app/assets/components/gold-cc-expiration-input/date-input.html +157 -0
- data/app/assets/components/gold-cc-expiration-input/date-validator.html +38 -0
- data/app/assets/components/gold-cc-expiration-input/demo/index.html +53 -0
- data/app/assets/components/gold-cc-expiration-input/gold-cc-expiration-input.html +131 -0
- data/app/assets/components/gold-cc-expiration-input/hero.svg +58 -0
- data/app/assets/components/gold-cc-expiration-input/index.html +28 -0
- data/app/assets/components/gold-cc-expiration-input/test/basic.html +126 -0
- data/app/assets/components/gold-cc-expiration-input/test/index.html +25 -0
- data/app/assets/components/gold-cc-input/README.md +9 -0
- data/app/assets/components/gold-cc-input/bower.json +39 -0
- data/app/assets/components/gold-cc-input/cc-validator.js +192 -0
- data/app/assets/components/gold-cc-input/demo/index.html +48 -0
- data/app/assets/components/gold-cc-input/gold-cc-input.html +215 -0
- data/app/assets/components/gold-cc-input/hero.svg +52 -0
- data/app/assets/components/gold-cc-input/images/amex.png +0 -0
- data/app/assets/components/gold-cc-input/images/diners_club.png +0 -0
- data/app/assets/components/gold-cc-input/images/discover.png +0 -0
- data/app/assets/components/gold-cc-input/images/jcb.png +0 -0
- data/app/assets/components/gold-cc-input/images/mastercard.png +0 -0
- data/app/assets/components/gold-cc-input/images/visa.png +0 -0
- data/app/assets/components/gold-cc-input/index.html +28 -0
- data/app/assets/components/gold-cc-input/test/basic.html +136 -0
- data/app/assets/components/gold-cc-input/test/index.html +25 -0
- data/app/assets/components/gold-elements/README.md +12 -0
- data/app/assets/components/gold-elements/bower.json +42 -0
- data/app/assets/components/gold-elements/demo/complex-form.html +127 -0
- data/app/assets/components/gold-elements/demo/index.html +94 -0
- data/app/assets/components/gold-elements/demo/item-card.html +59 -0
- data/app/assets/components/gold-elements/demo/simple-form.css +55 -0
- data/app/assets/components/gold-elements/demo/simple-form.html +93 -0
- data/app/assets/components/gold-elements/screenshot.png +0 -0
- data/app/assets/components/gold-email-input/README.md +8 -0
- data/app/assets/components/gold-email-input/bower.json +40 -0
- data/app/assets/components/gold-email-input/demo/index.html +46 -0
- data/app/assets/components/gold-email-input/email-validator.html +31 -0
- data/app/assets/components/gold-email-input/gold-email-input.html +108 -0
- data/app/assets/components/gold-email-input/hero.svg +59 -0
- data/app/assets/components/gold-email-input/index.html +28 -0
- data/app/assets/components/gold-email-input/test/basic.html +97 -0
- data/app/assets/components/gold-email-input/test/index.html +25 -0
- data/app/assets/components/gold-phone-input/README.md +13 -0
- data/app/assets/components/gold-phone-input/bower.json +39 -0
- data/app/assets/components/gold-phone-input/demo/index.html +53 -0
- data/app/assets/components/gold-phone-input/gold-phone-input.html +197 -0
- data/app/assets/components/gold-phone-input/hero.svg +63 -0
- data/app/assets/components/gold-phone-input/index.html +28 -0
- data/app/assets/components/gold-phone-input/test/basic.html +117 -0
- data/app/assets/components/gold-phone-input/test/index.html +25 -0
- data/app/assets/components/gold-zip-input/README.md +8 -0
- data/app/assets/components/gold-zip-input/bower.json +40 -0
- data/app/assets/components/gold-zip-input/demo/index.html +54 -0
- data/app/assets/components/gold-zip-input/gold-zip-input.html +113 -0
- data/app/assets/components/gold-zip-input/hero.svg +43 -0
- data/app/assets/components/gold-zip-input/index.html +28 -0
- data/app/assets/components/gold-zip-input/test/basic.html +116 -0
- data/app/assets/components/gold-zip-input/test/index.html +25 -0
- data/app/assets/components/gold-zip-input/zip-validator.html +32 -0
- data/app/assets/components/iron-autogrow-textarea/README.md +24 -0
- data/app/assets/components/iron-autogrow-textarea/bower.json +37 -0
- data/app/assets/components/iron-autogrow-textarea/demo/index.html +81 -0
- data/app/assets/components/iron-autogrow-textarea/hero.svg +33 -0
- data/app/assets/components/iron-autogrow-textarea/index.html +30 -0
- data/app/assets/components/iron-autogrow-textarea/iron-autogrow-textarea.html +263 -0
- data/app/assets/components/iron-autogrow-textarea/test/basic.html +94 -0
- data/app/assets/components/iron-autogrow-textarea/test/index.html +25 -0
- data/app/assets/components/iron-flex-layout/README.md +4 -0
- data/app/assets/components/iron-flex-layout/bower.json +21 -0
- data/app/assets/components/iron-flex-layout/classes/iron-flex-layout.html +307 -0
- data/app/assets/components/iron-flex-layout/classes/iron-shadow-flex-layout.html +302 -0
- data/app/assets/components/iron-flex-layout/demo/index.html +40 -0
- data/app/assets/components/iron-flex-layout/demo/x-app.html +106 -0
- data/app/assets/components/iron-flex-layout/iron-flex-layout.html +313 -0
- data/app/assets/components/iron-form-element-behavior/README.md +2 -0
- data/app/assets/components/iron-form-element-behavior/bower.json +27 -0
- data/app/assets/components/iron-form-element-behavior/demo/index.html +53 -0
- data/app/assets/components/iron-form-element-behavior/demo/simple-element.html +27 -0
- data/app/assets/components/iron-form-element-behavior/demo/simple-form.html +42 -0
- data/app/assets/components/iron-form-element-behavior/index.html +30 -0
- data/app/assets/components/iron-form-element-behavior/iron-form-element-behavior.html +50 -0
- data/app/assets/components/iron-icon/README.md +56 -0
- data/app/assets/components/iron-icon/bower.json +29 -0
- data/app/assets/components/iron-icon/demo/index.html +28 -0
- data/app/assets/components/iron-icon/demo/location.png +0 -0
- data/app/assets/components/iron-icon/hero.svg +19 -0
- data/app/assets/components/iron-icon/index.html +26 -0
- data/app/assets/components/iron-icon/iron-icon.html +187 -0
- data/app/assets/components/iron-icon/test/index.html +31 -0
- data/app/assets/components/iron-icon/test/iron-icon.html +120 -0
- data/app/assets/components/iron-input/README.md +16 -0
- data/app/assets/components/iron-input/bower.json +36 -0
- data/app/assets/components/iron-input/demo/index.html +87 -0
- data/app/assets/components/iron-input/hero.svg +19 -0
- data/app/assets/components/iron-input/index.html +30 -0
- data/app/assets/components/iron-input/iron-input.html +235 -0
- data/app/assets/components/iron-input/test/index.html +24 -0
- data/app/assets/components/iron-input/test/iron-input.html +139 -0
- data/app/assets/components/iron-input/test/letters-only.html +30 -0
- data/app/assets/components/iron-meta/README.md +46 -0
- data/app/assets/components/iron-meta/bower.json +28 -0
- data/app/assets/components/iron-meta/demo/index.html +45 -0
- data/app/assets/components/iron-meta/hero.svg +33 -0
- data/app/assets/components/iron-meta/index.html +27 -0
- data/app/assets/components/iron-meta/iron-meta.html +352 -0
- data/app/assets/components/iron-meta/test/basic.html +48 -0
- data/app/assets/components/iron-meta/test/index.html +30 -0
- data/app/assets/components/iron-meta/test/iron-meta.html +186 -0
- data/app/assets/components/iron-validatable-behavior/README.md +3 -0
- data/app/assets/components/iron-validatable-behavior/bower.json +35 -0
- data/app/assets/components/iron-validatable-behavior/demo/cats-only.html +46 -0
- data/app/assets/components/iron-validatable-behavior/demo/index.html +71 -0
- data/app/assets/components/iron-validatable-behavior/demo/validatable-input.html +46 -0
- data/app/assets/components/iron-validatable-behavior/index.html +30 -0
- data/app/assets/components/iron-validatable-behavior/iron-validatable-behavior.html +101 -0
- data/app/assets/components/iron-validatable-behavior/test/index.html +35 -0
- data/app/assets/components/iron-validatable-behavior/test/iron-validatable-behavior.html +52 -0
- data/app/assets/components/iron-validatable-behavior/test/test-validatable.html +28 -0
- data/app/assets/components/iron-validator-behavior/README.md +4 -0
- data/app/assets/components/iron-validator-behavior/bower.json +34 -0
- data/app/assets/components/iron-validator-behavior/demo/cats-only.html +46 -0
- data/app/assets/components/iron-validator-behavior/demo/index.html +144 -0
- data/app/assets/components/iron-validator-behavior/index.html +30 -0
- data/app/assets/components/iron-validator-behavior/iron-validator-behavior.html +61 -0
- data/app/assets/components/iron-validator-behavior/test/index.html +34 -0
- data/app/assets/components/iron-validator-behavior/test/iron-validator-behavior.html +47 -0
- data/app/assets/components/iron-validator-behavior/test/simple-validator.html +26 -0
- data/app/assets/components/paper-input/README.md +5 -0
- data/app/assets/components/paper-input/all-imports.html +12 -0
- data/app/assets/components/paper-input/bower.json +44 -0
- data/app/assets/components/paper-input/demo/index.html +96 -0
- data/app/assets/components/paper-input/demo/ssn-input.html +94 -0
- data/app/assets/components/paper-input/demo/ssn-validator.html +31 -0
- data/app/assets/components/paper-input/hero.svg +19 -0
- data/app/assets/components/paper-input/index.html +28 -0
- data/app/assets/components/paper-input/paper-input-addon-behavior.html +47 -0
- data/app/assets/components/paper-input/paper-input-behavior.html +317 -0
- data/app/assets/components/paper-input/paper-input-char-counter.html +95 -0
- data/app/assets/components/paper-input/paper-input-container.html +495 -0
- data/app/assets/components/paper-input/paper-input-error.html +99 -0
- data/app/assets/components/paper-input/paper-input.html +126 -0
- data/app/assets/components/paper-input/paper-textarea.html +106 -0
- data/app/assets/components/paper-input/test/index.html +28 -0
- data/app/assets/components/paper-input/test/letters-only.html +30 -0
- data/app/assets/components/paper-input/test/paper-input-char-counter.html +112 -0
- data/app/assets/components/paper-input/test/paper-input-container.html +237 -0
- data/app/assets/components/paper-input/test/paper-input-error.html +60 -0
- data/app/assets/components/paper-input/test/paper-input.html +213 -0
- data/app/assets/components/paper-input/test/paper-textarea.html +169 -0
- data/app/assets/components/paper-styles/README.md +3 -0
- data/app/assets/components/paper-styles/bower.json +27 -0
- data/app/assets/components/paper-styles/classes/global.html +96 -0
- data/app/assets/components/paper-styles/classes/shadow-layout.html +302 -0
- data/app/assets/components/paper-styles/classes/shadow.html +39 -0
- data/app/assets/components/paper-styles/classes/typography.html +171 -0
- data/app/assets/components/paper-styles/color.html +333 -0
- data/app/assets/components/paper-styles/default-theme.html +39 -0
- data/app/assets/components/paper-styles/demo-pages.html +72 -0
- data/app/assets/components/paper-styles/demo.css +25 -0
- data/app/assets/components/paper-styles/paper-styles-classes.html +14 -0
- data/app/assets/components/paper-styles/paper-styles.html +17 -0
- data/app/assets/components/paper-styles/shadow.html +61 -0
- data/app/assets/components/paper-styles/typography.html +240 -0
- data/app/assets/components/polymer/LICENSE.txt +27 -0
- data/app/assets/components/polymer/bower.json +26 -0
- data/app/assets/components/polymer/build.log +27 -0
- data/app/assets/components/polymer/polymer-micro.html +523 -0
- data/app/assets/components/polymer/polymer-mini.html +1368 -0
- data/app/assets/components/polymer/polymer.html +3768 -0
- data/app/assets/components/webcomponentsjs/CustomElements.js +956 -0
- data/app/assets/components/webcomponentsjs/CustomElements.min.js +11 -0
- data/app/assets/components/webcomponentsjs/HTMLImports.js +1078 -0
- data/app/assets/components/webcomponentsjs/HTMLImports.min.js +11 -0
- data/app/assets/components/webcomponentsjs/MutationObserver.js +344 -0
- data/app/assets/components/webcomponentsjs/MutationObserver.min.js +11 -0
- data/app/assets/components/webcomponentsjs/README.md +125 -0
- data/app/assets/components/webcomponentsjs/ShadowDOM.js +4414 -0
- data/app/assets/components/webcomponentsjs/ShadowDOM.min.js +15 -0
- data/app/assets/components/webcomponentsjs/bower.json +14 -0
- data/app/assets/components/webcomponentsjs/build.log +33 -0
- data/app/assets/components/webcomponentsjs/package.json +31 -0
- data/app/assets/components/webcomponentsjs/webcomponents-lite.js +2300 -0
- data/app/assets/components/webcomponentsjs/webcomponents-lite.min.js +13 -0
- data/app/assets/components/webcomponentsjs/webcomponents.js +7112 -0
- data/app/assets/components/webcomponentsjs/webcomponents.min.js +15 -0
- data/lib/polymer-gold-rails.rb +2 -0
- data/lib/polymer-gold-rails/enigne.rb +4 -0
- data/lib/polymer-gold-rails/version.rb +3 -0
- metadata +312 -0
Binary file
|
@@ -0,0 +1,40 @@
|
|
1
|
+
{
|
2
|
+
"name": "gold-email-input",
|
3
|
+
"version": "1.0.1",
|
4
|
+
"description": "An email input field",
|
5
|
+
"authors": [
|
6
|
+
"The Polymer Authors"
|
7
|
+
],
|
8
|
+
"keywords": [
|
9
|
+
"web-components",
|
10
|
+
"polymer",
|
11
|
+
"gold",
|
12
|
+
"input"
|
13
|
+
],
|
14
|
+
"main": [
|
15
|
+
"gold-email-input.html"
|
16
|
+
],
|
17
|
+
"private": true,
|
18
|
+
"repository": {
|
19
|
+
"type": "git",
|
20
|
+
"url": "git://github.com/PolymerElements/gold-email-input.git"
|
21
|
+
},
|
22
|
+
"license": "http://polymer.github.io/LICENSE.txt",
|
23
|
+
"homepage": "https://github.com/PolymerElements/gold-email-input",
|
24
|
+
"ignore": [],
|
25
|
+
"dependencies": {
|
26
|
+
"iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
|
27
|
+
"iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0",
|
28
|
+
"iron-icon": "PolymerElements/iron-icon#^1.0.0",
|
29
|
+
"paper-input": "PolymerElements/paper-input#^1.0.0",
|
30
|
+
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
31
|
+
"polymer": "Polymer/polymer#^1.0.0"
|
32
|
+
},
|
33
|
+
"devDependencies": {
|
34
|
+
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
35
|
+
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
|
36
|
+
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
37
|
+
"web-component-tester": "*",
|
38
|
+
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
39
|
+
}
|
40
|
+
}
|
@@ -0,0 +1,46 @@
|
|
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 http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
16
|
+
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
17
|
+
|
18
|
+
<title>gold-email-input demo</title>
|
19
|
+
|
20
|
+
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
21
|
+
<link rel="import" href="../gold-email-input.html">
|
22
|
+
|
23
|
+
<link rel="stylesheet" href="../../paper-styles/paper-styles.html">
|
24
|
+
<link rel="import" href="../../paper-styles/demo-pages.html">
|
25
|
+
|
26
|
+
</head>
|
27
|
+
<body>
|
28
|
+
<div class="vertical-section-container centered">
|
29
|
+
<h4>Standard</h4>
|
30
|
+
<div class="vertical-section">
|
31
|
+
<gold-email-input></gold-email-input>
|
32
|
+
<gold-email-input label="Auto-validating" auto-validate></gold-email-input>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<h4>Pre-validated</h4>
|
36
|
+
<div class="vertical-section">
|
37
|
+
<gold-email-input auto-validate value="batman@gotham.org"></gold-email-input>
|
38
|
+
<gold-email-input auto-validate value="not-a-thing.email"></gold-email-input>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<h4>Custom error message</h4>
|
42
|
+
<div class="vertical-section">
|
43
|
+
<gold-email-input required auto-validate error-message="Please enter a valid email" label="Email contact"></gold-email-input>
|
44
|
+
</div>
|
45
|
+
</div>
|
46
|
+
</body>
|
@@ -0,0 +1,31 @@
|
|
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
|
+
<link rel="import" href="../iron-validator-behavior/iron-validator-behavior.html">
|
13
|
+
|
14
|
+
<script>
|
15
|
+
|
16
|
+
Polymer({
|
17
|
+
|
18
|
+
is: 'email-validator',
|
19
|
+
|
20
|
+
behaviors: [
|
21
|
+
Polymer.IronValidatorBehavior
|
22
|
+
],
|
23
|
+
|
24
|
+
validate: function(value) {
|
25
|
+
var re = /[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?/i;
|
26
|
+
return re.test(value);
|
27
|
+
}
|
28
|
+
|
29
|
+
});
|
30
|
+
|
31
|
+
</script>
|
@@ -0,0 +1,108 @@
|
|
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="../paper-input/paper-input-behavior.html">
|
12
|
+
<link rel="import" href="../paper-input/paper-input-container.html">
|
13
|
+
<link rel="import" href="../paper-input/paper-input-error.html">
|
14
|
+
<link rel="import" href="../iron-input/iron-input.html">
|
15
|
+
<link rel="import" href="../iron-form-element-behavior/iron-form-element-behavior.html">
|
16
|
+
<link rel="import" href="email-validator.html">
|
17
|
+
|
18
|
+
<!--
|
19
|
+
`<gold-email-input>` is a single-line text field with Material Design styling
|
20
|
+
for entering an email address.
|
21
|
+
|
22
|
+
<gold-email-input></gold-email-input>
|
23
|
+
|
24
|
+
It may include an optional label, which by default is "Email".
|
25
|
+
|
26
|
+
<gold-email-input label="your email address"></gold-email-input>
|
27
|
+
|
28
|
+
### Validation
|
29
|
+
|
30
|
+
The input can be automatically validated as the user is typing by using
|
31
|
+
the `auto-validate` and `required` attributes. For manual validation, the
|
32
|
+
element also has a `validate()` method, which returns the validity of the
|
33
|
+
input as well sets any appropriate error messages and styles.
|
34
|
+
|
35
|
+
See `Polymer.PaperInputBehavior` for more API docs.
|
36
|
+
|
37
|
+
### Styling
|
38
|
+
|
39
|
+
See `Polymer.PaperInputContainer` for a list of custom properties used to
|
40
|
+
style this element.
|
41
|
+
|
42
|
+
@group Gold Elements
|
43
|
+
@hero hero.svg
|
44
|
+
@demo demo/index.html
|
45
|
+
@class gold-email-input
|
46
|
+
-->
|
47
|
+
|
48
|
+
<dom-module id="gold-email-input">
|
49
|
+
<style>
|
50
|
+
:host {
|
51
|
+
display: block;
|
52
|
+
}
|
53
|
+
</style>
|
54
|
+
|
55
|
+
<template>
|
56
|
+
|
57
|
+
<paper-input-container id="container"
|
58
|
+
auto-validate="[[autoValidate]]"
|
59
|
+
attr-for-value="bind-value">
|
60
|
+
|
61
|
+
<label hidden$="[[!label]]">[[label]]</label>
|
62
|
+
|
63
|
+
<email-validator></email-validator>
|
64
|
+
|
65
|
+
<input is="iron-input" id="input"
|
66
|
+
required$="[[required]]"
|
67
|
+
aria-labelledby$="[[_ariaLabelledBy]]"
|
68
|
+
aria-describedby$="[[_ariaDescribedBy]]"
|
69
|
+
validator="email-validator"
|
70
|
+
bind-value="{{value}}"
|
71
|
+
autocomplete="email"
|
72
|
+
name$="[[name]]">
|
73
|
+
|
74
|
+
<template is="dom-if" if="[[errorMessage]]">
|
75
|
+
<paper-input-error id="error">[[errorMessage]]</paper-input-error>
|
76
|
+
</template>
|
77
|
+
|
78
|
+
</paper-input-container>
|
79
|
+
</template>
|
80
|
+
|
81
|
+
</dom-module>
|
82
|
+
|
83
|
+
<script>
|
84
|
+
(function() {
|
85
|
+
Polymer({
|
86
|
+
|
87
|
+
is: 'gold-email-input',
|
88
|
+
|
89
|
+
behaviors: [
|
90
|
+
Polymer.PaperInputBehavior,
|
91
|
+
Polymer.IronFormElementBehavior
|
92
|
+
],
|
93
|
+
|
94
|
+
properties: {
|
95
|
+
/**
|
96
|
+
* The label for this input.
|
97
|
+
*/
|
98
|
+
label: {
|
99
|
+
type: String,
|
100
|
+
value: "Email"
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
})
|
105
|
+
|
106
|
+
})();
|
107
|
+
|
108
|
+
</script>
|
@@ -0,0 +1,59 @@
|
|
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
|
+
<polygon points="69,67.7 63,59.7 57,67.7 50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,1.6,1.2,3.4,2.2,3.4V68z"/>
|
53
|
+
<path d="M188,78H37V44h151V78z M39,76h147V46H39V76z"/>
|
54
|
+
<g id="ic_x5F_add_x0D_">
|
55
|
+
</g>
|
56
|
+
</g>
|
57
|
+
<g id="Guides">
|
58
|
+
</g>
|
59
|
+
</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-email-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,97 @@
|
|
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-email-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-email-input.html">
|
29
|
+
|
30
|
+
</head>
|
31
|
+
<body>
|
32
|
+
|
33
|
+
<test-fixture id="basic">
|
34
|
+
<template>
|
35
|
+
<gold-email-input auto-validate required error-message="error"></gold-email-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('valid input is ok', function() {
|
53
|
+
var input = fixture('basic');
|
54
|
+
input.value='batman@gotham.org';
|
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.isFalse(container.invalid);
|
60
|
+
});
|
61
|
+
|
62
|
+
|
63
|
+
test('weird tlds are ok', function() {
|
64
|
+
var input = fixture('basic');
|
65
|
+
input.value='testing+contact@subdomain.domain.pizza';
|
66
|
+
forceXIfStamp(input);
|
67
|
+
|
68
|
+
var container = Polymer.dom(input.root).querySelector('paper-input-container');
|
69
|
+
assert.ok(container, 'paper-input-container exists');
|
70
|
+
assert.isFalse(container.invalid);
|
71
|
+
});
|
72
|
+
|
73
|
+
test('empty required input shows error', function() {
|
74
|
+
var input = fixture('basic');
|
75
|
+
forceXIfStamp(input);
|
76
|
+
|
77
|
+
var error = Polymer.dom(input.root).querySelector('paper-input-error');
|
78
|
+
assert.ok(error, 'paper-input-error exists');
|
79
|
+
assert.notEqual(getComputedStyle(error).display, 'none', 'error is not display:none');
|
80
|
+
});
|
81
|
+
|
82
|
+
});
|
83
|
+
|
84
|
+
suite('a11y', function() {
|
85
|
+
|
86
|
+
test('has aria-labelledby', function() {
|
87
|
+
var input = fixture('basic');
|
88
|
+
assert.isTrue(input.inputElement.hasAttribute('aria-labelledby'))
|
89
|
+
assert.equal(input.inputElement.getAttribute('aria-labelledby'), Polymer.dom(input.root).querySelector('label').id, 'aria-labelledby points to the label');
|
90
|
+
});
|
91
|
+
|
92
|
+
});
|
93
|
+
|
94
|
+
</script>
|
95
|
+
|
96
|
+
</body>
|
97
|
+
</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-email-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>
|