polymer-core-rails 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +82 -0
- data/Rakefile +2 -0
- data/app/assets/components/core-ajax/core-ajax.html.erb +320 -0
- data/app/assets/components/core-ajax/core-xhr.html.erb +112 -0
- data/app/assets/components/core-animated-pages/core-animated-pages.css +18 -0
- data/app/assets/components/core-animated-pages/core-animated-pages.html.erb +413 -0
- data/app/assets/components/core-animated-pages/transitions/cascade-transition.html +138 -0
- data/app/assets/components/core-animated-pages/transitions/core-transition-pages.html.erb +173 -0
- data/app/assets/components/core-animated-pages/transitions/cross-fade.html.erb +173 -0
- data/app/assets/components/core-animated-pages/transitions/hero-transition.css +12 -0
- data/app/assets/components/core-animated-pages/transitions/hero-transition.html.erb +267 -0
- data/app/assets/components/core-animated-pages/transitions/list-cascade.html +58 -0
- data/app/assets/components/core-animated-pages/transitions/scale-up.html +37 -0
- data/app/assets/components/core-animated-pages/transitions/slide-down.html +55 -0
- data/app/assets/components/core-animated-pages/transitions/slide-from-bottom.html +31 -0
- data/app/assets/components/core-animated-pages/transitions/slide-from-right.html +35 -0
- data/app/assets/components/core-animated-pages/transitions/slide-up.html +82 -0
- data/app/assets/components/core-animated-pages/transitions/tile-cascade.html +101 -0
- data/app/assets/components/core-animation/core-animation-group.html.erb +168 -0
- data/app/assets/components/core-animation/core-animation.html.erb +523 -0
- data/app/assets/components/core-animation/web-animations.html.erb +1 -0
- data/app/assets/components/core-collapse/core-collapse.css +16 -0
- data/app/assets/components/core-collapse/core-collapse.html.erb +247 -0
- data/app/assets/components/core-drag-drop/core-drag-drop.html +109 -0
- data/app/assets/components/core-drawer-panel/core-drawer-panel.css +162 -0
- data/app/assets/components/core-drawer-panel/core-drawer-panel.html.erb +150 -0
- data/app/assets/components/core-field/core-field.css +38 -0
- data/app/assets/components/core-field/core-field.html.erb +32 -0
- data/app/assets/components/core-header-panel/core-header-panel.css +75 -0
- data/app/assets/components/core-header-panel/core-header-panel.html.erb +196 -0
- data/app/assets/components/core-icon/core-icon.css +25 -0
- data/app/assets/components/core-icon/core-icon.html.erb +126 -0
- data/app/assets/components/core-icon-button/core-icon-button.css +70 -0
- data/app/assets/components/core-icon-button/core-icon-button.html.erb +83 -0
- data/app/assets/components/core-icons/core-icons.html +14 -0
- data/app/assets/components/core-iconset/core-iconset.html.erb +236 -0
- data/app/assets/components/core-iconset-svg/core-iconset-svg.html +170 -0
- data/app/assets/components/core-input/core-input.css +35 -0
- data/app/assets/components/core-input/core-input.html.erb +311 -0
- data/app/assets/components/core-item/core-item.css +31 -0
- data/app/assets/components/core-item/core-item.html.erb +80 -0
- data/app/assets/components/core-list/core-list.css +20 -0
- data/app/assets/components/core-list/core-list.html.erb +403 -0
- data/app/assets/components/core-localstorage/core-localstorage.html +126 -0
- data/app/assets/components/core-media-query/core-media-query.html +86 -0
- data/app/assets/components/core-menu/core-menu.css +18 -0
- data/app/assets/components/core-menu/core-menu.html.erb +62 -0
- data/app/assets/components/core-menu/core-submenu.css +29 -0
- data/app/assets/components/core-menu/core-submenu.html.erb +106 -0
- data/app/assets/components/core-menu-button/core-menu-button.css +10 -0
- data/app/assets/components/core-menu-button/core-menu-button.html.erb +139 -0
- data/app/assets/components/core-meta/core-meta.html +143 -0
- data/app/assets/components/core-overlay/core-key-helper.html +17 -0
- data/app/assets/components/core-overlay/core-overlay-layer.html +112 -0
- data/app/assets/components/core-overlay/core-overlay.html.erb +661 -0
- data/app/assets/components/core-pages/core-pages.css +30 -0
- data/app/assets/components/core-pages/core-pages.html.erb +43 -0
- data/app/assets/components/core-range/core-range.html +107 -0
- data/app/assets/components/core-scaffold/core-scaffold.html.erb +147 -0
- data/app/assets/components/core-scroll-header-panel/core-scroll-header-panel.css +57 -0
- data/app/assets/components/core-scroll-header-panel/core-scroll-header-panel.html.erb +257 -0
- data/app/assets/components/core-selection/core-selection.html +148 -0
- data/app/assets/components/core-selector/core-selector.html.erb +423 -0
- data/app/assets/components/core-shared-lib/core-shared-lib.html +150 -0
- data/app/assets/components/core-signals/core-signals.html +83 -0
- data/app/assets/components/core-splitter/core-splitter.css.erb +27 -0
- data/app/assets/components/core-splitter/core-splitter.html.erb +159 -0
- data/app/assets/components/core-splitter/handle-h.svg +4 -0
- data/app/assets/components/core-splitter/handle.svg +4 -0
- data/app/assets/components/core-style/core-style.html +385 -0
- data/app/assets/components/core-toolbar/core-toolbar.css +126 -0
- data/app/assets/components/core-toolbar/core-toolbar.html.erb +73 -0
- data/app/assets/components/core-tooltip/core-tooltip.css +103 -0
- data/app/assets/components/core-tooltip/core-tooltip.html.erb +144 -0
- data/app/assets/components/core-transition/core-transition-css.html.erb +76 -0
- data/app/assets/components/core-transition/core-transition-overlay.css +46 -0
- data/app/assets/components/core-transition/core-transition.html.erb +44 -0
- data/app/assets/components/web-animations-js/web-animations.js +5666 -0
- data/lib/polymer-core-rails/engine.rb +4 -0
- data/lib/polymer-core-rails/version.rb +3 -0
- data/lib/polymer-core-rails.rb +2 -0
- metadata +167 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
<!--
|
2
|
+
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
3
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
4
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
5
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
6
|
+
Code distributed by Google as part of the polymer project is also
|
7
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
8
|
+
-->
|
9
|
+
|
10
|
+
<link href="core-transition-pages.html" rel="import">
|
11
|
+
|
12
|
+
<core-style id="scale-up">
|
13
|
+
polyfill-next-selector { content: ':host > * [scale-up]'; }
|
14
|
+
::content > * /deep/ [scale-up] {
|
15
|
+
-webkit-transition: -webkit-transform {{g.transitions.scaleDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1) {{g.transitions.scaleDelay || g.transitions.delay}} !important;
|
16
|
+
transition: transform {{g.transitions.scaleDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1) {{g.transitions.scaleDelay || g.transitions.delay}} !important;
|
17
|
+
}
|
18
|
+
|
19
|
+
polyfill-next-selector { content: ':host > .core-selected [scale-up]'; }
|
20
|
+
::content > .core-selected /deep/ [scale-up] {
|
21
|
+
-webkit-transform: none;
|
22
|
+
transform: none;
|
23
|
+
}
|
24
|
+
|
25
|
+
polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [scale-up]'; }
|
26
|
+
::content > [animate]:not(.core-selected) /deep/ [scale-up] {
|
27
|
+
-webkit-transform: scale(0);
|
28
|
+
transform: scale(0);
|
29
|
+
}
|
30
|
+
|
31
|
+
polyfill-next-selector { content: ':host > .core-selected[animate] [scale-up]'; }
|
32
|
+
::content > .core-selected[animate] /deep/ [scale-up] {
|
33
|
+
z-index: 1000;
|
34
|
+
}
|
35
|
+
</core-style>
|
36
|
+
|
37
|
+
<core-transition-pages id="scale-up"></core-transition-pages>
|
@@ -0,0 +1,55 @@
|
|
1
|
+
<!--
|
2
|
+
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
3
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
4
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
5
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
6
|
+
Code distributed by Google as part of the polymer project is also
|
7
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
8
|
+
-->
|
9
|
+
|
10
|
+
<link href="core-transition-pages.html" rel="import">
|
11
|
+
|
12
|
+
<core-style id="slide-down">
|
13
|
+
polyfill-next-selector { content: ':host.slide-down > * [slide-down]'; }
|
14
|
+
:host(.slide-down) ::content > * /deep/ [slide-down] {
|
15
|
+
-webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1);
|
16
|
+
transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1);
|
17
|
+
}
|
18
|
+
|
19
|
+
polyfill-next-selector { content: ':host > .core-selected [slide-down]'; }
|
20
|
+
::content > .core-selected /deep/ [slide-down] {
|
21
|
+
-webkit-transform: none;
|
22
|
+
transform: none;
|
23
|
+
}
|
24
|
+
|
25
|
+
polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [slide-down]'; }
|
26
|
+
::content > [animate]:not(.core-selected) /deep/ [slide-down] {
|
27
|
+
-webkit-transform: translateY(-100%);
|
28
|
+
transform: translateY(-100%);
|
29
|
+
}
|
30
|
+
</core-style>
|
31
|
+
|
32
|
+
<!--
|
33
|
+
|
34
|
+
`slide-down` slides an element in the outgoing page from the top of the window and
|
35
|
+
slides in an element in the incoming page from the top of the window during a page
|
36
|
+
transition. You can configure the duration of the transition with the global variable
|
37
|
+
`CoreStyle.g.transitions.slideDuration`.
|
38
|
+
|
39
|
+
Example:
|
40
|
+
|
41
|
+
<core-animated-pages transition="slide-down">
|
42
|
+
<section>
|
43
|
+
<div id="div1" slide-down></div>
|
44
|
+
</section>
|
45
|
+
<section></section>
|
46
|
+
</core-animated-pages>
|
47
|
+
|
48
|
+
@class slide-down
|
49
|
+
@extends core-transition-pages
|
50
|
+
@status beta
|
51
|
+
@homepage github.io
|
52
|
+
|
53
|
+
-->
|
54
|
+
|
55
|
+
<core-transition-pages id="slide-down" activeClass="slide-down"></core-transition-pages>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<!--
|
2
|
+
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
3
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
4
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
5
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
6
|
+
Code distributed by Google as part of the polymer project is also
|
7
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
8
|
+
-->
|
9
|
+
|
10
|
+
<link href="core-transition-pages.html" rel="import">
|
11
|
+
|
12
|
+
<core-style id="slide-from-bottom">
|
13
|
+
:host(.slide-from-bottom) ::content > * {
|
14
|
+
-webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1);
|
15
|
+
transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1);
|
16
|
+
}
|
17
|
+
|
18
|
+
:host(.slide-from-bottom) ::content > .core-selected ~ [animate]:not(.core-selected) {
|
19
|
+
-webkit-transform: translateY(100%);
|
20
|
+
}
|
21
|
+
|
22
|
+
:host(.slide-from-bottom) ::content > [animate]:not(.core-selected) {
|
23
|
+
-webkit-transform: translateY(-100%);
|
24
|
+
}
|
25
|
+
|
26
|
+
:host(.slide-from-bottom) ::content > .core-selected {
|
27
|
+
-webkit-transform: none;
|
28
|
+
}
|
29
|
+
</core-style>
|
30
|
+
|
31
|
+
<core-transition-pages id="slide-from-bottom" scopeClass="slide-from-bottom"></core-transition-pages>
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<!--
|
2
|
+
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
3
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
4
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
5
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
6
|
+
Code distributed by Google as part of the polymer project is also
|
7
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
8
|
+
-->
|
9
|
+
|
10
|
+
<link href="core-transition-pages.html" rel="import">
|
11
|
+
|
12
|
+
<core-style id="slide-from-right">
|
13
|
+
polyfill-next-selector { content: ':host(.slide-from-right) > *'; }
|
14
|
+
:host(.slide-from-right) ::content > * {
|
15
|
+
-webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1);
|
16
|
+
transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1);
|
17
|
+
}
|
18
|
+
|
19
|
+
polyfill-next-selector { content: ':host(.slide-from-right) > .core-selected ~ [animate]:not(.core-selected)'; }
|
20
|
+
:host(.slide-from-right) ::content > .core-selected ~ [animate]:not(.core-selected) {
|
21
|
+
-webkit-transform: translateX(100%);
|
22
|
+
}
|
23
|
+
|
24
|
+
polyfill-next-selector { content: ':host(.slide-from-right) > [animate]:not(.core-selected)'; }
|
25
|
+
:host(.slide-from-right) ::content > [animate]:not(.core-selected) {
|
26
|
+
-webkit-transform: translateX(-100%);
|
27
|
+
}
|
28
|
+
|
29
|
+
polyfill-next-selector { content: ':host(.slide-from-right) > .core-selected'; }
|
30
|
+
:host(.slide-from-right) ::content > .core-selected {
|
31
|
+
-webkit-transform: none;
|
32
|
+
}
|
33
|
+
</core-style>
|
34
|
+
|
35
|
+
<core-transition-pages id="slide-from-right" scopeClass="slide-from-right"></core-transition-pages>
|
@@ -0,0 +1,82 @@
|
|
1
|
+
<!--
|
2
|
+
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
3
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
4
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
5
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
6
|
+
Code distributed by Google as part of the polymer project is also
|
7
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
8
|
+
-->
|
9
|
+
|
10
|
+
<link href="core-transition-pages.html" rel="import">
|
11
|
+
|
12
|
+
<core-style id="slide-up">
|
13
|
+
polyfill-next-selector { content: ':host.slide-up > * [slide-up]'; }
|
14
|
+
:host(.slide-up) ::content > * /deep/ [slide-up] {
|
15
|
+
-webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1);
|
16
|
+
transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1);
|
17
|
+
}
|
18
|
+
|
19
|
+
polyfill-next-selector { content: ':host > .core-selected [slide-up]'; }
|
20
|
+
::content > .core-selected /deep/ [slide-up] {
|
21
|
+
-webkit-transform: none;
|
22
|
+
transform: none;
|
23
|
+
}
|
24
|
+
|
25
|
+
polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [slide-up]'; }
|
26
|
+
::content > [animate]:not(.core-selected) /deep/ [slide-up] {
|
27
|
+
-webkit-transform: translateY(150%);
|
28
|
+
transform: translateY(150%);
|
29
|
+
}
|
30
|
+
</core-style>
|
31
|
+
|
32
|
+
<core-style id="slide-up-offscreen">
|
33
|
+
polyfill-next-selector { content: ':host.slide-up-offscreen > * [slide-up-offscreen]'; }
|
34
|
+
:host(.slide-up-offscreen) ::content > * /deep/ [slide-up-offscreen] {
|
35
|
+
-webkit-transition: -webkit-transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1);
|
36
|
+
transition: transform {{g.transitions.slideDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1);
|
37
|
+
}
|
38
|
+
|
39
|
+
polyfill-next-selector { content: ':host > .core-selected [slide-up-offscreen]'; }
|
40
|
+
::content > .core-selected /deep/ [slide-up-offscreen] {
|
41
|
+
-webkit-transform: none;
|
42
|
+
transform: none;
|
43
|
+
}
|
44
|
+
|
45
|
+
polyfill-next-selector { content: ':host > [animate]:not(.core-selected) [slide-up-offscreen]'; }
|
46
|
+
::content > [animate]:not(.core-selected) /deep/ [slide-up-offscreen] {
|
47
|
+
-webkit-transform: translateY(100vh);
|
48
|
+
transform: translateY(100vh);
|
49
|
+
z-index: -1;
|
50
|
+
}
|
51
|
+
|
52
|
+
polyfill-rule {
|
53
|
+
content: ':host > [animate]:not(.core-selected) [slide-up-offscreen]';
|
54
|
+
-webkit-transform: translateY(1000px);
|
55
|
+
}
|
56
|
+
</core-style>
|
57
|
+
|
58
|
+
<!--
|
59
|
+
|
60
|
+
`slide-up` slides an element in the outgoing page from the bottom of the window
|
61
|
+
and slides in an element in the incoming page from the bottom of the window during
|
62
|
+
a page transition. You can configure the duration of the transition with the global
|
63
|
+
variable `CoreStyle.g.transitions.slideDuration`.
|
64
|
+
|
65
|
+
Example:
|
66
|
+
|
67
|
+
<core-animated-pages transition="slide-up">
|
68
|
+
<section>
|
69
|
+
<div id="div1" slide-up></div>
|
70
|
+
</section>
|
71
|
+
<section></section>
|
72
|
+
</core-animated-pages>
|
73
|
+
|
74
|
+
@class slide-up
|
75
|
+
@extends core-transition-pages
|
76
|
+
@status beta
|
77
|
+
@homepage github.io
|
78
|
+
|
79
|
+
-->
|
80
|
+
|
81
|
+
<core-transition-pages id="slide-up" activeClass="slide-up"></core-transition-pages>
|
82
|
+
<core-transition-pages id="slide-up-offscreen" activeClass="slide-up-offscreen"></core-transition-pages>
|
@@ -0,0 +1,101 @@
|
|
1
|
+
<!--
|
2
|
+
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
3
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
4
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
5
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
6
|
+
Code distributed by Google as part of the polymer project is also
|
7
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
8
|
+
-->
|
9
|
+
|
10
|
+
<link href="core-transition-pages.html" rel="import">
|
11
|
+
|
12
|
+
<core-style id="tile-cascade">
|
13
|
+
polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div'; }
|
14
|
+
:host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div {
|
15
|
+
-webkit-transition: -webkit-transform {{g.transitions.cascadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1), opacity {{g.transitions.cascadeFadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1);
|
16
|
+
transition: transform {{g.transitions.cascadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1), opacity {{g.transitions.cascadeFadeDuration || g.transitions.duration}} cubic-bezier(0.4, 0, 0.2, 1);
|
17
|
+
}
|
18
|
+
|
19
|
+
polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(2)'; }
|
20
|
+
:host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(2) {
|
21
|
+
-webkit-transition-delay: 0.05s;
|
22
|
+
transition-delay: 0.05s;
|
23
|
+
}
|
24
|
+
|
25
|
+
polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(3)'; }
|
26
|
+
:host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(3) {
|
27
|
+
-webkit-transition-delay: 0.1s;
|
28
|
+
transition-delay: 0.1s;
|
29
|
+
}
|
30
|
+
|
31
|
+
polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(4)'; }
|
32
|
+
:host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(4) {
|
33
|
+
-webkit-transition-delay: 0.15s;
|
34
|
+
transition-delay: 0.15s;
|
35
|
+
}
|
36
|
+
|
37
|
+
polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(5)'; }
|
38
|
+
:host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(5) {
|
39
|
+
-webkit-transition-delay: 0.2s;
|
40
|
+
transition-delay: 0.2s;
|
41
|
+
}
|
42
|
+
|
43
|
+
polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(6)'; }
|
44
|
+
:host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(6) {
|
45
|
+
-webkit-transition-delay: 0.25s;
|
46
|
+
transition-delay: 0.25s;
|
47
|
+
}
|
48
|
+
|
49
|
+
polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(7)'; }
|
50
|
+
:host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(7) {
|
51
|
+
-webkit-transition-delay: 0.3s;
|
52
|
+
transition-delay: 0.3s;
|
53
|
+
}
|
54
|
+
|
55
|
+
polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(8)'; }
|
56
|
+
:host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(8) {
|
57
|
+
-webkit-transition-delay: 0.35s;
|
58
|
+
transition-delay: 0.35s;
|
59
|
+
}
|
60
|
+
|
61
|
+
polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(9)'; }
|
62
|
+
:host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(9) {
|
63
|
+
-webkit-transition-delay: 0.4s;
|
64
|
+
transition-delay: 0.4s;
|
65
|
+
}
|
66
|
+
|
67
|
+
polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(10)'; }
|
68
|
+
:host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(10) {
|
69
|
+
-webkit-transition-delay: 0.45s;
|
70
|
+
transition-delay: 0.45s;
|
71
|
+
}
|
72
|
+
|
73
|
+
polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(11)'; }
|
74
|
+
:host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(11) {
|
75
|
+
-webkit-transition-delay: 0.5s;
|
76
|
+
transition-delay: 0.5s;
|
77
|
+
}
|
78
|
+
|
79
|
+
polyfill-next-selector { content: ':host(.tile-cascade) > * [tile-cascade] > div:nth-of-type(12)'; }
|
80
|
+
:host(.tile-cascade) ::content > * /deep/ [tile-cascade] > div:nth-of-type(12) {
|
81
|
+
-webkit-transition-delay: 0.55s;
|
82
|
+
transition-delay: 0.55s;
|
83
|
+
}
|
84
|
+
|
85
|
+
polyfill-next-selector { content: '.core-selected [tile-cascade] > div'; }
|
86
|
+
::content > .core-selected /deep/ [tile-cascade] > div {
|
87
|
+
}
|
88
|
+
|
89
|
+
polyfill-next-selector { content: '[animate]:not(.core-selected) [tile-cascade] > div'; }
|
90
|
+
::content > [animate]:not(.core-selected) /deep/ [tile-cascade] > div {
|
91
|
+
-webkit-transform: translateY(100%);
|
92
|
+
transform: translateY(100%);
|
93
|
+
}
|
94
|
+
|
95
|
+
polyfill-next-selector { content: '[animate]:not(.core-selected) [tile-cascade][fade] > div'; }
|
96
|
+
::content > [animate]:not(.core-selected) /deep/ [tile-cascade][fade] > div {
|
97
|
+
opacity: 0;
|
98
|
+
}
|
99
|
+
</core-style>
|
100
|
+
|
101
|
+
<core-transition-pages id="tile-cascade" activeClass="tile-cascade" transitionProperty="transform"></core-transition-pages>
|
@@ -0,0 +1,168 @@
|
|
1
|
+
<!--
|
2
|
+
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
3
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
4
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
5
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
6
|
+
Code distributed by Google as part of the polymer project is also
|
7
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
8
|
+
-->
|
9
|
+
|
10
|
+
<%= html_import_tag "core-animation/core-animation" %>
|
11
|
+
|
12
|
+
<!--
|
13
|
+
@group Polymer Core Elements
|
14
|
+
|
15
|
+
`core-animation-group` combines `core-animation` or `core-animation-group` elements to
|
16
|
+
create a grouped web animation. The group may be parallel (type is `par`) or sequential
|
17
|
+
(type is `seq`). Parallel groups play all the children elements simultaneously, and
|
18
|
+
sequential groups play the children one after another.
|
19
|
+
|
20
|
+
Example of an animation group to rotate and then fade an element:
|
21
|
+
|
22
|
+
<core-animation-group type="seq">
|
23
|
+
<core-animation id="fadeout" duration="500">
|
24
|
+
<core-animation-keyframe>
|
25
|
+
<core-animation-prop name="transform" value="rotate(0deg)"></core-animation-prop>
|
26
|
+
<core-animation-prop name="transform" value="rotate(45deg)"></core-animation-prop>
|
27
|
+
</core-animation-keyframe>
|
28
|
+
</core-animation>
|
29
|
+
<core-animation id="fadeout" duration="500">
|
30
|
+
<core-animation-keyframe>
|
31
|
+
<core-animation-prop name="opacity" value="1"></core-animation-prop>
|
32
|
+
</core-animation-keyframe>
|
33
|
+
<core-animation-keyframe>
|
34
|
+
<core-animation-prop name="opacity" value="0"></core-animation-prop>
|
35
|
+
</core-animation-keyframe>
|
36
|
+
</core-animation>
|
37
|
+
</core-animation-group>
|
38
|
+
|
39
|
+
@element core-animation-group
|
40
|
+
@status beta
|
41
|
+
@homepage github.io
|
42
|
+
-->
|
43
|
+
<polymer-element name="core-animation-group" constructor="CoreAnimationGroup" extends="core-animation" attributes="type">
|
44
|
+
<script>
|
45
|
+
(function() {
|
46
|
+
|
47
|
+
var ANIMATION_GROUPS = {
|
48
|
+
'par': AnimationGroup,
|
49
|
+
'seq': AnimationSequence
|
50
|
+
};
|
51
|
+
|
52
|
+
Polymer({
|
53
|
+
|
54
|
+
publish: {
|
55
|
+
/**
|
56
|
+
* If target is set, any children without a target will be assigned the group's
|
57
|
+
* target when this property is set.
|
58
|
+
*
|
59
|
+
* @property target
|
60
|
+
* @type HTMLElement|Node|Array|Array<HTMLElement|Node>
|
61
|
+
*/
|
62
|
+
|
63
|
+
/**
|
64
|
+
* For a `core-animation-group`, a duration of "auto" means the duration should
|
65
|
+
* be the specified duration of its children. If set to anything other than
|
66
|
+
* "auto", any children without a set duration will be assigned the group's duration.
|
67
|
+
*
|
68
|
+
* @property duration
|
69
|
+
* @type number
|
70
|
+
* @default "auto"
|
71
|
+
*/
|
72
|
+
duration: {value: 'auto', reflect: true},
|
73
|
+
|
74
|
+
/**
|
75
|
+
* The type of the animation group. 'par' creates a parallel group and 'seq' creates
|
76
|
+
* a sequential group.
|
77
|
+
*
|
78
|
+
* @property type
|
79
|
+
* @type String
|
80
|
+
* @default 'par'
|
81
|
+
*/
|
82
|
+
type: {value: 'par', reflect: true}
|
83
|
+
},
|
84
|
+
|
85
|
+
typeChanged: function() {
|
86
|
+
this.apply();
|
87
|
+
},
|
88
|
+
|
89
|
+
targetChanged: function() {
|
90
|
+
// Only propagate target to children animations if it's defined.
|
91
|
+
if (this.target) {
|
92
|
+
this.doOnChildren(function(c) {
|
93
|
+
c.target = this.target;
|
94
|
+
}.bind(this));
|
95
|
+
}
|
96
|
+
},
|
97
|
+
|
98
|
+
durationChanged: function() {
|
99
|
+
if (this.duration && this.duration !== 'auto') {
|
100
|
+
this.doOnChildren(function(c) {
|
101
|
+
// Propagate to children that is not a group and has no
|
102
|
+
// duration specified.
|
103
|
+
if (!c.type && (!c.duration || c.duration === 'auto')) {
|
104
|
+
c.duration = this.duration;
|
105
|
+
}
|
106
|
+
}.bind(this));
|
107
|
+
}
|
108
|
+
},
|
109
|
+
|
110
|
+
doOnChildren: function(inFn) {
|
111
|
+
var children = this.children;
|
112
|
+
if (!children.length) {
|
113
|
+
children = this.shadowRoot ? this.shadowRoot.childNodes : [];
|
114
|
+
}
|
115
|
+
Array.prototype.forEach.call(children, function(c) {
|
116
|
+
// TODO <template> in the way
|
117
|
+
c.apply && inFn(c);
|
118
|
+
}, this);
|
119
|
+
},
|
120
|
+
|
121
|
+
makeAnimation: function() {
|
122
|
+
return new ANIMATION_GROUPS[this.type](this.childAnimations, this.timingProps);
|
123
|
+
},
|
124
|
+
|
125
|
+
hasTarget: function() {
|
126
|
+
var ht = this.target !== null;
|
127
|
+
if (!ht) {
|
128
|
+
this.doOnChildren(function(c) {
|
129
|
+
ht = ht || c.hasTarget();
|
130
|
+
}.bind(this));
|
131
|
+
}
|
132
|
+
return ht;
|
133
|
+
},
|
134
|
+
|
135
|
+
apply: function() {
|
136
|
+
// Propagate target and duration to child animations first.
|
137
|
+
this.durationChanged();
|
138
|
+
this.targetChanged();
|
139
|
+
this.doOnChildren(function(c) {
|
140
|
+
c.apply();
|
141
|
+
});
|
142
|
+
return this.super();
|
143
|
+
},
|
144
|
+
|
145
|
+
get childAnimationElements() {
|
146
|
+
var list = [];
|
147
|
+
this.doOnChildren(function(c) {
|
148
|
+
if (c.makeAnimation) {
|
149
|
+
list.push(c);
|
150
|
+
}
|
151
|
+
});
|
152
|
+
return list;
|
153
|
+
},
|
154
|
+
|
155
|
+
get childAnimations() {
|
156
|
+
var list = [];
|
157
|
+
this.doOnChildren(function(c) {
|
158
|
+
if (c.animation) {
|
159
|
+
list.push(c.animation);
|
160
|
+
}
|
161
|
+
});
|
162
|
+
return list;
|
163
|
+
}
|
164
|
+
});
|
165
|
+
|
166
|
+
})();
|
167
|
+
</script>
|
168
|
+
</polymer-element>
|