diff options
author | michaelpg <michaelpg@chromium.org> | 2015-09-23 16:44:36 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-23 23:45:28 +0000 |
commit | e7cff0cfc5d68cb766d47c4ac0976de3037ce562 (patch) | |
tree | 553c8a32ea8a88add8bfad9c58c2c83c4ae15fa3 | |
parent | 8ea749580e0a44f10d4c339517385e4aac528cb4 (diff) | |
download | chromium_src-e7cff0cfc5d68cb766d47c4ac0976de3037ce562.zip chromium_src-e7cff0cfc5d68cb766d47c4ac0976de3037ce562.tar.gz chromium_src-e7cff0cfc5d68cb766d47c4ac0976de3037ce562.tar.bz2 |
Update Polymer
BUG=425627
Review URL: https://codereview.chromium.org/1363853002
Cr-Commit-Position: refs/heads/master@{#350393}
20 files changed, 408 insertions, 250 deletions
diff --git a/third_party/polymer/v1_0/components-chromium/iron-dropdown/.bower.json b/third_party/polymer/v1_0/components-chromium/iron-dropdown/.bower.json index 07d2c6b..97901cf 100644 --- a/third_party/polymer/v1_0/components-chromium/iron-dropdown/.bower.json +++ b/third_party/polymer/v1_0/components-chromium/iron-dropdown/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-dropdown", - "version": "1.0.5", + "version": "1.0.6", "description": "", "authors": [ "The Polymer Authors" @@ -35,11 +35,11 @@ "web-component-tester": "*", "iron-image": "polymerelements/iron-image#^1.0.0" }, - "_release": "1.0.5", + "_release": "1.0.6", "_resolution": { "type": "version", - "tag": "v1.0.5", - "commit": "9c300a14a5aeca1c02f085e9117521af814ce640" + "tag": "v1.0.6", + "commit": "9b52ccb37577b0e4b3d34f3795117d95648b39ff" }, "_source": "git://github.com/PolymerElements/iron-dropdown.git", "_target": "^1.0.0", diff --git a/third_party/polymer/v1_0/components-chromium/iron-dropdown/bower.json b/third_party/polymer/v1_0/components-chromium/iron-dropdown/bower.json index c80ae15..3ff762f 100644 --- a/third_party/polymer/v1_0/components-chromium/iron-dropdown/bower.json +++ b/third_party/polymer/v1_0/components-chromium/iron-dropdown/bower.json @@ -1,6 +1,6 @@ { "name": "iron-dropdown", - "version": "1.0.5", + "version": "1.0.6", "description": "", "authors": [ "The Polymer Authors" diff --git a/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js index 4423a42..ee5d0ff5 100644 --- a/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js +++ b/third_party/polymer/v1_0/components-chromium/iron-dropdown/iron-dropdown-extracted.js @@ -98,6 +98,17 @@ }, /** + * By default, the dropdown will constrain scrolling on the page + * to itself when opened. + * Set to true in order to prevent scroll from being constrained + * to the dropdown when it opens. + */ + allowOutsideScroll: { + type: Boolean, + value: false + }, + + /** * We memoize the positionTarget bounding rectangle so that we can * limit the number of times it is queried per resize / relayout. * @type {?Object} @@ -217,7 +228,10 @@ * Overridden from `IronOverlayBehavior`. */ _renderOpened: function() { - Polymer.IronDropdownScrollManager.pushScrollLock(this); + if (!this.allowOutsideScroll) { + Polymer.IronDropdownScrollManager.pushScrollLock(this); + } + if (!this.noAnimations && this.animationConfig && this.animationConfig.open) { this.$.contentWrapper.classList.add('animating'); this.playAnimation('open'); diff --git a/third_party/polymer/v1_0/components-chromium/iron-selector/.bower.json b/third_party/polymer/v1_0/components-chromium/iron-selector/.bower.json index 85d168e..07c5145 100644 --- a/third_party/polymer/v1_0/components-chromium/iron-selector/.bower.json +++ b/third_party/polymer/v1_0/components-chromium/iron-selector/.bower.json @@ -1,6 +1,6 @@ { "name": "iron-selector", - "version": "1.0.3", + "version": "1.0.4", "description": "Manages a set of elements that can be selected", "private": true, "license": "http://polymer.github.io/LICENSE.txt", @@ -31,11 +31,11 @@ "web-component-tester": "*", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.0.3", + "_release": "1.0.4", "_resolution": { "type": "version", - "tag": "v1.0.3", - "commit": "d93b02871f790b6bcb1fff52f24757e9c2eb04a5" + "tag": "v1.0.4", + "commit": "2af8ee5b7cd489bca7d4689c563b82fd356a9534" }, "_source": "git://github.com/PolymerElements/iron-selector.git", "_target": "^1.0.0", diff --git a/third_party/polymer/v1_0/components-chromium/iron-selector/bower.json b/third_party/polymer/v1_0/components-chromium/iron-selector/bower.json index 25324a6..1cf5a26 100644 --- a/third_party/polymer/v1_0/components-chromium/iron-selector/bower.json +++ b/third_party/polymer/v1_0/components-chromium/iron-selector/bower.json @@ -1,6 +1,6 @@ { "name": "iron-selector", - "version": "1.0.3", + "version": "1.0.4", "description": "Manages a set of elements that can be selected", "private": true, "license": "http://polymer.github.io/LICENSE.txt", diff --git a/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js b/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js index 5c1031b..6157fa1 100644 --- a/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js +++ b/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js @@ -4,34 +4,38 @@ Polymer.IronSelectableBehavior = { /** - * Fired when iron-selector is activated (selected or deselected). - * It is fired before the selected items are changed. - * Cancel the event to abort selection. + * Fired when iron-selector is activated (selected or deselected). + * It is fired before the selected items are changed. + * Cancel the event to abort selection. * * @event iron-activate - * - **/ + */ + /** - * Fired when an item is selected + * Fired when an item is selected * * @event iron-select - * - **/ + */ + /** - * Fired when an item is deselected + * Fired when an item is deselected * * @event iron-deselect + */ + + /** + * Fired when the list of selectable items changes (e.g., items are + * added or removed). The detail of the event is a list of mutation + * records that describe what changed. * - **/ + * @event iron-items-changed + */ properties: { /** * 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, @@ -40,9 +44,6 @@ /** * Gets or sets the selected element. The default is to use the index of the item. - * - * @attribute selected - * @type {string} */ selected: { type: String, @@ -51,9 +52,6 @@ /** * Returns the currently selected item. - * - * @attribute selectedItem - * @type {Object} */ selectedItem: { type: Object, @@ -65,10 +63,6 @@ * The event that fires from items when they are selected. Selectable * will listen for this event from items and update the selection state. * Set to empty string to listen to no events. - * - * @attribute activateEvent - * @type {string} - * @default 'tap' */ activateEvent: { type: String, @@ -79,17 +73,11 @@ /** * This is a CSS selector string. If this is set, only items that match the CSS selector * are selectable. - * - * @attribute selectable - * @type {string} */ selectable: String, /** * The class to set on elements when selected. - * - * @attribute selectedClass - * @type {string} */ selectedClass: { type: String, @@ -98,9 +86,6 @@ /** * The attribute to set on elements when selected. - * - * @attribute selectedAttribute - * @type {string} */ selectedAttribute: { type: String, @@ -111,10 +96,8 @@ * The set of excluded elements where the key is the `localName` * of the element that will be ignored from the item list. * - * @type {object} * @default {template: 1} */ - excludedLocalNames: { type: Object, value: function() { @@ -283,7 +266,15 @@ // observe items change under the given node. _observeItems: function(node) { - var observer = new MutationObserver(function() { + // TODO(cdata): Update this when we get distributed children changed. + var observer = new MutationObserver(function(mutations) { + // Let other interested parties know about the change so that + // we don't have to recreate mutation observers everywher. + this.fire('iron-items-changed', mutations, { + bubbles: false, + cancelable: false + }); + if (this.selected != null) { this._updateSelected(); } diff --git a/third_party/polymer/v1_0/components-chromium/paper-button/.bower.json b/third_party/polymer/v1_0/components-chromium/paper-button/.bower.json index d9ac079..458b2a3 100644 --- a/third_party/polymer/v1_0/components-chromium/paper-button/.bower.json +++ b/third_party/polymer/v1_0/components-chromium/paper-button/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-button", - "version": "1.0.4", + "version": "1.0.6", "description": "Material design button", "authors": [ "The Polymer Authors" @@ -24,7 +24,8 @@ "polymer": "Polymer/polymer#^1.1.0", "paper-ripple": "polymerelements/paper-ripple#^1.0.0", "paper-material": "polymerelements/paper-material#^1.0.0", - "paper-behaviors": "polymerelements/paper-behaviors#^1.0.0" + "paper-behaviors": "polymerelements/paper-behaviors#^1.0.0", + "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0" }, "devDependencies": { "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", @@ -36,11 +37,11 @@ "iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0", "paper-styles": "polymerelements/paper-styles#^1.0.0" }, - "_release": "1.0.4", + "_release": "1.0.6", "_resolution": { "type": "version", - "tag": "v1.0.4", - "commit": "402fffc8bad25ea7c3135f2e5997ad00765a2d61" + "tag": "v1.0.6", + "commit": "b70c4a22cbe3617d4a7717fe27ba68edd0d0c04f" }, "_source": "git://github.com/PolymerElements/paper-button.git", "_target": "^1.0.0", diff --git a/third_party/polymer/v1_0/components-chromium/paper-button/README.md b/third_party/polymer/v1_0/components-chromium/paper-button/README.md index 035b004..5c49a90 100644 --- a/third_party/polymer/v1_0/components-chromium/paper-button/README.md +++ b/third_party/polymer/v1_0/components-chromium/paper-button/README.md @@ -13,33 +13,12 @@ Example: <paper-button raised>raised button</paper-button> <paper-button noink>No ripple effect</paper-button> ``` -You may use custom DOM in the button body to create a variety of buttons. For example, to -create a button with an icon and some text: -```html +You may use custom DOM in the button body to create a variety of buttons. For example, to create a button with an icon and some text: + +```html <paper-button> <iron-icon icon="favorite"></iron-icon> custom button content </paper-button> ``` -## Styling - -Style the button with CSS as you would a normal DOM element. - -```css - /* make #my-button green with yellow text */ - #my-button { - background: green; - color: yellow; - } -``` -By default, the ripple is the same color as the foreground at 25% opacity. You may -customize the color using this selector: - -```css - /* make #my-button use a blue ripple instead of foreground color */ - #my-button::shadow paper-ripple { - color: blue; - } -``` -The opacity of the ripple is not customizable via CSS. diff --git a/third_party/polymer/v1_0/components-chromium/paper-button/bower.json b/third_party/polymer/v1_0/components-chromium/paper-button/bower.json index 2560658..5a9599c 100644 --- a/third_party/polymer/v1_0/components-chromium/paper-button/bower.json +++ b/third_party/polymer/v1_0/components-chromium/paper-button/bower.json @@ -1,6 +1,6 @@ { "name": "paper-button", - "version": "1.0.4", + "version": "1.0.6", "description": "Material design button", "authors": [ "The Polymer Authors" @@ -24,7 +24,8 @@ "polymer": "Polymer/polymer#^1.1.0", "paper-ripple": "polymerelements/paper-ripple#^1.0.0", "paper-material": "polymerelements/paper-material#^1.0.0", - "paper-behaviors": "polymerelements/paper-behaviors#^1.0.0" + "paper-behaviors": "polymerelements/paper-behaviors#^1.0.0", + "iron-flex-layout": "polymerelements/iron-flex-layout#^1.0.0" }, "devDependencies": { "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", diff --git a/third_party/polymer/v1_0/components-chromium/paper-button/paper-button.html b/third_party/polymer/v1_0/components-chromium/paper-button/paper-button.html index 5010e20..3463659 100644 --- a/third_party/polymer/v1_0/components-chromium/paper-button/paper-button.html +++ b/third_party/polymer/v1_0/components-chromium/paper-button/paper-button.html @@ -10,6 +10,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN <link rel="import" href="../paper-material/paper-material.html"> <link rel="import" href="../paper-ripple/paper-ripple.html"> <link rel="import" href="../paper-behaviors/paper-button-behavior.html"> +<link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> <!-- @@ -21,10 +22,10 @@ shadow. Example: - <paper-button>flat button</paper-button> - <paper-button raised>raised button</paper-button> + <paper-button>Flat button</paper-button> + <paper-button raised>Raised button</paper-button> <paper-button noink>No ripple effect</paper-button> - <paper-button toggles>toggle-able button</paper-button> + <paper-button toggles>Toggle-able button</paper-button> A button that has `toggles` true will remain `active` after being clicked (and will have an `active` attribute set). For more information, see the `Polymer.IronButtonState` @@ -42,29 +43,32 @@ create a button with an icon and some text: Style the button with CSS as you would a normal DOM element. - /* make #my-button green with yellow text */ - #my-button { - background: green; - color: yellow; + paper-button.fancy { + background: green; + color: yellow; } -By default, the ripple is the same color as the foreground at 25% opacity. You may -customize the color using this selector: + paper-button.fancy:hover { + background: lime; + } - /* make #my-button use a blue ripple instead of foreground color */ - #my-button::shadow paper-ripple { - color: blue; + paper-button[disabled], + paper-button[toggles][active] { + background: red; } -The opacity of the ripple is not customizable via CSS. +By default, the ripple is the same color as the foreground at 25% opacity. You may +customize the color using the `--paper-button-ink-color` custom property. The following custom properties and mixins are also available for styling: Custom property | Description | Default ----------------|-------------|---------- -`--paper-button-flat-focus-color` | Background color of a focused flat button | `--paper-grey-200` +`--paper-button-ink-color` | Background color of the ripple | `Based on the button's color` `--paper-button` | Mixin applied to the button | `{}` -`--paper-button-disabled` | Mixin applied to the disabled button | `{}` +`--paper-button-disabled` | Mixin applied to the disabled button. Note that you can also use the `paper-button[disabled]` selector | `{}` +`--paper-button-flat-keyboard-focus` | Mixin applied to a flat button after it's been focused using the keyboard | `{}` +`--paper-button-raised-keyboard-focus` | Mixin applied to a raised button after it's been focused using the keyboard | `{}` @demo demo/index.html --> @@ -91,12 +95,19 @@ Custom property | Description | Default user-select: none; cursor: pointer; z-index: 0; + padding: 0.7em 0.57em; @apply(--paper-button); } - .keyboard-focus { + :host([raised]) .keyboard-focus { + font-weight: bold; + @apply(--paper-button-raised-keyboard-focus); + } + + :host(:not([raised])) .keyboard-focus { font-weight: bold; + @apply(--paper-button-flat-keyboard-focus); } :host([disabled]) { @@ -112,24 +123,25 @@ Custom property | Description | Default display: none; } + paper-ripple { + color: var(--paper-button-ink-color); + } + paper-material { border-radius: inherit; + @apply(--layout-fit); } .content > ::content * { text-transform: inherit; } - - .content { - padding: 0.7em 0.57em - } </style> <paper-ripple></paper-ripple> - <paper-material class$="[[_computeContentClass(receivedFocusFromKeyboard)]]" elevation="[[_elevation]]" animated=""> - <content></content> - </paper-material> + <paper-material class$="[[_computeContentClass(receivedFocusFromKeyboard)]]" elevation="[[_elevation]]" animated=""></paper-material> + + <content></content> </template> </dom-module> diff --git a/third_party/polymer/v1_0/components-chromium/paper-radio-button/.bower.json b/third_party/polymer/v1_0/components-chromium/paper-radio-button/.bower.json index 0fc7a19..8d43e36 100644 --- a/third_party/polymer/v1_0/components-chromium/paper-radio-button/.bower.json +++ b/third_party/polymer/v1_0/components-chromium/paper-radio-button/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-radio-button", - "version": "1.0.7", + "version": "1.0.8", "description": "A material design radio button", "authors": [ "The Polymer Authors" @@ -24,7 +24,7 @@ "paper-styles": "PolymerLabs/paper-styles#^1.0.0", "paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0", "iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0", - "polymer": "Polymer/polymer#^1.0.0" + "polymer": "Polymer/polymer#^1.1.0" }, "devDependencies": { "web-component-tester": "Polymer/web-component-tester#^3.3.0", @@ -33,11 +33,11 @@ "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0" }, - "_release": "1.0.7", + "_release": "1.0.8", "_resolution": { "type": "version", - "tag": "v1.0.7", - "commit": "63a78475ecc28dfbc849e63001f0c8d001811e44" + "tag": "v1.0.8", + "commit": "f6fcf203775984877bd97393ac4a9cb2da45597b" }, "_source": "git://github.com/PolymerElements/paper-radio-button.git", "_target": "^1.0.0", diff --git a/third_party/polymer/v1_0/components-chromium/paper-radio-button/bower.json b/third_party/polymer/v1_0/components-chromium/paper-radio-button/bower.json index 2e406ff..67b4e35 100644 --- a/third_party/polymer/v1_0/components-chromium/paper-radio-button/bower.json +++ b/third_party/polymer/v1_0/components-chromium/paper-radio-button/bower.json @@ -1,6 +1,6 @@ { "name": "paper-radio-button", - "version": "1.0.7", + "version": "1.0.8", "description": "A material design radio button", "authors": [ "The Polymer Authors" @@ -24,7 +24,7 @@ "paper-styles": "PolymerLabs/paper-styles#^1.0.0", "paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0", "iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0", - "polymer": "Polymer/polymer#^1.0.0" + "polymer": "Polymer/polymer#^1.1.0" }, "devDependencies": { "web-component-tester": "Polymer/web-component-tester#^3.3.0", diff --git a/third_party/polymer/v1_0/components-chromium/paper-radio-button/paper-radio-button.css b/third_party/polymer/v1_0/components-chromium/paper-radio-button/paper-radio-button.css deleted file mode 100644 index 9ae301e..0000000 --- a/third_party/polymer/v1_0/components-chromium/paper-radio-button/paper-radio-button.css +++ /dev/null @@ -1,114 +0,0 @@ -/** -@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: inline-block; - white-space: nowrap; -} - -:host(:focus) { - outline: none; -} - -#radioContainer { - display: inline-block; - position: relative; - width: 16px; - height: 16px; - cursor: pointer; - vertical-align: middle; -} - -:host #ink { - position: absolute; - top: -16px; - left: -16px; - width: 48px; - height: 48px; - color: var(--paper-radio-button-unchecked-ink-color, --primary-text-color); - opacity: 0.6; - pointer-events: none; -} - -:host #ink[checked] { - color: var(--paper-radio-button-checked-ink-color, --default-primary-color); -} - -:host #offRadio { - position: absolute; - box-sizing: content-box; - top: 0px; - left: 0px; - width: 12px; - height: 12px; - border-radius: 50%; - border: solid 2px; - background-color: var(--paper-radio-button-unchecked-background-color, transparent); - border-color: var(--paper-radio-button-unchecked-color, --primary-text-color); - transition: border-color 0.28s; -} - -:host #onRadio { - position: absolute; - box-sizing: content-box; - top: 4px; - left: 4px; - width: 8px; - height: 8px; - border-radius: 50%; - background-color: var(--paper-radio-button-checked-color, --default-primary-color); - -webkit-transform: scale(0); - transform: scale(0); - transition: -webkit-transform ease 0.28s; - transition: transform ease 0.28s; -} - -:host([checked]) #offRadio { - border-color: var(--paper-radio-button-checked-color, --default-primary-color); -} - -:host([checked]) #onRadio { - -webkit-transform: scale(1); - transform: scale(1); -} - -#radioLabel { - position: relative; - display: inline-block; - vertical-align: middle; - margin-left: 10px; - white-space: normal; - pointer-events: none; - color: var(--paper-radio-button-label-color, --primary-text-color); -} - -#radioLabel[hidden] { - display: none; -} - -/* disabled state */ -:host([disabled]) { - pointer-events: none; -} - -:host([disabled]) #offRadio { - border-color: var(--paper-radio-button-unchecked-color, --primary-text-color); - opacity: 0.5; -} - -:host([disabled][checked]) #onRadio { - background-color: var(--paper-radio-button-unchecked-color, --primary-text-color); - opacity: 0.5; -} - -:host([disabled]) #radioLabel { - /* slightly darker than the button, so that it's readable */ - opacity: 0.65; -} diff --git a/third_party/polymer/v1_0/components-chromium/paper-radio-button/paper-radio-button.html b/third_party/polymer/v1_0/components-chromium/paper-radio-button/paper-radio-button.html index ed51ccd..0e53219 100644 --- a/third_party/polymer/v1_0/components-chromium/paper-radio-button/paper-radio-button.html +++ b/third_party/polymer/v1_0/components-chromium/paper-radio-button/paper-radio-button.html @@ -44,10 +44,113 @@ Custom property | Description | Default --> </head><body><dom-module id="paper-radio-button"> + <template> + <style> + :host { + display: inline-block; + white-space: nowrap; + } - <link rel="import" type="css" href="paper-radio-button.css"> + :host(:focus) { + outline: none; + } - <template> + #radioContainer { + display: inline-block; + position: relative; + width: 16px; + height: 16px; + cursor: pointer; + vertical-align: middle; + } + + :host #ink { + position: absolute; + top: -16px; + left: -16px; + width: 48px; + height: 48px; + color: var(--paper-radio-button-unchecked-ink-color, --primary-text-color); + opacity: 0.6; + pointer-events: none; + } + + :host #ink[checked] { + color: var(--paper-radio-button-checked-ink-color, --default-primary-color); + } + + :host #offRadio { + position: absolute; + box-sizing: content-box; + top: 0px; + left: 0px; + width: 12px; + height: 12px; + border-radius: 50%; + border: solid 2px; + background-color: var(--paper-radio-button-unchecked-background-color, transparent); + border-color: var(--paper-radio-button-unchecked-color, --primary-text-color); + transition: border-color 0.28s; + } + + :host #onRadio { + position: absolute; + box-sizing: content-box; + top: 4px; + left: 4px; + width: 8px; + height: 8px; + border-radius: 50%; + background-color: var(--paper-radio-button-checked-color, --default-primary-color); + -webkit-transform: scale(0); + transform: scale(0); + transition: -webkit-transform ease 0.28s; + transition: transform ease 0.28s; + } + + :host([checked]) #offRadio { + border-color: var(--paper-radio-button-checked-color, --default-primary-color); + } + + :host([checked]) #onRadio { + -webkit-transform: scale(1); + transform: scale(1); + } + + #radioLabel { + position: relative; + display: inline-block; + vertical-align: middle; + margin-left: 10px; + white-space: normal; + pointer-events: none; + color: var(--paper-radio-button-label-color, --primary-text-color); + } + + #radioLabel[hidden] { + display: none; + } + + /* disabled state */ + :host([disabled]) { + pointer-events: none; + } + + :host([disabled]) #offRadio { + border-color: var(--paper-radio-button-unchecked-color, --primary-text-color); + opacity: 0.5; + } + + :host([disabled][checked]) #onRadio { + background-color: var(--paper-radio-button-unchecked-color, --primary-text-color); + opacity: 0.5; + } + + :host([disabled]) #radioLabel { + /* slightly darker than the button, so that it's readable */ + opacity: 0.65; + } + </style> <div id="radioContainer"> <div id="offRadio"></div> diff --git a/third_party/polymer/v1_0/components-chromium/paper-toggle-button/.bower.json b/third_party/polymer/v1_0/components-chromium/paper-toggle-button/.bower.json index 59d8a16..336aa89 100644 --- a/third_party/polymer/v1_0/components-chromium/paper-toggle-button/.bower.json +++ b/third_party/polymer/v1_0/components-chromium/paper-toggle-button/.bower.json @@ -1,6 +1,6 @@ { "name": "paper-toggle-button", - "version": "1.0.7", + "version": "1.0.8", "description": "A material design toggle button control", "authors": [ "The Polymer Authors" @@ -34,11 +34,11 @@ "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0", "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0" }, - "_release": "1.0.7", + "_release": "1.0.8", "_resolution": { "type": "version", - "tag": "v1.0.7", - "commit": "9abc8568d25c83c77394d141b82ff1630649ee7c" + "tag": "v1.0.8", + "commit": "b1630a0597b9d55d09396c8636daf443890a46df" }, "_source": "git://github.com/PolymerElements/paper-toggle-button.git", "_target": "^1.0.0", diff --git a/third_party/polymer/v1_0/components-chromium/paper-toggle-button/bower.json b/third_party/polymer/v1_0/components-chromium/paper-toggle-button/bower.json index 6053241..9c9107b 100644 --- a/third_party/polymer/v1_0/components-chromium/paper-toggle-button/bower.json +++ b/third_party/polymer/v1_0/components-chromium/paper-toggle-button/bower.json @@ -1,6 +1,6 @@ { "name": "paper-toggle-button", - "version": "1.0.7", + "version": "1.0.8", "description": "A material design toggle button control", "authors": [ "The Polymer Authors" diff --git a/third_party/polymer/v1_0/components-chromium/paper-toggle-button/paper-toggle-button.html b/third_party/polymer/v1_0/components-chromium/paper-toggle-button/paper-toggle-button.html index 4c5b2fe..4bc9ed3 100644 --- a/third_party/polymer/v1_0/components-chromium/paper-toggle-button/paper-toggle-button.html +++ b/third_party/polymer/v1_0/components-chromium/paper-toggle-button/paper-toggle-button.html @@ -96,7 +96,7 @@ Custom property | Description | Default height: 14px; } - #toggleBar { + .toggle-bar { position: absolute; height: 100%; width: 100%; @@ -106,16 +106,16 @@ Custom property | Description | Default transition: background-color linear .08s; } - :host([checked]) #toggleBar { + :host([checked]) .toggle-bar { opacity: 0.5; } - :host([disabled]) #toggleBar { + :host([disabled]) .toggle-bar { background-color: #000; opacity: 0.12; } - #toggleButton { + .toggle-button { position: absolute; top: -3px; height: 20px; @@ -127,22 +127,22 @@ Custom property | Description | Default will-change: transform; } - #toggleButton.dragging { + .toggle-button.dragging { -webkit-transition: none; transition: none; } - :host([checked]) #toggleButton { + :host([checked]) .toggle-button { -webkit-transform: translate(16px, 0); transform: translate(16px, 0); } - :host([disabled]) #toggleButton { + :host([disabled]) .toggle-button { background-color: #bdbdbd; opacity: 1; } - #ink { + .toggle-ink { position: absolute; top: -14px; left: -14px; diff --git a/third_party/polymer/v1_0/components-chromium/polymer-externs/.bower.json b/third_party/polymer/v1_0/components-chromium/polymer-externs/.bower.json index fad56f9..686b17f 100644 --- a/third_party/polymer/v1_0/components-chromium/polymer-externs/.bower.json +++ b/third_party/polymer/v1_0/components-chromium/polymer-externs/.bower.json @@ -1,12 +1,12 @@ { "name": "polymer-externs", "homepage": "https://github.com/PolymerLabs/polymer-externs", - "version": "1.0.9", - "_release": "1.0.9", + "version": "1.0.10", + "_release": "1.0.10", "_resolution": { "type": "version", - "tag": "v1.0.9", - "commit": "7bc8688bbd33aa5f073c50175f4e5a3ca668f2df" + "tag": "v1.0.10", + "commit": "19b6a1153879dd0c4afc557d7eef23107fc1c7aa" }, "_source": "git://github.com/PolymerLabs/polymer-externs.git", "_target": "^1.0.0", diff --git a/third_party/polymer/v1_0/components-chromium/polymer-externs/polymer.externs.js b/third_party/polymer/v1_0/components-chromium/polymer-externs/polymer.externs.js index 293a41c..4c3b2da 100644 --- a/third_party/polymer/v1_0/components-chromium/polymer-externs/polymer.externs.js +++ b/third_party/polymer/v1_0/components-chromium/polymer-externs/polymer.externs.js @@ -122,8 +122,12 @@ PolymerElement.prototype.domHost; * Notifies the event binding system of a change to a property. * @param {string} path The path to set. * @param {*} value The value to send in the update notification. + * @param {boolean=} fromAbove When true, specifies that the change came from + * above this element and thus upward notification is not necessary. + * @return {boolean} True if notification actually took place, based on a dirty + * check of whether the new value was already known. */ -PolymerElement.prototype.notifyPath = function(path, value) {}; +PolymerElement.prototype.notifyPath = function(path, value, fromAbove) {}; /** * Convienence method for setting a value to a path and notifying any @@ -354,7 +358,7 @@ Polymer.Gestures; /** * Gets the original target of the given event. - * + * * Cheaper than Polymer.dom(ev).path[0]; * See https://github.com/Polymer/polymer/blob/master/src/standard/gestures.html#L191 * @@ -426,8 +430,10 @@ PolymerElement.prototype.importHref = function(href, onload, onerror) {}; /** * Delete an element from an array. - * @param {!Array} array - * @param {*} item + * @param {!Array|string} array Path to array from which to remove the item (or + * the array itself). + * @param {*} item Item to remove + * @return {!Array} The array with the item removed. */ PolymerElement.prototype.arrayDelete = function(array, item) {}; @@ -447,8 +453,8 @@ PolymerElement.prototype.resolveUrl = function(url) {}; * on this explicit signal from the user to indicate when changes have * been made that affect the values of custom properties. * - * @param {Object=} properties Properties object which, if provided is mixed - * into the element's `customStyle` property. This argument provides a + * @param {Object=} properties Properties object which, if provided is mixed + * into the element's `customStyle` property. This argument provides a * shortcut for setting `customStyle` and then calling `updateStyles`. */ PolymerElement.prototype.updateStyles = function(properties) {}; @@ -623,6 +629,73 @@ Polymer.CaseMap.camelToDashCase = function(camel) {}; /** + * A Polymer data structure abstraction. + * + * @param {?Array} userArray + * @constructor + */ +Polymer.Collection = function(userArray) {}; + +Polymer.Collection.prototype.initMap = function() {}; + +/** + * @param {*} item + */ +Polymer.Collection.prototype.add = function(item) {}; + +/** + * @param {number|string} key + */ +Polymer.Collection.prototype.removeKey = function(key) {}; + +/** + * @param {*} item + * @return {number|string} The key of the item removed. + */ +Polymer.Collection.prototype.remove = function(item) {}; + +/** + * @param {*} item + * @return {number|string} The key of the item. + */ +Polymer.Collection.prototype.getKey = function(item) {}; + +/** + * @return {!Array<number|string>} The key of the item removed. + */ +Polymer.Collection.prototype.getKeys = function() {}; + +/** + * @param {number|string} key + * @param {*} item + */ +Polymer.Collection.prototype.setItem = function(key, item) {}; + +/** + * @param {number|string} key + * @return {*} The item for the given key if present. + */ +Polymer.Collection.prototype.getItem = function(key) {}; + +/** + * @return {!Array} The items in the collection + */ +Polymer.Collection.prototype.getItems = function() {}; + +/** + * @param {!Array} userArray + * @return {!Polymer.Collection} A new Collection wrapping the given array. + */ +Polymer.Collection.get = function(userArray) {}; + +/** + * @param {!Array} userArray + * @param {!Array<!PolymerSplice>} splices + * @return {!Array<!PolymerKeySplice>} KeySplices with added and removed keys + */ +Polymer.Collection.applySplices = function(userArray, splices) {}; + +/** * Settings pulled from * https://github.com/Polymer/polymer/blob/master/src/lib/settings.html */ @@ -655,6 +728,8 @@ Polymer.Settings.useNativeCustomElements; * @polymerBehavior */ Polymer.Templatizer = { + ctor: function() {}, + /** * @param {?Object} model * @return {?Element} @@ -664,10 +739,84 @@ Polymer.Templatizer = { /** * @param {?Element} template */ - templatize: function(template) {} + templatize: function(template) {}, + + /** + * Returns the template "model" associated with a given element, which + * serves as the binding scope for the template instance the element is + * contained in. A template model is an instance of `Polymer.Base`, and + * should be used to manipulate data associated with this template instance. + * + * Example: + * + * var model = modelForElement(el); + * if (model.index < 10) { + * model.set('item.checked', true); + * } + * + * @param {!HTMLElement} el Element for which to return a template model. + * @return {(!PolymerElement)|undefined} Model representing the binding scope for + * the element. + */ + modelForElement: function(el) {} }; + +/** + * A node produced by Templatizer which has a templateInstance property. + * + * @constructor + * @extends {HTMLElement} + */ +var TemplatizerNode = function() {}; + + +/** @type {?PolymerElement} */ +TemplatizerNode.prototype._templateInstance; + + + +/** + * @see https://github.com/Polymer/polymer/blob/master/src/lib/template/array-selector.html + * @extends {PolymerElement} + * @constructor + */ +var ArraySelectorElement = function() {}; + + +/** + * Returns whether the item is currently selected. + * + * @param {*} item Item from `items` array to test + * @return {boolean} Whether the item is selected + */ +ArraySelectorElement.prototype.isSelected = function(item) {}; + + +/** + * Clears the selection state. + */ +ArraySelectorElement.prototype.clearSelection = function() {}; + + +/** + * Deselects the given item if it is already selected. + * + * @param {*} item Item from `items` array to deselect + */ +ArraySelectorElement.prototype.deselect = function(item) {}; + + +/** + * Selects the given item. When `toggle` is true, this will automatically + * deselect the item if already selected. + * + * @param {*} item Item from `items` array to select + */ +ArraySelectorElement.prototype.select = function(item) {}; + + /** * An Event type fired when moving while finger/button is down. * state - a string indicating the tracking state: @@ -710,3 +859,28 @@ var PolymerTrackEvent; * }} */ var PolymerTouchEvent; + +/** + * @typedef {{ + * index: number, + * removed: !Array, + * addedCount: number + * }} + */ +var PolymerSplice; + +/** + * @typedef {{ + * added: !Array<string|number>, + * removed: !Array<string|number> + * }} + */ +var PolymerKeySplice; + +/** + * @typedef {{ + * indexSplices: ?Array<!PolymerSplice>, + * keySplices: ?Array<!PolymerKeySplice> + * }} + */ +var PolymerSpliceChange; diff --git a/ui/webui/resources/polymer_resources.grdp b/ui/webui/resources/polymer_resources.grdp index a0f9d7f..05ffa07 100644 --- a/ui/webui/resources/polymer_resources.grdp +++ b/ui/webui/resources/polymer_resources.grdp @@ -515,9 +515,6 @@ <structure name="IDR_POLYMER_1_0_PAPER_RADIO_BUTTON_PAPER_RADIO_BUTTON_EXTRACTED_JS" file="../../../third_party/polymer/v1_0/components-chromium/paper-radio-button/paper-radio-button-extracted.js" type="chrome_html" /> - <structure name="IDR_POLYMER_1_0_PAPER_RADIO_BUTTON_PAPER_RADIO_BUTTON_CSS" - file="../../../third_party/polymer/v1_0/components-chromium/paper-radio-button/paper-radio-button.css" - type="chrome_html" /> <structure name="IDR_POLYMER_1_0_PAPER_RADIO_BUTTON_PAPER_RADIO_BUTTON_HTML" file="../../../third_party/polymer/v1_0/components-chromium/paper-radio-button/paper-radio-button.html" type="chrome_html" /> |