update polymer
This commit is contained in:
parent
d2bb0d6805
commit
d96a2b7946
28 changed files with 109 additions and 118 deletions
|
@ -29,14 +29,14 @@
|
|||
"web-component-tester": "*",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior",
|
||||
"homepage": "https://github.com/PolymerElements/iron-a11y-keys-behavior",
|
||||
"_release": "1.0.6",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.6",
|
||||
"commit": "af5c98b1cf9b3d180a6326c99ac9c7057eee647f"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git",
|
||||
"_source": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/iron-a11y-keys-behavior"
|
||||
"_originalSource": "PolymerElements/iron-a11y-keys-behavior"
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "iron-iconset-svg",
|
||||
"description": "Manages a set of svg icons",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
|
@ -30,11 +30,11 @@
|
|||
"web-component-tester": "*"
|
||||
},
|
||||
"homepage": "https://github.com/polymerelements/iron-iconset-svg",
|
||||
"_release": "1.0.5",
|
||||
"_release": "1.0.6",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.5",
|
||||
"commit": "54d35698c1e06462452997f8731ea31a4bf1638c"
|
||||
"tag": "v1.0.6",
|
||||
"commit": "ebd17924942abe6110aa0fe81b1b31e1fcc34a9f"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-iconset-svg.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "iron-iconset-svg",
|
||||
"description": "Manages a set of svg icons",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
|
|
|
@ -179,13 +179,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
*/
|
||||
_prepareSvgClone: function(sourceSvg, size) {
|
||||
if (sourceSvg) {
|
||||
var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
||||
svg.setAttribute('viewBox', ['0', '0', size, size].join(' '));
|
||||
var content = sourceSvg.cloneNode(true),
|
||||
svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'),
|
||||
viewBox = content.getAttribute('viewBox') || '0 0 ' + size + ' ' + size;
|
||||
svg.setAttribute('viewBox', viewBox);
|
||||
svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
|
||||
// TODO(dfreedm): `pointer-events: none` works around https://crbug.com/370136
|
||||
// TODO(sjmiles): inline style may not be ideal, but avoids requiring a shadow-root
|
||||
svg.style.cssText = 'pointer-events: none; display: block; width: 100%; height: 100%;';
|
||||
svg.appendChild(sourceSvg.cloneNode(true)).removeAttribute('id');
|
||||
svg.appendChild(content).removeAttribute('id');
|
||||
return svg;
|
||||
}
|
||||
return null;
|
||||
|
|
|
@ -42,6 +42,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<defs>
|
||||
<circle id="circle" cx="20" cy="20" r="10"></circle>
|
||||
<rect id="square" x="0" y="0" width="20" height="20"></rect>
|
||||
<symbol id="rect" viewBox="0 0 50 25">
|
||||
<rect x="0" y="0" width="50" height="25"></rect>
|
||||
</symbol>
|
||||
</defs>
|
||||
</svg>
|
||||
</iron-iconset-svg>
|
||||
|
@ -97,7 +100,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
});
|
||||
|
||||
test('can be queried for all available icons', function () {
|
||||
expect(iconset.getIconNames()).to.deep.eql(['my-icons:circle', 'my-icons:square']);
|
||||
expect(iconset.getIconNames()).to.deep.eql(['my-icons:circle', 'my-icons:square', 'my-icons:rect']);
|
||||
});
|
||||
|
||||
test('supports any icon defined in the svg', function () {
|
||||
|
@ -110,6 +113,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
});
|
||||
});
|
||||
|
||||
test('prefers a viewBox attribute over the iconset size', function () {
|
||||
iconset.applyIcon(div, 'rect');
|
||||
expect(div.firstElementChild.getAttribute('viewBox')).to.be.equal('0 0 50 25');
|
||||
});
|
||||
|
||||
test('uses the iconset size when viewBox is not defined on the element', function () {
|
||||
iconset.applyIcon(div, 'circle');
|
||||
expect(div.firstElementChild.getAttribute('viewBox')).to.be.equal('0 0 20 20');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-selector",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"description": "Manages a set of elements that can be selected",
|
||||
"private": true,
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
|
@ -32,11 +32,11 @@
|
|||
"web-component-tester": "*",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"_release": "1.0.5",
|
||||
"_release": "1.0.6",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.5",
|
||||
"commit": "396ef93a5d3467810cec0328c53f09037d6ee8e1"
|
||||
"tag": "v1.0.6",
|
||||
"commit": "08fa18c70b79abdee8a02486223ab9a4f0acc72c"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-selector.git",
|
||||
"_target": "^1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "iron-selector",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"description": "Manages a set of elements that can be selected",
|
||||
"private": true,
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
|
|
|
@ -111,7 +111,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
* @type {object}
|
||||
* @default {template: 1}
|
||||
*/
|
||||
excludedLocalNames: {
|
||||
_excludedLocalNames: {
|
||||
type: Object,
|
||||
value: function() {
|
||||
return {
|
||||
|
@ -223,7 +223,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
},
|
||||
|
||||
_filterItem: function(node) {
|
||||
return !this.excludedLocalNames[node.localName];
|
||||
return !this._excludedLocalNames[node.localName];
|
||||
},
|
||||
|
||||
_valueToItem: function(value) {
|
||||
|
|
|
@ -57,22 +57,22 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
test2 = fixture('test2');
|
||||
});
|
||||
|
||||
test('default `excludedLocalNames`', function() {
|
||||
assert.isTrue('template' in test1.excludedLocalNames);
|
||||
assert.isTrue('template' in test2.excludedLocalNames);
|
||||
test('default `_excludedLocalNames`', function() {
|
||||
assert.isTrue('template' in test1._excludedLocalNames);
|
||||
assert.isTrue('template' in test2._excludedLocalNames);
|
||||
});
|
||||
|
||||
test('custom `excludedLocalNames`', function() {
|
||||
test1.excludedLocalNames.foo = 1;
|
||||
test('custom `_excludedLocalNames`', function() {
|
||||
test1._excludedLocalNames.foo = 1;
|
||||
|
||||
assert.isTrue('foo' in test1.excludedLocalNames);
|
||||
assert.isFalse('foo' in test2.excludedLocalNames);
|
||||
assert.isTrue('foo' in test1._excludedLocalNames);
|
||||
assert.isFalse('foo' in test2._excludedLocalNames);
|
||||
});
|
||||
|
||||
|
||||
test('items', function() {
|
||||
test1.excludedLocalNames.span = 1;
|
||||
test2.excludedLocalNames.div = 1;
|
||||
test1._excludedLocalNames.span = 1;
|
||||
test2._excludedLocalNames.div = 1;
|
||||
|
||||
var NOT_FOUND = -1;
|
||||
var items1 = test1.items.map(function(el) { return el.localName; });
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
"tag": "v1.0.4",
|
||||
"commit": "a7ac7fbdb79b4d82416ec9b41613575386d0d226"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/paper-behaviors.git",
|
||||
"_source": "git://github.com/PolymerElements/paper-behaviors.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/paper-behaviors"
|
||||
"_originalSource": "PolymerElements/paper-behaviors"
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-checkbox",
|
||||
"version": "1.0.10",
|
||||
"version": "1.0.11",
|
||||
"description": "A material design checkbox",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -35,11 +35,11 @@
|
|||
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
|
||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
||||
},
|
||||
"_release": "1.0.10",
|
||||
"_release": "1.0.11",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.10",
|
||||
"commit": "ce4a8e8663892e95fccc0142055db214fa292d6d"
|
||||
"tag": "v1.0.11",
|
||||
"commit": "00a147c81fe766f5c90222b2d1b0d8b5ddb12be5"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-checkbox.git",
|
||||
"_target": "~1.0.5",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-checkbox",
|
||||
"version": "1.0.10",
|
||||
"version": "1.0.11",
|
||||
"description": "A material design checkbox",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
|
|
@ -80,7 +80,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<div>
|
||||
<h4>Color</h4>
|
||||
<div class="horizontal-section">
|
||||
<paper-checkbox class="blue" checked>Oxygen</paper-checkbox>
|
||||
<paper-checkbox class="blue" checked aria-label="Hurray for oxygen">Oxygen</paper-checkbox>
|
||||
<paper-checkbox class="red" checked>Carbon</paper-checkbox>
|
||||
<paper-checkbox class="orange" checked>Hydrogen</paper-checkbox>
|
||||
<paper-checkbox class="green" checked>Nitrogen</paper-checkbox>
|
||||
|
|
|
@ -14,7 +14,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<link rel="import" href="../paper-styles/color.html">
|
||||
<link rel="import" href="../paper-behaviors/paper-inky-focus-behavior.html">
|
||||
<link rel="import" href="../iron-checked-element-behavior/iron-checked-element-behavior.html">
|
||||
|
||||
<!--
|
||||
Material design: [Checkbox](https://www.google.com/design/spec/components/selection-controls.html#selection-controls-checkbox)
|
||||
|
||||
`paper-checkbox` is a button that can be either checked or unchecked. User
|
||||
can tap the checkbox to check or uncheck it. Usually you use checkboxes
|
||||
|
@ -243,23 +245,6 @@ Custom property | Description | Default
|
|||
|
||||
attached: function() {
|
||||
this._isReady = true;
|
||||
|
||||
// Don't stomp over a user-set aria-label.
|
||||
if (!this.getAttribute('aria-label')) {
|
||||
this.updateAriaLabel();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the checkbox aria-label. This is a temporary workaround not
|
||||
* being able to observe changes in <content>
|
||||
* (see: https://github.com/Polymer/polymer/issues/1773)
|
||||
*
|
||||
* Call this if you manually change the contents of the checkbox
|
||||
* and want the aria-label to match the new contents.
|
||||
*/
|
||||
updateAriaLabel: function() {
|
||||
this.setAttribute('aria-label', Polymer.dom(this).textContent.trim());
|
||||
},
|
||||
|
||||
// button-behavior hook
|
||||
|
|
|
@ -96,16 +96,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
c1.checked = true;
|
||||
assert.isTrue(c1.validate());
|
||||
});
|
||||
|
||||
test('checkbox label can be updated', function() {
|
||||
Polymer.dom(c1).textContent = 'Batman';
|
||||
c1.updateAriaLabel();
|
||||
assert.isTrue(c1.getAttribute('aria-label') == 'Batman');
|
||||
|
||||
Polymer.dom(c1).textContent = 'Robin';
|
||||
c1.updateAriaLabel();
|
||||
assert.isTrue(c1.getAttribute('aria-label') == 'Robin');
|
||||
});
|
||||
});
|
||||
|
||||
suite('a11y', function() {
|
||||
|
@ -126,10 +116,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
assert.isTrue(!c1.getAttribute('aria-label'));
|
||||
});
|
||||
|
||||
test('checkbox with a label sets an aria label', function() {
|
||||
assert.isTrue(c2.getAttribute('aria-label') == "Batman");
|
||||
});
|
||||
|
||||
test('checkbox respects the user set aria-label', function() {
|
||||
var c = fixture('AriaLabel');
|
||||
assert.isTrue(c.getAttribute('aria-label') == "Batman");
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-tabs",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "Material design tabs",
|
||||
"private": true,
|
||||
|
@ -39,11 +39,11 @@
|
|||
"web-component-tester": "*"
|
||||
},
|
||||
"homepage": "https://github.com/PolymerElements/paper-tabs",
|
||||
"_release": "1.0.3",
|
||||
"_release": "1.0.4",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.3",
|
||||
"commit": "19546ca9fbe23da457177cac8de1a7720cb62c57"
|
||||
"tag": "v1.0.4",
|
||||
"commit": "b07b594cc08e7c97cda7e9b30b0bdd6c8969226c"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-tabs.git",
|
||||
"_target": "~1.0.0",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-tabs",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "Material design tabs",
|
||||
"private": true,
|
||||
|
|
|
@ -20,6 +20,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
<link rel="import" href="paper-tab.html">
|
||||
|
||||
<!--
|
||||
Material design: [Tabs](https://www.google.com/design/spec/components/tabs.html)
|
||||
|
||||
`paper-tabs` makes it easy to explore and switch between different views or functional aspects of
|
||||
an app, or to browse categorized data sets.
|
||||
|
||||
|
@ -125,6 +127,7 @@ Custom property | Description | Default
|
|||
|
||||
.not-visible {
|
||||
opacity: 0;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
paper-icon-button {
|
||||
|
@ -172,7 +175,7 @@ Custom property | Description | Default
|
|||
|
||||
<template>
|
||||
|
||||
<paper-icon-button icon="paper-tabs:chevron-left" class$="[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onLeftScrollButtonDown"></paper-icon-button>
|
||||
<paper-icon-button icon="paper-tabs:chevron-left" class$="[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onLeftScrollButtonDown" tabindex="-1"></paper-icon-button>
|
||||
|
||||
<div id="tabsContainer" class="flex" on-track="_scroll" on-down="_down">
|
||||
|
||||
|
@ -187,7 +190,7 @@ Custom property | Description | Default
|
|||
|
||||
</div>
|
||||
|
||||
<paper-icon-button icon="paper-tabs:chevron-right" class$="[[_computeScrollButtonClass(_rightHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onRightScrollButtonDown"></paper-icon-button>
|
||||
<paper-icon-button icon="paper-tabs:chevron-right" class$="[[_computeScrollButtonClass(_rightHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onRightScrollButtonDown" tabindex="-1"></paper-icon-button>
|
||||
|
||||
</template>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue