polymer-paper-elements-rails 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +51 -0
  3. data/Rakefile +1 -0
  4. data/app/assets/components/iron-a11y-announcer/iron-a11y-announcer.html +125 -0
  5. data/app/assets/components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html +418 -0
  6. data/app/assets/components/iron-autogrow-textarea/hero.svg +33 -0
  7. data/app/assets/components/iron-autogrow-textarea/iron-autogrow-textarea.html +263 -0
  8. data/app/assets/components/iron-behaviors/iron-button-state.html +195 -0
  9. data/app/assets/components/iron-behaviors/iron-control-state.html +102 -0
  10. data/app/assets/components/iron-fit-behavior/iron-fit-behavior.html +230 -0
  11. data/app/assets/components/iron-flex-layout/classes/iron-flex-layout.html +307 -0
  12. data/app/assets/components/iron-flex-layout/classes/iron-shadow-flex-layout.html +302 -0
  13. data/app/assets/components/iron-flex-layout/iron-flex-layout.html +313 -0
  14. data/app/assets/components/iron-form-element-behavior/iron-form-element-behavior.html +50 -0
  15. data/app/assets/components/iron-icon/hero.svg +19 -0
  16. data/app/assets/components/iron-icon/iron-icon.html +187 -0
  17. data/app/assets/components/iron-icons/av-icons.html +73 -0
  18. data/app/assets/components/iron-icons/communication-icons.html +59 -0
  19. data/app/assets/components/iron-icons/device-icons.html +94 -0
  20. data/app/assets/components/iron-icons/editor-icons.html +70 -0
  21. data/app/assets/components/iron-icons/hardware-icons.html +61 -0
  22. data/app/assets/components/iron-icons/hero.svg +35 -0
  23. data/app/assets/components/iron-icons/image-icons.html +164 -0
  24. data/app/assets/components/iron-icons/iron-icons.html +303 -0
  25. data/app/assets/components/iron-icons/maps-icons.html +71 -0
  26. data/app/assets/components/iron-icons/notification-icons.html +62 -0
  27. data/app/assets/components/iron-icons/social-icons.html +40 -0
  28. data/app/assets/components/iron-iconset-svg/iron-iconset-svg.html +191 -0
  29. data/app/assets/components/iron-input/hero.svg +19 -0
  30. data/app/assets/components/iron-input/iron-input.html +235 -0
  31. data/app/assets/components/iron-media-query/hero.svg +29 -0
  32. data/app/assets/components/iron-media-query/iron-media-query.html +84 -0
  33. data/app/assets/components/iron-menu-behavior/iron-menu-behavior.html +214 -0
  34. data/app/assets/components/iron-menu-behavior/iron-menubar-behavior.html +65 -0
  35. data/app/assets/components/iron-meta/hero.svg +33 -0
  36. data/app/assets/components/iron-meta/iron-meta.html +352 -0
  37. data/app/assets/components/iron-overlay-behavior/iron-overlay-backdrop.html +132 -0
  38. data/app/assets/components/iron-overlay-behavior/iron-overlay-behavior.html +432 -0
  39. data/app/assets/components/iron-overlay-behavior/iron-overlay-manager.html +107 -0
  40. data/app/assets/components/iron-range-behavior/iron-range-behavior.html +101 -0
  41. data/app/assets/components/iron-resizable-behavior/iron-resizable-behavior.html +139 -0
  42. data/app/assets/components/iron-selector/iron-multi-selectable.html +120 -0
  43. data/app/assets/components/iron-selector/iron-selectable.html +307 -0
  44. data/app/assets/components/iron-selector/iron-selection.html +115 -0
  45. data/app/assets/components/iron-selector/iron-selector.html +71 -0
  46. data/app/assets/components/iron-validatable-behavior/iron-validatable-behavior.html +100 -0
  47. data/app/assets/components/neon-animation/animations/cascaded-animation.html +84 -0
  48. data/app/assets/components/neon-animation/animations/fade-in-animation.html +49 -0
  49. data/app/assets/components/neon-animation/animations/fade-out-animation.html +49 -0
  50. data/app/assets/components/neon-animation/animations/hero-animation.html +83 -0
  51. data/app/assets/components/neon-animation/animations/opaque-animation.html +46 -0
  52. data/app/assets/components/neon-animation/animations/ripple-animation.html +92 -0
  53. data/app/assets/components/neon-animation/animations/scale-down-animation.html +65 -0
  54. data/app/assets/components/neon-animation/animations/scale-up-animation.html +58 -0
  55. data/app/assets/components/neon-animation/animations/slide-down-animation.html +59 -0
  56. data/app/assets/components/neon-animation/animations/slide-from-left-animation.html +60 -0
  57. data/app/assets/components/neon-animation/animations/slide-from-right-animation.html +60 -0
  58. data/app/assets/components/neon-animation/animations/slide-left-animation.html +59 -0
  59. data/app/assets/components/neon-animation/animations/slide-right-animation.html +59 -0
  60. data/app/assets/components/neon-animation/animations/slide-up-animation.html +59 -0
  61. data/app/assets/components/neon-animation/animations/transform-animation.html +61 -0
  62. data/app/assets/components/neon-animation/guides/neon-animation.md +313 -0
  63. data/app/assets/components/neon-animation/neon-animatable-behavior.html +156 -0
  64. data/app/assets/components/neon-animation/neon-animatable.html +54 -0
  65. data/app/assets/components/neon-animation/neon-animated-pages.html +208 -0
  66. data/app/assets/components/neon-animation/neon-animation-behavior.html +88 -0
  67. data/app/assets/components/neon-animation/neon-animation-runner-behavior.html +110 -0
  68. data/app/assets/components/neon-animation/neon-animation.html +17 -0
  69. data/app/assets/components/neon-animation/neon-animations.html +25 -0
  70. data/app/assets/components/neon-animation/neon-shared-element-animatable-behavior.html +37 -0
  71. data/app/assets/components/neon-animation/neon-shared-element-animation-behavior.html +66 -0
  72. data/app/assets/components/neon-animation/web-animations.html +11 -0
  73. data/app/assets/components/paper-behaviors/paper-button-behavior.html +55 -0
  74. data/app/assets/components/paper-behaviors/paper-inky-focus-behavior.html +44 -0
  75. data/app/assets/components/paper-button/paper-button.html +177 -0
  76. data/app/assets/components/paper-checkbox/metadata.html +17 -0
  77. data/app/assets/components/paper-checkbox/paper-checkbox.css +149 -0
  78. data/app/assets/components/paper-checkbox/paper-checkbox.html +163 -0
  79. data/app/assets/components/paper-dialog-behavior/hero.svg +51 -0
  80. data/app/assets/components/paper-dialog-behavior/paper-dialog-behavior.html +236 -0
  81. data/app/assets/components/paper-dialog-behavior/paper-dialog-common.css +58 -0
  82. data/app/assets/components/paper-dialog-scrollable/hero.svg +69 -0
  83. data/app/assets/components/paper-dialog-scrollable/paper-dialog-scrollable.html +150 -0
  84. data/app/assets/components/paper-dialog/hero.svg +58 -0
  85. data/app/assets/components/paper-dialog/paper-dialog.html +122 -0
  86. data/app/assets/components/paper-drawer-panel/hero.svg +21 -0
  87. data/app/assets/components/paper-drawer-panel/paper-drawer-panel.css +142 -0
  88. data/app/assets/components/paper-drawer-panel/paper-drawer-panel.html +585 -0
  89. data/app/assets/components/paper-fab/paper-fab.html +159 -0
  90. data/app/assets/components/paper-header-panel/hero.svg +38 -0
  91. data/app/assets/components/paper-header-panel/paper-header-panel.html +496 -0
  92. data/app/assets/components/paper-icon-button/paper-icon-button.html +141 -0
  93. data/app/assets/components/paper-input/all-imports.html +12 -0
  94. data/app/assets/components/paper-input/hero.svg +19 -0
  95. data/app/assets/components/paper-input/paper-input-addon-behavior.html +43 -0
  96. data/app/assets/components/paper-input/paper-input-behavior.html +293 -0
  97. data/app/assets/components/paper-input/paper-input-char-counter.html +95 -0
  98. data/app/assets/components/paper-input/paper-input-container.html +495 -0
  99. data/app/assets/components/paper-input/paper-input-error.html +99 -0
  100. data/app/assets/components/paper-input/paper-input.html +126 -0
  101. data/app/assets/components/paper-input/paper-textarea.html +100 -0
  102. data/app/assets/components/paper-item/all-imports.html +13 -0
  103. data/app/assets/components/paper-item/paper-icon-item.html +86 -0
  104. data/app/assets/components/paper-item/paper-item-body.html +93 -0
  105. data/app/assets/components/paper-item/paper-item-shared.css +19 -0
  106. data/app/assets/components/paper-item/paper-item.html +95 -0
  107. data/app/assets/components/paper-material/paper-material.html +98 -0
  108. data/app/assets/components/paper-menu/hero.svg +35 -0
  109. data/app/assets/components/paper-menu/paper-menu.html +133 -0
  110. data/app/assets/components/paper-progress/hero.svg +21 -0
  111. data/app/assets/components/paper-progress/paper-progress.html +199 -0
  112. data/app/assets/components/paper-radio-button/hero.svg +22 -0
  113. data/app/assets/components/paper-radio-button/paper-radio-button.css +109 -0
  114. data/app/assets/components/paper-radio-button/paper-radio-button.html +148 -0
  115. data/app/assets/components/paper-radio-group/hero.svg +25 -0
  116. data/app/assets/components/paper-radio-group/paper-radio-group.html +186 -0
  117. data/app/assets/components/paper-ripple/hero.svg +30 -0
  118. data/app/assets/components/paper-ripple/paper-ripple.html +714 -0
  119. data/app/assets/components/paper-scroll-header-panel/hero.svg +41 -0
  120. data/app/assets/components/paper-scroll-header-panel/paper-scroll-header-panel.html +455 -0
  121. data/app/assets/components/paper-slider/hero.svg +20 -0
  122. data/app/assets/components/paper-slider/paper-slider.css +252 -0
  123. data/app/assets/components/paper-slider/paper-slider.html +449 -0
  124. data/app/assets/components/paper-spinner/hero.svg +27 -0
  125. data/app/assets/components/paper-spinner/paper-spinner.css +325 -0
  126. data/app/assets/components/paper-spinner/paper-spinner.html +222 -0
  127. data/app/assets/components/paper-styles/classes/global.html +96 -0
  128. data/app/assets/components/paper-styles/classes/shadow-layout.html +302 -0
  129. data/app/assets/components/paper-styles/classes/shadow.html +39 -0
  130. data/app/assets/components/paper-styles/classes/typography.html +171 -0
  131. data/app/assets/components/paper-styles/color.html +333 -0
  132. data/app/assets/components/paper-styles/default-theme.html +39 -0
  133. data/app/assets/components/paper-styles/paper-styles-classes.html +14 -0
  134. data/app/assets/components/paper-styles/paper-styles.html +17 -0
  135. data/app/assets/components/paper-styles/shadow.html +61 -0
  136. data/app/assets/components/paper-styles/typography.html +240 -0
  137. data/app/assets/components/paper-tabs/hero.svg +23 -0
  138. data/app/assets/components/paper-tabs/paper-tab.html +158 -0
  139. data/app/assets/components/paper-tabs/paper-tabs-icons.html +18 -0
  140. data/app/assets/components/paper-tabs/paper-tabs.html +483 -0
  141. data/app/assets/components/paper-toast/hero.svg +20 -0
  142. data/app/assets/components/paper-toast/paper-toast.html +164 -0
  143. data/app/assets/components/paper-toggle-button/hero.svg +22 -0
  144. data/app/assets/components/paper-toggle-button/paper-toggle-button.css +108 -0
  145. data/app/assets/components/paper-toggle-button/paper-toggle-button.html +183 -0
  146. data/app/assets/components/paper-toolbar/paper-toolbar.html +375 -0
  147. data/app/assets/components/polymer-gestures/Gruntfile.js +60 -0
  148. data/app/assets/components/polymer-gestures/banner.txt +9 -0
  149. data/app/assets/components/polymer-gestures/build.json +17 -0
  150. data/app/assets/components/polymer-gestures/conf/karma.conf.js +39 -0
  151. data/app/assets/components/polymer-gestures/package.json +20 -0
  152. data/app/assets/components/polymer-gestures/polymer-gestures.html +21 -0
  153. data/app/assets/components/polymer-gestures/polymer-gestures.js +46 -0
  154. data/app/assets/components/polymer-gestures/src/dispatcher.js +474 -0
  155. data/app/assets/components/polymer-gestures/src/eventFactory.js +127 -0
  156. data/app/assets/components/polymer-gestures/src/hold.js +129 -0
  157. data/app/assets/components/polymer-gestures/src/mouse.js +135 -0
  158. data/app/assets/components/polymer-gestures/src/ms.js +80 -0
  159. data/app/assets/components/polymer-gestures/src/pinch.js +186 -0
  160. data/app/assets/components/polymer-gestures/src/platform-events.js +39 -0
  161. data/app/assets/components/polymer-gestures/src/pointer.js +68 -0
  162. data/app/assets/components/polymer-gestures/src/pointermap.js +67 -0
  163. data/app/assets/components/polymer-gestures/src/scope.js +10 -0
  164. data/app/assets/components/polymer-gestures/src/tap.js +103 -0
  165. data/app/assets/components/polymer-gestures/src/targetfind.js +244 -0
  166. data/app/assets/components/polymer-gestures/src/touch-action.js +60 -0
  167. data/app/assets/components/polymer-gestures/src/touch.js +341 -0
  168. data/app/assets/components/polymer-gestures/src/track.js +230 -0
  169. data/app/assets/components/web-animations-js/web-animations-next-lite.min.js +17 -0
  170. data/app/assets/components/web-animations-js/web-animations-next.min.js +17 -0
  171. data/app/assets/components/web-animations-js/web-animations.min.js +17 -0
  172. data/app/assets/components/webcomponentsjs/CustomElements.js +956 -0
  173. data/app/assets/components/webcomponentsjs/CustomElements.min.js +11 -0
  174. data/app/assets/components/webcomponentsjs/HTMLImports.js +1078 -0
  175. data/app/assets/components/webcomponentsjs/HTMLImports.min.js +11 -0
  176. data/app/assets/components/webcomponentsjs/MutationObserver.js +344 -0
  177. data/app/assets/components/webcomponentsjs/MutationObserver.min.js +11 -0
  178. data/app/assets/components/webcomponentsjs/ShadowDOM.js +4414 -0
  179. data/app/assets/components/webcomponentsjs/ShadowDOM.min.js +15 -0
  180. data/app/assets/components/webcomponentsjs/package.json +31 -0
  181. data/app/assets/components/webcomponentsjs/webcomponents-lite.js +2300 -0
  182. data/app/assets/components/webcomponentsjs/webcomponents-lite.min.js +13 -0
  183. data/app/assets/components/webcomponentsjs/webcomponents.js +7112 -0
  184. data/app/assets/components/webcomponentsjs/webcomponents.min.js +15 -0
  185. data/lib/polymer-paper-elements-rails.rb +2 -0
  186. data/lib/polymer-paper-elements-rails/engine.rb +4 -0
  187. data/lib/polymer-paper-elements-rails/version.rb +3 -0
  188. metadata +272 -0
@@ -0,0 +1,27 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 17.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ viewBox="0 0 225 126" enable-background="new 0 0 225 126" xml:space="preserve">
6
+ <g id="background" display="none">
7
+ <rect display="inline" fill="#B0BEC5" width="225" height="126"/>
8
+ </g>
9
+ <g id="label">
10
+ </g>
11
+ <g id="art">
12
+ <g>
13
+ <path d="M112.1,92.3c-13.4,0-25.1-9.1-28.4-22l1.9-0.5c3.1,12.1,13.9,20.5,26.4,20.5c15,0,27.3-12.2,27.3-27.3
14
+ s-12.2-27.3-27.3-27.3c-8.1,0-15.8,3.6-21,9.8l-1.5-1.3c5.6-6.7,13.8-10.6,22.5-10.6c16.1,0,29.3,13.1,29.3,29.3
15
+ S128.2,92.3,112.1,92.3z"/>
16
+ <path d="M112.7,87.3c-6.6,0-12.7-2.5-17.3-7.2c-4.6-4.6-7.2-10.8-7.2-17.3c0-6.6,2.5-12.7,7.2-17.3c7.9-7.9,20.2-9.5,29.8-3.8
17
+ l-1,1.7c-8.8-5.3-20.1-3.8-27.4,3.5c-4.2,4.2-6.6,9.9-6.6,15.9s2.3,11.7,6.6,15.9s9.9,6.6,15.9,6.6c6,0,11.7-2.3,15.9-6.6
18
+ c4.7-4.7,7.1-11.3,6.5-18l2-0.2c0.7,7.3-1.9,14.4-7.1,19.6C125.4,84.7,119.2,87.3,112.7,87.3z"/>
19
+ <path d="M112.5,43.5C101.8,43.5,93,52.3,93,63s8.7,19.5,19.5,19.5S132,73.7,132,63S123.2,43.5,112.5,43.5z M119,64h-6v6h-2v-6h-6
20
+ v-2h6v-6h2v6h6V64z"/>
21
+ </g>
22
+ <g id="ic_x5F_add_x0D_">
23
+ </g>
24
+ </g>
25
+ <g id="Guides">
26
+ </g>
27
+ </svg>
@@ -0,0 +1,325 @@
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
+ /**************************/
12
+ /* STYLES FOR THE SPINNER */
13
+ /**************************/
14
+
15
+ /*
16
+ * Constants:
17
+ * STROKEWIDTH = 3px
18
+ * ARCSIZE = 270 degrees (amount of circle the arc takes up)
19
+ * ARCTIME = 1333ms (time it takes to expand and contract arc)
20
+ * ARCSTARTROT = 216 degrees (how much the start location of the arc
21
+ * should rotate each time, 216 gives us a
22
+ * 5 pointed star shape (it's 360/5 * 3).
23
+ * For a 7 pointed star, we might do
24
+ * 360/7 * 3 = 154.286)
25
+ * CONTAINERWIDTH = 28px
26
+ * SHRINK_TIME = 400ms
27
+ */
28
+
29
+ :host {
30
+ display: inline-block;
31
+ position: relative;
32
+ width: 28px; /* CONTAINERWIDTH */
33
+ height: 28px; /* CONTAINERWIDTH */
34
+ }
35
+
36
+ #spinnerContainer {
37
+ width: 100%;
38
+ height: 100%;
39
+ }
40
+
41
+ #spinnerContainer.active {
42
+ /* duration: 360 * ARCTIME / (ARCSTARTROT + (360-ARCSIZE)) */
43
+ -webkit-animation: container-rotate 1568ms linear infinite;
44
+ animation: container-rotate 1568ms linear infinite;
45
+ }
46
+
47
+ @-webkit-keyframes container-rotate {
48
+ to { -webkit-transform: rotate(360deg) }
49
+ }
50
+
51
+ @keyframes container-rotate {
52
+ to { transform: rotate(360deg) }
53
+ }
54
+
55
+ .spinner-layer {
56
+ position: absolute;
57
+ width: 100%;
58
+ height: 100%;
59
+ opacity: 0;
60
+ }
61
+
62
+ .layer-1 {
63
+ border-color: var(--paper-spinner-layer-1-color, --google-blue-500);
64
+ }
65
+
66
+ .layer-2 {
67
+ border-color: var(--paper-spinner-layer-2-color, --google-red-500);
68
+ }
69
+
70
+ .layer-3 {
71
+ border-color: var(--paper-spinner-layer-3-color, --google-yellow-500);
72
+ }
73
+
74
+ .layer-4 {
75
+ border-color: var(--paper-spinner-layer-4-color, --google-blue-500);
76
+ }
77
+
78
+ /**
79
+ * IMPORTANT NOTE ABOUT CSS ANIMATION PROPERTIES (keanulee):
80
+ *
81
+ * iOS Safari (tested on iOS 8.1) does not handle animation-delay very well - it doesn't
82
+ * guarantee that the animation will start _exactly_ after that value. So we avoid using
83
+ * animation-delay and instead set custom keyframes for each color (as layer-2undant as it
84
+ * seems).
85
+ *
86
+ * We write out each animation in full (instead of separating animation-name,
87
+ * animation-duration, etc.) because under the polyfill, Safari does not recognize those
88
+ * specific properties properly, treats them as -webkit-animation, and overrides the
89
+ * other animation rules. See https://github.com/Polymer/platform/issues/53.
90
+ */
91
+ .active .spinner-layer.layer-1 {
92
+ /* durations: 4 * ARCTIME */
93
+ -webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-1-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
94
+ animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-1-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
95
+ }
96
+
97
+ .active .spinner-layer.layer-2 {
98
+ /* durations: 4 * ARCTIME */
99
+ -webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-2-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
100
+ animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-2-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
101
+ }
102
+
103
+ .active .spinner-layer.layer-3 {
104
+ /* durations: 4 * ARCTIME */
105
+ -webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-3-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
106
+ animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-3-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
107
+ }
108
+
109
+ .active .spinner-layer.layer-4 {
110
+ /* durations: 4 * ARCTIME */
111
+ -webkit-animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-4-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
112
+ animation: fill-unfill-rotate 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both, layer-4-fade-in-out 5332ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
113
+ }
114
+
115
+ @-webkit-keyframes fill-unfill-rotate {
116
+ 12.5% { -webkit-transform: rotate(135deg); } /* 0.5 * ARCSIZE */
117
+ 25% { -webkit-transform: rotate(270deg); } /* 1 * ARCSIZE */
118
+ 37.5% { -webkit-transform: rotate(405deg); } /* 1.5 * ARCSIZE */
119
+ 50% { -webkit-transform: rotate(540deg); } /* 2 * ARCSIZE */
120
+ 62.5% { -webkit-transform: rotate(675deg); } /* 2.5 * ARCSIZE */
121
+ 75% { -webkit-transform: rotate(810deg); } /* 3 * ARCSIZE */
122
+ 87.5% { -webkit-transform: rotate(945deg); } /* 3.5 * ARCSIZE */
123
+ to { -webkit-transform: rotate(1080deg); } /* 4 * ARCSIZE */
124
+ }
125
+
126
+ @keyframes fill-unfill-rotate {
127
+ 12.5% { transform: rotate(135deg); } /* 0.5 * ARCSIZE */
128
+ 25% { transform: rotate(270deg); } /* 1 * ARCSIZE */
129
+ 37.5% { transform: rotate(405deg); } /* 1.5 * ARCSIZE */
130
+ 50% { transform: rotate(540deg); } /* 2 * ARCSIZE */
131
+ 62.5% { transform: rotate(675deg); } /* 2.5 * ARCSIZE */
132
+ 75% { transform: rotate(810deg); } /* 3 * ARCSIZE */
133
+ 87.5% { transform: rotate(945deg); } /* 3.5 * ARCSIZE */
134
+ to { transform: rotate(1080deg); } /* 4 * ARCSIZE */
135
+ }
136
+
137
+ /**
138
+ * HACK: Even though the intention is to have the current .spinner-layer at
139
+ * `opacity: 1`, we set it to `opacity: 0.99` instead since this forces Chrome
140
+ * to do proper subpixel rendering for the elements being animated. This is
141
+ * especially visible in Chrome 39 on Ubuntu 14.04. See:
142
+ *
143
+ * - https://github.com/Polymer/paper-spinner/issues/9
144
+ * - https://code.google.com/p/chromium/issues/detail?id=436255
145
+ */
146
+ @-webkit-keyframes layer-1-fade-in-out {
147
+ from { opacity: 0.99; }
148
+ 25% { opacity: 0.99; }
149
+ 26% { opacity: 0; }
150
+ 89% { opacity: 0; }
151
+ 90% { opacity: 0.99; }
152
+ 100% { opacity: 0.99; }
153
+ }
154
+
155
+ @keyframes layer-1-fade-in-out {
156
+ from { opacity: 0.99; }
157
+ 25% { opacity: 0.99; }
158
+ 26% { opacity: 0; }
159
+ 89% { opacity: 0; }
160
+ 90% { opacity: 0.99; }
161
+ 100% { opacity: 0.99; }
162
+ }
163
+
164
+ @-webkit-keyframes layer-2-fade-in-out {
165
+ from { opacity: 0; }
166
+ 15% { opacity: 0; }
167
+ 25% { opacity: 0.99; }
168
+ 50% { opacity: 0.99; }
169
+ 51% { opacity: 0; }
170
+ }
171
+
172
+ @keyframes layer-2-fade-in-out {
173
+ from { opacity: 0; }
174
+ 15% { opacity: 0; }
175
+ 25% { opacity: 0.99; }
176
+ 50% { opacity: 0.99; }
177
+ 51% { opacity: 0; }
178
+ }
179
+
180
+ @-webkit-keyframes layer-3-fade-in-out {
181
+ from { opacity: 0; }
182
+ 40% { opacity: 0; }
183
+ 50% { opacity: 0.99; }
184
+ 75% { opacity: 0.99; }
185
+ 76% { opacity: 0; }
186
+ }
187
+
188
+ @keyframes layer-3-fade-in-out {
189
+ from { opacity: 0; }
190
+ 40% { opacity: 0; }
191
+ 50% { opacity: 0.99; }
192
+ 75% { opacity: 0.99; }
193
+ 76% { opacity: 0; }
194
+ }
195
+
196
+ @-webkit-keyframes layer-4-fade-in-out {
197
+ from { opacity: 0; }
198
+ 65% { opacity: 0; }
199
+ 75% { opacity: 0.99; }
200
+ 90% { opacity: 0.99; }
201
+ 100% { opacity: 0; }
202
+ }
203
+
204
+ @keyframes layer-4-fade-in-out {
205
+ from { opacity: 0; }
206
+ 65% { opacity: 0; }
207
+ 75% { opacity: 0.99; }
208
+ 90% { opacity: 0.99; }
209
+ 100% { opacity: 0; }
210
+ }
211
+
212
+ /**
213
+ * Patch the gap that appear between the two adjacent div.circle-clipper while the
214
+ * spinner is rotating (appears on Chrome 38, Safari 7.1, and IE 11).
215
+ *
216
+ * Update: the gap no longer appears on Chrome when .spinner-layer's opacity is 0.99,
217
+ * but still does on Safari and IE.
218
+ */
219
+ .gap-patch {
220
+ position: absolute;
221
+ box-sizing: border-box;
222
+ top: 0;
223
+ left: 45%;
224
+ width: 10%;
225
+ height: 100%;
226
+ overflow: hidden;
227
+ border-color: inherit;
228
+ }
229
+
230
+ .gap-patch .circle {
231
+ width: 1000%;
232
+ left: -450%;
233
+ }
234
+
235
+ .circle-clipper {
236
+ display: inline-block;
237
+ position: relative;
238
+ width: 50%;
239
+ height: 100%;
240
+ overflow: hidden;
241
+ border-color: inherit;
242
+ }
243
+
244
+ .circle-clipper .circle {
245
+ width: 200%;
246
+ }
247
+
248
+ .circle {
249
+ box-sizing: border-box;
250
+ height: 100%;
251
+ border-width: 3px; /* STROKEWIDTH */
252
+ border-style: solid;
253
+ border-color: inherit;
254
+ border-bottom-color: transparent !important;
255
+ border-radius: 50%;
256
+ -webkit-animation: none;
257
+ animation: none;
258
+
259
+ @apply(--layout-fit);
260
+ }
261
+
262
+ .circle-clipper.left .circle {
263
+ border-right-color: transparent !important;
264
+ -webkit-transform: rotate(129deg);
265
+ transform: rotate(129deg);
266
+ }
267
+
268
+ .circle-clipper.right .circle {
269
+ left: -100%;
270
+ border-left-color: transparent !important;
271
+ -webkit-transform: rotate(-129deg);
272
+ transform: rotate(-129deg);
273
+ }
274
+
275
+ .active .circle-clipper.left .circle {
276
+ /* duration: ARCTIME */
277
+ -webkit-animation: left-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
278
+ animation: left-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
279
+ }
280
+
281
+ .active .circle-clipper.right .circle {
282
+ /* duration: ARCTIME */
283
+ -webkit-animation: right-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
284
+ animation: right-spin 1333ms cubic-bezier(0.4, 0.0, 0.2, 1) infinite both;
285
+ }
286
+
287
+ @-webkit-keyframes left-spin {
288
+ from { -webkit-transform: rotate(130deg); }
289
+ 50% { -webkit-transform: rotate(-5deg); }
290
+ to { -webkit-transform: rotate(130deg); }
291
+ }
292
+
293
+ @keyframes left-spin {
294
+ from { transform: rotate(130deg); }
295
+ 50% { transform: rotate(-5deg); }
296
+ to { transform: rotate(130deg); }
297
+ }
298
+
299
+ @-webkit-keyframes right-spin {
300
+ from { -webkit-transform: rotate(-130deg); }
301
+ 50% { -webkit-transform: rotate(5deg); }
302
+ to { -webkit-transform: rotate(-130deg); }
303
+ }
304
+
305
+ @keyframes right-spin {
306
+ from { transform: rotate(-130deg); }
307
+ 50% { transform: rotate(5deg); }
308
+ to { transform: rotate(-130deg); }
309
+ }
310
+
311
+ #spinnerContainer.cooldown {
312
+ /* duration: SHRINK_TIME */
313
+ -webkit-animation: container-rotate 1568ms linear infinite, fade-out 400ms cubic-bezier(0.4, 0.0, 0.2, 1);
314
+ animation: container-rotate 1568ms linear infinite, fade-out 400ms cubic-bezier(0.4, 0.0, 0.2, 1);
315
+ }
316
+
317
+ @-webkit-keyframes fade-out {
318
+ from { opacity: 0.99; }
319
+ to { opacity: 0; }
320
+ }
321
+
322
+ @keyframes fade-out {
323
+ from { opacity: 0.99; }
324
+ to { opacity: 0; }
325
+ }
@@ -0,0 +1,222 @@
1
+ <!--
2
+ @license
3
+ Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7
+ Code distributed by Google as part of the polymer project is also
8
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9
+ -->
10
+
11
+ <link rel="import" href="../polymer/polymer.html">
12
+ <link rel="import" href="../paper-styles/color.html">
13
+ <link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
14
+
15
+ <!--
16
+ Element providing material design circular spinner.
17
+
18
+ <paper-spinner active></paper-spinner>
19
+
20
+ The default spinner cycles between four layers of colors; by default they are
21
+ blue, red, yellow and green. It can be customized so that it uses one color only
22
+ by setting all the layer colors to the same value.
23
+
24
+ ### Accessibility
25
+
26
+ Alt attribute should be set to provide adequate context for accessibility. If not provided,
27
+ it defaults to 'loading'.
28
+ Empty alt can be provided to mark the element as decorative if alternative content is provided
29
+ in another form (e.g. a text block following the spinner).
30
+
31
+ <paper-spinner alt="Loading contacts list" active></paper-spinner>
32
+
33
+ ### Styling
34
+
35
+ The following custom properties and mixins are available for styling:
36
+
37
+ Custom property | Description | Default
38
+ ----------------|-------------|----------
39
+ `--paper-spinner-layer-1-color` | Color of the first spinner rotation | `--google-blue-500`
40
+ `--paper-spinner-layer-2-color` | Color of the second spinner rotation | `--google-red-500`
41
+ `--paper-spinner-layer-3-color` | Color of the third spinner rotation | `--google-yellow-500`
42
+ `--paper-spinner-layer-4-color` | Color of the fourth spinner rotation | `--google-green-500`
43
+
44
+ @group Paper Elements
45
+ @element paper-spinner
46
+ @hero hero.svg
47
+ @demo demo/index.html
48
+ -->
49
+
50
+ <dom-module id="paper-spinner">
51
+
52
+ <link rel="import" type="css" href="paper-spinner.css">
53
+
54
+ <template>
55
+
56
+ <div id="spinnerContainer" class-name="[[_spinnerContainerClassName]]">
57
+ <div class="spinner-layer layer-1">
58
+ <div class="circle-clipper left">
59
+ <div class="circle"></div>
60
+ </div><div class="gap-patch">
61
+ <div class="circle"></div>
62
+ </div><div class="circle-clipper right">
63
+ <div class="circle"></div>
64
+ </div>
65
+ </div>
66
+
67
+ <div class="spinner-layer layer-2">
68
+ <div class="circle-clipper left">
69
+ <div class="circle"></div>
70
+ </div><div class="gap-patch">
71
+ <div class="circle"></div>
72
+ </div><div class="circle-clipper right">
73
+ <div class="circle"></div>
74
+ </div>
75
+ </div>
76
+
77
+ <div class="spinner-layer layer-3">
78
+ <div class="circle-clipper left">
79
+ <div class="circle"></div>
80
+ </div><div class="gap-patch">
81
+ <div class="circle"></div>
82
+ </div><div class="circle-clipper right">
83
+ <div class="circle"></div>
84
+ </div>
85
+ </div>
86
+
87
+ <div class="spinner-layer layer-4">
88
+ <div class="circle-clipper left">
89
+ <div class="circle"></div>
90
+ </div><div class="gap-patch">
91
+ <div class="circle"></div>
92
+ </div><div class="circle-clipper right">
93
+ <div class="circle"></div>
94
+ </div>
95
+ </div>
96
+ </div>
97
+
98
+ </template>
99
+
100
+ <script>
101
+
102
+ (function() {
103
+
104
+ 'use strict';
105
+
106
+ function classNames(obj) {
107
+ var classNames = [];
108
+ for (var key in obj) {
109
+ if (obj.hasOwnProperty(key) && obj[key]) {
110
+ classNames.push(key);
111
+ }
112
+ }
113
+
114
+ return classNames.join(' ');
115
+ }
116
+
117
+ Polymer({
118
+
119
+ is: 'paper-spinner',
120
+
121
+ listeners: {
122
+ 'animationend': 'reset',
123
+ 'webkitAnimationEnd': 'reset'
124
+ },
125
+
126
+ properties: {
127
+
128
+ /**
129
+ * Displays the spinner.
130
+ *
131
+ * @attribute active
132
+ * @type boolean
133
+ * @default false
134
+ */
135
+ active: {
136
+ observer: '_activeChanged',
137
+ type: Boolean,
138
+ value: false
139
+ },
140
+
141
+ /**
142
+ * Alternative text content for accessibility support.
143
+ * If alt is present, it will add an aria-label whose content matches alt when active.
144
+ * If alt is not present, it will default to 'loading' as the alt value.
145
+ *
146
+ * @attribute alt
147
+ * @type string
148
+ * @default 'loading'
149
+ */
150
+ alt: {
151
+ observer: '_altChanged',
152
+ type: String,
153
+ value: 'loading'
154
+ },
155
+
156
+ /**
157
+ * True when the spinner is going from active to inactive. This is represented by a fade
158
+ * to 0% opacity to the user.
159
+ */
160
+ _coolingDown: {
161
+ type: Boolean,
162
+ value: false
163
+ },
164
+
165
+ _spinnerContainerClassName: {
166
+ type: String,
167
+ computed: '_computeSpinnerContainerClassName(active, _coolingDown)'
168
+ }
169
+
170
+ },
171
+
172
+ _computeSpinnerContainerClassName: function(active, _coolingDown) {
173
+ return classNames({
174
+ active: active || _coolingDown,
175
+ cooldown: _coolingDown
176
+ });
177
+ },
178
+
179
+ ready: function() {
180
+ // Allow user-provided `aria-label` take preference to any other text alternative.
181
+ if (this.hasAttribute('aria-label')) {
182
+ this.alt = this.getAttribute('aria-label');
183
+ } else {
184
+ this.setAttribute('aria-label', this.alt);
185
+ }
186
+
187
+ if (!this.active) {
188
+ this.setAttribute('aria-hidden', 'true');
189
+ }
190
+ },
191
+
192
+ _activeChanged: function() {
193
+ if (this.active) {
194
+ this.removeAttribute('aria-hidden');
195
+ } else {
196
+ this._coolingDown = true;
197
+ this.setAttribute('aria-hidden', 'true');
198
+ }
199
+ },
200
+
201
+ _altChanged: function() {
202
+ if (this.alt === '') {
203
+ this.setAttribute('aria-hidden', 'true');
204
+ } else {
205
+ this.removeAttribute('aria-hidden');
206
+ }
207
+
208
+ this.setAttribute('aria-label', this.alt);
209
+ },
210
+
211
+ reset: function() {
212
+ this.active = false;
213
+ this._coolingDown = false;
214
+ }
215
+
216
+ });
217
+
218
+ }());
219
+
220
+ </script>
221
+
222
+ </dom-module>