polymer-paper-elements-rails 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
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,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,23 @@
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
+ <path d="M188,78H37V44h151V78z M39,76h147V46H39V76z"/>
13
+ <polygon points="66,64.8 60.6,56.8 55.3,64.8 49.2,55.6 50.8,54.4 55.3,61.2 60.6,53.2 66,61.2 71.3,53.2 77.4,62.4 75.8,63.6
14
+ 71.3,56.8 "/>
15
+ <rect x="149" y="58" width="26" height="2"/>
16
+ <rect x="99" y="58" width="26" height="2"/>
17
+ <rect x="38" y="72" width="50" height="4"/>
18
+ <g id="ic_x5F_add_x0D_">
19
+ </g>
20
+ </g>
21
+ <g id="Guides">
22
+ </g>
23
+ </svg>
@@ -0,0 +1,158 @@
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="../iron-flex-layout/classes/iron-flex-layout.html">
13
+ <link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
14
+ <link rel="import" href="../iron-behaviors/iron-control-state.html">
15
+ <link rel="import" href="../paper-ripple/paper-ripple.html">
16
+
17
+ <!--
18
+ `paper-tab` is styled to look like a tab. It should be used in conjunction with
19
+ `paper-tabs`.
20
+
21
+ Example:
22
+
23
+ <paper-tabs selected="0">
24
+ <paper-tab>TAB 1</paper-tab>
25
+ <paper-tab>TAB 2</paper-tab>
26
+ <paper-tab>TAB 3</paper-tab>
27
+ </paper-tabs>
28
+
29
+ ### Styling
30
+
31
+ The following custom properties and mixins are available for styling:
32
+
33
+ Custom property | Description | Default
34
+ ----------------|-------------|----------
35
+ `--paper-tab-ink` | Ink color | `--paper-yellow-a100`
36
+ `--paper-tab` | Mixin applied to the tab | `{}`
37
+ `--paper-tab-content` | Mixin applied to the tab content | `{}`
38
+
39
+ -->
40
+
41
+ <dom-module id="paper-tab">
42
+
43
+ <style>
44
+
45
+ :host {
46
+ @apply(--layout-inline);
47
+ @apply(--layout-center);
48
+ @apply(--layout-center-justified);
49
+ @apply(--layout-flex);
50
+
51
+ position: relative;
52
+ padding: 0 12px;
53
+ overflow: hidden;
54
+ cursor: pointer;
55
+
56
+ @apply(--paper-tab);
57
+ }
58
+
59
+ :host(:focus) {
60
+ outline: none;
61
+ }
62
+
63
+ :host([link]) {
64
+ padding: 0;
65
+ }
66
+
67
+ .tab-content {
68
+ height: 100%;
69
+ -webkit-transform: translateZ(0);
70
+ transform: translateZ(0);
71
+ transition: opacity 0.1s cubic-bezier(0.4, 0.0, 1, 1);
72
+
73
+ @apply(--paper-tab-content);
74
+ }
75
+
76
+ :host(:not(.iron-selected)) > .tab-content {
77
+ opacity: 0.8;
78
+ }
79
+
80
+ :host(:focus) .tab-content {
81
+ opacity: 1;
82
+ font-weight: 700;
83
+ }
84
+
85
+ #ink {
86
+ color: var(--paper-tab-ink, --paper-yellow-a100);
87
+ pointer-events: none;
88
+ }
89
+
90
+ .tab-content > ::content > a {
91
+ height: 100%;
92
+ /* flex */
93
+ -ms-flex: 1 1 0.000000001px;
94
+ -webkit-flex: 1;
95
+ flex: 1;
96
+ -webkit-flex-basis: 0.000000001px;
97
+ flex-basis: 0.000000001px;
98
+ }
99
+
100
+ </style>
101
+
102
+ <template>
103
+
104
+ <div class="tab-content flex-auto center-center horizontal layout">
105
+ <content></content>
106
+ </div>
107
+
108
+ <template is="dom-if" if="[[!noink]]">
109
+ <paper-ripple id="ink" initial-opacity="0.95" opacity-decay-velocity="0.98"></paper-ripple>
110
+ </template>
111
+
112
+ </template>
113
+
114
+ </dom-module>
115
+
116
+ <script>
117
+
118
+ Polymer({
119
+
120
+ is: 'paper-tab',
121
+
122
+ behaviors: [
123
+ Polymer.IronControlState
124
+ ],
125
+
126
+ properties: {
127
+
128
+ /**
129
+ * If true, ink ripple effect is disabled.
130
+ *
131
+ * @attribute noink
132
+ */
133
+ noink: {
134
+ type: Boolean,
135
+ value: false
136
+ }
137
+
138
+ },
139
+
140
+ hostAttributes: {
141
+ role: 'tab'
142
+ },
143
+
144
+ listeners: {
145
+ down: '_onDown'
146
+ },
147
+
148
+ get _parentNoink () {
149
+ var parent = Polymer.dom(this).parentNode;
150
+ return !!parent && !!parent.noink;
151
+ },
152
+
153
+ _onDown: function(e) {
154
+ this.noink = !!this.noink || !!this._parentNoink;
155
+ }
156
+ });
157
+
158
+ </script>
@@ -0,0 +1,18 @@
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-iconset-svg/iron-iconset-svg.html">
12
+
13
+ <iron-iconset-svg name="paper-tabs" size="24">
14
+ <svg><defs>
15
+ <g id="chevron-left"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></g>
16
+ <g id="chevron-right"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></g>
17
+ </defs></svg>
18
+ </iron-iconset-svg>
@@ -0,0 +1,483 @@
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="../iron-flex-layout/iron-flex-layout.html">
13
+ <link rel="import" href="../iron-flex-layout/classes/iron-flex-layout.html">
14
+ <link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html">
15
+ <link rel="import" href="../iron-menu-behavior/iron-menubar-behavior.html">
16
+ <link rel="import" href="../iron-icon/iron-icon.html">
17
+ <link rel="import" href="../paper-icon-button/paper-icon-button.html">
18
+ <link rel="import" href="../paper-styles/color.html">
19
+ <link rel="import" href="paper-tabs-icons.html">
20
+ <link rel="import" href="paper-tab.html">
21
+
22
+ <!--
23
+ `paper-tabs` makes it easy to explore and switch between different views or functional aspects of
24
+ an app, or to browse categorized data sets.
25
+
26
+ Use `selected` property to get or set the selected tab.
27
+
28
+ Example:
29
+
30
+ <paper-tabs selected="0">
31
+ <paper-tab>TAB 1</paper-tab>
32
+ <paper-tab>TAB 2</paper-tab>
33
+ <paper-tab>TAB 3</paper-tab>
34
+ </paper-tabs>
35
+
36
+ See <a href="#paper-tab">paper-tab</a> for more information about
37
+ `paper-tab`.
38
+
39
+ A common usage for `paper-tabs` is to use it along with `iron-pages` to switch
40
+ between different views.
41
+
42
+ <paper-tabs selected="{{selected}}">
43
+ <paper-tab>Tab 1</paper-tab>
44
+ <paper-tab>Tab 2</paper-tab>
45
+ <paper-tab>Tab 3</paper-tab>
46
+ </paper-tabs>
47
+
48
+ <iron-pages selected="{{selected}}">
49
+ <div>Page 1</div>
50
+ <div>Page 2</div>
51
+ <div>Page 3</div>
52
+ </iron-pages>
53
+
54
+
55
+ To use links in tabs, add `link` attribute to `paper-tab` and put an `<a>`
56
+ element in `paper-tab`.
57
+
58
+ Example:
59
+
60
+ <paper-tabs selected="0">
61
+ <paper-tab link>
62
+ <a href="#link1" class="horizontal center-center layout">TAB ONE</a>
63
+ </paper-tab>
64
+ <paper-tab link>
65
+ <a href="#link2" class="horizontal center-center layout">TAB TWO</a>
66
+ </paper-tab>
67
+ <paper-tab link>
68
+ <a href="#link3" class="horizontal center-center layout">TAB THREE</a>
69
+ </paper-tab>
70
+ </paper-tabs>
71
+
72
+ ### Styling
73
+
74
+ The following custom properties and mixins are available for styling:
75
+
76
+ Custom property | Description | Default
77
+ ----------------|-------------|----------
78
+ `--paper-tabs-selection-bar-color` | Color for the selection bar | `--paper-yellow-a100`
79
+ `--paper-tabs` | Mixin applied to the tabs | `{}`
80
+
81
+ @hero hero.svg
82
+ @demo demo/index.html
83
+ -->
84
+
85
+ <dom-module id="paper-tabs">
86
+
87
+ <style>
88
+
89
+ :host {
90
+ @apply(--layout);
91
+ @apply(--layout-center);
92
+
93
+ height: 48px;
94
+ font-size: 14px;
95
+ font-weight: 500;
96
+ overflow: hidden;
97
+ -webkit-user-select: none;
98
+ -moz-user-select: none;
99
+ -ms-user-select: none;
100
+ user-select: none;
101
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
102
+
103
+ @apply(--paper-tabs);
104
+ }
105
+
106
+ #tabsContainer {
107
+ position: relative;
108
+ height: 100%;
109
+ white-space: nowrap;
110
+ overflow: hidden;
111
+ }
112
+
113
+ #tabsContent {
114
+ height: 100%;
115
+ }
116
+
117
+ #tabsContent.scrollable {
118
+ position: absolute;
119
+ white-space: nowrap;
120
+ }
121
+
122
+ .hidden {
123
+ display: none;
124
+ }
125
+
126
+ .not-visible {
127
+ opacity: 0;
128
+ }
129
+
130
+ paper-icon-button {
131
+ width: 24px;
132
+ padding: 16px;
133
+ }
134
+
135
+ #selectionBar {
136
+ position: absolute;
137
+ height: 2px;
138
+ bottom: 0;
139
+ left: 0;
140
+ right: 0;
141
+ background-color: var(--paper-tabs-selection-bar-color, --paper-yellow-a100);
142
+ -webkit-transform-origin: left center;
143
+ transform-origin: left center;
144
+ -webkit-transform: scale(0);
145
+ transform: scale(0);
146
+ transition: -webkit-transform;
147
+ transition: transform;
148
+
149
+ @apply(--paper-tabs-selection-bar);
150
+ }
151
+
152
+ #selectionBar.align-bottom {
153
+ top: 0;
154
+ bottom: auto;
155
+ }
156
+
157
+ #selectionBar.expand {
158
+ transition-duration: 0.15s;
159
+ transition-timing-function: cubic-bezier(0.4, 0.0, 1, 1);
160
+ }
161
+
162
+ #selectionBar.contract {
163
+ transition-duration: 0.18s;
164
+ transition-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1);
165
+ }
166
+
167
+ #tabsContent > ::content > *:not(#selectionBar) {
168
+ height: 100%;
169
+ }
170
+
171
+ </style>
172
+
173
+ <template>
174
+
175
+ <paper-icon-button icon="paper-tabs:chevron-left" class$="[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onLeftScrollButtonDown"></paper-icon-button>
176
+
177
+ <div id="tabsContainer" class="flex" on-scroll="_scroll">
178
+
179
+ <div id="tabsContent" class$="[[_computeTabsContentClass(scrollable)]]">
180
+
181
+ <content select="*"></content>
182
+
183
+ <div id="selectionBar" class$="[[_computeSelectionBarClass(noBar, alignBottom)]]"
184
+ on-transitionend="_onBarTransitionEnd"></div>
185
+
186
+ </div>
187
+
188
+ </div>
189
+
190
+ <paper-icon-button icon="paper-tabs:chevron-right" class$="[[_computeScrollButtonClass(_rightHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onRightScrollButtonDown"></paper-icon-button>
191
+
192
+ </template>
193
+
194
+ </dom-module>
195
+
196
+ <script>
197
+
198
+ Polymer({
199
+
200
+ is: 'paper-tabs',
201
+
202
+ behaviors: [
203
+ Polymer.IronResizableBehavior,
204
+ Polymer.IronMenubarBehavior
205
+ ],
206
+
207
+ properties: {
208
+
209
+ /**
210
+ * If true, ink ripple effect is disabled.
211
+ */
212
+ noink: {
213
+ type: Boolean,
214
+ value: false
215
+ },
216
+
217
+ /**
218
+ * If true, the bottom bar to indicate the selected tab will not be shown.
219
+ */
220
+ noBar: {
221
+ type: Boolean,
222
+ value: false
223
+ },
224
+
225
+ /**
226
+ * If true, the slide effect for the bottom bar is disabled.
227
+ */
228
+ noSlide: {
229
+ type: Boolean,
230
+ value: false
231
+ },
232
+
233
+ /**
234
+ * If true, tabs are scrollable and the tab width is based on the label width.
235
+ */
236
+ scrollable: {
237
+ type: Boolean,
238
+ value: false
239
+ },
240
+
241
+ /**
242
+ * If true, dragging on the tabs to scroll is disabled.
243
+ */
244
+ disableDrag: {
245
+ type: Boolean,
246
+ value: false
247
+ },
248
+
249
+ /**
250
+ * If true, scroll buttons (left/right arrow) will be hidden for scrollable tabs.
251
+ */
252
+ hideScrollButtons: {
253
+ type: Boolean,
254
+ value: false
255
+ },
256
+
257
+ /**
258
+ * If true, the tabs are aligned to bottom (the selection bar appears at the top).
259
+ */
260
+ alignBottom: {
261
+ type: Boolean,
262
+ value: false
263
+ },
264
+
265
+ /**
266
+ * Gets or sets the selected element. The default is to use the index of the item.
267
+ */
268
+ selected: {
269
+ type: String,
270
+ notify: true
271
+ },
272
+
273
+ selectable: {
274
+ type: String,
275
+ value: 'paper-tab'
276
+ },
277
+
278
+ _step: {
279
+ type: Number,
280
+ value: 10
281
+ },
282
+
283
+ _holdDelay: {
284
+ type: Number,
285
+ value: 1
286
+ },
287
+
288
+ _leftHidden: {
289
+ type: Boolean,
290
+ value: false
291
+ },
292
+
293
+ _rightHidden: {
294
+ type: Boolean,
295
+ value: false
296
+ },
297
+
298
+ _previousTab: {
299
+ type: Object
300
+ }
301
+ },
302
+
303
+ hostAttributes: {
304
+ role: 'tablist'
305
+ },
306
+
307
+ listeners: {
308
+ 'iron-resize': '_onResize',
309
+ 'iron-select': '_onIronSelect',
310
+ 'iron-deselect': '_onIronDeselect'
311
+ },
312
+
313
+ _computeScrollButtonClass: function(hideThisButton, scrollable, hideScrollButtons) {
314
+ if (!scrollable || hideScrollButtons) {
315
+ return 'hidden';
316
+ }
317
+
318
+ if (hideThisButton) {
319
+ return 'not-visible';
320
+ }
321
+
322
+ return '';
323
+ },
324
+
325
+ _computeTabsContentClass: function(scrollable) {
326
+ return scrollable ? 'scrollable' : 'horizontal layout';
327
+ },
328
+
329
+ _computeSelectionBarClass: function(noBar, alignBottom) {
330
+ if (noBar) {
331
+ return 'hidden';
332
+ } else if (alignBottom) {
333
+ return 'align-bottom';
334
+ }
335
+ },
336
+
337
+ // TODO(cdata): Add `track` response back in when gesture lands.
338
+
339
+ _onResize: function() {
340
+ this.debounce('_onResize', function() {
341
+ this._scroll();
342
+ this._tabChanged(this.selectedItem);
343
+ }, 10);
344
+ },
345
+
346
+ _onIronSelect: function(event) {
347
+ this._tabChanged(event.detail.item, this._previousTab);
348
+ this._previousTab = event.detail.item;
349
+ this.cancelDebouncer('tab-changed');
350
+ },
351
+
352
+ _onIronDeselect: function(event) {
353
+ this.debounce('tab-changed', function() {
354
+ this._tabChanged(null, this._previousTab);
355
+ // See polymer/polymer#1305
356
+ }, 1);
357
+ },
358
+
359
+ get _tabContainerScrollSize () {
360
+ return Math.max(
361
+ 0,
362
+ this.$.tabsContainer.scrollWidth -
363
+ this.$.tabsContainer.offsetWidth
364
+ );
365
+ },
366
+
367
+ _scroll: function() {
368
+ var scrollLeft;
369
+
370
+ if (!this.scrollable) {
371
+ return;
372
+ }
373
+
374
+ scrollLeft = this.$.tabsContainer.scrollLeft;
375
+
376
+ this._leftHidden = scrollLeft === 0;
377
+ this._rightHidden = scrollLeft === this._tabContainerScrollSize;
378
+ },
379
+
380
+ _onLeftScrollButtonDown: function() {
381
+ this._holdJob = setInterval(this._scrollToLeft.bind(this), this._holdDelay);
382
+ },
383
+
384
+ _onRightScrollButtonDown: function() {
385
+ this._holdJob = setInterval(this._scrollToRight.bind(this), this._holdDelay);
386
+ },
387
+
388
+ _onScrollButtonUp: function() {
389
+ clearInterval(this._holdJob);
390
+ this._holdJob = null;
391
+ },
392
+
393
+ _scrollToLeft: function() {
394
+ this.$.tabsContainer.scrollLeft -= this._step;
395
+ },
396
+
397
+ _scrollToRight: function() {
398
+ this.$.tabsContainer.scrollLeft += this._step;
399
+ },
400
+
401
+ _tabChanged: function(tab, old) {
402
+ if (!tab) {
403
+ this._positionBar(0, 0);
404
+ return;
405
+ }
406
+
407
+ var r = this.$.tabsContent.getBoundingClientRect();
408
+ var w = r.width;
409
+ var tabRect = tab.getBoundingClientRect();
410
+ var tabOffsetLeft = tabRect.left - r.left;
411
+
412
+ this._pos = {
413
+ width: this._calcPercent(tabRect.width, w),
414
+ left: this._calcPercent(tabOffsetLeft, w)
415
+ };
416
+
417
+ if (this.noSlide || old == null) {
418
+ // position bar directly without animation
419
+ this._positionBar(this._pos.width, this._pos.left);
420
+ return;
421
+ }
422
+
423
+ var oldRect = old.getBoundingClientRect();
424
+ var oldIndex = this.items.indexOf(old);
425
+ var index = this.items.indexOf(tab);
426
+ var m = 5;
427
+
428
+ // bar animation: expand
429
+ this.$.selectionBar.classList.add('expand');
430
+
431
+ if (oldIndex < index) {
432
+ this._positionBar(this._calcPercent(tabRect.left + tabRect.width - oldRect.left, w) - m,
433
+ this._left);
434
+ } else {
435
+ this._positionBar(this._calcPercent(oldRect.left + oldRect.width - tabRect.left, w) - m,
436
+ this._calcPercent(tabOffsetLeft, w) + m);
437
+ }
438
+
439
+ if (this.scrollable) {
440
+ this._scrollToSelectedIfNeeded(tabRect.width, tabOffsetLeft);
441
+ }
442
+ },
443
+
444
+ _scrollToSelectedIfNeeded: function(tabWidth, tabOffsetLeft) {
445
+ var l = tabOffsetLeft - this.$.tabsContainer.scrollLeft;
446
+ if (l < 0) {
447
+ this.$.tabsContainer.scrollLeft += l;
448
+ } else {
449
+ l += (tabWidth - this.$.tabsContainer.offsetWidth);
450
+ if (l > 0) {
451
+ this.$.tabsContainer.scrollLeft += l;
452
+ }
453
+ }
454
+ },
455
+
456
+ _calcPercent: function(w, w0) {
457
+ return 100 * w / w0;
458
+ },
459
+
460
+ _positionBar: function(width, left) {
461
+ this._width = width;
462
+ this._left = left;
463
+ this.transform(
464
+ 'translate3d(' + left + '%, 0, 0) scaleX(' + (width / 100) + ')',
465
+ this.$.selectionBar);
466
+ },
467
+
468
+ _onBarTransitionEnd: function(e) {
469
+ var cl = this.$.selectionBar.classList;
470
+ // bar animation: expand -> contract
471
+ if (cl.contains('expand')) {
472
+ cl.remove('expand');
473
+ cl.add('contract');
474
+ this._positionBar(this._pos.width, this._pos.left);
475
+ // bar animation done
476
+ } else if (cl.contains('contract')) {
477
+ cl.remove('contract');
478
+ }
479
+ }
480
+
481
+ });
482
+
483
+ </script>