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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d53a57bb41b3734b6c966d5521a9c106919db1b
4
- data.tar.gz: 2b31752e1e041b56bafaa576706c5e366b8544aa
3
+ metadata.gz: 80eb88f81605dfe42e0e76b446b8848438cd05e7
4
+ data.tar.gz: f6e38a05a9b9f9c92e0bb451865966ddab5f444e
5
5
  SHA512:
6
- metadata.gz: 298b871833a9ef30478380cbb39fb4aa6b0c9fe3ef602a5fd67fa3528561c3ae8348f4d4c74644804b73502b91e378ac34a4c4a6290f4de4c2e72797a531922c
7
- data.tar.gz: f3a31a30f710a3090ff7bcb961a6441abe6c427b1691a506719c22b7ab7ce8d3e5602cbbba477687148759d379c4872c3270f24c8dd42655f2b7b53c52c0f9a8
6
+ metadata.gz: 8b24e51139bec23c59d8056274068efb520264fe4f815a8f1b1988eec0ffee5e6d0312f861b884976ac4f301b05f7ec5b163b29c0cd7521e2c625117c6c2802a
7
+ data.tar.gz: 4b4062d5202ea41e66017751e408487effec158e3e1149a1e40f26c8dfd10a4f47ca74adc3dc2f3035054ff42b026b6405e4798574af8082f142213e18688394
data/README.md CHANGED
@@ -24,7 +24,7 @@ Or install it yourself as:
24
24
  ## Getting started
25
25
 
26
26
  In order to use Polymer core elements you need to have
27
- `polymer` installed in your project. Use [polymer-rails](https://github.com/alchapone/polymer-core-rails) gem for adding `polymer` to your Rails application.
27
+ `polymer` installed in your project. Use [polymer-rails](https://github.com/alchapone/polymer-rails) gem for adding `polymer` to your Rails application.
28
28
 
29
29
  ```ruby
30
30
  gem 'polymer-rails'
@@ -35,7 +35,7 @@ After runnign `bundle install` require needed core elements into your `applicati
35
35
 
36
36
  //= require polymer/polymer
37
37
  //= require core-ajax/core-ajax
38
- //= require core-input/core-intut
38
+ //= require core-input/core-input
39
39
  .....
40
40
  //= require core-tooltip/core-tooltip
41
41
 
@@ -44,6 +44,7 @@ to explicitly require any of dependencies, otherwise it will raise exception.
44
44
 
45
45
  ## Available elements
46
46
 
47
+ * [core-a11y-keys](http://www.polymer-project.org/docs/elements/core-elements.html#core-a11y-keys)
47
48
  * [core-ajax](http://www.polymer-project.org/docs/elements/core-elements.html#core-ajax)
48
49
  * [core-animated-pages](http://www.polymer-project.org/docs/elements/core-elements.html#core-animated-pages)
49
50
  * [core-animation](http://www.polymer-project.org/docs/elements/core-elements.html#core-animation)
@@ -71,7 +72,7 @@ to explicitly require any of dependencies, otherwise it will raise exception.
71
72
  * [core-style](http://www.polymer-project.org/docs/elements/core-elements.html#core-style)
72
73
  * [core-toolbar](http://www.polymer-project.org/docs/elements/core-elements.html#core-toolbar)
73
74
  * [core-tooltip](http://www.polymer-project.org/docs/elements/core-elements.html#core-tooltip)
74
-
75
+ * [core-transition](http://www.polymer-project.org/docs/elements/core-elements.html#core-transition)
75
76
 
76
77
  ## Contributing
77
78
 
@@ -1,4 +1,4 @@
1
- /*
1
+ /**
2
2
  * @license
3
3
  * Copyright (c) 2014 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
@@ -60,7 +60,7 @@
60
60
  };
61
61
  entities.push(current);
62
62
  break;
63
-
63
+
64
64
  // an entity may have these describable sub-features
65
65
  case 'attribute':
66
66
  case 'property':
@@ -94,7 +94,30 @@
94
94
  }
95
95
 
96
96
  break;
97
-
97
+
98
+ case 'extends':
99
+ case 'mixins':
100
+ var parts = content.split(' ');
101
+ var subObj = {
102
+ name: parts[0],
103
+ url: parts[1] || null
104
+ };
105
+ makePragma(current, pragma, subObj);
106
+ break;
107
+
108
+ case 'return':
109
+ var returnRe = /\{(.+)\}\s+(.*)$/;
110
+
111
+ var returnReResult = content.match(returnRe);
112
+ if (returnReResult) {
113
+ var subReturnObj = {
114
+ type: returnReResult[1],
115
+ description: returnReResult[2]
116
+ };
117
+ subCurrent[pragma] = subReturnObj;
118
+ }
119
+ break;
120
+
98
121
  // everything else
99
122
  default:
100
123
  current[pragma] = content;
@@ -127,4 +150,4 @@
127
150
  scope.ContextFreeParser = ContextFreeParser;
128
151
  }
129
152
 
130
- })(this);
153
+ })(this);
@@ -222,8 +222,8 @@ Keys Syntax Grammar:
222
222
  }
223
223
 
224
224
  function keyboardEventToKey(ev) {
225
- // fall back from .key, to .keyIdentifier, and then to .keyCode
226
- var normalizedKey = transformKey(ev.key) || transformKeyIdentifier(ev.keyIdentifier) || transformKeyCode(ev.keyCode) || '';
225
+ // fall back from .key, to .keyIdentifier, to .keyCode, and then to .detail.key to support artificial keyboard events
226
+ var normalizedKey = transformKey(ev.key) || transformKeyIdentifier(ev.keyIdentifier) || transformKeyCode(ev.keyCode) || transformKey(ev.detail.key) || '';
227
227
  return {
228
228
  shift: ev.shiftKey,
229
229
  ctrl: ev.ctrlKey,
@@ -303,10 +303,10 @@ Keys Syntax Grammar:
303
303
  },
304
304
  publish: {
305
305
  /**
306
- * The set of key combinations to listen for.
306
+ * The set of key combinations that will be matched (in keys syntax).
307
307
  *
308
308
  * @attribute keys
309
- * @type string (keys syntax)
309
+ * @type string
310
310
  * @default ''
311
311
  */
312
312
  keys: '',
@@ -100,7 +100,7 @@ element.
100
100
  * Parameters to send to the specified URL, as JSON.
101
101
  *
102
102
  * @attribute params
103
- * @type string (JSON)
103
+ * @type string
104
104
  * @default ''
105
105
  */
106
106
  params: '',
@@ -236,7 +236,7 @@ element.
236
236
 
237
237
  isSuccess: function(xhr) {
238
238
  var status = xhr.status || 0;
239
- return !status || (status >= 200 && status < 300);
239
+ return (status >= 200 && status < 300);
240
240
  },
241
241
 
242
242
  processResponse: function(xhr) {
@@ -248,11 +248,15 @@ element.
248
248
  },
249
249
 
250
250
  processError: function(xhr) {
251
- var response = xhr.status + ': ' + xhr.responseText;
251
+ var response = this.evalResponse(xhr);
252
+ var error = {
253
+ statusCode: xhr.status,
254
+ response: response
255
+ };
252
256
  if (xhr === this.activeRequest) {
253
- this.error = response;
257
+ this.error = error;
254
258
  }
255
- this.fire('core-error', {response: response, xhr: xhr});
259
+ this.fire('core-error', {response: error, xhr: xhr});
256
260
  },
257
261
 
258
262
  processProgress: function(progress, xhr) {
@@ -347,6 +351,14 @@ element.
347
351
  }
348
352
  },
349
353
 
354
+ getParams: function(params) {
355
+ params = this.params || params;
356
+ if (params && typeof(params) == 'string') {
357
+ params = JSON.parse(params);
358
+ }
359
+ return params;
360
+ },
361
+
350
362
  /**
351
363
  * Performs an Ajax request to the specified URL.
352
364
  *
@@ -356,10 +368,7 @@ element.
356
368
  var args = this.xhrArgs || {};
357
369
  // TODO(sjmiles): we may want XHR to default to POST if body is set
358
370
  args.body = this.body || args.body;
359
- args.params = this.params || args.params;
360
- if (args.params && typeof(args.params) == 'string') {
361
- args.params = JSON.parse(args.params);
362
- }
371
+ args.params = this.getParams(args.params);
363
372
  args.headers = this.headers || args.headers || {};
364
373
  if (args.headers && typeof(args.headers) == 'string') {
365
374
  args.headers = JSON.parse(args.headers);
@@ -367,7 +376,12 @@ element.
367
376
  var hasContentType = Object.keys(args.headers).some(function (header) {
368
377
  return header.toLowerCase() === 'content-type';
369
378
  });
370
- if (!hasContentType && this.contentType) {
379
+ // No Content-Type should be specified if sending `FormData`.
380
+ // The UA must set the Content-Type w/ a calculated multipart boundary ID.
381
+ if (args.body instanceof FormData) {
382
+ delete args.headers['Content-Type'];
383
+ }
384
+ else if (!hasContentType && this.contentType) {
371
385
  args.headers['Content-Type'] = this.contentType;
372
386
  }
373
387
  if (this.handleAs === 'arraybuffer' || this.handleAs === 'blob' ||
@@ -398,6 +412,20 @@ element.
398
412
  }
399
413
  }
400
414
  return this.activeRequest;
415
+ },
416
+
417
+ /**
418
+ * Aborts the current active request if there is one and resets internal
419
+ * state appropriately.
420
+ *
421
+ * @method abort
422
+ */
423
+ abort: function() {
424
+ if (!this.activeRequest) return;
425
+ this.activeRequest.abort();
426
+ this.activeRequest = null;
427
+ this.progress = {};
428
+ this.loading = false;
401
429
  }
402
430
 
403
431
  });
@@ -51,7 +51,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
51
51
  var async = !options.sync;
52
52
  //
53
53
  var params = this.toQueryString(options.params);
54
- if (params && method == 'GET') {
54
+ if (params && method.toUpperCase() == 'GET') {
55
55
  url += (url.indexOf('?') > 0 ? '&' : '?') + params;
56
56
  }
57
57
  var xhrParams = this.isBodyMethod(method) ? (options.body || params) : null;
@@ -8,6 +8,7 @@
8
8
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9
9
  -->
10
10
  <link href="../core-selector/core-selector.html" rel="import">
11
+ <link href="../core-resizable/core-resizable.html" rel="import">
11
12
 
12
13
  <link href="transitions/hero-transition.html" rel="import">
13
14
  <link href="transitions/cross-fade.html" rel="import">
@@ -218,6 +219,7 @@ Example:
218
219
 
219
220
  @element core-animated-pages
220
221
  @extends core-selector
222
+ @mixins Polymer.CoreResizer https://github.com/polymer/core-resizable
221
223
  @status beta
222
224
  @homepage github.io
223
225
  -->
@@ -245,7 +247,7 @@ Fired when a page transition completes.
245
247
 
246
248
  <script>
247
249
 
248
- Polymer({
250
+ Polymer(Polymer.mixin({
249
251
 
250
252
  eventDelegates: {
251
253
  'core-transitionend': 'transitionEnd'
@@ -283,6 +285,14 @@ Fired when a page transition completes.
283
285
  this.transitioning = [];
284
286
  },
285
287
 
288
+ attached: function() {
289
+ this.resizerAttachedHandler();
290
+ },
291
+
292
+ detached: function() {
293
+ this.resizerDetachedHandler();
294
+ },
295
+
286
296
  transitionsChanged: function() {
287
297
  this._transitions = this.transitions.split(' ');
288
298
  },
@@ -410,12 +420,14 @@ Fired when a page transition completes.
410
420
 
411
421
  if (!oldItem) {
412
422
  this.applySelection(this.selectedItem, true);
423
+ this.async(this.notifyResize);
413
424
  return;
414
425
  }
415
426
 
416
427
  if (this.hasAttribute('no-transition') || !this._transitionElements || !this._transitionElements.length) {
417
428
  this.applySelection(oldItem, false);
418
429
  this.applySelection(this.selectedItem, true);
430
+ this.notifyResize();
419
431
  return;
420
432
  }
421
433
 
@@ -425,11 +437,22 @@ Fired when a page transition completes.
425
437
  Polymer.flush();
426
438
  Polymer.endOfMicrotask(function() {
427
439
  self.applyTransition(oldItem, self.selectedItem);
440
+ self.notifyResize();
428
441
  });
429
442
  }
443
+ },
444
+
445
+ resizerShouldNotify: function(el) {
446
+ // Only notify descendents of selected item
447
+ while (el && (el != this)) {
448
+ if (el == this.selectedItem) {
449
+ return true;
450
+ }
451
+ el = el.parentElement || (el.parentNode && el.parentNode.host);
452
+ }
430
453
  }
431
454
 
432
- });
455
+ }, Polymer.CoreResizer));
433
456
 
434
457
  </script>
435
458
 
@@ -7,4 +7,4 @@
7
7
  Code distributed by Google as part of the polymer project is also
8
8
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
9
9
  -->
10
- <link rel="import" href="../web-animations-next/web-animations.html">
10
+ <script src="../web-animations-js/web-animations-next-lite.min.js"></script>
@@ -76,7 +76,7 @@ and instead put a div inside and style that.
76
76
  * opened. If unspecified, the `core-collapse` itself is the target.
77
77
  *
78
78
  * @attribute target
79
- * @type object
79
+ * @type Object
80
80
  * @default null
81
81
  */
82
82
  target: null,
@@ -10,6 +10,7 @@
10
10
 
11
11
  :host {
12
12
  display: block;
13
+ font-family: Roboto;
13
14
  }
14
15
 
15
16
  #info > * {
@@ -34,7 +35,11 @@ h1 {
34
35
  color: #E91E63;
35
36
  font-size: 52px;
36
37
  line-height: 60px;
37
- font-weight: inherit;
38
+ font-weight: 300;
39
+ }
40
+
41
+ h3 {
42
+ font-weight: 500;
38
43
  }
39
44
 
40
45
  .box {
@@ -68,6 +73,26 @@ h1 {
68
73
  font-weight: 500;
69
74
  }
70
75
 
76
+ .inheritance {
77
+ border-bottom: 1px solid #eee;
78
+ border-top: 1px solid #eee;
79
+ padding: 16px 0;
80
+ }
81
+
82
+ .inheritance h3 {
83
+ margin: 0 10px 0 0;
84
+ }
85
+
86
+ .inheritance .top > * {
87
+ margin-right: 7px;
88
+ }
89
+
90
+ .top b,
91
+ .top strong {
92
+ text-transform: uppercase;
93
+ font-size: 14px;
94
+ }
95
+
71
96
  .top pre {
72
97
  background-color: rgb(250, 250, 250);
73
98
  padding: 16px;
@@ -15,6 +15,8 @@
15
15
  <link rel="import" href="../../prettify-element/prettify-import.html">
16
16
  <link rel="import" href="../../context-free-parser/context-free-parser.html">
17
17
 
18
+ <link href='http://fonts.googleapis.com/css?family=Roboto:400,300,500,700|Source+Code+Pro' rel='stylesheet' type='text/css'>
19
+
18
20
  <!--
19
21
 
20
22
  Displays formatted source documentation scraped from input urls.
@@ -43,10 +45,38 @@ Displays formatted source documentation scraped from input urls.
43
45
  <span layout horizontal center hidden?="{{!data.version}}"><core-icon icon="info-outline"></core-icon>Version: {{data.version}}</span>
44
46
  </p>
45
47
 
46
- <template if="{{data.extends}}">
47
- <section class="top">
48
- <h3 id="{{data.name}}.extends">Extends: <a href="#{{data.extends}}">{{data.extends}}</a></h3>
49
- </section>
48
+ <template bind="{{data as data}}" if="{{data.extends || data.mixins}}">
49
+ <div class="inheritance">
50
+ <template if="{{data.extends}}">
51
+ <section class="top extends" layout horizontal center>
52
+ <h3 id="{{data.name}}.extends">Extends:</h3>
53
+ <template repeat="{{e, i in data.extends}}">
54
+ <div>
55
+ <template if="{{e.url}}">
56
+ <a href="{{e.url}}">{{e.name}}</a>
57
+ </template>
58
+ <template if="{{!e.url}}"><a href="#{{e.name}}">{{e.name}}</a></template>
59
+ <span hidden?="{{i == data.extends.length - 1}}">,</span>
60
+ </div>
61
+ </template>
62
+ </section>
63
+ </template>
64
+
65
+ <template if="{{data.mixins}}">
66
+ <section class="top mixins" layout horizontal center>
67
+ <h3 id="{{data.name}}.mixins">Mixins:</h3>
68
+ <template repeat="{{e, i in data.mixins}}">
69
+ <div>
70
+ <template if="{{e.url}}">
71
+ <a href="{{e.url ? e.url : e.name}}">{{e.name}}</a>
72
+ </template>
73
+ <template if="{{!e.url}}"><span>{{e.name}}</span></template>
74
+ <span hidden?="{{i == data.mixins.length - 1}}">,</span>
75
+ </div>
76
+ </template>
77
+ </section>
78
+ </template>
79
+ </div>
50
80
  </template>
51
81
 
52
82
  <template if="{{data.description}}">
@@ -177,6 +207,11 @@ Displays formatted source documentation scraped from input urls.
177
207
  if (elementToFocus) {
178
208
  elementToFocus.scrollIntoView();
179
209
  }
210
+ else {
211
+ var viewer = this.$.panel.scroller;
212
+ viewer.scrollTop = 0;
213
+ viewer.scrollLeft = 0;
214
+ }
180
215
  });
181
216
  }
182
217
 
@@ -19,9 +19,9 @@ core-header-panel {
19
19
  top: 0;
20
20
  left: 0;
21
21
  height: 100%;
22
- width: 100%;
22
+ width: 100%;
23
23
  }
24
24
 
25
- core-toolbar {
26
- background-color: #eeeeee;
25
+ core-toolbar {
26
+ background-color: #eeeeee;
27
27
  }
@@ -24,7 +24,7 @@ core-selector > #drawer {
24
24
  height: 100%;
25
25
  will-change: transform;
26
26
  box-sizing: border-box;
27
- -mox-box-sizing: border-box;
27
+ -moz-box-sizing: border-box;
28
28
  }
29
29
 
30
30
  .transition > #drawer {
@@ -40,11 +40,6 @@ right-drawer: make drawer on the right side
40
40
  right: 0;
41
41
  }
42
42
 
43
- .right-drawer.transition > #drawer {
44
- transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s;
45
- transition: transform ease-in-out 0.3s, width ease-in-out 0.3s;
46
- }
47
-
48
43
  polyfill-next-selector { content: ':host [drawer]'; }
49
44
  ::content[select="[drawer]"] > * {
50
45
  position: absolute;
@@ -92,6 +87,19 @@ polyfill-next-selector { content: '#main > [main]'; }
92
87
  transition: opacity ease-in-out 0.38s, visibility ease-in-out 0.38s;
93
88
  }
94
89
 
90
+ #edgeSwipeOverlay {
91
+ position: absolute;
92
+ top: 0;
93
+ bottom: 0;
94
+ left: 0;
95
+ width: 20px;
96
+ }
97
+
98
+ .right-drawer > #main > #edgeSwipeOverlay {
99
+ right: 0;
100
+ left: auto;
101
+ }
102
+
95
103
  /*
96
104
  narrow layout
97
105
  */
@@ -9,14 +9,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
9
9
 
10
10
  <!--
11
11
  `core-drawer-panel` contains a drawer panel and a main panel. The drawer
12
- and the main panel are side-by-side with drawer on the left. When browser
12
+ and the main panel are side-by-side with drawer on the left. When the browser
13
13
  window size is smaller than the `responsiveWidth`, `core-drawer-panel`
14
14
  changes to narrow layout. In narrow layout, the drawer will be stacked on top
15
- of the main panel. The drawer will be slided in/out to hide/reveal the main
15
+ of the main panel. The drawer will slide in/out to hide/reveal the main
16
16
  panel.
17
17
 
18
- Use the attribute `drawer` to indicate the element is a drawer panel and
19
- `main` to indicate is a main panel.
18
+ Use the attribute `drawer` to indicate that the element is the drawer panel and
19
+ `main` to indicate that the element is the main panel.
20
20
 
21
21
  Example:
22
22
 
@@ -90,6 +90,7 @@ To position the drawer to the right, add `rightDrawer` attribute.
90
90
  <div id="main" _style="left: {{ narrow || rightDrawer ? '0' : drawerWidth }}; right: {{ rightDrawer ? (narrow ? '' : drawerWidth) : '' }};">
91
91
  <content select="[main]"></content>
92
92
  <div id="scrim" on-tap="{{togglePanel}}"></div>
93
+ <div id="edgeSwipeOverlay" hidden?="{{!narrow || disableEdgeSwipe}}"></div>
93
94
  </div>
94
95
 
95
96
  <div id="drawer" _style="width: {{ drawerWidth }}">
@@ -110,6 +111,19 @@ To position the drawer to the right, add `rightDrawer` attribute.
110
111
  * @param {Object} detail
111
112
  * @param {boolean} detail.narrow true if the panel is in narrow layout.
112
113
  */
114
+
115
+ /**
116
+ * Fired when the selected panel changes.
117
+ *
118
+ * Listening for this event is an alternative to observing changes in the `selected` attribute.
119
+ * This event is fired both when a panel is selected and deselected.
120
+ * The `isSelected` detail property contains the selection state.
121
+ *
122
+ * @event core-select
123
+ * @param {Object} detail
124
+ * @param {boolean} detail.isSelected true for selection and false for deselection
125
+ * @param {Object} detail.item the panel that the event refers to
126
+ */
113
127
 
114
128
  publish: {
115
129
 
@@ -186,7 +200,16 @@ To position the drawer to the right, add `rightDrawer` attribute.
186
200
  * @type boolean
187
201
  * @default false
188
202
  */
189
- forceNarrow: false
203
+ forceNarrow: false,
204
+
205
+ /**
206
+ * If true, swipe from the edge is disable.
207
+ *
208
+ * @attribute disableEdgeSwipe
209
+ * @type boolean
210
+ * @default false
211
+ */
212
+ disableEdgeSwipe: false
190
213
  },
191
214
 
192
215
  eventDelegates: {
@@ -314,9 +337,10 @@ To position the drawer to the right, add `rightDrawer` attribute.
314
337
  },
315
338
 
316
339
  isEdgeTouch: function(e) {
317
- return this.swipeAllowed() && (this.rightDrawer ?
318
- e.pageX >= this.offsetWidth - this.edgeSwipeSensitivity :
319
- e.pageX <= this.edgeSwipeSensitivity);
340
+ return !this.disableEdgeSwipe && this.swipeAllowed() &&
341
+ (this.rightDrawer ?
342
+ e.pageX >= this.offsetWidth - this.edgeSwipeSensitivity :
343
+ e.pageX <= this.edgeSwipeSensitivity);
320
344
  },
321
345
 
322
346
  trackStart : function(e) {
@@ -140,9 +140,11 @@ not scroll with its container.
140
140
  * The horizontal alignment of the popup relative to `relatedTarget`. `left`
141
141
  * means the left edges are aligned together. `right` means the right edges
142
142
  * are aligned together.
143
+ *
144
+ * Accepted values: 'left', 'right'
143
145
  *
144
146
  * @attribute halign
145
- * @type 'left' | 'right'
147
+ * @type String
146
148
  * @default 'left'
147
149
  */
148
150
  halign: 'left',
@@ -152,8 +154,10 @@ not scroll with its container.
152
154
  * the top edges are aligned together. `bottom` means the bottom edges are
153
155
  * aligned together.
154
156
  *
157
+ * Accepted values: 'top', 'bottom'
158
+ *
155
159
  * @attribute valign
156
- * @type 'top' | 'bottom'
160
+ * @type String
157
161
  * @default 'top'
158
162
  */
159
163
  valign: 'top',
@@ -191,6 +195,8 @@ not scroll with its container.
191
195
  style[dims.position.v] = null;
192
196
  dims.position.v_by = null;
193
197
  }
198
+ style.width = null;
199
+ style.height = null;
194
200
  this.super();
195
201
  },
196
202
 
@@ -47,6 +47,7 @@ See `bower.json` for the complete list of components.
47
47
  <link rel="import" href="../core-range/core-range.html">
48
48
  <link rel="import" href="../core-scaffold/core-scaffold.html">
49
49
  <link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
50
+ <link rel="import" href="../core-scroll-threshold/core-scroll-threshold.html">
50
51
  <link rel="import" href="../core-selection/core-selection.html">
51
52
  <link rel="import" href="../core-selector/core-selector.html">
52
53
  <link rel="import" href="../core-shared-lib/core-shared-lib.html">
@@ -28,7 +28,6 @@ Example setting size to 32px x 32px:
28
28
  The core elements include several sets of icons.
29
29
  To use the default set of icons, import `core-icons.html` and use the `icon` attribute to specify an icon:
30
30
 
31
- &lt;!-- import default iconset and core-icon --&gt;
32
31
  <link rel="import" href="/components/core-icons/core-icons.html">
33
32
 
34
33
  <core-icon icon="menu"></core-icon>
@@ -36,7 +35,6 @@ To use the default set of icons, import `core-icons.html` and use the `icon` at
36
35
  To use a different built-in set of icons, import `core-icons/<iconset>-icons.html`, and
37
36
  specify the icon as `<iconset>:<icon>`. For example:
38
37
 
39
- &lt;!-- import communication iconset and core-icon --&gt;
40
38
  <link rel="import" href="/components/core-icons/communication-icons.html">
41
39
 
42
40
  <core-icon icon="communication:email"></core-icon>