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,14 @@
|
|
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="../iron-flex-layout/classes/iron-flex-layout.html">
|
12
|
+
|
13
|
+
<link rel="import" href="classes/typography.html">
|
14
|
+
<link rel="import" href="classes/shadow.html">
|
@@ -0,0 +1,17 @@
|
|
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="../iron-flex-layout/iron-flex-layout.html">
|
12
|
+
<link rel="import" href="../iron-flex-layout/classes/iron-flex-layout.html">
|
13
|
+
|
14
|
+
<link rel="import" href="color.html">
|
15
|
+
<link rel="import" href="default-theme.html">
|
16
|
+
<link rel="import" href="shadow.html">
|
17
|
+
<link rel="import" href="typography.html">
|
@@ -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
|
+
|
13
|
+
<style is="custom-style">
|
14
|
+
|
15
|
+
:root {
|
16
|
+
|
17
|
+
--shadow-transition: {
|
18
|
+
transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
19
|
+
};
|
20
|
+
|
21
|
+
/* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c9185904b57421cdb */
|
22
|
+
|
23
|
+
--shadow-elevation-2dp: {
|
24
|
+
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
|
25
|
+
0 1px 5px 0 rgba(0, 0, 0, 0.12),
|
26
|
+
0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
27
|
+
};
|
28
|
+
|
29
|
+
--shadow-elevation-3dp: {
|
30
|
+
box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
|
31
|
+
0 1px 8px 0 rgba(0, 0, 0, 0.12),
|
32
|
+
0 3px 3px -2px rgba(0, 0, 0, 0.4);
|
33
|
+
};
|
34
|
+
|
35
|
+
--shadow-elevation-4dp: {
|
36
|
+
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
|
37
|
+
0 1px 10px 0 rgba(0, 0, 0, 0.12),
|
38
|
+
0 2px 4px -1px rgba(0, 0, 0, 0.4);
|
39
|
+
};
|
40
|
+
|
41
|
+
--shadow-elevation-6dp: {
|
42
|
+
box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14),
|
43
|
+
0 1px 18px 0 rgba(0, 0, 0, 0.12),
|
44
|
+
0 3px 5px -1px rgba(0, 0, 0, 0.4);
|
45
|
+
};
|
46
|
+
|
47
|
+
--shadow-elevation-8dp: {
|
48
|
+
box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
|
49
|
+
0 3px 14px 2px rgba(0, 0, 0, 0.12),
|
50
|
+
0 5px 5px -3px rgba(0, 0, 0, 0.4);
|
51
|
+
};
|
52
|
+
|
53
|
+
--shadow-elevation-16dp: {
|
54
|
+
box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14),
|
55
|
+
0 6px 30px 5px rgba(0, 0, 0, 0.12),
|
56
|
+
0 8px 10px -5px rgba(0, 0, 0, 0.4);
|
57
|
+
};
|
58
|
+
|
59
|
+
}
|
60
|
+
|
61
|
+
</style>
|
@@ -0,0 +1,240 @@
|
|
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
|
+
<!-- TODO(nevir): Should we upgrade Polymer/font-roboto to the final font? -->
|
11
|
+
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic">
|
12
|
+
|
13
|
+
<link rel="import" href="../polymer/polymer.html">
|
14
|
+
|
15
|
+
<style is="custom-style">
|
16
|
+
|
17
|
+
:root {
|
18
|
+
|
19
|
+
/* Shared Styles */
|
20
|
+
|
21
|
+
/*
|
22
|
+
Unfortunately, we can't make use of these yet - sibling properties aren't
|
23
|
+
evaluated. See https://github.com/Polymer/polymer/issues/1399
|
24
|
+
|
25
|
+
--paper-font-common-base: {
|
26
|
+
font-family: 'Roboto', 'Noto', sans-serif;
|
27
|
+
-webkit-font-smoothing: antialiased;
|
28
|
+
};
|
29
|
+
|
30
|
+
--paper-font-common-code: {
|
31
|
+
font-family: 'Inconsolata', 'Consolas', 'Source Code Pro', 'Monaco', 'Menlo', monospace;
|
32
|
+
-webkit-font-smoothing: antialiased;
|
33
|
+
};
|
34
|
+
|
35
|
+
--paper-font-common-expensive-kerning: {
|
36
|
+
text-rendering: optimizeLegibility;
|
37
|
+
};
|
38
|
+
|
39
|
+
--paper-font-common-nowrap: {
|
40
|
+
white-space: nowrap;
|
41
|
+
overflow: hidden;
|
42
|
+
text-overflow: ellipsis;
|
43
|
+
};
|
44
|
+
*/
|
45
|
+
|
46
|
+
/* Material Font Styles */
|
47
|
+
|
48
|
+
--paper-font-display4: {
|
49
|
+
/* @apply(--paper-font-common-base) */
|
50
|
+
font-family: 'Roboto', 'Noto', sans-serif;
|
51
|
+
-webkit-font-smoothing: antialiased;
|
52
|
+
/* @apply(--paper-font-common-expensive-kerning); */
|
53
|
+
text-rendering: optimizeLegibility;
|
54
|
+
/* @apply(--paper-font-common-nowrap); */
|
55
|
+
white-space: nowrap;
|
56
|
+
overflow: hidden;
|
57
|
+
text-overflow: ellipsis;
|
58
|
+
|
59
|
+
font-size: 112px;
|
60
|
+
font-weight: 300;
|
61
|
+
letter-spacing: -.044em;
|
62
|
+
line-height: 120px;
|
63
|
+
};
|
64
|
+
|
65
|
+
--paper-font-display3: {
|
66
|
+
/* @apply(--paper-font-common-base) */
|
67
|
+
font-family: 'Roboto', 'Noto', sans-serif;
|
68
|
+
-webkit-font-smoothing: antialiased;
|
69
|
+
/* @apply(--paper-font-common-expensive-kerning); */
|
70
|
+
text-rendering: optimizeLegibility;
|
71
|
+
/* @apply(--paper-font-common-nowrap); */
|
72
|
+
white-space: nowrap;
|
73
|
+
overflow: hidden;
|
74
|
+
text-overflow: ellipsis;
|
75
|
+
|
76
|
+
font-size: 56px;
|
77
|
+
font-weight: 400;
|
78
|
+
letter-spacing: -.026em;
|
79
|
+
line-height: 60px;
|
80
|
+
};
|
81
|
+
|
82
|
+
--paper-font-display2: {
|
83
|
+
/* @apply(--paper-font-common-base) */
|
84
|
+
font-family: 'Roboto', 'Noto', sans-serif;
|
85
|
+
-webkit-font-smoothing: antialiased;
|
86
|
+
/* @apply(--paper-font-common-expensive-kerning); */
|
87
|
+
text-rendering: optimizeLegibility;
|
88
|
+
|
89
|
+
font-size: 45px;
|
90
|
+
font-weight: 400;
|
91
|
+
letter-spacing: -.018em;
|
92
|
+
line-height: 48px;
|
93
|
+
};
|
94
|
+
|
95
|
+
--paper-font-display1: {
|
96
|
+
/* @apply(--paper-font-common-base) */
|
97
|
+
font-family: 'Roboto', 'Noto', sans-serif;
|
98
|
+
-webkit-font-smoothing: antialiased;
|
99
|
+
/* @apply(--paper-font-common-expensive-kerning); */
|
100
|
+
text-rendering: optimizeLegibility;
|
101
|
+
|
102
|
+
font-size: 34px;
|
103
|
+
font-weight: 400;
|
104
|
+
letter-spacing: -.01em;
|
105
|
+
line-height: 40px;
|
106
|
+
};
|
107
|
+
|
108
|
+
--paper-font-headline: {
|
109
|
+
/* @apply(--paper-font-common-base) */
|
110
|
+
font-family: 'Roboto', 'Noto', sans-serif;
|
111
|
+
-webkit-font-smoothing: antialiased;
|
112
|
+
/* @apply(--paper-font-common-expensive-kerning); */
|
113
|
+
text-rendering: optimizeLegibility;
|
114
|
+
|
115
|
+
font-size: 24px;
|
116
|
+
font-weight: 400;
|
117
|
+
letter-spacing: -.012em;
|
118
|
+
line-height: 32px;
|
119
|
+
};
|
120
|
+
|
121
|
+
--paper-font-title: {
|
122
|
+
/* @apply(--paper-font-common-base) */
|
123
|
+
font-family: 'Roboto', 'Noto', sans-serif;
|
124
|
+
-webkit-font-smoothing: antialiased;
|
125
|
+
/* @apply(--paper-font-common-expensive-kerning); */
|
126
|
+
text-rendering: optimizeLegibility;
|
127
|
+
/* @apply(--paper-font-common-nowrap); */
|
128
|
+
white-space: nowrap;
|
129
|
+
overflow: hidden;
|
130
|
+
text-overflow: ellipsis;
|
131
|
+
|
132
|
+
font-size: 20px;
|
133
|
+
font-weight: 500;
|
134
|
+
line-height: 28px;
|
135
|
+
};
|
136
|
+
|
137
|
+
--paper-font-subhead: {
|
138
|
+
/* @apply(--paper-font-common-base) */
|
139
|
+
font-family: 'Roboto', 'Noto', sans-serif;
|
140
|
+
-webkit-font-smoothing: antialiased;
|
141
|
+
/* @apply(--paper-font-common-expensive-kerning); */
|
142
|
+
text-rendering: optimizeLegibility;
|
143
|
+
|
144
|
+
font-size: 16px;
|
145
|
+
font-weight: 400;
|
146
|
+
line-height: 24px;
|
147
|
+
};
|
148
|
+
|
149
|
+
--paper-font-body2: {
|
150
|
+
/* @apply(--paper-font-common-base) */
|
151
|
+
font-family: 'Roboto', 'Noto', sans-serif;
|
152
|
+
-webkit-font-smoothing: antialiased;
|
153
|
+
|
154
|
+
font-size: 14px;
|
155
|
+
font-weight: 500;
|
156
|
+
line-height: 24px;
|
157
|
+
};
|
158
|
+
|
159
|
+
--paper-font-body1: {
|
160
|
+
/* @apply(--paper-font-common-base) */
|
161
|
+
font-family: 'Roboto', 'Noto', sans-serif;
|
162
|
+
-webkit-font-smoothing: antialiased;
|
163
|
+
|
164
|
+
font-size: 14px;
|
165
|
+
font-weight: 400;
|
166
|
+
line-height: 20px;
|
167
|
+
};
|
168
|
+
|
169
|
+
--paper-font-caption: {
|
170
|
+
/* @apply(--paper-font-common-base) */
|
171
|
+
font-family: 'Roboto', 'Noto', sans-serif;
|
172
|
+
-webkit-font-smoothing: antialiased;
|
173
|
+
/* @apply(--paper-font-common-nowrap); */
|
174
|
+
white-space: nowrap;
|
175
|
+
overflow: hidden;
|
176
|
+
text-overflow: ellipsis;
|
177
|
+
|
178
|
+
font-size: 12px;
|
179
|
+
font-weight: 400;
|
180
|
+
letter-spacing: 0.011em;
|
181
|
+
line-height: 20px;
|
182
|
+
};
|
183
|
+
|
184
|
+
--paper-font-menu: {
|
185
|
+
/* @apply(--paper-font-common-base) */
|
186
|
+
font-family: 'Roboto', 'Noto', sans-serif;
|
187
|
+
-webkit-font-smoothing: antialiased;
|
188
|
+
/* @apply(--paper-font-common-expensive-kerning); */
|
189
|
+
text-rendering: optimizeLegibility;
|
190
|
+
/* @apply(--paper-font-common-nowrap); */
|
191
|
+
white-space: nowrap;
|
192
|
+
overflow: hidden;
|
193
|
+
text-overflow: ellipsis;
|
194
|
+
|
195
|
+
font-size: 13px;
|
196
|
+
font-weight: 500;
|
197
|
+
line-height: 24px;
|
198
|
+
};
|
199
|
+
|
200
|
+
--paper-font-button: {
|
201
|
+
/* @apply(--paper-font-common-base) */
|
202
|
+
font-family: 'Roboto', 'Noto', sans-serif;
|
203
|
+
-webkit-font-smoothing: antialiased;
|
204
|
+
/* @apply(--paper-font-common-expensive-kerning); */
|
205
|
+
text-rendering: optimizeLegibility;
|
206
|
+
/* @apply(--paper-font-common-nowrap); */
|
207
|
+
white-space: nowrap;
|
208
|
+
overflow: hidden;
|
209
|
+
text-overflow: ellipsis;
|
210
|
+
|
211
|
+
font-size: 14px;
|
212
|
+
font-weight: 500;
|
213
|
+
letter-spacing: 0.018em;
|
214
|
+
line-height: 24px;
|
215
|
+
text-transform: uppercase;
|
216
|
+
};
|
217
|
+
|
218
|
+
--paper-font-code2: {
|
219
|
+
/* @apply(--paper-font-common-code); */
|
220
|
+
font-family: 'Inconsolata', 'Consolas', 'Source Code Pro', 'Monaco', 'Menlo', monospace;
|
221
|
+
-webkit-font-smoothing: antialiased;
|
222
|
+
|
223
|
+
font-size: 14px;
|
224
|
+
font-weight: 700;
|
225
|
+
line-height: 20px;
|
226
|
+
};
|
227
|
+
|
228
|
+
--paper-font-code1: {
|
229
|
+
/* @apply(--paper-font-common-code); */
|
230
|
+
font-family: 'Inconsolata', 'Consolas', 'Source Code Pro', 'Monaco', 'Menlo', monospace;
|
231
|
+
-webkit-font-smoothing: antialiased;
|
232
|
+
|
233
|
+
font-size: 14px;
|
234
|
+
font-weight: 500;
|
235
|
+
line-height: 20px;
|
236
|
+
};
|
237
|
+
|
238
|
+
}
|
239
|
+
|
240
|
+
</style>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
// Copyright (c) 2014 The Polymer Authors. All rights reserved.
|
2
|
+
//
|
3
|
+
// Redistribution and use in source and binary forms, with or without
|
4
|
+
// modification, are permitted provided that the following conditions are
|
5
|
+
// met:
|
6
|
+
//
|
7
|
+
// * Redistributions of source code must retain the above copyright
|
8
|
+
// notice, this list of conditions and the following disclaimer.
|
9
|
+
// * Redistributions in binary form must reproduce the above
|
10
|
+
// copyright notice, this list of conditions and the following disclaimer
|
11
|
+
// in the documentation and/or other materials provided with the
|
12
|
+
// distribution.
|
13
|
+
// * Neither the name of Google Inc. nor the names of its
|
14
|
+
// contributors may be used to endorse or promote products derived from
|
15
|
+
// this software without specific prior written permission.
|
16
|
+
//
|
17
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
18
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
19
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
20
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
21
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
22
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
23
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
24
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
25
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
26
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
27
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"name": "polymer",
|
3
|
+
"version": "1.0.3",
|
4
|
+
"main": [
|
5
|
+
"polymer.html"
|
6
|
+
],
|
7
|
+
"license": "http://polymer.github.io/LICENSE.txt",
|
8
|
+
"ignore": [
|
9
|
+
"/.*",
|
10
|
+
"/test/"
|
11
|
+
],
|
12
|
+
"authors": [
|
13
|
+
"The Polymer Authors (http://polymer.github.io/AUTHORS.txt)"
|
14
|
+
],
|
15
|
+
"repository": {
|
16
|
+
"type": "git",
|
17
|
+
"url": "https://github.com/Polymer/polymer.git"
|
18
|
+
},
|
19
|
+
"dependencies": {
|
20
|
+
"webcomponentsjs": "^0.7.2"
|
21
|
+
},
|
22
|
+
"devDependencies": {
|
23
|
+
"web-component-tester": "*"
|
24
|
+
},
|
25
|
+
"private": true
|
26
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
BUILD LOG
|
2
|
+
---------
|
3
|
+
Build Time: 2015-06-04T20:19:11-0700
|
4
|
+
|
5
|
+
NODEJS INFORMATION
|
6
|
+
==================
|
7
|
+
nodejs: v2.0.2
|
8
|
+
gulp: 3.9.0
|
9
|
+
gulp-audit: 1.0.0
|
10
|
+
gulp-rename: 1.2.2
|
11
|
+
gulp-vulcanize: 6.0.0
|
12
|
+
lazypipe: 0.2.3
|
13
|
+
polyclean: 1.2.0
|
14
|
+
run-sequence: 1.1.0
|
15
|
+
del: 1.2.0
|
16
|
+
gulp-replace: 0.5.3
|
17
|
+
vulcanize: 1.8.1
|
18
|
+
|
19
|
+
REPO REVISIONS
|
20
|
+
==============
|
21
|
+
polymer: 0c73fc226b6b5ca308a851b334b1bdeda289195d
|
22
|
+
|
23
|
+
BUILD HASHES
|
24
|
+
============
|
25
|
+
polymer-mini.html: 8173d099edaed570f4db95cd54317f49dc3183ae
|
26
|
+
polymer-micro.html: afd2d239fc08ec69fa912a0fc7e73e8ce58e3f91
|
27
|
+
polymer.html: 2094f18d71f5aec3321b1364575579e960b37cbc
|
@@ -0,0 +1,523 @@
|
|
1
|
+
<!--
|
2
|
+
@license
|
3
|
+
Copyright (c) 2014 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
|
+
--><script>(function () {
|
10
|
+
function resolve() {
|
11
|
+
document.body.removeAttribute('unresolved');
|
12
|
+
}
|
13
|
+
if (window.WebComponents) {
|
14
|
+
addEventListener('WebComponentsReady', resolve);
|
15
|
+
} else {
|
16
|
+
if (document.readyState === 'interactive' || document.readyState === 'complete') {
|
17
|
+
resolve();
|
18
|
+
} else {
|
19
|
+
addEventListener('DOMContentLoaded', resolve);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}());
|
23
|
+
Polymer = {
|
24
|
+
Settings: function () {
|
25
|
+
var user = window.Polymer || {};
|
26
|
+
location.search.slice(1).split('&').forEach(function (o) {
|
27
|
+
o = o.split('=');
|
28
|
+
o[0] && (user[o[0]] = o[1] || true);
|
29
|
+
});
|
30
|
+
var wantShadow = user.dom === 'shadow';
|
31
|
+
var hasShadow = Boolean(Element.prototype.createShadowRoot);
|
32
|
+
var nativeShadow = hasShadow && !window.ShadowDOMPolyfill;
|
33
|
+
var useShadow = wantShadow && hasShadow;
|
34
|
+
var hasNativeImports = Boolean('import' in document.createElement('link'));
|
35
|
+
var useNativeImports = hasNativeImports;
|
36
|
+
var useNativeCustomElements = !window.CustomElements || window.CustomElements.useNative;
|
37
|
+
return {
|
38
|
+
wantShadow: wantShadow,
|
39
|
+
hasShadow: hasShadow,
|
40
|
+
nativeShadow: nativeShadow,
|
41
|
+
useShadow: useShadow,
|
42
|
+
useNativeShadow: useShadow && nativeShadow,
|
43
|
+
useNativeImports: useNativeImports,
|
44
|
+
useNativeCustomElements: useNativeCustomElements
|
45
|
+
};
|
46
|
+
}()
|
47
|
+
};
|
48
|
+
(function () {
|
49
|
+
var userPolymer = window.Polymer;
|
50
|
+
window.Polymer = function (prototype) {
|
51
|
+
var ctor = desugar(prototype);
|
52
|
+
prototype = ctor.prototype;
|
53
|
+
var options = { prototype: prototype };
|
54
|
+
if (prototype.extends) {
|
55
|
+
options.extends = prototype.extends;
|
56
|
+
}
|
57
|
+
Polymer.telemetry._registrate(prototype);
|
58
|
+
document.registerElement(prototype.is, options);
|
59
|
+
return ctor;
|
60
|
+
};
|
61
|
+
var desugar = function (prototype) {
|
62
|
+
prototype = Polymer.Base.chainObject(prototype, Polymer.Base);
|
63
|
+
prototype.registerCallback();
|
64
|
+
return prototype.constructor;
|
65
|
+
};
|
66
|
+
window.Polymer = Polymer;
|
67
|
+
if (userPolymer) {
|
68
|
+
for (var i in userPolymer) {
|
69
|
+
Polymer[i] = userPolymer[i];
|
70
|
+
}
|
71
|
+
}
|
72
|
+
Polymer.Class = desugar;
|
73
|
+
}());
|
74
|
+
Polymer.telemetry = {
|
75
|
+
registrations: [],
|
76
|
+
_regLog: function (prototype) {
|
77
|
+
console.log('[' + prototype.is + ']: registered');
|
78
|
+
},
|
79
|
+
_registrate: function (prototype) {
|
80
|
+
this.registrations.push(prototype);
|
81
|
+
Polymer.log && this._regLog(prototype);
|
82
|
+
},
|
83
|
+
dumpRegistrations: function () {
|
84
|
+
this.registrations.forEach(this._regLog);
|
85
|
+
}
|
86
|
+
};
|
87
|
+
Object.defineProperty(window, 'currentImport', {
|
88
|
+
enumerable: true,
|
89
|
+
configurable: true,
|
90
|
+
get: function () {
|
91
|
+
return (document._currentScript || document.currentScript).ownerDocument;
|
92
|
+
}
|
93
|
+
});
|
94
|
+
Polymer.Base = {
|
95
|
+
_addFeature: function (feature) {
|
96
|
+
this.extend(this, feature);
|
97
|
+
},
|
98
|
+
registerCallback: function () {
|
99
|
+
this._registerFeatures();
|
100
|
+
this._doBehavior('registered');
|
101
|
+
},
|
102
|
+
createdCallback: function () {
|
103
|
+
Polymer.telemetry.instanceCount++;
|
104
|
+
this.root = this;
|
105
|
+
this._doBehavior('created');
|
106
|
+
this._initFeatures();
|
107
|
+
},
|
108
|
+
attachedCallback: function () {
|
109
|
+
this.isAttached = true;
|
110
|
+
this._doBehavior('attached');
|
111
|
+
},
|
112
|
+
detachedCallback: function () {
|
113
|
+
this.isAttached = false;
|
114
|
+
this._doBehavior('detached');
|
115
|
+
},
|
116
|
+
attributeChangedCallback: function (name) {
|
117
|
+
this._setAttributeToProperty(this, name);
|
118
|
+
this._doBehavior('attributeChanged', arguments);
|
119
|
+
},
|
120
|
+
extend: function (prototype, api) {
|
121
|
+
if (prototype && api) {
|
122
|
+
Object.getOwnPropertyNames(api).forEach(function (n) {
|
123
|
+
this.copyOwnProperty(n, api, prototype);
|
124
|
+
}, this);
|
125
|
+
}
|
126
|
+
return prototype || api;
|
127
|
+
},
|
128
|
+
copyOwnProperty: function (name, source, target) {
|
129
|
+
var pd = Object.getOwnPropertyDescriptor(source, name);
|
130
|
+
if (pd) {
|
131
|
+
Object.defineProperty(target, name, pd);
|
132
|
+
}
|
133
|
+
},
|
134
|
+
_log: console.log.apply.bind(console.log, console),
|
135
|
+
_warn: console.warn.apply.bind(console.warn, console),
|
136
|
+
_error: console.error.apply.bind(console.error, console),
|
137
|
+
_logf: function () {
|
138
|
+
return this._logPrefix.concat([this.is]).concat(Array.prototype.slice.call(arguments, 0));
|
139
|
+
}
|
140
|
+
};
|
141
|
+
Polymer.Base._logPrefix = function () {
|
142
|
+
var color = window.chrome || /firefox/i.test(navigator.userAgent);
|
143
|
+
return color ? [
|
144
|
+
'%c[%s::%s]:',
|
145
|
+
'font-weight: bold; background-color:#EEEE00;'
|
146
|
+
] : ['[%s::%s]:'];
|
147
|
+
}();
|
148
|
+
Polymer.Base.chainObject = function (object, inherited) {
|
149
|
+
if (object && inherited && object !== inherited) {
|
150
|
+
if (!Object.__proto__) {
|
151
|
+
object = Polymer.Base.extend(Object.create(inherited), object);
|
152
|
+
}
|
153
|
+
object.__proto__ = inherited;
|
154
|
+
}
|
155
|
+
return object;
|
156
|
+
};
|
157
|
+
Polymer.Base = Polymer.Base.chainObject(Polymer.Base, HTMLElement.prototype);
|
158
|
+
Polymer.telemetry.instanceCount = 0;
|
159
|
+
(function () {
|
160
|
+
var modules = {};
|
161
|
+
var DomModule = function () {
|
162
|
+
return document.createElement('dom-module');
|
163
|
+
};
|
164
|
+
DomModule.prototype = Object.create(HTMLElement.prototype);
|
165
|
+
DomModule.prototype.constructor = DomModule;
|
166
|
+
DomModule.prototype.createdCallback = function () {
|
167
|
+
var id = this.id || this.getAttribute('name') || this.getAttribute('is');
|
168
|
+
if (id) {
|
169
|
+
this.id = id;
|
170
|
+
modules[id] = this;
|
171
|
+
}
|
172
|
+
};
|
173
|
+
DomModule.prototype.import = function (id, slctr) {
|
174
|
+
var m = modules[id];
|
175
|
+
if (!m) {
|
176
|
+
forceDocumentUpgrade();
|
177
|
+
m = modules[id];
|
178
|
+
}
|
179
|
+
if (m && slctr) {
|
180
|
+
m = m.querySelector(slctr);
|
181
|
+
}
|
182
|
+
return m;
|
183
|
+
};
|
184
|
+
var cePolyfill = window.CustomElements && !CustomElements.useNative;
|
185
|
+
if (cePolyfill) {
|
186
|
+
var ready = CustomElements.ready;
|
187
|
+
CustomElements.ready = true;
|
188
|
+
}
|
189
|
+
document.registerElement('dom-module', DomModule);
|
190
|
+
if (cePolyfill) {
|
191
|
+
CustomElements.ready = ready;
|
192
|
+
}
|
193
|
+
function forceDocumentUpgrade() {
|
194
|
+
if (cePolyfill) {
|
195
|
+
var script = document._currentScript || document.currentScript;
|
196
|
+
if (script) {
|
197
|
+
CustomElements.upgradeAll(script.ownerDocument);
|
198
|
+
}
|
199
|
+
}
|
200
|
+
}
|
201
|
+
}());
|
202
|
+
Polymer.Base._addFeature({
|
203
|
+
_prepIs: function () {
|
204
|
+
if (!this.is) {
|
205
|
+
var module = (document._currentScript || document.currentScript).parentNode;
|
206
|
+
if (module.localName === 'dom-module') {
|
207
|
+
var id = module.id || module.getAttribute('name') || module.getAttribute('is');
|
208
|
+
this.is = id;
|
209
|
+
}
|
210
|
+
}
|
211
|
+
}
|
212
|
+
});
|
213
|
+
Polymer.Base._addFeature({
|
214
|
+
behaviors: [],
|
215
|
+
_prepBehaviors: function () {
|
216
|
+
if (this.behaviors.length) {
|
217
|
+
this.behaviors = this._flattenBehaviorsList(this.behaviors);
|
218
|
+
}
|
219
|
+
this._prepAllBehaviors(this.behaviors);
|
220
|
+
},
|
221
|
+
_flattenBehaviorsList: function (behaviors) {
|
222
|
+
var flat = [];
|
223
|
+
behaviors.forEach(function (b) {
|
224
|
+
if (b instanceof Array) {
|
225
|
+
flat = flat.concat(this._flattenBehaviorsList(b));
|
226
|
+
} else if (b) {
|
227
|
+
flat.push(b);
|
228
|
+
} else {
|
229
|
+
this._warn(this._logf('_flattenBehaviorsList', 'behavior is null, check for missing or 404 import'));
|
230
|
+
}
|
231
|
+
}, this);
|
232
|
+
return flat;
|
233
|
+
},
|
234
|
+
_prepAllBehaviors: function (behaviors) {
|
235
|
+
for (var i = behaviors.length - 1; i >= 0; i--) {
|
236
|
+
this._mixinBehavior(behaviors[i]);
|
237
|
+
}
|
238
|
+
for (var i = 0, l = behaviors.length; i < l; i++) {
|
239
|
+
this._prepBehavior(behaviors[i]);
|
240
|
+
}
|
241
|
+
this._prepBehavior(this);
|
242
|
+
},
|
243
|
+
_mixinBehavior: function (b) {
|
244
|
+
Object.getOwnPropertyNames(b).forEach(function (n) {
|
245
|
+
switch (n) {
|
246
|
+
case 'hostAttributes':
|
247
|
+
case 'registered':
|
248
|
+
case 'properties':
|
249
|
+
case 'observers':
|
250
|
+
case 'listeners':
|
251
|
+
case 'created':
|
252
|
+
case 'attached':
|
253
|
+
case 'detached':
|
254
|
+
case 'attributeChanged':
|
255
|
+
case 'configure':
|
256
|
+
case 'ready':
|
257
|
+
break;
|
258
|
+
default:
|
259
|
+
if (!this.hasOwnProperty(n)) {
|
260
|
+
this.copyOwnProperty(n, b, this);
|
261
|
+
}
|
262
|
+
break;
|
263
|
+
}
|
264
|
+
}, this);
|
265
|
+
},
|
266
|
+
_doBehavior: function (name, args) {
|
267
|
+
this.behaviors.forEach(function (b) {
|
268
|
+
this._invokeBehavior(b, name, args);
|
269
|
+
}, this);
|
270
|
+
this._invokeBehavior(this, name, args);
|
271
|
+
},
|
272
|
+
_invokeBehavior: function (b, name, args) {
|
273
|
+
var fn = b[name];
|
274
|
+
if (fn) {
|
275
|
+
fn.apply(this, args || Polymer.nar);
|
276
|
+
}
|
277
|
+
},
|
278
|
+
_marshalBehaviors: function () {
|
279
|
+
this.behaviors.forEach(function (b) {
|
280
|
+
this._marshalBehavior(b);
|
281
|
+
}, this);
|
282
|
+
this._marshalBehavior(this);
|
283
|
+
}
|
284
|
+
});
|
285
|
+
Polymer.Base._addFeature({
|
286
|
+
_prepExtends: function () {
|
287
|
+
if (this.extends) {
|
288
|
+
this.__proto__ = this._getExtendedPrototype(this.extends);
|
289
|
+
}
|
290
|
+
},
|
291
|
+
_getExtendedPrototype: function (tag) {
|
292
|
+
return this._getExtendedNativePrototype(tag);
|
293
|
+
},
|
294
|
+
_nativePrototypes: {},
|
295
|
+
_getExtendedNativePrototype: function (tag) {
|
296
|
+
var p = this._nativePrototypes[tag];
|
297
|
+
if (!p) {
|
298
|
+
var np = this.getNativePrototype(tag);
|
299
|
+
p = this.extend(Object.create(np), Polymer.Base);
|
300
|
+
this._nativePrototypes[tag] = p;
|
301
|
+
}
|
302
|
+
return p;
|
303
|
+
},
|
304
|
+
getNativePrototype: function (tag) {
|
305
|
+
return Object.getPrototypeOf(document.createElement(tag));
|
306
|
+
}
|
307
|
+
});
|
308
|
+
Polymer.Base._addFeature({
|
309
|
+
_prepConstructor: function () {
|
310
|
+
this._factoryArgs = this.extends ? [
|
311
|
+
this.extends,
|
312
|
+
this.is
|
313
|
+
] : [this.is];
|
314
|
+
var ctor = function () {
|
315
|
+
return this._factory(arguments);
|
316
|
+
};
|
317
|
+
if (this.hasOwnProperty('extends')) {
|
318
|
+
ctor.extends = this.extends;
|
319
|
+
}
|
320
|
+
Object.defineProperty(this, 'constructor', {
|
321
|
+
value: ctor,
|
322
|
+
writable: true,
|
323
|
+
configurable: true
|
324
|
+
});
|
325
|
+
ctor.prototype = this;
|
326
|
+
},
|
327
|
+
_factory: function (args) {
|
328
|
+
var elt = document.createElement.apply(document, this._factoryArgs);
|
329
|
+
if (this.factoryImpl) {
|
330
|
+
this.factoryImpl.apply(elt, args);
|
331
|
+
}
|
332
|
+
return elt;
|
333
|
+
}
|
334
|
+
});
|
335
|
+
Polymer.nob = Object.create(null);
|
336
|
+
Polymer.Base._addFeature({
|
337
|
+
properties: {},
|
338
|
+
getPropertyInfo: function (property) {
|
339
|
+
var info = this._getPropertyInfo(property, this.properties);
|
340
|
+
if (!info) {
|
341
|
+
this.behaviors.some(function (b) {
|
342
|
+
return info = this._getPropertyInfo(property, b.properties);
|
343
|
+
}, this);
|
344
|
+
}
|
345
|
+
return info || Polymer.nob;
|
346
|
+
},
|
347
|
+
_getPropertyInfo: function (property, properties) {
|
348
|
+
var p = properties && properties[property];
|
349
|
+
if (typeof p === 'function') {
|
350
|
+
p = properties[property] = { type: p };
|
351
|
+
}
|
352
|
+
if (p) {
|
353
|
+
p.defined = true;
|
354
|
+
}
|
355
|
+
return p;
|
356
|
+
}
|
357
|
+
});
|
358
|
+
Polymer.CaseMap = {
|
359
|
+
_caseMap: {},
|
360
|
+
dashToCamelCase: function (dash) {
|
361
|
+
var mapped = Polymer.CaseMap._caseMap[dash];
|
362
|
+
if (mapped) {
|
363
|
+
return mapped;
|
364
|
+
}
|
365
|
+
if (dash.indexOf('-') < 0) {
|
366
|
+
return Polymer.CaseMap._caseMap[dash] = dash;
|
367
|
+
}
|
368
|
+
return Polymer.CaseMap._caseMap[dash] = dash.replace(/-([a-z])/g, function (m) {
|
369
|
+
return m[1].toUpperCase();
|
370
|
+
});
|
371
|
+
},
|
372
|
+
camelToDashCase: function (camel) {
|
373
|
+
var mapped = Polymer.CaseMap._caseMap[camel];
|
374
|
+
if (mapped) {
|
375
|
+
return mapped;
|
376
|
+
}
|
377
|
+
return Polymer.CaseMap._caseMap[camel] = camel.replace(/([a-z][A-Z])/g, function (g) {
|
378
|
+
return g[0] + '-' + g[1].toLowerCase();
|
379
|
+
});
|
380
|
+
}
|
381
|
+
};
|
382
|
+
Polymer.Base._addFeature({
|
383
|
+
_prepAttributes: function () {
|
384
|
+
this._aggregatedAttributes = {};
|
385
|
+
},
|
386
|
+
_addHostAttributes: function (attributes) {
|
387
|
+
if (attributes) {
|
388
|
+
this.mixin(this._aggregatedAttributes, attributes);
|
389
|
+
}
|
390
|
+
},
|
391
|
+
_marshalHostAttributes: function () {
|
392
|
+
this._applyAttributes(this, this._aggregatedAttributes);
|
393
|
+
},
|
394
|
+
_applyAttributes: function (node, attr$) {
|
395
|
+
for (var n in attr$) {
|
396
|
+
if (!this.hasAttribute(n) && n !== 'class') {
|
397
|
+
this.serializeValueToAttribute(attr$[n], n, this);
|
398
|
+
}
|
399
|
+
}
|
400
|
+
},
|
401
|
+
_marshalAttributes: function () {
|
402
|
+
this._takeAttributesToModel(this);
|
403
|
+
},
|
404
|
+
_takeAttributesToModel: function (model) {
|
405
|
+
for (var i = 0, l = this.attributes.length; i < l; i++) {
|
406
|
+
this._setAttributeToProperty(model, this.attributes[i].name);
|
407
|
+
}
|
408
|
+
},
|
409
|
+
_setAttributeToProperty: function (model, attrName) {
|
410
|
+
if (!this._serializing) {
|
411
|
+
var propName = Polymer.CaseMap.dashToCamelCase(attrName);
|
412
|
+
var info = this.getPropertyInfo(propName);
|
413
|
+
if (info.defined || this._propertyEffects && this._propertyEffects[propName]) {
|
414
|
+
var val = this.getAttribute(attrName);
|
415
|
+
model[propName] = this.deserialize(val, info.type);
|
416
|
+
}
|
417
|
+
}
|
418
|
+
},
|
419
|
+
_serializing: false,
|
420
|
+
reflectPropertyToAttribute: function (name) {
|
421
|
+
this._serializing = true;
|
422
|
+
this.serializeValueToAttribute(this[name], Polymer.CaseMap.camelToDashCase(name));
|
423
|
+
this._serializing = false;
|
424
|
+
},
|
425
|
+
serializeValueToAttribute: function (value, attribute, node) {
|
426
|
+
var str = this.serialize(value);
|
427
|
+
(node || this)[str === undefined ? 'removeAttribute' : 'setAttribute'](attribute, str);
|
428
|
+
},
|
429
|
+
deserialize: function (value, type) {
|
430
|
+
switch (type) {
|
431
|
+
case Number:
|
432
|
+
value = Number(value);
|
433
|
+
break;
|
434
|
+
case Boolean:
|
435
|
+
value = value !== null;
|
436
|
+
break;
|
437
|
+
case Object:
|
438
|
+
try {
|
439
|
+
value = JSON.parse(value);
|
440
|
+
} catch (x) {
|
441
|
+
}
|
442
|
+
break;
|
443
|
+
case Array:
|
444
|
+
try {
|
445
|
+
value = JSON.parse(value);
|
446
|
+
} catch (x) {
|
447
|
+
value = null;
|
448
|
+
console.warn('Polymer::Attributes: couldn`t decode Array as JSON');
|
449
|
+
}
|
450
|
+
break;
|
451
|
+
case Date:
|
452
|
+
value = new Date(value);
|
453
|
+
break;
|
454
|
+
case String:
|
455
|
+
default:
|
456
|
+
break;
|
457
|
+
}
|
458
|
+
return value;
|
459
|
+
},
|
460
|
+
serialize: function (value) {
|
461
|
+
switch (typeof value) {
|
462
|
+
case 'boolean':
|
463
|
+
return value ? '' : undefined;
|
464
|
+
case 'object':
|
465
|
+
if (value instanceof Date) {
|
466
|
+
return value;
|
467
|
+
} else if (value) {
|
468
|
+
try {
|
469
|
+
return JSON.stringify(value);
|
470
|
+
} catch (x) {
|
471
|
+
return '';
|
472
|
+
}
|
473
|
+
}
|
474
|
+
default:
|
475
|
+
return value != null ? value : undefined;
|
476
|
+
}
|
477
|
+
}
|
478
|
+
});
|
479
|
+
Polymer.Base._addFeature({
|
480
|
+
_setupDebouncers: function () {
|
481
|
+
this._debouncers = {};
|
482
|
+
},
|
483
|
+
debounce: function (jobName, callback, wait) {
|
484
|
+
this._debouncers[jobName] = Polymer.Debounce.call(this, this._debouncers[jobName], callback, wait);
|
485
|
+
},
|
486
|
+
isDebouncerActive: function (jobName) {
|
487
|
+
var debouncer = this._debouncers[jobName];
|
488
|
+
return debouncer && debouncer.finish;
|
489
|
+
},
|
490
|
+
flushDebouncer: function (jobName) {
|
491
|
+
var debouncer = this._debouncers[jobName];
|
492
|
+
if (debouncer) {
|
493
|
+
debouncer.complete();
|
494
|
+
}
|
495
|
+
},
|
496
|
+
cancelDebouncer: function (jobName) {
|
497
|
+
var debouncer = this._debouncers[jobName];
|
498
|
+
if (debouncer) {
|
499
|
+
debouncer.stop();
|
500
|
+
}
|
501
|
+
}
|
502
|
+
});
|
503
|
+
Polymer.version = '1.0.3';
|
504
|
+
Polymer.Base._addFeature({
|
505
|
+
_registerFeatures: function () {
|
506
|
+
this._prepIs();
|
507
|
+
this._prepAttributes();
|
508
|
+
this._prepBehaviors();
|
509
|
+
this._prepExtends();
|
510
|
+
this._prepConstructor();
|
511
|
+
},
|
512
|
+
_prepBehavior: function (b) {
|
513
|
+
this._addHostAttributes(b.hostAttributes);
|
514
|
+
},
|
515
|
+
_marshalBehavior: function (b) {
|
516
|
+
},
|
517
|
+
_initFeatures: function () {
|
518
|
+
this._marshalHostAttributes();
|
519
|
+
this._setupDebouncers();
|
520
|
+
this._marshalBehaviors();
|
521
|
+
}
|
522
|
+
});</script>
|
523
|
+
|