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,29 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<!--
|
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
|
+
<html>
|
11
|
+
<head>
|
12
|
+
<title>neon-animated-pages demo: list</title>
|
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
|
+
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
|
19
|
+
|
20
|
+
<link rel="import" href="../../../paper-styles/paper-styles.html">
|
21
|
+
<link rel="import" href="list-demo.html">
|
22
|
+
|
23
|
+
</head>
|
24
|
+
<body class="fullbleed relative">
|
25
|
+
|
26
|
+
<list-demo class="fit"></list-demo>
|
27
|
+
|
28
|
+
</body>
|
29
|
+
</html>
|
@@ -0,0 +1,112 @@
|
|
1
|
+
<!--
|
2
|
+
Copyright (c) 2015 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
|
+
<link rel="import" href="../../../polymer/polymer.html">
|
10
|
+
<link rel="import" href="../../../paper-styles/paper-styles.html">
|
11
|
+
<link rel="import" href="../../../paper-toolbar/paper-toolbar.html">
|
12
|
+
<link rel="import" href="../../neon-animated-pages.html">
|
13
|
+
<link rel="import" href="../../neon-animations.html">
|
14
|
+
<link rel="import" href="list-view.html">
|
15
|
+
<link rel="import" href="full-view.html">
|
16
|
+
|
17
|
+
<dom-module id="list-demo">
|
18
|
+
|
19
|
+
<style>
|
20
|
+
|
21
|
+
:host {
|
22
|
+
display: block;
|
23
|
+
}
|
24
|
+
|
25
|
+
neon-animated-pages {
|
26
|
+
height: 100%;
|
27
|
+
}
|
28
|
+
|
29
|
+
</style>
|
30
|
+
|
31
|
+
<template>
|
32
|
+
|
33
|
+
<neon-animated-pages id="pages" selected="0">
|
34
|
+
|
35
|
+
<list-view data="[[fileData]]" on-item-click="_onItemClick"></list-view>
|
36
|
+
|
37
|
+
<full-view on-close="_onClose"></full-view>
|
38
|
+
|
39
|
+
</neon-animated-pages>
|
40
|
+
|
41
|
+
</template>
|
42
|
+
|
43
|
+
</dom-module>
|
44
|
+
|
45
|
+
<script>
|
46
|
+
|
47
|
+
Polymer({
|
48
|
+
|
49
|
+
is: 'list-demo',
|
50
|
+
|
51
|
+
properties: {
|
52
|
+
|
53
|
+
fileData: {
|
54
|
+
type: Array,
|
55
|
+
value: function() {
|
56
|
+
return [
|
57
|
+
{fileName: 'IMG_4130.jpg', modifiedDate: 'May 12 2015'},
|
58
|
+
{fileName: 'IMG_4131.jpg', modifiedDate: 'May 12 2015'},
|
59
|
+
{fileName: 'IMG_4132.jpg', modifiedDate: 'May 12 2015'},
|
60
|
+
{fileName: 'IMG_4133.jpg', modifiedDate: 'May 12 2015'},
|
61
|
+
{fileName: 'IMG_4134.jpg', modifiedDate: 'May 12 2015'},
|
62
|
+
{fileName: 'IMG_4135.jpg', modifiedDate: 'May 12 2015'},
|
63
|
+
{fileName: 'IMG_4136.jpg', modifiedDate: 'May 12 2015'},
|
64
|
+
{fileName: 'IMG_4137.jpg', modifiedDate: 'May 12 2015'},
|
65
|
+
{fileName: 'IMG_4138.jpg', modifiedDate: 'May 12 2015'},
|
66
|
+
{fileName: 'IMG_4139.jpg', modifiedDate: 'May 12 2015'},
|
67
|
+
{fileName: 'IMG_4140.jpg', modifiedDate: 'May 12 2015'},
|
68
|
+
{fileName: 'IMG_4141.jpg', modifiedDate: 'May 12 2015'},
|
69
|
+
{fileName: 'IMG_4142.jpg', modifiedDate: 'May 12 2015'},
|
70
|
+
{fileName: 'IMG_4143.jpg', modifiedDate: 'May 12 2015'},
|
71
|
+
{fileName: 'IMG_4144.jpg', modifiedDate: 'May 12 2015'},
|
72
|
+
{fileName: 'IMG_4145.jpg', modifiedDate: 'May 12 2015'},
|
73
|
+
{fileName: 'IMG_4146.jpg', modifiedDate: 'May 12 2015'},
|
74
|
+
{fileName: 'IMG_4147.jpg', modifiedDate: 'May 12 2015'},
|
75
|
+
{fileName: 'IMG_4148.jpg', modifiedDate: 'May 12 2015'},
|
76
|
+
{fileName: 'IMG_4149.jpg', modifiedDate: 'May 12 2015'},
|
77
|
+
{fileName: 'IMG_4150.jpg', modifiedDate: 'May 12 2015'},
|
78
|
+
{fileName: 'IMG_4151.jpg', modifiedDate: 'May 12 2015'},
|
79
|
+
{fileName: 'IMG_4152.jpg', modifiedDate: 'May 12 2015'},
|
80
|
+
{fileName: 'IMG_4153.jpg', modifiedDate: 'May 12 2015'},
|
81
|
+
{fileName: 'IMG_4154.jpg', modifiedDate: 'May 12 2015'},
|
82
|
+
{fileName: 'IMG_4155.jpg', modifiedDate: 'May 12 2015'},
|
83
|
+
{fileName: 'IMG_4156.jpg', modifiedDate: 'May 12 2015'},
|
84
|
+
{fileName: 'IMG_4157.jpg', modifiedDate: 'May 12 2015'},
|
85
|
+
{fileName: 'IMG_4158.jpg', modifiedDate: 'May 12 2015'},
|
86
|
+
{fileName: 'IMG_4159.jpg', modifiedDate: 'May 12 2015'},
|
87
|
+
{fileName: 'IMG_4160.jpg', modifiedDate: 'May 12 2015'},
|
88
|
+
{fileName: 'IMG_4161.jpg', modifiedDate: 'May 12 2015'},
|
89
|
+
{fileName: 'IMG_4162.jpg', modifiedDate: 'May 12 2015'},
|
90
|
+
{fileName: 'IMG_4163.jpg', modifiedDate: 'May 12 2015'},
|
91
|
+
{fileName: 'IMG_4164.jpg', modifiedDate: 'May 12 2015'},
|
92
|
+
{fileName: 'IMG_4165.jpg', modifiedDate: 'May 12 2015'},
|
93
|
+
{fileName: 'IMG_4166.jpg', modifiedDate: 'May 12 2015'},
|
94
|
+
{fileName: 'IMG_4167.jpg', modifiedDate: 'May 12 2015'},
|
95
|
+
{fileName: 'IMG_4168.jpg', modifiedDate: 'May 12 2015'},
|
96
|
+
{fileName: 'IMG_4169.jpg', modifiedDate: 'May 12 2015'}
|
97
|
+
]
|
98
|
+
}
|
99
|
+
}
|
100
|
+
},
|
101
|
+
|
102
|
+
_onItemClick: function() {
|
103
|
+
this.$.pages.selected = 1;
|
104
|
+
},
|
105
|
+
|
106
|
+
_onClose: function() {
|
107
|
+
this.$.pages.selected = 0;
|
108
|
+
}
|
109
|
+
|
110
|
+
});
|
111
|
+
|
112
|
+
</script>
|
@@ -0,0 +1,127 @@
|
|
1
|
+
<!--
|
2
|
+
Copyright (c) 2015 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
|
+
<link rel="import" href="../../../polymer/polymer.html">
|
10
|
+
<link rel="import" href="../../../iron-icons/iron-icons.html">
|
11
|
+
<link rel="import" href="../../../iron-icon/iron-icon.html">
|
12
|
+
<link rel="import" href="../../../paper-icon-button/paper-icon-button.html">
|
13
|
+
<link rel="import" href="../../../paper-item/paper-item.html">
|
14
|
+
<link rel="import" href="../../../paper-item/paper-item-body.html">
|
15
|
+
<link rel="import" href="../../../paper-styles/paper-styles.html">
|
16
|
+
<link rel="import" href="../../neon-animatable-behavior.html">
|
17
|
+
|
18
|
+
<dom-module id="list-view">
|
19
|
+
|
20
|
+
<style>
|
21
|
+
|
22
|
+
:host {
|
23
|
+
@apply(--layout-vertical);
|
24
|
+
}
|
25
|
+
|
26
|
+
.main {
|
27
|
+
@apply(--layout-flex);
|
28
|
+
@apply(--layout-scroll);
|
29
|
+
}
|
30
|
+
|
31
|
+
iron-icon {
|
32
|
+
color: var(--google-grey-500);
|
33
|
+
}
|
34
|
+
|
35
|
+
</style>
|
36
|
+
|
37
|
+
<template>
|
38
|
+
|
39
|
+
<paper-toolbar class="medium-tall">
|
40
|
+
<paper-icon-button id="button" icon="arrow-back"></paper-icon-button>
|
41
|
+
</paper-toolbar>
|
42
|
+
|
43
|
+
<div class="main">
|
44
|
+
|
45
|
+
<template is="dom-repeat" items="[[data]]">
|
46
|
+
|
47
|
+
<paper-item>
|
48
|
+
<paper-item-body two-line>
|
49
|
+
<div>[[item.fileName]]</div>
|
50
|
+
<div secondary>[[item.modifiedDate]]</div>
|
51
|
+
</paper-item-body>
|
52
|
+
<iron-icon icon="info"></iron-icon>
|
53
|
+
</paper-item>
|
54
|
+
|
55
|
+
</template>
|
56
|
+
|
57
|
+
</div>
|
58
|
+
|
59
|
+
</template>
|
60
|
+
|
61
|
+
</dom-module>
|
62
|
+
|
63
|
+
<script>
|
64
|
+
|
65
|
+
Polymer({
|
66
|
+
|
67
|
+
is: 'list-view',
|
68
|
+
|
69
|
+
behaviors: [
|
70
|
+
Polymer.NeonAnimatableBehavior
|
71
|
+
],
|
72
|
+
|
73
|
+
listeners: {
|
74
|
+
'click': '_onClick'
|
75
|
+
},
|
76
|
+
|
77
|
+
properties: {
|
78
|
+
|
79
|
+
data: {
|
80
|
+
type: Array,
|
81
|
+
value: function() {
|
82
|
+
return [];
|
83
|
+
}
|
84
|
+
},
|
85
|
+
|
86
|
+
animationConfig: {
|
87
|
+
type: Object,
|
88
|
+
value: function() {
|
89
|
+
return {
|
90
|
+
'entry': [{
|
91
|
+
name: 'fade-in-animation',
|
92
|
+
node: this.$.button
|
93
|
+
}],
|
94
|
+
|
95
|
+
'exit': [{
|
96
|
+
name: 'fade-out-animation',
|
97
|
+
node: this.$.button
|
98
|
+
}, {
|
99
|
+
name: 'hero-animation',
|
100
|
+
id: 'hero',
|
101
|
+
fromPage: this
|
102
|
+
}]
|
103
|
+
};
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
},
|
108
|
+
|
109
|
+
_onClick: function(event) {
|
110
|
+
var target = event.target;
|
111
|
+
while (target !== this && !target._templateInstance) {
|
112
|
+
target = target.parentNode;
|
113
|
+
}
|
114
|
+
|
115
|
+
// configure the page animation
|
116
|
+
this.sharedElements = {
|
117
|
+
'hero': target,
|
118
|
+
};
|
119
|
+
|
120
|
+
this.fire('item-click', {
|
121
|
+
item: target,
|
122
|
+
});
|
123
|
+
}
|
124
|
+
|
125
|
+
});
|
126
|
+
|
127
|
+
</script>
|
@@ -0,0 +1,147 @@
|
|
1
|
+
<!--
|
2
|
+
Copyright (c) 2015 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
|
+
<link rel="import" href="../../../polymer/polymer.html">
|
10
|
+
<link rel="import" href="../../../paper-styles/paper-styles.html">
|
11
|
+
<link rel="import" href="../../neon-shared-element-animatable-behavior.html">
|
12
|
+
|
13
|
+
<dom-module id="animated-grid">
|
14
|
+
|
15
|
+
<link rel="import" type="css" href="../shared.css">
|
16
|
+
|
17
|
+
<style>
|
18
|
+
|
19
|
+
:host {
|
20
|
+
display: block;
|
21
|
+
background: #000;
|
22
|
+
}
|
23
|
+
|
24
|
+
.tile {
|
25
|
+
display: inline-block;
|
26
|
+
float: left;
|
27
|
+
vertical-align: top;
|
28
|
+
width: calc(100% / 6);
|
29
|
+
height: calc(100% / 3);
|
30
|
+
|
31
|
+
@apply(--paper-font-title);
|
32
|
+
@apply(--layout-vertical);
|
33
|
+
@apply(--layout-center-center);
|
34
|
+
}
|
35
|
+
|
36
|
+
.tile:nth-of-type(1) {
|
37
|
+
width: calc(100% / 3);
|
38
|
+
height: calc(100% / 3 * 2);
|
39
|
+
}
|
40
|
+
|
41
|
+
.tile:nth-of-type(4) {
|
42
|
+
width: calc(100% / 3);
|
43
|
+
}
|
44
|
+
|
45
|
+
.tile:nth-of-type(5) {
|
46
|
+
width: calc(100% / 3);
|
47
|
+
height: calc(100% / 3 * 2);
|
48
|
+
}
|
49
|
+
|
50
|
+
.tile:nth-of-type(8) {
|
51
|
+
width: calc(100% / 3);
|
52
|
+
height: calc(100% / 3);
|
53
|
+
}
|
54
|
+
|
55
|
+
.tile:nth-of-type(9) {
|
56
|
+
position: absolute;
|
57
|
+
top: calc(100% / 3 * 2);
|
58
|
+
left: 0;
|
59
|
+
width: calc(100% / 6);
|
60
|
+
height: calc(100% / 3);
|
61
|
+
}
|
62
|
+
|
63
|
+
.tile:nth-of-type(10) {
|
64
|
+
position: absolute;
|
65
|
+
top: calc(100% / 3 * 2);
|
66
|
+
left: calc(100% / 6);;
|
67
|
+
width: calc(100% / 6);
|
68
|
+
height: calc(100% / 3);
|
69
|
+
}
|
70
|
+
|
71
|
+
</style>
|
72
|
+
|
73
|
+
<template>
|
74
|
+
|
75
|
+
<template is="dom-repeat" items="[[config]]">
|
76
|
+
<div class$="[[_computeTileClass(item.color)]]">
|
77
|
+
<span>[[item.value]]</span>
|
78
|
+
</div>
|
79
|
+
</template>
|
80
|
+
|
81
|
+
</template>
|
82
|
+
|
83
|
+
</dom-module>
|
84
|
+
|
85
|
+
<script>
|
86
|
+
|
87
|
+
Polymer({
|
88
|
+
|
89
|
+
is: 'animated-grid',
|
90
|
+
|
91
|
+
behaviors: [
|
92
|
+
Polymer.NeonSharedElementAnimatableBehavior
|
93
|
+
],
|
94
|
+
|
95
|
+
properties: {
|
96
|
+
|
97
|
+
config: {
|
98
|
+
type: Array,
|
99
|
+
value: function() {
|
100
|
+
return [
|
101
|
+
{value: 1, color: 'blue'},
|
102
|
+
{value: 2, color: 'red'},
|
103
|
+
{value: 3, color: 'blue'},
|
104
|
+
{value: 4, color: 'green'},
|
105
|
+
{value: 5, color: 'yellow'},
|
106
|
+
{value: 6, color: 'blue'},
|
107
|
+
{value: 7, color: 'red'},
|
108
|
+
{value: 8, color: 'green'},
|
109
|
+
{value: 9, color: 'yellow'},
|
110
|
+
{value: 10, color: 'red'}
|
111
|
+
]
|
112
|
+
}
|
113
|
+
},
|
114
|
+
|
115
|
+
animationConfig: {
|
116
|
+
type: Object,
|
117
|
+
value: function() {
|
118
|
+
return {
|
119
|
+
'entry': [{
|
120
|
+
name: 'cascaded-animation',
|
121
|
+
animation: 'transform-animation',
|
122
|
+
transformFrom: 'translateY(100%)',
|
123
|
+
transformTo: 'none',
|
124
|
+
timing: {
|
125
|
+
delay: 50
|
126
|
+
}
|
127
|
+
}]
|
128
|
+
}
|
129
|
+
}
|
130
|
+
}
|
131
|
+
|
132
|
+
},
|
133
|
+
|
134
|
+
attached: function() {
|
135
|
+
this.async(function() {
|
136
|
+
var nodeList = Polymer.dom(this.root).querySelectorAll('.tile');
|
137
|
+
this.animationConfig['entry'][0].nodes = Array.prototype.slice.call(nodeList);
|
138
|
+
});
|
139
|
+
},
|
140
|
+
|
141
|
+
_computeTileClass: function(color) {
|
142
|
+
return 'tile ' + color + '-300';
|
143
|
+
}
|
144
|
+
|
145
|
+
});
|
146
|
+
|
147
|
+
</script>
|
@@ -0,0 +1,86 @@
|
|
1
|
+
<!--
|
2
|
+
Copyright (c) 2015 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
|
+
<link rel="import" href="../../../polymer/polymer.html">
|
10
|
+
<link rel="import" href="../../../paper-styles/paper-styles.html">
|
11
|
+
<link rel="import" href="../../neon-animatable-behavior.html">
|
12
|
+
<link rel="import" href="../../neon-animation-runner-behavior.html">
|
13
|
+
<link rel="import" href="animated-grid.html">
|
14
|
+
|
15
|
+
<dom-module id="full-page">
|
16
|
+
|
17
|
+
<style>
|
18
|
+
|
19
|
+
:host {
|
20
|
+
background: black;
|
21
|
+
visibility: hidden;
|
22
|
+
@apply(--layout-vertical);
|
23
|
+
}
|
24
|
+
|
25
|
+
.toolbar {
|
26
|
+
background: #9c27b0;
|
27
|
+
height: 72px;
|
28
|
+
z-index: 1;
|
29
|
+
@apply(--shadow-elevation-2dp);
|
30
|
+
}
|
31
|
+
|
32
|
+
animated-grid {
|
33
|
+
height: calc(100% - 72px);
|
34
|
+
@apply(--layout-flex);
|
35
|
+
}
|
36
|
+
|
37
|
+
</style>
|
38
|
+
|
39
|
+
<template>
|
40
|
+
|
41
|
+
<div id="toolbar" class="toolbar"></div>
|
42
|
+
|
43
|
+
<animated-grid id="grid"></animated-grid>
|
44
|
+
|
45
|
+
</template>
|
46
|
+
|
47
|
+
</dom-module>
|
48
|
+
|
49
|
+
<script>
|
50
|
+
|
51
|
+
Polymer({
|
52
|
+
|
53
|
+
is: 'full-page',
|
54
|
+
|
55
|
+
behaviors: [
|
56
|
+
Polymer.NeonAnimatableBehavior,
|
57
|
+
Polymer.NeonAnimationRunnerBehavior
|
58
|
+
],
|
59
|
+
|
60
|
+
properties: {
|
61
|
+
|
62
|
+
animationConfig: {
|
63
|
+
type: Object,
|
64
|
+
value: function() {
|
65
|
+
return {
|
66
|
+
'entry': [{
|
67
|
+
name: 'slide-down-animation',
|
68
|
+
node: this.$.toolbar
|
69
|
+
}, {
|
70
|
+
animatable: this.$.grid,
|
71
|
+
type: 'entry'
|
72
|
+
}]
|
73
|
+
};
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
},
|
78
|
+
|
79
|
+
show: function() {
|
80
|
+
this.style.visibility = 'visible';
|
81
|
+
this.playAnimation('entry');
|
82
|
+
}
|
83
|
+
|
84
|
+
});
|
85
|
+
|
86
|
+
</script>
|