diff options
author | michaelpg <michaelpg@chromium.org> | 2015-05-12 12:50:51 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-12 19:51:38 +0000 |
commit | dbcc99dfe30cd56a36a231db576d7d7ea6c6622e (patch) | |
tree | cc011eba3fbcfb18e86d0fb96dd9d2eff6d12b80 /third_party | |
parent | f15ce16de276c2d03186804eb8e7755cbcbcc58e (diff) | |
download | chromium_src-dbcc99dfe30cd56a36a231db576d7d7ea6c6622e.zip chromium_src-dbcc99dfe30cd56a36a231db576d7d7ea6c6622e.tar.gz chromium_src-dbcc99dfe30cd56a36a231db576d7d7ea6c6622e.tar.bz2 |
Add paper-item#^0.8.0 and run reproduce.sh
This brings paper-item v0.8.2 into third_party/polymer/v0_8.
I got a presubmit warning about not updating README.chromium.
Will that actually be a problem in the CQ?
BUG=485381
Review URL: https://codereview.chromium.org/1124133004
Cr-Commit-Position: refs/heads/master@{#329464}
Diffstat (limited to 'third_party')
30 files changed, 693 insertions, 522 deletions
diff --git a/third_party/polymer/v0_8/bower.json b/third_party/polymer/v0_8/bower.json index 23672c2..1592894 100644 --- a/third_party/polymer/v0_8/bower.json +++ b/third_party/polymer/v0_8/bower.json @@ -15,6 +15,7 @@ "paper-checkbox": "PolymerElements/paper-checkbox#^0.8.0", "paper-drawer-panel": "PolymerElements/paper-drawer-panel#^0.8.0", "paper-input": "PolymerElements/paper-input#^0.8.0", + "paper-item": "PolymerElements/paper-item#^0.8.0", "paper-menu": "PolymerElements/paper-menu#^0.8.0", "paper-ripple": "PolymerElements/paper-ripple#^0.8.0", "paper-styles": "PolymerElements/paper-styles#^0.8.0", diff --git a/third_party/polymer/v0_8/components-chromium/iron-meta/.bower.json b/third_party/polymer/v0_8/components-chromium/iron-meta/.bower.json index 73fc7c8..54e2239 100644 --- a/third_party/polymer/v0_8/components-chromium/iron-meta/.bower.json +++ b/third_party/polymer/v0_8/components-chromium/iron-meta/.bower.json @@ -13,7 +13,7 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.6.0", "web-component-tester": "~2.2.6" }, - "homepage": "https://github.com/polymerelements/iron-meta", + "homepage": "https://github.com/PolymerElements/iron-meta", "version": "0.8.2", "_release": "0.8.2", "_resolution": { @@ -21,7 +21,7 @@ "tag": "v0.8.2", "commit": "c67091ccb5cca75ea4d103b5ce6ae9703676aa98" }, - "_source": "git://github.com/polymerelements/iron-meta.git", + "_source": "git://github.com/PolymerElements/iron-meta.git", "_target": "^0.8.0", - "_originalSource": "polymerelements/iron-meta" + "_originalSource": "PolymerElements/iron-meta" }
\ No newline at end of file diff --git a/third_party/polymer/v0_8/components-chromium/iron-selector/.bower.json b/third_party/polymer/v0_8/components-chromium/iron-selector/.bower.json index c6c8240..5c96766 100644 --- a/third_party/polymer/v0_8/components-chromium/iron-selector/.bower.json +++ b/third_party/polymer/v0_8/components-chromium/iron-selector/.bower.json @@ -18,14 +18,14 @@ "web-component-tester": "Polymer/web-component-tester#^2.2.3", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.6.0" }, - "homepage": "https://github.com/PolymerElements/iron-selector", + "homepage": "https://github.com/polymerelements/iron-selector", "_release": "0.8.5", "_resolution": { "type": "version", "tag": "v0.8.5", "commit": "6b56de55e3e7f8ed108c9c227c85bc2a2f360d0d" }, - "_source": "git://github.com/PolymerElements/iron-selector.git", + "_source": "git://github.com/polymerelements/iron-selector.git", "_target": "^0.8.0", - "_originalSource": "PolymerElements/iron-selector" + "_originalSource": "polymerelements/iron-selector" }
\ No newline at end of file diff --git a/third_party/polymer/v0_8/components-chromium/paper-item/README.md b/third_party/polymer/v0_8/components-chromium/paper-item/README.md new file mode 100644 index 0000000..43de002 --- /dev/null +++ b/third_party/polymer/v0_8/components-chromium/paper-item/README.md @@ -0,0 +1,2 @@ +paper-item +=========
\ No newline at end of file diff --git a/third_party/polymer/v0_8/components-chromium/paper-item/bower.json b/third_party/polymer/v0_8/components-chromium/paper-item/bower.json new file mode 100644 index 0000000..ed1828f --- /dev/null +++ b/third_party/polymer/v0_8/components-chromium/paper-item/bower.json @@ -0,0 +1,34 @@ +{ + "name": "paper-item", + "version": "0.8.0", + "authors": [ + "Yvonne Yip <ykyyip@google.com>" + ], + "keywords": [ + "web-components", + "web-component", + "polymer" + ], + "main": "index.html", + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-item" + }, + "license": "MIT", + "homepage": "https://github.com/PolymerElements/paper-item", + "ignore": [ + ], + "dependencies": { + "polymer": "Polymer/polymer#v0.8.0-rc.7", + "paper-styles": "PolymerElements/paper-styles#^0.8.0" + }, + "devDependencies": { + "iron-icon": "PolymerElements/iron-icon#^0.8.0", + "iron-icons": "PolymerElements/iron-icons#^0.8.0", + "iron-doc-viewer": "PolymerElements/iron-doc-viewer#^0.8.0", + "test-fixture": "PolymerElements/test-fixture#^0.8.0", + "web-component-tester": "Polymer/web-component-tester#^2.2.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.6.0" + } +} diff --git a/third_party/polymer/v0_8/components-chromium/paper-item/index.html b/third_party/polymer/v0_8/components-chromium/paper-item/index.html new file mode 100644 index 0000000..23604a2 --- /dev/null +++ b/third_party/polymer/v0_8/components-chromium/paper-item/index.html @@ -0,0 +1,38 @@ +<!-- +@license +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<!doctype html> +<html> +<head> + + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> + + <title>paper-item</title> + + <script src="../webcomponentsjs/webcomponents-lite.js"></script> + + <link rel="import" href="../polymer/polymer.html"> + <link rel="import" href="../iron-doc-viewer/iron-doc-viewer.html"> + + <style> + + body { + margin: 16px; + } + + </style> + +</head> +<body> + + <iron-doc-viewer src="paper-item.html"></iron-doc-viewer> + +</body> +</html> diff --git a/third_party/polymer/v0_8/components-chromium/paper-item/paper-icon-item-extracted.js b/third_party/polymer/v0_8/components-chromium/paper-item/paper-icon-item-extracted.js new file mode 100644 index 0000000..ec59a359 --- /dev/null +++ b/third_party/polymer/v0_8/components-chromium/paper-item/paper-icon-item-extracted.js @@ -0,0 +1,38 @@ + + +(function() { + + Polymer({ + + is: 'paper-icon-item', + + enableCustomStyleProperties: true, + + hostAttributes: { + 'role': 'listitem' + }, + + properties: { + + /** + * The width of the icon area. + * + * @attribute iconWidth + * @type String + * @default '56px' + */ + iconWidth: { + type: String, + value: '56px' + } + + }, + + ready: function() { + this.$.contentIcon.style.width = this.iconWidth; + } + + }); + +})(); + diff --git a/third_party/polymer/v0_8/components-chromium/paper-item/paper-icon-item.html b/third_party/polymer/v0_8/components-chromium/paper-item/paper-icon-item.html new file mode 100644 index 0000000..cefa45f --- /dev/null +++ b/third_party/polymer/v0_8/components-chromium/paper-item/paper-icon-item.html @@ -0,0 +1,44 @@ +<!-- + @license + Copyright (c) 2015 The Polymer Project Authors. All rights reserved. + This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + Code distributed by Google as part of the polymer project is also + subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--><html><head><link rel="import" href="../polymer/polymer.html"> +<link rel="import" href="../paper-styles/paper-styles.html"> + +<!-- +`paper-icon-item` is a list item with a fixed-width icon area. + +@element paper-icon-item +--> + +</head><body><dom-module id="paper-icon-item"> + + <link rel="import" type="css" href="paper-item-shared.css"> + + <style> + + :host { + mixin(--layout-horizontal); + mixin(--layout-center); + mixin(--paper-font-subhead); + + mixin(--paper-item); + mixin(--paper-icon-item); + } + + </style> + + <template> + <div id="contentIcon" class="content-icon layout horizontal center"> + <content select="[item-icon]"></content> + </div> + <content></content> + </template> + +</dom-module> + +<script src="paper-icon-item-extracted.js"></script></body></html>
\ No newline at end of file diff --git a/third_party/polymer/v0_8/components-chromium/paper-item/paper-item-body-extracted.js b/third_party/polymer/v0_8/components-chromium/paper-item/paper-item-body-extracted.js new file mode 100644 index 0000000..e8c7743 --- /dev/null +++ b/third_party/polymer/v0_8/components-chromium/paper-item/paper-item-body-extracted.js @@ -0,0 +1,14 @@ + + +(function() { + + Polymer({ + + is: 'paper-item-body', + + enableCustomStyleProperties: true + + }); + +})(); + diff --git a/third_party/polymer/v0_8/components-chromium/paper-item/paper-item-body.html b/third_party/polymer/v0_8/components-chromium/paper-item/paper-item-body.html new file mode 100644 index 0000000..94803d3 --- /dev/null +++ b/third_party/polymer/v0_8/components-chromium/paper-item/paper-item-body.html @@ -0,0 +1,57 @@ +<!-- + @license + Copyright (c) 2015 The Polymer Project Authors. All rights reserved. + This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + Code distributed by Google as part of the polymer project is also + subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--><html><head><link rel="import" href="../polymer/polymer.html"> +<link rel="import" href="../paper-styles/paper-styles.html"> + +<!-- + +@element paper-item-body +--> + +</head><body><dom-module id="paper-item-body"> + + <style> + + :host { + --mixin(--layout-vertical); + --mixin(--layout-center-justified); + --mixin(--layout-flex); + } + + :host([two-line]) { + min-height: 72px; + } + + :host([three-line]) { + min-height: 88px; + } + + :host > ::content > * { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + :host > ::content [secondary] { + color: var(--secondary-text-color); + mixin(--paper-font-body1); + + mixin(--paper-item-body-secondary); + } + + + </style> + + <template> + <content></content> + </template> + +</dom-module> + +<script src="paper-item-body-extracted.js"></script></body></html>
\ No newline at end of file diff --git a/third_party/polymer/v0_8/components-chromium/paper-item/paper-item-extracted.js b/third_party/polymer/v0_8/components-chromium/paper-item/paper-item-extracted.js new file mode 100644 index 0000000..58fd2bf --- /dev/null +++ b/third_party/polymer/v0_8/components-chromium/paper-item/paper-item-extracted.js @@ -0,0 +1,18 @@ + + +(function() { + + Polymer({ + + is: 'paper-item', + + enableCustomStyleProperties: true, + + hostAttributes: { + role: 'listitem' + } + + }); + +})(); + diff --git a/third_party/polymer/v0_8/components-chromium/paper-item/paper-item-shared.css b/third_party/polymer/v0_8/components-chromium/paper-item/paper-item-shared.css new file mode 100644 index 0000000..2dfc087 --- /dev/null +++ b/third_party/polymer/v0_8/components-chromium/paper-item/paper-item-shared.css @@ -0,0 +1,19 @@ +/* + @license + Copyright (c) 2015 The Polymer Project Authors. All rights reserved. + This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + Code distributed by Google as part of the polymer project is also + subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: block; + min-height: 48px; + padding: 0px 16px; +} + +:host > ::content > *:not(:first-child):not(:last-child) { + margin-right: 16px; +} diff --git a/third_party/polymer/v0_8/components-chromium/paper-item/paper-item.html b/third_party/polymer/v0_8/components-chromium/paper-item/paper-item.html new file mode 100644 index 0000000..fec7521 --- /dev/null +++ b/third_party/polymer/v0_8/components-chromium/paper-item/paper-item.html @@ -0,0 +1,40 @@ +<!-- + @license + Copyright (c) 2015 The Polymer Project Authors. All rights reserved. + This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + Code distributed by Google as part of the polymer project is also + subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--><html><head><link rel="import" href="../polymer/polymer.html"> +<link rel="import" href="../paper-styles/paper-styles.html"> + +<!-- +`paper-item` is a non-interactive list item. + +@element paper-item +--> + +</head><body><dom-module id="paper-item"> + + <link rel="import" type="css" href="paper-item-shared.css"> + + <style> + + :host { + mixin(--layout-horizontal); + mixin(--layout-center); + mixin(--paper-font-subhead); + + mixin(--paper-item); + } + + </style> + + <template> + <content></content> + </template> + +</dom-module> + +<script src="paper-item-extracted.js"></script></body></html>
\ No newline at end of file diff --git a/third_party/polymer/v0_8/components-chromium/paper-menu/.bower.json b/third_party/polymer/v0_8/components-chromium/paper-menu/.bower.json index 3bb8166..7f5e3fb 100644 --- a/third_party/polymer/v0_8/components-chromium/paper-menu/.bower.json +++ b/third_party/polymer/v0_8/components-chromium/paper-menu/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-menu", - "version": "0.8.2", + "version": "0.8.3", "authors": "The Polymer Authors", "keywords": [ "web-components", @@ -18,7 +18,7 @@ "ignore": [], "dependencies": { "polymer": "Polymer/polymer#v0.8.0-rc.7", - "iron-selector": "PolymerElements/iron-selector#^0.8.0", + "iron-menu-behavior": "PolymerElements/iron-menu-behavior#^0.8.0", "paper-styles": "PolymerElements/paper-styles#^0.8.0" }, "devDependencies": { @@ -28,11 +28,11 @@ "web-component-tester": "Polymer/web-component-tester#^2.2.0", "webcomponentsjs": "Polymer/webcomponentsjs#^0.6.0" }, - "_release": "0.8.2", + "_release": "0.8.3", "_resolution": { "type": "version", - "tag": "v0.8.2", - "commit": "a10381891339cb021d1215bd3bcf0eb96251acd9" + "tag": "v0.8.3", + "commit": "23566fd8054fe8a162972ba98dd2a6fcb58e8e2d" }, "_source": "git://github.com/PolymerElements/paper-menu.git", "_target": "^0.8.0", diff --git a/third_party/polymer/v0_8/components-chromium/paper-menu/bower.json b/third_party/polymer/v0_8/components-chromium/paper-menu/bower.json index 9f5a25e..2d7e615c 100644 --- a/third_party/polymer/v0_8/components-chromium/paper-menu/bower.json +++ b/third_party/polymer/v0_8/components-chromium/paper-menu/bower.json @@ -18,7 +18,7 @@ "ignore": [], "dependencies": { "polymer": "Polymer/polymer#v0.8.0-rc.7", - "iron-selector": "PolymerElements/iron-selector#^0.8.0", + "iron-menu-behavior": "PolymerElements/iron-menu-behavior#^0.8.0", "paper-styles": "PolymerElements/paper-styles#^0.8.0" }, "devDependencies": { diff --git a/third_party/polymer/v0_8/components-chromium/paper-menu/paper-menu-extracted.js b/third_party/polymer/v0_8/components-chromium/paper-menu/paper-menu-extracted.js index e509822..2ebdfad 100644 --- a/third_party/polymer/v0_8/components-chromium/paper-menu/paper-menu-extracted.js +++ b/third_party/polymer/v0_8/components-chromium/paper-menu/paper-menu-extracted.js @@ -2,259 +2,15 @@ (function() { - // FIXME menu control should be refactored to a more general element - Polymer({ is: 'paper-menu', enableCustomStyleProperties: true, - mixins: [ - Polymer.Core.Selectable - ], - - properties: { - - /** - * Returns the currently focused item. - * - * @attribute focusedItem - * @type Object - */ - focusedItem: { - observer: 'focusedItemChanged', - readOnly: true, - type: Object - }, - - /** - * The attribute to use on menu items to look up the item title. Typing the first - * letter of an item when the menu is open focuses that item. If unset, `textContent` - * will be used. - * - * @attribute attrForItemTitle - * @type String - */ - attrForItemTitle: { - type: String - }, - - /***********************************************************************/ - /* Polymer.Core.Selectable */ - /***********************************************************************/ - - /** - * If you want to use the attribute value of an element for `selected` instead of the index, - * set this to the name of the attribute. - * - * @attribute attrForSelected - * @type String - */ - attrForSelected: { - type: String - }, - - /** - * If true, multiple selections are allowed. - * - * @attribute multi - * @type Boolean - * @default false - */ - multi: { - observer: 'multiChanged', - type: Boolean, - value: false - }, - - /** - * Gets or sets the selected element. The default is to use the index of the item. In - * multi-selection this should be an array of values. - * - * @attribute selected - * @type String|Array - */ - selected: { - notify: true, - observer: 'selectedChanged', - type: String - }, - - /** - * Returns the currently selected item. In multi-selection this returns an array of - * selected items. - * - * @attribute selectedItem - * @type Object|Array - */ - selectedItem: { - notify: true, - observer: 'selectedItemChanged', - readOnly: true, - type: Object - }, - - /** - * The event that would be fired from the item to indicate it is being selected. Set this - * to empty string or null if you don't want to listen for any events. - * - * @attribute activateEvent - * @type String - * @default 'click' - */ - activateEvent: { - observer: 'activateEventChanged', - type: String, - value: 'click' - }, - - /** - * If this is set, only items with local name that matches the `selectable` are selectable. - * - * @attribute selectable - * @type String - */ - selectable: { - type: String - } - - }, - - hostAttributes: { - 'role': 'menu', - 'tabindex': '0' - }, - - listeners: { - 'focus': 'onFocus', - 'keydown': 'onKeydown' - }, - - created: function() { - this._bindActivateHandler = this.activateHandler.bind(this); - }, - - attached: function() { - this.selectableAttached(); - }, - - detached: function() { - this.selectableDetached(); - this.removeListener(this.activateEvent); - }, - - addListener: function(eventName) { - if (eventName) { - this.addEventListener(eventName, this._bindActivateHandler); - } - }, - - removeListener: function(eventName) { - if (eventName) { - this.removeEventListener(eventName, this._bindActivateHandler); - } - }, - - activateEventChanged: function(eventName, old) { - this.removeListener(old); - this.addListener(eventName); - }, - - focusedItemChanged: function(focusedItem, old) { - old && old.setAttribute('tabindex', '-1'); - if (focusedItem) { - focusedItem.setAttribute('tabindex', '0'); - focusedItem.focus(); - } - }, - - multiChanged: function(multi) { - this.selection.multi = multi; - this.selectedChanged(this.selected); - }, - - selectedChanged: function(selected, old) { - this._selectedChanged(selected, old); - }, - - selectedItemChanged: function(selectedItem) { - this._setFocusedItem(Array.isArray(selectedItem) ? selectedItem[0] : selectedItem); - }, - - activateHandler: function(e) { - var t = e.target; - var items = this.items; - while (t && t != this) { - var i = items.indexOf(t); - if (i >= 0) { - if (t.hasAttribute('disabled')) { - return; - } - var value = this.indexToValue(i); - if (!this.fire('iron-activate', {selected: value, item: t}).defaultPrevented) { - this.select(value); - } - return; - } - t = t.parentNode; - } - }, - - onFocus: function(event) { - // clear the cached focus item - this._setFocusedItem(null); - // focus the selected item when the menu receives focus, or the first item - // if no item is selected - var selectedItem = this.selectedItem; - selectedItem = Array.isArray(selectedItem) ? selectedItem[0] : selectedItem; - if (selectedItem) { - this._setFocusedItem(selectedItem); - } else { - this._setFocusedItem(this.items[0]); - } - }, - - onKeydown: function(event) { - // FIXME want to define these somewhere, core-a11y-keys? - var DOWN = 40; - var UP = 38; - var ESC = 27; - var ENTER = 13; - if (event.keyCode === DOWN) { - // up and down arrows moves the focus - this.focusNext(); - } else if (event.keyCode === UP) { - this.focusPrevious(); - } else if (event.keyCode === ESC) { - // esc blurs the control - this.focusedItem.blur(); - } else if (event.keyCode === ENTER) { - // enter activates the item - this.activateHandler(event); - } else { - // all other keys focus the menu item starting with that character - for (var i = 0, item; item = this.items[i]; i++) { - var attr = this.attrForItemTitle || 'textContent'; - var title = item[attr] || item.getAttribute(attr); - if (title && title.charAt(0).toLowerCase() === String.fromCharCode(event.keyCode).toLowerCase()) { - this._setFocusedItem(item); - break; - } - } - } - }, - - focusPrevious: function() { - var length = this.items.length; - var index = (Number(this.indexOf(this.focusedItem)) - 1 + length) % length; - this._setFocusedItem(this.items[index]); - }, - - focusNext: function() { - var index = (Number(this.indexOf(this.focusedItem)) + 1) % this.items.length; - this._setFocusedItem(this.items[index]); - } + behaviors: [ + Polymer.IronMenuBehavior + ] }); diff --git a/third_party/polymer/v0_8/components-chromium/paper-menu/paper-menu.html b/third_party/polymer/v0_8/components-chromium/paper-menu/paper-menu.html index 1055de2..9a06497 100644 --- a/third_party/polymer/v0_8/components-chromium/paper-menu/paper-menu.html +++ b/third_party/polymer/v0_8/components-chromium/paper-menu/paper-menu.html @@ -7,7 +7,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI Code distributed by Google as part of the polymer project is also subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt --><html><head><link rel="import" href="../polymer/polymer.html"> -<link rel="import" href="../iron-selector/iron-selectable.html"> +<link rel="import" href="../iron-menu-behavior/iron-menu-behavior.html"> <link rel="import" href="../paper-styles/paper-styles.html"> <!-- @@ -19,6 +19,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN <style> :host { + display: block; padding: 8px 0; background: var(--primary-background-color); @@ -36,7 +37,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN } :host > ::content > .iron-selected::after { - mixin(--fit); + mixin(--layout-fit); background: currentColor; /* FIXME move to paper-styles for next widget */ diff --git a/third_party/polymer/v0_8/components/iron-meta/.bower.json b/third_party/polymer/v0_8/components/iron-meta/.bower.json index 73fc7c8..54e2239 100644 --- a/third_party/polymer/v0_8/components/iron-meta/.bower.json +++ b/third_party/polymer/v0_8/components/iron-meta/.bower.json @@ -13,7 +13,7 @@ "webcomponentsjs": "webcomponents/webcomponentsjs#^0.6.0", "web-component-tester": "~2.2.6" }, - "homepage": "https://github.com/polymerelements/iron-meta", + "homepage": "https://github.com/PolymerElements/iron-meta", "version": "0.8.2", "_release": "0.8.2", "_resolution": { @@ -21,7 +21,7 @@ "tag": "v0.8.2", "commit": "c67091ccb5cca75ea4d103b5ce6ae9703676aa98" }, - "_source": "git://github.com/polymerelements/iron-meta.git", + "_source": "git://github.com/PolymerElements/iron-meta.git", "_target": "^0.8.0", - "_originalSource": "polymerelements/iron-meta" + "_originalSource": "PolymerElements/iron-meta" }
\ No newline at end of file diff --git a/third_party/polymer/v0_8/components/iron-selector/.bower.json b/third_party/polymer/v0_8/components/iron-selector/.bower.json index c6c8240..5c96766 100644 --- a/third_party/polymer/v0_8/components/iron-selector/.bower.json +++ b/third_party/polymer/v0_8/components/iron-selector/.bower.json @@ -18,14 +18,14 @@ "web-component-tester": "Polymer/web-component-tester#^2.2.3", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.6.0" }, - "homepage": "https://github.com/PolymerElements/iron-selector", + "homepage": "https://github.com/polymerelements/iron-selector", "_release": "0.8.5", "_resolution": { "type": "version", "tag": "v0.8.5", "commit": "6b56de55e3e7f8ed108c9c227c85bc2a2f360d0d" }, - "_source": "git://github.com/PolymerElements/iron-selector.git", + "_source": "git://github.com/polymerelements/iron-selector.git", "_target": "^0.8.0", - "_originalSource": "PolymerElements/iron-selector" + "_originalSource": "polymerelements/iron-selector" }
\ No newline at end of file diff --git a/third_party/polymer/v0_8/components/paper-item/.bower.json b/third_party/polymer/v0_8/components/paper-item/.bower.json new file mode 100644 index 0000000..9079b5a --- /dev/null +++ b/third_party/polymer/v0_8/components/paper-item/.bower.json @@ -0,0 +1,42 @@ +{ + "name": "paper-item", + "version": "0.8.2", + "authors": [ + "Yvonne Yip <ykyyip@google.com>" + ], + "keywords": [ + "web-components", + "web-component", + "polymer" + ], + "main": "index.html", + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-item" + }, + "license": "MIT", + "homepage": "https://github.com/PolymerElements/paper-item", + "ignore": [], + "dependencies": { + "polymer": "Polymer/polymer#v0.8.0-rc.7", + "paper-styles": "PolymerElements/paper-styles#^0.8.0" + }, + "devDependencies": { + "iron-icon": "PolymerElements/iron-icon#^0.8.0", + "iron-icons": "PolymerElements/iron-icons#^0.8.0", + "iron-doc-viewer": "PolymerElements/iron-doc-viewer#^0.8.0", + "test-fixture": "PolymerElements/test-fixture#^0.8.0", + "web-component-tester": "Polymer/web-component-tester#^2.2.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.6.0" + }, + "_release": "0.8.2", + "_resolution": { + "type": "version", + "tag": "v0.8.2", + "commit": "0fb9b2b2fa033088a09896d721833bcd27ee164e" + }, + "_source": "git://github.com/PolymerElements/paper-item.git", + "_target": "^0.8.0", + "_originalSource": "PolymerElements/paper-item" +}
\ No newline at end of file diff --git a/third_party/polymer/v0_8/components/paper-item/README.md b/third_party/polymer/v0_8/components/paper-item/README.md new file mode 100644 index 0000000..43de002 --- /dev/null +++ b/third_party/polymer/v0_8/components/paper-item/README.md @@ -0,0 +1,2 @@ +paper-item +=========
\ No newline at end of file diff --git a/third_party/polymer/v0_8/components/paper-item/bower.json b/third_party/polymer/v0_8/components/paper-item/bower.json new file mode 100644 index 0000000..ed1828f --- /dev/null +++ b/third_party/polymer/v0_8/components/paper-item/bower.json @@ -0,0 +1,34 @@ +{ + "name": "paper-item", + "version": "0.8.0", + "authors": [ + "Yvonne Yip <ykyyip@google.com>" + ], + "keywords": [ + "web-components", + "web-component", + "polymer" + ], + "main": "index.html", + "private": true, + "repository": { + "type": "git", + "url": "git://github.com/PolymerElements/paper-item" + }, + "license": "MIT", + "homepage": "https://github.com/PolymerElements/paper-item", + "ignore": [ + ], + "dependencies": { + "polymer": "Polymer/polymer#v0.8.0-rc.7", + "paper-styles": "PolymerElements/paper-styles#^0.8.0" + }, + "devDependencies": { + "iron-icon": "PolymerElements/iron-icon#^0.8.0", + "iron-icons": "PolymerElements/iron-icons#^0.8.0", + "iron-doc-viewer": "PolymerElements/iron-doc-viewer#^0.8.0", + "test-fixture": "PolymerElements/test-fixture#^0.8.0", + "web-component-tester": "Polymer/web-component-tester#^2.2.0", + "webcomponentsjs": "webcomponents/webcomponentsjs#^0.6.0" + } +} diff --git a/third_party/polymer/v0_8/components/paper-item/index.html b/third_party/polymer/v0_8/components/paper-item/index.html new file mode 100644 index 0000000..23604a2 --- /dev/null +++ b/third_party/polymer/v0_8/components/paper-item/index.html @@ -0,0 +1,38 @@ +<!-- +@license +Copyright (c) 2015 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> +<!doctype html> +<html> +<head> + + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> + + <title>paper-item</title> + + <script src="../webcomponentsjs/webcomponents-lite.js"></script> + + <link rel="import" href="../polymer/polymer.html"> + <link rel="import" href="../iron-doc-viewer/iron-doc-viewer.html"> + + <style> + + body { + margin: 16px; + } + + </style> + +</head> +<body> + + <iron-doc-viewer src="paper-item.html"></iron-doc-viewer> + +</body> +</html> diff --git a/third_party/polymer/v0_8/components/paper-item/paper-icon-item.html b/third_party/polymer/v0_8/components/paper-item/paper-icon-item.html new file mode 100644 index 0000000..ec025f8 --- /dev/null +++ b/third_party/polymer/v0_8/components/paper-item/paper-icon-item.html @@ -0,0 +1,84 @@ +<!-- + @license + Copyright (c) 2015 The Polymer Project Authors. All rights reserved. + This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + Code distributed by Google as part of the polymer project is also + subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../polymer/polymer.html"> +<link rel="import" href="../paper-styles/paper-styles.html"> + +<!-- +`paper-icon-item` is a list item with a fixed-width icon area. + +@element paper-icon-item +--> + +<dom-module id="paper-icon-item"> + + <link rel="import" type="css" href="paper-item-shared.css"> + + <style> + + :host { + mixin(--layout-horizontal); + mixin(--layout-center); + mixin(--paper-font-subhead); + + mixin(--paper-item); + mixin(--paper-icon-item); + } + + </style> + + <template> + <div id="contentIcon" class="content-icon layout horizontal center"> + <content select="[item-icon]"></content> + </div> + <content></content> + </template> + +</dom-module> + +<script> + +(function() { + + Polymer({ + + is: 'paper-icon-item', + + enableCustomStyleProperties: true, + + hostAttributes: { + 'role': 'listitem' + }, + + properties: { + + /** + * The width of the icon area. + * + * @attribute iconWidth + * @type String + * @default '56px' + */ + iconWidth: { + type: String, + value: '56px' + } + + }, + + ready: function() { + this.$.contentIcon.style.width = this.iconWidth; + } + + }); + +})(); + +</script> diff --git a/third_party/polymer/v0_8/components/paper-item/paper-item-body.html b/third_party/polymer/v0_8/components/paper-item/paper-item-body.html new file mode 100644 index 0000000..a49e4d0 --- /dev/null +++ b/third_party/polymer/v0_8/components/paper-item/paper-item-body.html @@ -0,0 +1,73 @@ +<!-- + @license + Copyright (c) 2015 The Polymer Project Authors. All rights reserved. + This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + Code distributed by Google as part of the polymer project is also + subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../polymer/polymer.html"> +<link rel="import" href="../paper-styles/paper-styles.html"> + +<!-- + +@element paper-item-body +--> + +<dom-module id="paper-item-body"> + + <style> + + :host { + --mixin(--layout-vertical); + --mixin(--layout-center-justified); + --mixin(--layout-flex); + } + + :host([two-line]) { + min-height: 72px; + } + + :host([three-line]) { + min-height: 88px; + } + + :host > ::content > * { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + :host > ::content [secondary] { + color: var(--secondary-text-color); + mixin(--paper-font-body1); + + mixin(--paper-item-body-secondary); + } + + + </style> + + <template> + <content></content> + </template> + +</dom-module> + +<script> + +(function() { + + Polymer({ + + is: 'paper-item-body', + + enableCustomStyleProperties: true + + }); + +})(); + +</script> diff --git a/third_party/polymer/v0_8/components/paper-item/paper-item-shared.css b/third_party/polymer/v0_8/components/paper-item/paper-item-shared.css new file mode 100644 index 0000000..2dfc087 --- /dev/null +++ b/third_party/polymer/v0_8/components/paper-item/paper-item-shared.css @@ -0,0 +1,19 @@ +/* + @license + Copyright (c) 2015 The Polymer Project Authors. All rights reserved. + This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + Code distributed by Google as part of the polymer project is also + subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ + +:host { + display: block; + min-height: 48px; + padding: 0px 16px; +} + +:host > ::content > *:not(:first-child):not(:last-child) { + margin-right: 16px; +} diff --git a/third_party/polymer/v0_8/components/paper-item/paper-item.html b/third_party/polymer/v0_8/components/paper-item/paper-item.html new file mode 100644 index 0000000..d9996de --- /dev/null +++ b/third_party/polymer/v0_8/components/paper-item/paper-item.html @@ -0,0 +1,60 @@ +<!-- + @license + Copyright (c) 2015 The Polymer Project Authors. All rights reserved. + This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt + The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt + The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt + Code distributed by Google as part of the polymer project is also + subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +--> + +<link rel="import" href="../polymer/polymer.html"> +<link rel="import" href="../paper-styles/paper-styles.html"> + +<!-- +`paper-item` is a non-interactive list item. + +@element paper-item +--> + +<dom-module id="paper-item"> + + <link rel="import" type="css" href="paper-item-shared.css"> + + <style> + + :host { + mixin(--layout-horizontal); + mixin(--layout-center); + mixin(--paper-font-subhead); + + mixin(--paper-item); + } + + </style> + + <template> + <content></content> + </template> + +</dom-module> + +<script> + +(function() { + + Polymer({ + + is: 'paper-item', + + enableCustomStyleProperties: true, + + hostAttributes: { + role: 'listitem' + } + + }); + +})(); + +</script> diff --git a/third_party/polymer/v0_8/components/paper-menu/.bower.json b/third_party/polymer/v0_8/components/paper-menu/.bower.json index 3bb8166..7f5e3fb 100644 --- a/third_party/polymer/v0_8/components/paper-menu/.bower.json +++ b/third_party/polymer/v0_8/components/paper-menu/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-menu", - "version": "0.8.2", + "version": "0.8.3", "authors": "The Polymer Authors", "keywords": [ "web-components", @@ -18,7 +18,7 @@ "ignore": [], "dependencies": { "polymer": "Polymer/polymer#v0.8.0-rc.7", - "iron-selector": "PolymerElements/iron-selector#^0.8.0", + "iron-menu-behavior": "PolymerElements/iron-menu-behavior#^0.8.0", "paper-styles": "PolymerElements/paper-styles#^0.8.0" }, "devDependencies": { @@ -28,11 +28,11 @@ "web-component-tester": "Polymer/web-component-tester#^2.2.0", "webcomponentsjs": "Polymer/webcomponentsjs#^0.6.0" }, - "_release": "0.8.2", + "_release": "0.8.3", "_resolution": { "type": "version", - "tag": "v0.8.2", - "commit": "a10381891339cb021d1215bd3bcf0eb96251acd9" + "tag": "v0.8.3", + "commit": "23566fd8054fe8a162972ba98dd2a6fcb58e8e2d" }, "_source": "git://github.com/PolymerElements/paper-menu.git", "_target": "^0.8.0", diff --git a/third_party/polymer/v0_8/components/paper-menu/bower.json b/third_party/polymer/v0_8/components/paper-menu/bower.json index 9f5a25e..2d7e615c 100644 --- a/third_party/polymer/v0_8/components/paper-menu/bower.json +++ b/third_party/polymer/v0_8/components/paper-menu/bower.json @@ -18,7 +18,7 @@ "ignore": [], "dependencies": { "polymer": "Polymer/polymer#v0.8.0-rc.7", - "iron-selector": "PolymerElements/iron-selector#^0.8.0", + "iron-menu-behavior": "PolymerElements/iron-menu-behavior#^0.8.0", "paper-styles": "PolymerElements/paper-styles#^0.8.0" }, "devDependencies": { diff --git a/third_party/polymer/v0_8/components/paper-menu/paper-menu.html b/third_party/polymer/v0_8/components/paper-menu/paper-menu.html index c9cf583..a6a4929 100644 --- a/third_party/polymer/v0_8/components/paper-menu/paper-menu.html +++ b/third_party/polymer/v0_8/components/paper-menu/paper-menu.html @@ -9,7 +9,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN --> <link rel="import" href="../polymer/polymer.html"> -<link rel="import" href="../iron-selector/iron-selectable.html"> +<link rel="import" href="../iron-menu-behavior/iron-menu-behavior.html"> <link rel="import" href="../paper-styles/paper-styles.html"> <!-- @@ -21,6 +21,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN <style> :host { + display: block; padding: 8px 0; background: var(--primary-background-color); @@ -38,7 +39,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN } :host > ::content > .iron-selected::after { - mixin(--fit); + mixin(--layout-fit); background: currentColor; /* FIXME move to paper-styles for next widget */ @@ -68,259 +69,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN (function() { - // FIXME menu control should be refactored to a more general element - Polymer({ is: 'paper-menu', enableCustomStyleProperties: true, - mixins: [ - Polymer.Core.Selectable - ], - - properties: { - - /** - * Returns the currently focused item. - * - * @attribute focusedItem - * @type Object - */ - focusedItem: { - observer: 'focusedItemChanged', - readOnly: true, - type: Object - }, - - /** - * The attribute to use on menu items to look up the item title. Typing the first - * letter of an item when the menu is open focuses that item. If unset, `textContent` - * will be used. - * - * @attribute attrForItemTitle - * @type String - */ - attrForItemTitle: { - type: String - }, - - /***********************************************************************/ - /* Polymer.Core.Selectable */ - /***********************************************************************/ - - /** - * If you want to use the attribute value of an element for `selected` instead of the index, - * set this to the name of the attribute. - * - * @attribute attrForSelected - * @type String - */ - attrForSelected: { - type: String - }, - - /** - * If true, multiple selections are allowed. - * - * @attribute multi - * @type Boolean - * @default false - */ - multi: { - observer: 'multiChanged', - type: Boolean, - value: false - }, - - /** - * Gets or sets the selected element. The default is to use the index of the item. In - * multi-selection this should be an array of values. - * - * @attribute selected - * @type String|Array - */ - selected: { - notify: true, - observer: 'selectedChanged', - type: String - }, - - /** - * Returns the currently selected item. In multi-selection this returns an array of - * selected items. - * - * @attribute selectedItem - * @type Object|Array - */ - selectedItem: { - notify: true, - observer: 'selectedItemChanged', - readOnly: true, - type: Object - }, - - /** - * The event that would be fired from the item to indicate it is being selected. Set this - * to empty string or null if you don't want to listen for any events. - * - * @attribute activateEvent - * @type String - * @default 'click' - */ - activateEvent: { - observer: 'activateEventChanged', - type: String, - value: 'click' - }, - - /** - * If this is set, only items with local name that matches the `selectable` are selectable. - * - * @attribute selectable - * @type String - */ - selectable: { - type: String - } - - }, - - hostAttributes: { - 'role': 'menu', - 'tabindex': '0' - }, - - listeners: { - 'focus': 'onFocus', - 'keydown': 'onKeydown' - }, - - created: function() { - this._bindActivateHandler = this.activateHandler.bind(this); - }, - - attached: function() { - this.selectableAttached(); - }, - - detached: function() { - this.selectableDetached(); - this.removeListener(this.activateEvent); - }, - - addListener: function(eventName) { - if (eventName) { - this.addEventListener(eventName, this._bindActivateHandler); - } - }, - - removeListener: function(eventName) { - if (eventName) { - this.removeEventListener(eventName, this._bindActivateHandler); - } - }, - - activateEventChanged: function(eventName, old) { - this.removeListener(old); - this.addListener(eventName); - }, - - focusedItemChanged: function(focusedItem, old) { - old && old.setAttribute('tabindex', '-1'); - if (focusedItem) { - focusedItem.setAttribute('tabindex', '0'); - focusedItem.focus(); - } - }, - - multiChanged: function(multi) { - this.selection.multi = multi; - this.selectedChanged(this.selected); - }, - - selectedChanged: function(selected, old) { - this._selectedChanged(selected, old); - }, - - selectedItemChanged: function(selectedItem) { - this._setFocusedItem(Array.isArray(selectedItem) ? selectedItem[0] : selectedItem); - }, - - activateHandler: function(e) { - var t = e.target; - var items = this.items; - while (t && t != this) { - var i = items.indexOf(t); - if (i >= 0) { - if (t.hasAttribute('disabled')) { - return; - } - var value = this.indexToValue(i); - if (!this.fire('iron-activate', {selected: value, item: t}).defaultPrevented) { - this.select(value); - } - return; - } - t = t.parentNode; - } - }, - - onFocus: function(event) { - // clear the cached focus item - this._setFocusedItem(null); - // focus the selected item when the menu receives focus, or the first item - // if no item is selected - var selectedItem = this.selectedItem; - selectedItem = Array.isArray(selectedItem) ? selectedItem[0] : selectedItem; - if (selectedItem) { - this._setFocusedItem(selectedItem); - } else { - this._setFocusedItem(this.items[0]); - } - }, - - onKeydown: function(event) { - // FIXME want to define these somewhere, core-a11y-keys? - var DOWN = 40; - var UP = 38; - var ESC = 27; - var ENTER = 13; - if (event.keyCode === DOWN) { - // up and down arrows moves the focus - this.focusNext(); - } else if (event.keyCode === UP) { - this.focusPrevious(); - } else if (event.keyCode === ESC) { - // esc blurs the control - this.focusedItem.blur(); - } else if (event.keyCode === ENTER) { - // enter activates the item - this.activateHandler(event); - } else { - // all other keys focus the menu item starting with that character - for (var i = 0, item; item = this.items[i]; i++) { - var attr = this.attrForItemTitle || 'textContent'; - var title = item[attr] || item.getAttribute(attr); - if (title && title.charAt(0).toLowerCase() === String.fromCharCode(event.keyCode).toLowerCase()) { - this._setFocusedItem(item); - break; - } - } - } - }, - - focusPrevious: function() { - var length = this.items.length; - var index = (Number(this.indexOf(this.focusedItem)) - 1 + length) % length; - this._setFocusedItem(this.items[index]); - }, - - focusNext: function() { - var index = (Number(this.indexOf(this.focusedItem)) + 1) % this.items.length; - this._setFocusedItem(this.items[index]); - } + behaviors: [ + Polymer.IronMenuBehavior + ] }); |