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.
Files changed (154) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +39 -0
  3. data/Rakefile +1 -0
  4. data/app/assets/components/iron-flex-layout/README.md +4 -0
  5. data/app/assets/components/iron-flex-layout/bower.json +21 -0
  6. data/app/assets/components/iron-flex-layout/classes/iron-flex-layout.html +307 -0
  7. data/app/assets/components/iron-flex-layout/classes/iron-shadow-flex-layout.html +302 -0
  8. data/app/assets/components/iron-flex-layout/demo/index.html +40 -0
  9. data/app/assets/components/iron-flex-layout/demo/x-app.html +106 -0
  10. data/app/assets/components/iron-flex-layout/iron-flex-layout.html +313 -0
  11. data/app/assets/components/iron-meta/README.md +46 -0
  12. data/app/assets/components/iron-meta/bower.json +28 -0
  13. data/app/assets/components/iron-meta/demo/index.html +45 -0
  14. data/app/assets/components/iron-meta/hero.svg +33 -0
  15. data/app/assets/components/iron-meta/index.html +27 -0
  16. data/app/assets/components/iron-meta/iron-meta.html +352 -0
  17. data/app/assets/components/iron-meta/test/basic.html +48 -0
  18. data/app/assets/components/iron-meta/test/index.html +30 -0
  19. data/app/assets/components/iron-meta/test/iron-meta.html +186 -0
  20. data/app/assets/components/iron-resizable-behavior/README.md +16 -0
  21. data/app/assets/components/iron-resizable-behavior/bower.json +26 -0
  22. data/app/assets/components/iron-resizable-behavior/demo/index.html +29 -0
  23. data/app/assets/components/iron-resizable-behavior/demo/src/x-app.html +114 -0
  24. data/app/assets/components/iron-resizable-behavior/index.html +25 -0
  25. data/app/assets/components/iron-resizable-behavior/iron-resizable-behavior.html +139 -0
  26. data/app/assets/components/iron-resizable-behavior/test/basic.html +263 -0
  27. data/app/assets/components/iron-resizable-behavior/test/index.html +31 -0
  28. data/app/assets/components/iron-resizable-behavior/test/test-elements.html +143 -0
  29. data/app/assets/components/iron-selector/README.md +50 -0
  30. data/app/assets/components/iron-selector/bower.json +31 -0
  31. data/app/assets/components/iron-selector/demo/index.html +66 -0
  32. data/app/assets/components/iron-selector/index.html +28 -0
  33. data/app/assets/components/iron-selector/iron-multi-selectable.html +120 -0
  34. data/app/assets/components/iron-selector/iron-selectable.html +307 -0
  35. data/app/assets/components/iron-selector/iron-selection.html +115 -0
  36. data/app/assets/components/iron-selector/iron-selector.html +71 -0
  37. data/app/assets/components/iron-selector/test/activate-event.html +138 -0
  38. data/app/assets/components/iron-selector/test/basic.html +150 -0
  39. data/app/assets/components/iron-selector/test/content-element.html +43 -0
  40. data/app/assets/components/iron-selector/test/content.html +168 -0
  41. data/app/assets/components/iron-selector/test/index.html +36 -0
  42. data/app/assets/components/iron-selector/test/multi.html +135 -0
  43. data/app/assets/components/iron-selector/test/next-previous.html +134 -0
  44. data/app/assets/components/iron-selector/test/selected-attribute.html +72 -0
  45. data/app/assets/components/iron-selector/test/template-repeat.html +110 -0
  46. data/app/assets/components/neon-animation/README.md +304 -0
  47. data/app/assets/components/neon-animation/animations/cascaded-animation.html +84 -0
  48. data/app/assets/components/neon-animation/animations/fade-in-animation.html +49 -0
  49. data/app/assets/components/neon-animation/animations/fade-out-animation.html +49 -0
  50. data/app/assets/components/neon-animation/animations/hero-animation.html +83 -0
  51. data/app/assets/components/neon-animation/animations/opaque-animation.html +46 -0
  52. data/app/assets/components/neon-animation/animations/ripple-animation.html +92 -0
  53. data/app/assets/components/neon-animation/animations/scale-down-animation.html +65 -0
  54. data/app/assets/components/neon-animation/animations/scale-up-animation.html +58 -0
  55. data/app/assets/components/neon-animation/animations/slide-down-animation.html +59 -0
  56. data/app/assets/components/neon-animation/animations/slide-from-left-animation.html +60 -0
  57. data/app/assets/components/neon-animation/animations/slide-from-right-animation.html +60 -0
  58. data/app/assets/components/neon-animation/animations/slide-left-animation.html +59 -0
  59. data/app/assets/components/neon-animation/animations/slide-right-animation.html +59 -0
  60. data/app/assets/components/neon-animation/animations/slide-up-animation.html +59 -0
  61. data/app/assets/components/neon-animation/animations/transform-animation.html +61 -0
  62. data/app/assets/components/neon-animation/bower.json +51 -0
  63. data/app/assets/components/neon-animation/demo/declarative/index.html +108 -0
  64. data/app/assets/components/neon-animation/demo/doc/basic.html +47 -0
  65. data/app/assets/components/neon-animation/demo/doc/my-animatable.html +73 -0
  66. data/app/assets/components/neon-animation/demo/doc/my-dialog.html +97 -0
  67. data/app/assets/components/neon-animation/demo/doc/types.html +53 -0
  68. data/app/assets/components/neon-animation/demo/dropdown/animated-dropdown.html +97 -0
  69. data/app/assets/components/neon-animation/demo/dropdown/index.html +54 -0
  70. data/app/assets/components/neon-animation/demo/grid/animated-grid.html +166 -0
  71. data/app/assets/components/neon-animation/demo/grid/fullsize-page-with-card.html +124 -0
  72. data/app/assets/components/neon-animation/demo/grid/index.html +70 -0
  73. data/app/assets/components/neon-animation/demo/index.html +6 -0
  74. data/app/assets/components/neon-animation/demo/list/full-view.html +122 -0
  75. data/app/assets/components/neon-animation/demo/list/index.html +29 -0
  76. data/app/assets/components/neon-animation/demo/list/list-demo.html +112 -0
  77. data/app/assets/components/neon-animation/demo/list/list-view.html +127 -0
  78. data/app/assets/components/neon-animation/demo/load/animated-grid.html +147 -0
  79. data/app/assets/components/neon-animation/demo/load/full-page.html +86 -0
  80. data/app/assets/components/neon-animation/demo/load/index.html +45 -0
  81. data/app/assets/components/neon-animation/demo/reprojection/animated-grid.html +166 -0
  82. data/app/assets/components/neon-animation/demo/reprojection/fullsize-page-with-card.html +124 -0
  83. data/app/assets/components/neon-animation/demo/reprojection/index.html +66 -0
  84. data/app/assets/components/neon-animation/demo/reprojection/reprojected-pages.html +42 -0
  85. data/app/assets/components/neon-animation/demo/shared.css +40 -0
  86. data/app/assets/components/neon-animation/demo/tiles/circles-page.html +110 -0
  87. data/app/assets/components/neon-animation/demo/tiles/index.html +77 -0
  88. data/app/assets/components/neon-animation/demo/tiles/squares-page.html +104 -0
  89. data/app/assets/components/neon-animation/guides/neon-animation.md +313 -0
  90. data/app/assets/components/neon-animation/index.html +30 -0
  91. data/app/assets/components/neon-animation/neon-animatable-behavior.html +156 -0
  92. data/app/assets/components/neon-animation/neon-animatable.html +54 -0
  93. data/app/assets/components/neon-animation/neon-animated-pages.html +208 -0
  94. data/app/assets/components/neon-animation/neon-animation-behavior.html +88 -0
  95. data/app/assets/components/neon-animation/neon-animation-runner-behavior.html +110 -0
  96. data/app/assets/components/neon-animation/neon-animation.html +17 -0
  97. data/app/assets/components/neon-animation/neon-animations.html +25 -0
  98. data/app/assets/components/neon-animation/neon-shared-element-animatable-behavior.html +37 -0
  99. data/app/assets/components/neon-animation/neon-shared-element-animation-behavior.html +66 -0
  100. data/app/assets/components/neon-animation/web-animations.html +11 -0
  101. data/app/assets/components/neon-elements/README.md +19 -0
  102. data/app/assets/components/neon-elements/bower.json +26 -0
  103. data/app/assets/components/paper-styles/README.md +3 -0
  104. data/app/assets/components/paper-styles/bower.json +27 -0
  105. data/app/assets/components/paper-styles/classes/global.html +96 -0
  106. data/app/assets/components/paper-styles/classes/shadow-layout.html +302 -0
  107. data/app/assets/components/paper-styles/classes/shadow.html +39 -0
  108. data/app/assets/components/paper-styles/classes/typography.html +171 -0
  109. data/app/assets/components/paper-styles/color.html +333 -0
  110. data/app/assets/components/paper-styles/default-theme.html +39 -0
  111. data/app/assets/components/paper-styles/demo-pages.html +72 -0
  112. data/app/assets/components/paper-styles/demo.css +25 -0
  113. data/app/assets/components/paper-styles/paper-styles-classes.html +14 -0
  114. data/app/assets/components/paper-styles/paper-styles.html +17 -0
  115. data/app/assets/components/paper-styles/shadow.html +61 -0
  116. data/app/assets/components/paper-styles/typography.html +240 -0
  117. data/app/assets/components/polymer/LICENSE.txt +27 -0
  118. data/app/assets/components/polymer/bower.json +26 -0
  119. data/app/assets/components/polymer/build.log +27 -0
  120. data/app/assets/components/polymer/polymer-micro.html +523 -0
  121. data/app/assets/components/polymer/polymer-mini.html +1368 -0
  122. data/app/assets/components/polymer/polymer.html +3768 -0
  123. data/app/assets/components/web-animations-js/COPYING +202 -0
  124. data/app/assets/components/web-animations-js/History.md +108 -0
  125. data/app/assets/components/web-animations-js/README.md +161 -0
  126. data/app/assets/components/web-animations-js/bower.json +31 -0
  127. data/app/assets/components/web-animations-js/web-animations-next-lite.min.js +17 -0
  128. data/app/assets/components/web-animations-js/web-animations-next-lite.min.js.map +1 -0
  129. data/app/assets/components/web-animations-js/web-animations-next.min.js +17 -0
  130. data/app/assets/components/web-animations-js/web-animations-next.min.js.map +1 -0
  131. data/app/assets/components/web-animations-js/web-animations.html +50 -0
  132. data/app/assets/components/web-animations-js/web-animations.min.js +17 -0
  133. data/app/assets/components/web-animations-js/web-animations.min.js.gz +0 -0
  134. data/app/assets/components/web-animations-js/web-animations.min.js.map +1 -0
  135. data/app/assets/components/webcomponentsjs/CustomElements.js +956 -0
  136. data/app/assets/components/webcomponentsjs/CustomElements.min.js +11 -0
  137. data/app/assets/components/webcomponentsjs/HTMLImports.js +1078 -0
  138. data/app/assets/components/webcomponentsjs/HTMLImports.min.js +11 -0
  139. data/app/assets/components/webcomponentsjs/MutationObserver.js +344 -0
  140. data/app/assets/components/webcomponentsjs/MutationObserver.min.js +11 -0
  141. data/app/assets/components/webcomponentsjs/README.md +125 -0
  142. data/app/assets/components/webcomponentsjs/ShadowDOM.js +4414 -0
  143. data/app/assets/components/webcomponentsjs/ShadowDOM.min.js +15 -0
  144. data/app/assets/components/webcomponentsjs/bower.json +14 -0
  145. data/app/assets/components/webcomponentsjs/build.log +33 -0
  146. data/app/assets/components/webcomponentsjs/package.json +31 -0
  147. data/app/assets/components/webcomponentsjs/webcomponents-lite.js +2300 -0
  148. data/app/assets/components/webcomponentsjs/webcomponents-lite.min.js +13 -0
  149. data/app/assets/components/webcomponentsjs/webcomponents.js +7112 -0
  150. data/app/assets/components/webcomponentsjs/webcomponents.min.js +15 -0
  151. data/lib/polymer-neon-rails.rb +2 -0
  152. data/lib/polymer-neon-rails/engine.rb +4 -0
  153. data/lib/polymer-neon-rails/version.rb +3 -0
  154. 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>