polymer-core-rails 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -3
  3. data/app/assets/components/context-free-parser/context-free-parser.js +27 -4
  4. data/app/assets/components/core-a11y-keys/core-a11y-keys.html +4 -4
  5. data/app/assets/components/core-ajax/core-ajax.html +38 -10
  6. data/app/assets/components/core-ajax/core-xhr.html +1 -1
  7. data/app/assets/components/core-animated-pages/core-animated-pages.html +25 -2
  8. data/app/assets/components/core-animation/web-animations.html +1 -1
  9. data/app/assets/components/core-collapse/core-collapse.html +1 -1
  10. data/app/assets/components/core-doc-viewer/elements/core-doc-page.css +26 -1
  11. data/app/assets/components/core-doc-viewer/elements/core-doc-page.html +39 -4
  12. data/app/assets/components/core-doc-viewer/elements/core-doc-toc.css +3 -3
  13. data/app/assets/components/core-drawer-panel/core-drawer-panel.css +14 -6
  14. data/app/assets/components/core-drawer-panel/core-drawer-panel.html +32 -8
  15. data/app/assets/components/core-dropdown/core-dropdown.html +8 -2
  16. data/app/assets/components/core-elements/core-elements.html +1 -0
  17. data/app/assets/components/core-icon/core-icon.html +0 -2
  18. data/app/assets/components/core-icons/av-icons.html +2 -9
  19. data/app/assets/components/core-icons/communication-icons.html +39 -42
  20. data/app/assets/components/core-icons/core-icons.html +231 -235
  21. data/app/assets/components/core-icons/device-icons.html +75 -90
  22. data/app/assets/components/core-icons/editor-icons.html +52 -52
  23. data/app/assets/components/core-icons/hardware-icons.html +40 -41
  24. data/app/assets/components/core-icons/image-icons.html +133 -137
  25. data/app/assets/components/core-icons/maps-icons.html +55 -57
  26. data/app/assets/components/core-icons/notification-icons.html +34 -34
  27. data/app/assets/components/core-icons/social-icons.html +23 -37
  28. data/app/assets/components/core-image/core-image.html +3 -3
  29. data/app/assets/components/core-list/core-list.html +50 -27
  30. data/app/assets/components/core-localstorage/core-localstorage.html +4 -5
  31. data/app/assets/components/core-menu/core-menu.html +8 -3
  32. data/app/assets/components/core-menu/core-submenu.html +2 -2
  33. data/app/assets/components/core-overlay/core-key-helper.html +3 -0
  34. data/app/assets/components/core-overlay/core-overlay-layer.html +3 -0
  35. data/app/assets/components/core-overlay/core-overlay.html +20 -4
  36. data/app/assets/components/core-resizable/core-resizable.html +248 -0
  37. data/app/assets/components/core-scroll-header-panel/core-scroll-header-panel.html +14 -3
  38. data/app/assets/components/core-scroll-threshold/core-scroll-threshold.html +222 -0
  39. data/app/assets/components/core-scroll-threshold/metadata.html +24 -0
  40. data/app/assets/components/core-selection/core-selection.html +1 -1
  41. data/app/assets/components/core-selector/core-selector.html +26 -26
  42. data/app/assets/components/core-splitter/core-splitter.html +17 -2
  43. data/app/assets/components/core-style/core-style.html +1 -1
  44. data/app/assets/components/core-toolbar/core-toolbar.html +1 -1
  45. data/app/assets/components/core-tooltip/core-tooltip.css +2 -2
  46. data/app/assets/components/core-tooltip/core-tooltip.html +16 -5
  47. data/app/assets/components/core-tooltip/metadata.html +1 -1
  48. data/app/assets/components/google-code-prettify/styles/doxy.css +1 -1
  49. data/app/assets/components/marked/lib/marked.js +11 -5
  50. data/app/assets/components/marked/marked.min.js +6 -0
  51. data/app/assets/components/paper-button/paper-button-base.html +56 -12
  52. data/app/assets/components/paper-button/paper-button.html +22 -5
  53. data/app/assets/components/paper-fab/paper-fab.html +2 -2
  54. data/app/assets/components/paper-ripple/paper-ripple.html +2 -1
  55. data/app/assets/components/paper-shadow/paper-shadow.css +10 -10
  56. data/app/assets/components/paper-shadow/paper-shadow.html +8 -1
  57. data/app/assets/components/sampler-scaffold/sampler-scaffold.css +1 -1
  58. data/app/assets/components/{web-animations-next → web-animations-js}/src/animation-constructor.js +10 -5
  59. data/app/assets/components/{web-animations-next → web-animations-js}/src/animation-node.js +1 -1
  60. data/app/assets/components/{web-animations-next → web-animations-js}/src/animation.js +2 -2
  61. data/app/assets/components/{web-animations-next → web-animations-js}/src/apply-preserving-inline-style.js +2 -3
  62. data/app/assets/components/{web-animations-next → web-animations-js}/src/apply.js +1 -1
  63. data/app/assets/components/{web-animations-next → web-animations-js}/src/box-handler.js +1 -1
  64. data/app/assets/components/{web-animations-next → web-animations-js}/src/color-handler.js +2 -2
  65. data/app/assets/components/{web-animations-next → web-animations-js}/src/deprecation.js +0 -0
  66. data/app/assets/components/{web-animations-next → web-animations-js}/src/dev.js +0 -0
  67. data/app/assets/components/{web-animations-next → web-animations-js}/src/dimension-handler.js +1 -1
  68. data/app/assets/components/{web-animations-next → web-animations-js}/src/effect-callback.js +2 -2
  69. data/app/assets/components/{web-animations-next → web-animations-js}/src/effect.js +1 -1
  70. data/app/assets/components/{web-animations-next → web-animations-js}/src/element-animatable.js +1 -1
  71. data/app/assets/components/{web-animations-next → web-animations-js}/src/font-weight-handler.js +1 -1
  72. data/app/assets/components/{web-animations-next → web-animations-js}/src/group-constructors.js +2 -1
  73. data/app/assets/components/{web-animations-next → web-animations-js}/src/handler-utils.js +1 -1
  74. data/app/assets/components/{web-animations-next → web-animations-js}/src/interpolation.js +1 -1
  75. data/app/assets/components/{web-animations-next → web-animations-js}/src/matrix-decomposition.js +1 -1
  76. data/app/assets/components/{web-animations-next → web-animations-js}/src/matrix-interpolation.js +1 -1
  77. data/app/assets/components/{web-animations-next → web-animations-js}/src/normalize-keyframes.js +1 -1
  78. data/app/assets/components/{web-animations-next → web-animations-js}/src/number-handler.js +1 -1
  79. data/app/assets/components/{web-animations-next → web-animations-js}/src/player.js +1 -1
  80. data/app/assets/components/{web-animations-next → web-animations-js}/src/position-handler.js +1 -1
  81. data/app/assets/components/{web-animations-next → web-animations-js}/src/property-interpolation.js +1 -1
  82. data/app/assets/components/{web-animations-next → web-animations-js}/src/property-names.js +1 -1
  83. data/app/assets/components/{web-animations-next → web-animations-js}/src/scope.js +2 -2
  84. data/app/assets/components/{web-animations-next → web-animations-js}/src/shadow-handler.js +1 -1
  85. data/app/assets/components/{web-animations-next → web-animations-js}/src/shape-handler.js +1 -1
  86. data/app/assets/components/{web-animations-next → web-animations-js}/src/tick.js +1 -1
  87. data/app/assets/components/{web-animations-next → web-animations-js}/src/timeline.js +7 -7
  88. data/app/assets/components/{web-animations-next → web-animations-js}/src/timing-utilities.js +0 -0
  89. data/app/assets/components/{web-animations-next → web-animations-js}/src/transform-handler.js +1 -1
  90. data/app/assets/components/{web-animations-next → web-animations-js}/src/visibility-handler.js +1 -1
  91. data/app/assets/components/{web-animations-next/src/maxifill-player.js → web-animations-js/src/web-animations-next-player.js} +1 -1
  92. data/app/assets/components/{web-animations-next → web-animations-js}/web-animations-next-lite.dev.html +1 -1
  93. data/app/assets/components/{web-animations-next → web-animations-js}/web-animations-next-lite.dev.js +0 -0
  94. data/app/assets/components/web-animations-js/web-animations-next-lite.min.js +17 -0
  95. data/app/assets/components/{web-animations-next → web-animations-js}/web-animations-next.dev.html +1 -1
  96. data/app/assets/components/{web-animations-next → web-animations-js}/web-animations-next.dev.js +0 -0
  97. data/app/assets/components/web-animations-js/web-animations-next.min.js +17 -0
  98. data/app/assets/components/{web-animations-next → web-animations-js}/web-animations.dev.html +0 -0
  99. data/app/assets/components/{web-animations-next → web-animations-js}/web-animations.dev.js +0 -0
  100. data/app/assets/components/{web-animations-next → web-animations-js}/web-animations.html +1 -3
  101. data/app/assets/components/web-animations-js/web-animations.min.js +17 -0
  102. data/app/assets/components/webcomponentsjs/CustomElements.js +634 -0
  103. data/app/assets/components/webcomponentsjs/CustomElements.min.js +11 -0
  104. data/app/assets/components/webcomponentsjs/HTMLImports.js +764 -0
  105. data/app/assets/components/webcomponentsjs/HTMLImports.min.js +11 -0
  106. data/app/assets/components/webcomponentsjs/ShadowDOM.js +4277 -0
  107. data/app/assets/components/webcomponentsjs/ShadowDOM.min.js +13 -0
  108. data/app/assets/components/webcomponentsjs/webcomponents-lite.js +1728 -0
  109. data/app/assets/components/webcomponentsjs/webcomponents-lite.min.js +11 -0
  110. data/app/assets/components/webcomponentsjs/webcomponents.js +6114 -0
  111. data/app/assets/components/webcomponentsjs/webcomponents.min.js +14 -0
  112. data/lib/polymer-core-rails/version.rb +1 -1
  113. metadata +60 -76
  114. data/app/assets/components/context-free-parser/package.json +0 -16
  115. data/app/assets/components/core-ajax/demo-progress.html +0 -65
  116. data/app/assets/components/core-dropdown/metadata.html +0 -62
  117. data/app/assets/components/core-icons/png-icons.html +0 -19
  118. data/app/assets/components/core-overlay/tests/html/core-overlay-basic.html +0 -127
  119. data/app/assets/components/core-overlay/tests/html/core-overlay-positioning-margin.html +0 -153
  120. data/app/assets/components/core-overlay/tests/html/core-overlay-positioning.html +0 -167
  121. data/app/assets/components/core-overlay/tests/html/core-overlay-scroll.html +0 -130
  122. data/app/assets/components/core-overlay/tests/js/htmltests.js +0 -6
  123. data/app/assets/components/core-overlay/tests/runner.html +0 -14
  124. data/app/assets/components/core-overlay/tests/tests.json +0 -6
  125. data/app/assets/components/core-popup-menu/core-popup-menu.css +0 -28
  126. data/app/assets/components/core-popup-menu/core-popup-menu.html +0 -198
  127. data/app/assets/components/core-popup-menu/core-popup-overlay.html +0 -111
  128. data/app/assets/components/core-popup-menu/metadata.html +0 -62
  129. data/app/assets/components/core-shared-lib/tests/html/core-shared-lib.html +0 -47
  130. data/app/assets/components/core-shared-lib/tests/js/htmltests.js +0 -3
  131. data/app/assets/components/core-shared-lib/tests/runner.html +0 -14
  132. data/app/assets/components/core-shared-lib/tests/tests.json +0 -6
  133. data/app/assets/components/marked/LICENSE +0 -19
  134. data/app/assets/components/marked/Makefile +0 -12
  135. data/app/assets/components/marked/package.json +0 -22
  136. data/app/assets/components/platform/platform.js +0 -16
  137. data/app/assets/components/web-animations-js/web-animations.js +0 -5529
  138. data/app/assets/components/web-animations-next/Gruntfile.js +0 -279
  139. data/app/assets/components/web-animations-next/History.md +0 -76
  140. data/app/assets/components/web-animations-next/package.json +0 -33
  141. data/app/assets/components/web-animations-next/target-config.js +0 -124
  142. data/app/assets/components/web-animations-next/target-loader.js +0 -13
  143. data/app/assets/components/web-animations-next/templates/boilerplate +0 -13
  144. data/app/assets/components/web-animations-next/templates/runner.html +0 -26
  145. data/app/assets/components/web-animations-next/templates/web-animations.html +0 -18
  146. data/app/assets/components/web-animations-next/templates/web-animations.js +0 -21
@@ -0,0 +1,222 @@
1
+ <!--
2
+ Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
3
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
4
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
5
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
6
+ Code distributed by Google as part of the polymer project is also
7
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
8
+ -->
9
+
10
+ <!--
11
+ `core-scroll-threshold` is a utility element that listens for `scroll` events from a
12
+ scrollable region and fires events to indicate when the scroller has reached a pre-defined
13
+ limit, specified in pixels from the upper and lower bounds of the scrollable region.
14
+
15
+ This element may wrap a scrollable region and will listen for `scroll` events bubbling
16
+ through it from its children. In this case, care should be taken that only one scrollable
17
+ region with the same orientation as this element is contained within. Alternatively,
18
+ the `scrollTarget` property can be set/bound to a non-child scrollable region, from which
19
+ it will listen for events.
20
+
21
+ Once a threshold has been reached, a `lower-trigger` or `upper-trigger` event will
22
+ be fired, at which point the user may perform actions such as lazily-loading more data
23
+ to be displayed. After any work is done, the user must then clear the threshold by
24
+ calling the `clearUpper` or `clearLower` methods on this element, after which it will
25
+ begin listening again for the scroll position to reach the threshold again assuming
26
+ the content in the scrollable region has grown. If the user no longer wishes to receive
27
+ events (e.g. all data has been exhausted), the threshold property in question (e.g.
28
+ `lowerThreshold`) may be set to a falsy value to disable events and clear the associated
29
+ triggered property.
30
+
31
+ Example:
32
+
33
+ <core-scroll-threshold id="threshold" lowerThreshold="500"
34
+ on-lower-trigger="{{loadMore}}" lowerTriggered="{{spinnerShouldShow}}">
35
+ </core-scroll-threshold>
36
+
37
+ ...
38
+
39
+ loadMore: function() {
40
+ this.asyncLoadStuffThen(function() {
41
+ this.$.threshold.clearLower();
42
+ }.bind(this));
43
+ }
44
+
45
+ @group Polymer Core Elements
46
+ @element core-scroll-threshold
47
+ @homepage github.io
48
+ -->
49
+
50
+ <link rel="import" href="../polymer/polymer.html">
51
+
52
+ <polymer-element name="core-scroll-threshold">
53
+
54
+ <script>
55
+
56
+ Polymer({
57
+
58
+ publish: {
59
+
60
+ /**
61
+ * When set, the given element is observed for scroll position. When undefined,
62
+ * children can be placed inside and element itself can be used as the scrollable
63
+ * element.
64
+ *
65
+ * @attribute scrollTarget
66
+ * @type Element
67
+ * @default null
68
+ */
69
+ scrollTarget: null,
70
+
71
+ /**
72
+ * Orientation of the scroller to be observed (`v` for vertical, `h` for horizontal)
73
+ *
74
+ * @attribute orient
75
+ * @type boolean
76
+ * @default 'v'
77
+ */
78
+ orient: 'v',
79
+
80
+ /**
81
+ * Distance from the top (or left, for horizontal) bound of the scroller
82
+ * where the "upper trigger" will fire.
83
+ *
84
+ * @attribute upperThreshold
85
+ * @type integer
86
+ * @default null
87
+ */
88
+ upperThreshold: null,
89
+
90
+ /**
91
+ * Distance from the bottom (or right, for horizontal) bound of the scroller
92
+ * where the "lower trigger" will fire.
93
+ *
94
+ * @attribute lowerThreshold
95
+ * @type integer
96
+ * @default null
97
+ */
98
+ lowerThreshold: null,
99
+
100
+ /**
101
+ * Read-only value that tracks the triggered state of the upper threshold
102
+ *
103
+ * @attribute upperTriggered
104
+ * @type boolean
105
+ * @default false
106
+ */
107
+ upperTriggered: false,
108
+
109
+ /**
110
+ * Read-only value that tracks the triggered state of the lower threshold
111
+ *
112
+ * @attribute lowerTriggered
113
+ * @type boolean
114
+ * @default false
115
+ */
116
+ lowerTriggered: false
117
+
118
+ },
119
+
120
+ observe: {
121
+ 'upperThreshold lowerThreshold scrollTarget orient': 'setup'
122
+ },
123
+
124
+ ready: function() {
125
+ this._boundScrollHandler = this.checkThreshold.bind(this);
126
+ },
127
+
128
+ setup: function() {
129
+ // Remove listener for any previous scroll target
130
+ if (this._scrollTarget && (this._scrollTarget != this.target)) {
131
+ this._scrollTarget.removeEventListener(this._boundScrollHandler);
132
+ }
133
+
134
+ // Add listener for new scroll target
135
+ var target = this.scrollTarget || this;
136
+ if (target) {
137
+ this._scrollTarget = target;
138
+ this._scrollTarget.addEventListener('scroll', this._boundScrollHandler);
139
+ }
140
+
141
+ // If we're listening on ourself, make us auto in case someone put
142
+ // content inside
143
+ this.style.overflow = (target == this) ? 'auto' : null;
144
+
145
+ // Setup extents based on orientation
146
+ this.scrollPosition = (this.orient == 'v') ? 'scrollTop' : 'scrollLeft';
147
+ this.sizeExtent = (this.orient == 'v') ? 'offsetHeight' : 'offsetWidth';
148
+ this.scrollExtent = (this.orient == 'v') ? 'scrollHeight' : 'scrollWidth';
149
+
150
+ // Clear trigger state if user has cleared the threshold
151
+ if (!this.upperThreshold) {
152
+ this.upperTriggered = false;
153
+ }
154
+ if (!this.lowerThreshold) {
155
+ this.lowerTriggered = false;
156
+ }
157
+ },
158
+
159
+ checkThreshold: function(e) {
160
+ var top = this._scrollTarget[this.scrollPosition];
161
+ if (!this.upperTriggered && this.upperThreshold != null) {
162
+ if (top < this.upperThreshold) {
163
+ this.upperTriggered = true;
164
+ this.fire('upper-trigger');
165
+ }
166
+ }
167
+ if (this.lowerThreshold != null) {
168
+ var bottom = top + this._scrollTarget[this.sizeExtent];
169
+ var size = this._scrollTarget[this.scrollExtent];
170
+ if (!this.lowerTriggered && (size - bottom) < this.lowerThreshold) {
171
+ this.lowerTriggered = true;
172
+ this.fire('lower-trigger');
173
+ }
174
+ }
175
+ },
176
+
177
+ /**
178
+ * Clear the upper threshold, following an `upper-trigger` event.
179
+ *
180
+ * @method clearUpper
181
+ */
182
+ clearUpper: function(waitForMutation) {
183
+ if (waitForMutation) {
184
+ this._waitForMutation(function() {
185
+ this.clearUpper();
186
+ }.bind(this));
187
+ } else {
188
+ requestAnimationFrame(function() {
189
+ this.upperTriggered = false;
190
+ }.bind(this));
191
+ }
192
+ },
193
+
194
+ /**
195
+ * Clear the lower threshold, following a `lower-trigger` event.
196
+ *
197
+ * @method clearLower
198
+ */
199
+ clearLower: function(waitForMutation) {
200
+ if (waitForMutation) {
201
+ this._waitForMutation(function() {
202
+ this.clearLower();
203
+ }.bind(this));
204
+ } else {
205
+ requestAnimationFrame(function() {
206
+ this.lowerTriggered = false;
207
+ }.bind(this));
208
+ }
209
+ },
210
+
211
+ _waitForMutation: function(listener) {
212
+ var observer = new MutationObserver(function(mutations) {
213
+ listener.call(this, observer, mutations);
214
+ observer.disconnect();
215
+ }.bind(this));
216
+ observer.observe(this._scrollTarget, {attributes:true, childList: true, subtree: true});
217
+ }
218
+
219
+ });
220
+
221
+ </script>
222
+ </polymer-element>
@@ -0,0 +1,24 @@
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
+ -->
10
+ <x-meta id="core-scroll-threshold" label="Scroll Threshold" group="Core">
11
+
12
+ <template>
13
+
14
+ <core-item icon="settings" label="Scroll Threshold"></core-item>
15
+
16
+ </template>
17
+
18
+ <template id="imports">
19
+
20
+ <link rel="import" href="core-scroll-threshold.html">
21
+
22
+ </template>
23
+
24
+ </x-meta>
@@ -12,7 +12,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
12
12
  The `<core-selection>` element is used to manage selection state. It has no
13
13
  visual appearance and is typically used in conjunction with another element.
14
14
  For example, [core-selector](#core-selector)
15
- use a `<core-selection>` to manage selection.
15
+ uses a `<core-selection>` to manage selection.
16
16
 
17
17
  To mark an item as selected, call the `select(item)` method on
18
18
  `<core-selection>`. The item itself is an argument to this method.
@@ -130,7 +130,7 @@ Fired when an item element is tapped.
130
130
 
131
131
  /**
132
132
  * Specifies the CSS class to be used to add to the selected element.
133
- *
133
+ *
134
134
  * @attribute selectedClass
135
135
  * @type string
136
136
  * @default 'core-selected'
@@ -162,7 +162,7 @@ Fired when an item element is tapped.
162
162
  * an array of selected elements.
163
163
  * Note that you should not use this to set the selection. Instead use
164
164
  * `selected`.
165
- *
165
+ *
166
166
  * @attribute selectedItem
167
167
  * @type Object
168
168
  * @default null
@@ -172,9 +172,9 @@ Fired when an item element is tapped.
172
172
  /**
173
173
  * In single selection, this returns the model associated with the
174
174
  * selected element.
175
- * Note that you should not use this to set the selection. Instead use
175
+ * Note that you should not use this to set the selection. Instead use
176
176
  * `selected`.
177
- *
177
+ *
178
178
  * @attribute selectedModel
179
179
  * @type Object
180
180
  * @default null
@@ -193,7 +193,7 @@ Fired when an item element is tapped.
193
193
  selectedIndex: -1,
194
194
 
195
195
  /**
196
- * Nodes with local name that are in the list will not be included
196
+ * Nodes with local name that are in the list will not be included
197
197
  * in the selection items. In the following example, `items` returns four
198
198
  * `core-item`'s and doesn't include `h3` and `hr`.
199
199
  *
@@ -213,9 +213,9 @@ Fired when an item element is tapped.
213
213
  excludedLocalNames: '',
214
214
 
215
215
  /**
216
- * The target element that contains items. If this is not set
216
+ * The target element that contains items. If this is not set
217
217
  * core-selector is the container.
218
- *
218
+ *
219
219
  * @attribute target
220
220
  * @type Object
221
221
  * @default null
@@ -223,7 +223,7 @@ Fired when an item element is tapped.
223
223
  target: null,
224
224
 
225
225
  /**
226
- * This can be used to query nodes from the target node to be used for
226
+ * This can be used to query nodes from the target node to be used for
227
227
  * selection items. Note this only works if `target` is set
228
228
  * and is not `core-selector` itself.
229
229
  *
@@ -236,7 +236,7 @@ Fired when an item element is tapped.
236
236
  * <label><input type="radio" name="color" value="blue"> Blue</label> <br>
237
237
  * <p>color = {{color}}</p>
238
238
  * </form>
239
- *
239
+ *
240
240
  * @attribute itemsSelector
241
241
  * @type string
242
242
  * @default ''
@@ -264,7 +264,7 @@ Fired when an item element is tapped.
264
264
  notap: false,
265
265
 
266
266
  defaultExcludedLocalNames: 'template',
267
-
267
+
268
268
  observe: {
269
269
  'selected multi': 'selectedChanged'
270
270
  },
@@ -288,8 +288,8 @@ Fired when an item element is tapped.
288
288
  if (!this.target) {
289
289
  return [];
290
290
  }
291
- var nodes = this.target !== this ? (this.itemsSelector ?
292
- this.target.querySelectorAll(this.itemsSelector) :
291
+ var nodes = this.target !== this ? (this.itemsSelector ?
292
+ this.target.querySelectorAll(this.itemsSelector) :
293
293
  this.target.children) : this.$.items.getDistributedNodes();
294
294
  return Array.prototype.filter.call(nodes, this.itemFilter);
295
295
  },
@@ -332,7 +332,7 @@ Fired when an item element is tapped.
332
332
 
333
333
  /**
334
334
  * Returns the selected item(s). If the `multi` property is true,
335
- * this will return an array, otherwise it will return
335
+ * this will return an array, otherwise it will return
336
336
  * the selected item or undefined if there is no selection.
337
337
  */
338
338
  get selection() {
@@ -348,7 +348,7 @@ Fired when an item element is tapped.
348
348
  this.updateSelected();
349
349
  }
350
350
  },
351
-
351
+
352
352
  updateSelected: function() {
353
353
  this.validateSelected();
354
354
  if (this.multi) {
@@ -363,7 +363,7 @@ Fired when an item element is tapped.
363
363
 
364
364
  validateSelected: function() {
365
365
  // convert to an array for multi-selection
366
- if (this.multi && !Array.isArray(this.selected) &&
366
+ if (this.multi && !Array.isArray(this.selected) &&
367
367
  this.selected != null) {
368
368
  this.selected = [this.selected];
369
369
  // use the first selected in the array for single-selection
@@ -373,7 +373,7 @@ Fired when an item element is tapped.
373
373
  this.selected = s;
374
374
  }
375
375
  },
376
-
376
+
377
377
  processSplices: function(splices) {
378
378
  for (var i = 0, splice; splice = splices[i]; i++) {
379
379
  for (var j = 0; j < splice.removed.length; j++) {
@@ -398,7 +398,7 @@ Fired when an item element is tapped.
398
398
  var item = this.valueToItem(value);
399
399
  this.$.selection.select(item);
400
400
  },
401
-
401
+
402
402
  setValueSelected: function(value, isSelected) {
403
403
  var item = this.valueToItem(value);
404
404
  if (isSelected ^ this.$.selection.isSelected(item)) {
@@ -417,12 +417,12 @@ Fired when an item element is tapped.
417
417
  } else {
418
418
  this.selectedModel = null;
419
419
  }
420
- this.selectedIndex = this.selectedItem ?
420
+ this.selectedIndex = this.selectedItem ?
421
421
  parseInt(this.valueToIndex(this.selected)) : -1;
422
422
  },
423
-
423
+
424
424
  valueToItem: function(value) {
425
- return (value === null || value === undefined) ?
425
+ return (value === null || value === undefined) ?
426
426
  null : this.items[this.valueToIndex(value)];
427
427
  },
428
428
 
@@ -506,7 +506,7 @@ Fired when an item element is tapped.
506
506
  target = target.parentNode;
507
507
  }
508
508
  },
509
-
509
+
510
510
  selectIndex: function(index) {
511
511
  var item = this.items[index];
512
512
  if (item) {
@@ -514,7 +514,7 @@ Fired when an item element is tapped.
514
514
  return item;
515
515
  }
516
516
  },
517
-
517
+
518
518
  /**
519
519
  * Selects the previous item. This should be used in single selection only.
520
520
  *
@@ -524,11 +524,11 @@ Fired when an item element is tapped.
524
524
  * @returns the previous item or undefined if there is none
525
525
  */
526
526
  selectPrevious: function(wrapped) {
527
- var i = wrapped && !this.selectedIndex ?
527
+ var i = wrapped && !this.selectedIndex ?
528
528
  this.items.length - 1 : this.selectedIndex - 1;
529
529
  return this.selectIndex(i);
530
530
  },
531
-
531
+
532
532
  /**
533
533
  * Selects the next item. This should be used in single selection only.
534
534
  *
@@ -538,11 +538,11 @@ Fired when an item element is tapped.
538
538
  * @returns the next item or undefined if there is none
539
539
  */
540
540
  selectNext: function(wrapped) {
541
- var i = wrapped && this.selectedIndex >= this.items.length - 1 ?
541
+ var i = wrapped && this.selectedIndex >= this.items.length - 1 ?
542
542
  0 : this.selectedIndex + 1;
543
543
  return this.selectIndex(i);
544
544
  }
545
-
545
+
546
546
  });
547
547
  </script>
548
548
  </polymer-element>
@@ -38,10 +38,12 @@ Example:
38
38
 
39
39
  @group Polymer Core Elements
40
40
  @element core-splitter
41
+ @mixins Polymer.CoreResizer https://github.com/polymer/core-resizable
41
42
  @homepage github.io
42
43
  -->
43
44
 
44
45
  <link rel="import" href="../polymer/polymer.html">
46
+ <link rel="import" href="../core-resizable/core-resizable.html">
45
47
 
46
48
  <polymer-element name="core-splitter" attributes="direction locked minSize allowOverflow"
47
49
  on-trackstart="{{trackStart}}" on-track="{{track}}" on-down="{{preventSelection}}">
@@ -53,7 +55,7 @@ Example:
53
55
  </template>
54
56
  <script>
55
57
 
56
- Polymer('core-splitter', {
58
+ Polymer(Polymer.mixin({
57
59
 
58
60
  /**
59
61
  * Possible values are `left`, `right`, `up` and `down`.
@@ -94,10 +96,21 @@ Example:
94
96
  */
95
97
  allowOverflow: false,
96
98
 
99
+ // Listen for resize requests on parent, since splitter is peer to resizables
100
+ resizerIsPeer: true,
101
+
97
102
  ready: function() {
98
103
  this.directionChanged();
99
104
  },
100
105
 
106
+ attached: function() {
107
+ this.resizerAttachedHandler();
108
+ },
109
+
110
+ detached: function() {
111
+ this.resizerDetachedHandler();
112
+ },
113
+
101
114
  domReady: function() {
102
115
  if (!this.allowOverflow) {
103
116
  this.parentNode.style.overflow = this.nextElementSibling.style.overflow =
@@ -137,12 +150,14 @@ Example:
137
150
  var d = e[this.horizontal ? 'dy' : 'dx'];
138
151
  this.target.style[this.dimension] =
139
152
  this.size + (this.isNext ? -d : d) + 'px';
153
+ this.notifyResize();
140
154
  },
141
155
 
142
156
  preventSelection: function(e) {
143
157
  e.preventDefault();
144
158
  }
145
- });
159
+
160
+ }, Polymer.CoreResizer));
146
161
 
147
162
  </script>
148
163
  </polymer-element>
@@ -143,7 +143,7 @@ Polymer('core-style', {
143
143
  * inside another.
144
144
  *
145
145
  * @attribute list
146
- * @type object (readonly)
146
+ * @type object
147
147
  * @default {map of all `core-style` producers}
148
148
  */
149
149
  list: CoreStyle.list,
@@ -138,7 +138,7 @@ on itself or any of its ancestors.
138
138
  if (old) {
139
139
  bar.removeAttribute(this.toLayoutAttrName(old));
140
140
  }
141
- if (this.justify) {
141
+ if (justify) {
142
142
  bar.setAttribute(this.toLayoutAttrName(justify), '');
143
143
  }
144
144
  },
@@ -27,10 +27,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
27
27
  .core-tooltip {
28
28
  position: absolute;
29
29
  font-size: 10px;
30
- font-family: sans-serif;
30
+ font-weight: 500;
31
31
  padding: 8px;
32
32
  color: white;
33
- background-color: rgba(0,0,0,0.8);
33
+ background-color: rgba(0, 0, 0, 0.9);
34
34
  box-sizing: border-box;
35
35
  border-radius: 3px; /* TODO: not in spec. */
36
36
  white-space: nowrap;
@@ -1,5 +1,5 @@
1
1
  <!--
2
- Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
2
+ Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
3
3
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
4
4
  The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
5
5
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
@@ -60,13 +60,14 @@ You can customize this attribute with the `tipAttribute` attribute:
60
60
 
61
61
  @group Polymer Core Elements
62
62
  @element core-tooltip
63
- @extends core-focusable
64
- @mixins Polymer.CoreFocusable
63
+ @mixins Polymer.CoreFocusable https://github.com/polymer/core-focusable
64
+ @mixins Polymer.CoreResizable https://github.com/polymer/core-resizable
65
65
  @homepage http://www.polymer-project.org/components/core-tooltip/index.html
66
66
  -->
67
67
 
68
68
  <link rel="import" href="../polymer/polymer.html">
69
69
  <link rel="import" href="../core-focusable/core-focusable.html">
70
+ <link rel="import" href="../core-resizable/core-resizable.html">
70
71
 
71
72
  <!-- TODO: would be nice to inherit from label to get .htmlFor, and .control,
72
73
  but the latter is readonly. -->
@@ -76,8 +77,8 @@ You can customize this attribute with the `tipAttribute` attribute:
76
77
  <!-- TODO: possibly reuse core-overlay. -->
77
78
  <polymer-element name="core-tooltip" attributes="noarrow position label show tipAttribute" role="tooltip" tabindex="0">
78
79
  <template>
79
-
80
80
  <link rel="stylesheet" href="core-tooltip.css">
81
+
81
82
  <div id="tooltip" hidden?="{{!hasTooltipContent}}"
82
83
  class="core-tooltip {{position}} {{ {noarrow: noarrow, show: show && !disabled} | tokenList}}">
83
84
  <content id="c" select="[{{tipAttribute}}]">{{label}}</content>
@@ -102,6 +103,10 @@ You can customize this attribute with the `tipAttribute` attribute:
102
103
  */
103
104
  label: null,
104
105
 
106
+ eventDelegates: {
107
+ 'core-resize': 'positionChanged'
108
+ },
109
+
105
110
  computed: {
106
111
  // Indicates whether the tooltip has a set label propety or
107
112
  // an element with the `tip` attribute.
@@ -149,13 +154,18 @@ You can customize this attribute with the `tipAttribute` attribute:
149
154
 
150
155
  attached: function() {
151
156
  this.updatedChildren();
157
+ this.resizableAttachedHandler();
158
+ },
159
+
160
+ detached: function() {
161
+ this.resizableDetachedHandler();
152
162
  },
153
163
 
154
164
  updatedChildren: function () {
155
165
  this.tipElement = null;
156
166
 
157
167
  for (var i = 0, el; el = this.$.c.getDistributedNodes()[i]; ++i) {
158
- if (el.hasAttribute && el.hasAttribute('tip')) {
168
+ if (el.hasAttribute && el.hasAttribute(this.tipAttribute)) {
159
169
  this.tipElement = el;
160
170
  break;
161
171
  }
@@ -199,6 +209,7 @@ You can customize this attribute with the `tipAttribute` attribute:
199
209
  };
200
210
 
201
211
  Polymer.mixin2(proto, Polymer.CoreFocusable);
212
+ Polymer.mixin(proto, Polymer.CoreResizable);
202
213
  Polymer(proto);
203
214
  })();
204
215
 
@@ -1,6 +1,6 @@
1
1
  <!--
2
2
  @license
3
- Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
3
+ Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
4
4
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5
5
  The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6
6
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
@@ -51,7 +51,7 @@ li.L1,li.L3,li.L5,li.L7,li.L9 { }
51
51
  pre.prettyprint, code.prettyprint { background-color: #fff; }
52
52
  pre .str, code .str { color: #088; }
53
53
  pre .kwd, code .kwd { color: #006; font-weight: bold; }
54
- pre .com, code .com { color: #oc3; font-style: italic; }
54
+ pre .com, code .com { color: #0C3; font-style: italic; }
55
55
  pre .typ, code .typ { color: #404; font-weight: bold; }
56
56
  pre .lit, code .lit { color: #044; }
57
57
  pre .pun, code .pun { color: #440; }
@@ -20,7 +20,7 @@ var block = {
20
20
  lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,
21
21
  blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,
22
22
  list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,
23
- html: /^ *(?:comment|closed|closing) *(?:\n{2,}|\s*$)/,
23
+ html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,
24
24
  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,
25
25
  table: noop,
26
26
  paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,
@@ -868,7 +868,7 @@ Renderer.prototype.link = function(href, title, text) {
868
868
  } catch (e) {
869
869
  return '';
870
870
  }
871
- if (prot.indexOf('javascript:') === 0) {
871
+ if (prot.indexOf('javascript:') === 0 || prot.indexOf('vbscript:') === 0) {
872
872
  return '';
873
873
  }
874
874
  }
@@ -1154,8 +1154,13 @@ function marked(src, opt, callback) {
1154
1154
 
1155
1155
  pending = tokens.length;
1156
1156
 
1157
- var done = function() {
1158
- var out, err;
1157
+ var done = function(err) {
1158
+ if (err) {
1159
+ opt.highlight = highlight;
1160
+ return callback(err);
1161
+ }
1162
+
1163
+ var out;
1159
1164
 
1160
1165
  try {
1161
1166
  out = Parser.parse(tokens, opt);
@@ -1184,6 +1189,7 @@ function marked(src, opt, callback) {
1184
1189
  return --pending || done();
1185
1190
  }
1186
1191
  return highlight(token.text, token.lang, function(err, code) {
1192
+ if (err) return done(err);
1187
1193
  if (code == null || code === token.text) {
1188
1194
  return --pending || done();
1189
1195
  }
@@ -1253,7 +1259,7 @@ marked.inlineLexer = InlineLexer.output;
1253
1259
 
1254
1260
  marked.parse = marked;
1255
1261
 
1256
- if (typeof exports === 'object') {
1262
+ if (typeof module !== 'undefined' && typeof exports === 'object') {
1257
1263
  module.exports = marked;
1258
1264
  } else if (typeof define === 'function' && define.amd) {
1259
1265
  define(function() { return marked; });