polymer-neon-rails 1.0.0.pre.rc.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +39 -0
- data/Rakefile +1 -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-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-resizable-behavior/README.md +16 -0
- data/app/assets/components/iron-resizable-behavior/bower.json +26 -0
- data/app/assets/components/iron-resizable-behavior/demo/index.html +29 -0
- data/app/assets/components/iron-resizable-behavior/demo/src/x-app.html +114 -0
- data/app/assets/components/iron-resizable-behavior/index.html +25 -0
- data/app/assets/components/iron-resizable-behavior/iron-resizable-behavior.html +139 -0
- data/app/assets/components/iron-resizable-behavior/test/basic.html +263 -0
- data/app/assets/components/iron-resizable-behavior/test/index.html +31 -0
- data/app/assets/components/iron-resizable-behavior/test/test-elements.html +143 -0
- data/app/assets/components/iron-selector/README.md +50 -0
- data/app/assets/components/iron-selector/bower.json +31 -0
- data/app/assets/components/iron-selector/demo/index.html +66 -0
- data/app/assets/components/iron-selector/index.html +28 -0
- data/app/assets/components/iron-selector/iron-multi-selectable.html +120 -0
- data/app/assets/components/iron-selector/iron-selectable.html +307 -0
- data/app/assets/components/iron-selector/iron-selection.html +115 -0
- data/app/assets/components/iron-selector/iron-selector.html +71 -0
- data/app/assets/components/iron-selector/test/activate-event.html +138 -0
- data/app/assets/components/iron-selector/test/basic.html +150 -0
- data/app/assets/components/iron-selector/test/content-element.html +43 -0
- data/app/assets/components/iron-selector/test/content.html +168 -0
- data/app/assets/components/iron-selector/test/index.html +36 -0
- data/app/assets/components/iron-selector/test/multi.html +135 -0
- data/app/assets/components/iron-selector/test/next-previous.html +134 -0
- data/app/assets/components/iron-selector/test/selected-attribute.html +72 -0
- data/app/assets/components/iron-selector/test/template-repeat.html +110 -0
- data/app/assets/components/neon-animation/README.md +304 -0
- data/app/assets/components/neon-animation/animations/cascaded-animation.html +84 -0
- data/app/assets/components/neon-animation/animations/fade-in-animation.html +49 -0
- data/app/assets/components/neon-animation/animations/fade-out-animation.html +49 -0
- data/app/assets/components/neon-animation/animations/hero-animation.html +83 -0
- data/app/assets/components/neon-animation/animations/opaque-animation.html +46 -0
- data/app/assets/components/neon-animation/animations/ripple-animation.html +92 -0
- data/app/assets/components/neon-animation/animations/scale-down-animation.html +65 -0
- data/app/assets/components/neon-animation/animations/scale-up-animation.html +58 -0
- data/app/assets/components/neon-animation/animations/slide-down-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/slide-from-left-animation.html +60 -0
- data/app/assets/components/neon-animation/animations/slide-from-right-animation.html +60 -0
- data/app/assets/components/neon-animation/animations/slide-left-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/slide-right-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/slide-up-animation.html +59 -0
- data/app/assets/components/neon-animation/animations/transform-animation.html +61 -0
- data/app/assets/components/neon-animation/bower.json +51 -0
- data/app/assets/components/neon-animation/demo/declarative/index.html +108 -0
- data/app/assets/components/neon-animation/demo/doc/basic.html +47 -0
- data/app/assets/components/neon-animation/demo/doc/my-animatable.html +73 -0
- data/app/assets/components/neon-animation/demo/doc/my-dialog.html +97 -0
- data/app/assets/components/neon-animation/demo/doc/types.html +53 -0
- data/app/assets/components/neon-animation/demo/dropdown/animated-dropdown.html +97 -0
- data/app/assets/components/neon-animation/demo/dropdown/index.html +54 -0
- data/app/assets/components/neon-animation/demo/grid/animated-grid.html +166 -0
- data/app/assets/components/neon-animation/demo/grid/fullsize-page-with-card.html +124 -0
- data/app/assets/components/neon-animation/demo/grid/index.html +70 -0
- data/app/assets/components/neon-animation/demo/index.html +6 -0
- data/app/assets/components/neon-animation/demo/list/full-view.html +122 -0
- data/app/assets/components/neon-animation/demo/list/index.html +29 -0
- data/app/assets/components/neon-animation/demo/list/list-demo.html +112 -0
- data/app/assets/components/neon-animation/demo/list/list-view.html +127 -0
- data/app/assets/components/neon-animation/demo/load/animated-grid.html +147 -0
- data/app/assets/components/neon-animation/demo/load/full-page.html +86 -0
- data/app/assets/components/neon-animation/demo/load/index.html +45 -0
- data/app/assets/components/neon-animation/demo/reprojection/animated-grid.html +166 -0
- data/app/assets/components/neon-animation/demo/reprojection/fullsize-page-with-card.html +124 -0
- data/app/assets/components/neon-animation/demo/reprojection/index.html +66 -0
- data/app/assets/components/neon-animation/demo/reprojection/reprojected-pages.html +42 -0
- data/app/assets/components/neon-animation/demo/shared.css +40 -0
- data/app/assets/components/neon-animation/demo/tiles/circles-page.html +110 -0
- data/app/assets/components/neon-animation/demo/tiles/index.html +77 -0
- data/app/assets/components/neon-animation/demo/tiles/squares-page.html +104 -0
- data/app/assets/components/neon-animation/guides/neon-animation.md +313 -0
- data/app/assets/components/neon-animation/index.html +30 -0
- data/app/assets/components/neon-animation/neon-animatable-behavior.html +156 -0
- data/app/assets/components/neon-animation/neon-animatable.html +54 -0
- data/app/assets/components/neon-animation/neon-animated-pages.html +208 -0
- data/app/assets/components/neon-animation/neon-animation-behavior.html +88 -0
- data/app/assets/components/neon-animation/neon-animation-runner-behavior.html +110 -0
- data/app/assets/components/neon-animation/neon-animation.html +17 -0
- data/app/assets/components/neon-animation/neon-animations.html +25 -0
- data/app/assets/components/neon-animation/neon-shared-element-animatable-behavior.html +37 -0
- data/app/assets/components/neon-animation/neon-shared-element-animation-behavior.html +66 -0
- data/app/assets/components/neon-animation/web-animations.html +11 -0
- data/app/assets/components/neon-elements/README.md +19 -0
- data/app/assets/components/neon-elements/bower.json +26 -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/web-animations-js/COPYING +202 -0
- data/app/assets/components/web-animations-js/History.md +108 -0
- data/app/assets/components/web-animations-js/README.md +161 -0
- data/app/assets/components/web-animations-js/bower.json +31 -0
- data/app/assets/components/web-animations-js/web-animations-next-lite.min.js +17 -0
- data/app/assets/components/web-animations-js/web-animations-next-lite.min.js.map +1 -0
- data/app/assets/components/web-animations-js/web-animations-next.min.js +17 -0
- data/app/assets/components/web-animations-js/web-animations-next.min.js.map +1 -0
- data/app/assets/components/web-animations-js/web-animations.html +50 -0
- data/app/assets/components/web-animations-js/web-animations.min.js +17 -0
- data/app/assets/components/web-animations-js/web-animations.min.js.gz +0 -0
- data/app/assets/components/web-animations-js/web-animations.min.js.map +1 -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-neon-rails.rb +2 -0
- data/lib/polymer-neon-rails/engine.rb +4 -0
- data/lib/polymer-neon-rails/version.rb +3 -0
- metadata +264 -0
@@ -0,0 +1,58 @@
|
|
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="../neon-animation-behavior.html">
|
13
|
+
<link rel="import" href="../web-animations.html">
|
14
|
+
|
15
|
+
<!--
|
16
|
+
`<scale-up-animation>` animates the scale transform of an element from 0 to 1. By default it
|
17
|
+
scales in both the x and y axes.
|
18
|
+
|
19
|
+
Configuration:
|
20
|
+
```
|
21
|
+
{
|
22
|
+
name: 'scale-up-animation',
|
23
|
+
node: <node>,
|
24
|
+
axis: 'x' | 'y' | '',
|
25
|
+
transformOrigin: <transform-origin>,
|
26
|
+
timing: <animation-timing>
|
27
|
+
}
|
28
|
+
```
|
29
|
+
-->
|
30
|
+
|
31
|
+
<script>
|
32
|
+
|
33
|
+
Polymer({
|
34
|
+
|
35
|
+
is: 'scale-up-animation',
|
36
|
+
|
37
|
+
behaviors: [
|
38
|
+
Polymer.NeonAnimationBehavior
|
39
|
+
],
|
40
|
+
|
41
|
+
configure: function(config) {
|
42
|
+
var node = config.node;
|
43
|
+
|
44
|
+
if (config.transformOrigin) {
|
45
|
+
this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
|
46
|
+
}
|
47
|
+
|
48
|
+
this._effect = new KeyframeEffect(node, [
|
49
|
+
{'transform': 'scale(0)'},
|
50
|
+
{'transform': 'scale(1)'}
|
51
|
+
], this.timingFromConfig(config));
|
52
|
+
|
53
|
+
return this._effect;
|
54
|
+
}
|
55
|
+
|
56
|
+
});
|
57
|
+
|
58
|
+
</script>
|
@@ -0,0 +1,59 @@
|
|
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="../neon-animation-behavior.html">
|
13
|
+
<link rel="import" href="../web-animations.html">
|
14
|
+
|
15
|
+
<!--
|
16
|
+
`<slide-down-animation>` animates the transform of an element from `translateY(-100%)` to `none`.
|
17
|
+
The `transformOrigin` defaults to `50% 0`.
|
18
|
+
|
19
|
+
Configuration:
|
20
|
+
```
|
21
|
+
{
|
22
|
+
name: 'slide-down-animation',
|
23
|
+
node: <node>,
|
24
|
+
transformOrigin: <transform-origin>,
|
25
|
+
timing: <animation-timing>
|
26
|
+
}
|
27
|
+
```
|
28
|
+
-->
|
29
|
+
|
30
|
+
<script>
|
31
|
+
|
32
|
+
Polymer({
|
33
|
+
|
34
|
+
is: 'slide-down-animation',
|
35
|
+
|
36
|
+
behaviors: [
|
37
|
+
Polymer.NeonAnimationBehavior
|
38
|
+
],
|
39
|
+
|
40
|
+
configure: function(config) {
|
41
|
+
var node = config.node;
|
42
|
+
|
43
|
+
if (config.transformOrigin) {
|
44
|
+
this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
|
45
|
+
} else {
|
46
|
+
this.setPrefixedProperty(node, 'transformOrigin', '50% 0');
|
47
|
+
}
|
48
|
+
|
49
|
+
this._effect = new KeyframeEffect(node, [
|
50
|
+
{'transform': 'translateY(-100%)'},
|
51
|
+
{'transform': 'none'}
|
52
|
+
], this.timingFromConfig(config));
|
53
|
+
|
54
|
+
return this._effect;
|
55
|
+
}
|
56
|
+
|
57
|
+
});
|
58
|
+
|
59
|
+
</script>
|
@@ -0,0 +1,60 @@
|
|
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="../neon-animation-behavior.html">
|
13
|
+
<link rel="import" href="../web-animations.html">
|
14
|
+
|
15
|
+
<!--
|
16
|
+
`<slide-from-left-animation>` animates the transform of an element from
|
17
|
+
`translateX(-100%)` to `none`.
|
18
|
+
The `transformOrigin` defaults to `0 50%`.
|
19
|
+
|
20
|
+
Configuration:
|
21
|
+
```
|
22
|
+
{
|
23
|
+
name: 'slide-from-left-animation',
|
24
|
+
node: <node>,
|
25
|
+
transformOrigin: <transform-origin>,
|
26
|
+
timing: <animation-timing>
|
27
|
+
}
|
28
|
+
```
|
29
|
+
-->
|
30
|
+
|
31
|
+
<script>
|
32
|
+
|
33
|
+
Polymer({
|
34
|
+
|
35
|
+
is: 'slide-from-left-animation',
|
36
|
+
|
37
|
+
behaviors: [
|
38
|
+
Polymer.NeonAnimationBehavior
|
39
|
+
],
|
40
|
+
|
41
|
+
configure: function(config) {
|
42
|
+
var node = config.node;
|
43
|
+
|
44
|
+
if (config.transformOrigin) {
|
45
|
+
this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
|
46
|
+
} else {
|
47
|
+
this.setPrefixedProperty(node, 'transformOrigin', '0 50%');
|
48
|
+
}
|
49
|
+
|
50
|
+
this._effect = new KeyframeEffect(node, [
|
51
|
+
{'transform': 'translateX(-100%)'},
|
52
|
+
{'transform': 'none'}
|
53
|
+
], this.timingFromConfig(config));
|
54
|
+
|
55
|
+
return this._effect;
|
56
|
+
}
|
57
|
+
|
58
|
+
});
|
59
|
+
|
60
|
+
</script>
|
@@ -0,0 +1,60 @@
|
|
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="../neon-animation-behavior.html">
|
13
|
+
<link rel="import" href="../web-animations.html">
|
14
|
+
|
15
|
+
<!--
|
16
|
+
`<slide-from-right-animation>` animates the transform of an element from
|
17
|
+
`translateX(100%)` to `none`.
|
18
|
+
The `transformOrigin` defaults to `0 50%`.
|
19
|
+
|
20
|
+
Configuration:
|
21
|
+
```
|
22
|
+
{
|
23
|
+
name: 'slide-from-right-animation',
|
24
|
+
node: <node>,
|
25
|
+
transformOrigin: <transform-origin>,
|
26
|
+
timing: <animation-timing>
|
27
|
+
}
|
28
|
+
```
|
29
|
+
-->
|
30
|
+
|
31
|
+
<script>
|
32
|
+
|
33
|
+
Polymer({
|
34
|
+
|
35
|
+
is: 'slide-from-right-animation',
|
36
|
+
|
37
|
+
behaviors: [
|
38
|
+
Polymer.NeonAnimationBehavior
|
39
|
+
],
|
40
|
+
|
41
|
+
configure: function(config) {
|
42
|
+
var node = config.node;
|
43
|
+
|
44
|
+
if (config.transformOrigin) {
|
45
|
+
this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
|
46
|
+
} else {
|
47
|
+
this.setPrefixedProperty(node, 'transformOrigin', '0 50%');
|
48
|
+
}
|
49
|
+
|
50
|
+
this._effect = new KeyframeEffect(node, [
|
51
|
+
{'transform': 'translateX(100%)'},
|
52
|
+
{'transform': 'none'}
|
53
|
+
], this.timingFromConfig(config));
|
54
|
+
|
55
|
+
return this._effect;
|
56
|
+
}
|
57
|
+
|
58
|
+
});
|
59
|
+
|
60
|
+
</script>
|
@@ -0,0 +1,59 @@
|
|
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="../neon-animation-behavior.html">
|
13
|
+
<link rel="import" href="../web-animations.html">
|
14
|
+
|
15
|
+
<!--
|
16
|
+
`<slide-left-animation>` animates the transform of an element from `none` to `translateX(-100%)`.
|
17
|
+
The `transformOrigin` defaults to `0 50%`.
|
18
|
+
|
19
|
+
Configuration:
|
20
|
+
```
|
21
|
+
{
|
22
|
+
name: 'slide-left-animation',
|
23
|
+
node: <node>,
|
24
|
+
transformOrigin: <transform-origin>,
|
25
|
+
timing: <animation-timing>
|
26
|
+
}
|
27
|
+
```
|
28
|
+
-->
|
29
|
+
|
30
|
+
<script>
|
31
|
+
|
32
|
+
Polymer({
|
33
|
+
|
34
|
+
is: 'slide-left-animation',
|
35
|
+
|
36
|
+
behaviors: [
|
37
|
+
Polymer.NeonAnimationBehavior
|
38
|
+
],
|
39
|
+
|
40
|
+
configure: function(config) {
|
41
|
+
var node = config.node;
|
42
|
+
|
43
|
+
if (config.transformOrigin) {
|
44
|
+
this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
|
45
|
+
} else {
|
46
|
+
this.setPrefixedProperty(node, 'transformOrigin', '0 50%');
|
47
|
+
}
|
48
|
+
|
49
|
+
this._effect = new KeyframeEffect(node, [
|
50
|
+
{'transform': 'none'},
|
51
|
+
{'transform': 'translateX(-100%)'}
|
52
|
+
], this.timingFromConfig(config));
|
53
|
+
|
54
|
+
return this._effect;
|
55
|
+
}
|
56
|
+
|
57
|
+
});
|
58
|
+
|
59
|
+
</script>
|
@@ -0,0 +1,59 @@
|
|
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="../neon-animation-behavior.html">
|
13
|
+
<link rel="import" href="../web-animations.html">
|
14
|
+
|
15
|
+
<!--
|
16
|
+
`<slide-right-animation>` animates the transform of an element from `none` to `translateX(100%)`.
|
17
|
+
The `transformOrigin` defaults to `0 50%`.
|
18
|
+
|
19
|
+
Configuration:
|
20
|
+
```
|
21
|
+
{
|
22
|
+
name: 'slide-right-animation',
|
23
|
+
node: <node>,
|
24
|
+
transformOrigin: <transform-origin>,
|
25
|
+
timing: <animation-timing>
|
26
|
+
}
|
27
|
+
```
|
28
|
+
-->
|
29
|
+
|
30
|
+
<script>
|
31
|
+
|
32
|
+
Polymer({
|
33
|
+
|
34
|
+
is: 'slide-right-animation',
|
35
|
+
|
36
|
+
behaviors: [
|
37
|
+
Polymer.NeonAnimationBehavior
|
38
|
+
],
|
39
|
+
|
40
|
+
configure: function(config) {
|
41
|
+
var node = config.node;
|
42
|
+
|
43
|
+
if (config.transformOrigin) {
|
44
|
+
this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
|
45
|
+
} else {
|
46
|
+
this.setPrefixedProperty(node, 'transformOrigin', '0 50%');
|
47
|
+
}
|
48
|
+
|
49
|
+
this._effect = new KeyframeEffect(node, [
|
50
|
+
{'transform': 'none'},
|
51
|
+
{'transform': 'translateX(100%)'}
|
52
|
+
], this.timingFromConfig(config));
|
53
|
+
|
54
|
+
return this._effect;
|
55
|
+
}
|
56
|
+
|
57
|
+
});
|
58
|
+
|
59
|
+
</script>
|
@@ -0,0 +1,59 @@
|
|
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="../neon-animation-behavior.html">
|
13
|
+
<link rel="import" href="../web-animations.html">
|
14
|
+
|
15
|
+
<!--
|
16
|
+
`<slide-up-animation>` animates the transform of an element from `translateY(0)` to
|
17
|
+
`translateY(-100%)`. The `transformOrigin` defaults to `50% 0`.
|
18
|
+
|
19
|
+
Configuration:
|
20
|
+
```
|
21
|
+
{
|
22
|
+
name: 'slide-up-animation',
|
23
|
+
node: <node>,
|
24
|
+
transformOrigin: <transform-origin>,
|
25
|
+
timing: <animation-timing>
|
26
|
+
}
|
27
|
+
```
|
28
|
+
-->
|
29
|
+
|
30
|
+
<script>
|
31
|
+
|
32
|
+
Polymer({
|
33
|
+
|
34
|
+
is: 'slide-up-animation',
|
35
|
+
|
36
|
+
behaviors: [
|
37
|
+
Polymer.NeonAnimationBehavior
|
38
|
+
],
|
39
|
+
|
40
|
+
configure: function(config) {
|
41
|
+
var node = config.node;
|
42
|
+
|
43
|
+
if (config.transformOrigin) {
|
44
|
+
this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
|
45
|
+
} else {
|
46
|
+
this.setPrefixedProperty(node, 'transformOrigin', '50% 0');
|
47
|
+
}
|
48
|
+
|
49
|
+
this._effect = new KeyframeEffect(node, [
|
50
|
+
{'transform': 'translate(0)'},
|
51
|
+
{'transform': 'translateY(-100%)'}
|
52
|
+
], this.timingFromConfig(config));
|
53
|
+
|
54
|
+
return this._effect;
|
55
|
+
}
|
56
|
+
|
57
|
+
});
|
58
|
+
|
59
|
+
</script>
|
@@ -0,0 +1,61 @@
|
|
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="../neon-animation-behavior.html">
|
13
|
+
<link rel="import" href="../web-animations.html">
|
14
|
+
|
15
|
+
<!--
|
16
|
+
`<slide-down-animation>` animates a custom transform on an element. Use this to animate multiple
|
17
|
+
transform properties, or to apply a custom transform value.
|
18
|
+
|
19
|
+
Configuration:
|
20
|
+
```
|
21
|
+
{
|
22
|
+
name: 'slide-down-animation',
|
23
|
+
node: <node>,
|
24
|
+
transformOrigin: <transform-origin>,
|
25
|
+
transformFrom: <transform-from-string>,
|
26
|
+
transformTo: <transform-to-string>,
|
27
|
+
timing: <animation-timing>
|
28
|
+
}
|
29
|
+
```
|
30
|
+
-->
|
31
|
+
|
32
|
+
<script>
|
33
|
+
|
34
|
+
Polymer({
|
35
|
+
|
36
|
+
is: 'transform-animation',
|
37
|
+
|
38
|
+
behaviors: [
|
39
|
+
Polymer.NeonAnimationBehavior
|
40
|
+
],
|
41
|
+
|
42
|
+
configure: function(config) {
|
43
|
+
var node = config.node;
|
44
|
+
var transformFrom = config.transformFrom || 'none';
|
45
|
+
var transformTo = config.transformTo || 'none';
|
46
|
+
|
47
|
+
if (config.transformOrigin) {
|
48
|
+
this.setPrefixedProperty(node, 'transformOrigin', config.transformOrigin);
|
49
|
+
}
|
50
|
+
|
51
|
+
this._effect = new KeyframeEffect(node, [
|
52
|
+
{'transform': transformFrom},
|
53
|
+
{'transform': transformTo}
|
54
|
+
], this.timingFromConfig(config));
|
55
|
+
|
56
|
+
return this._effect;
|
57
|
+
}
|
58
|
+
|
59
|
+
});
|
60
|
+
|
61
|
+
</script>
|