update requirecss
This commit is contained in:
parent
57708e9007
commit
91051df493
30 changed files with 600 additions and 221 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-radio-group",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"description": "A group of material design radio buttons",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -22,7 +22,7 @@
|
|||
"dependencies": {
|
||||
"iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0",
|
||||
"iron-selector": "PolymerElements/iron-selector#^1.0.0",
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
"polymer": "Polymer/polymer#^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
|
@ -30,14 +30,15 @@
|
|||
"paper-radio-button": "PolymerElements/paper-radio-button#^1.0.0",
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "*",
|
||||
"web-component-tester": "polymer/web-component-tester#^3.4.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"_release": "1.0.6",
|
||||
"main": "paper-radio-group.html",
|
||||
"_release": "1.0.7",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.6",
|
||||
"commit": "e52738e71ebb7ec5470de109f4aa7b419f6f72e5"
|
||||
"tag": "v1.0.7",
|
||||
"commit": "5f0d8a159a545e4eca1aefa5716d29f230364499"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/paper-radio-group.git",
|
||||
"_target": "~1.0.4",
|
||||
|
|
22
dashboard-ui/bower_components/paper-radio-group/.travis.yml
vendored
Normal file
22
dashboard-ui/bower_components/paper-radio-group/.travis.yml
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
language: node_js
|
||||
sudo: false
|
||||
before_script:
|
||||
- npm install web-component-tester
|
||||
- npm install bower
|
||||
- 'export PATH=$PWD/node_modules/.bin:$PATH'
|
||||
- bower install
|
||||
env:
|
||||
global:
|
||||
- secure: fuljRoGGYqpPmvGA/f/nsqHWRmAFSu0BpeXS838DmXDZGe2l6liTQM3WOg/zsbQimo62bzyfaX7RI0LEPv3kcdIAjxF78/0y+Gb092YOlWjBDf8+Kwz4UuxwEHQ9FRv4T0CiZnp81oo/J9DgBNUIuIKNoycVfp/GQNM7VH8NvYM=
|
||||
- secure: ibwd66QS2gTWqIW57liwNiDZE1GHmS4lJ62T4cJ1lLUV41B6pONB62fzAVtvJhLfAyQeR3cX0+grCFJtc2v94r5DhVoTAdxuM3MrYQuM+p1XNpK/UUjEkRZkSP2GxHIztXDwePe96W5DqX/C9E/KC3G00NF5/rdtTkoEe6sn0wA=
|
||||
node_js: 4
|
||||
addons:
|
||||
firefox: latest
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
script:
|
||||
- xvfb-run wct
|
||||
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
72
dashboard-ui/bower_components/paper-radio-group/CONTRIBUTING.md
vendored
Normal file
72
dashboard-ui/bower_components/paper-radio-group/CONTRIBUTING.md
vendored
Normal file
|
@ -0,0 +1,72 @@
|
|||
|
||||
<!--
|
||||
This file is autogenerated based on
|
||||
https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
|
||||
|
||||
If you edit that file, it will get updated everywhere else.
|
||||
If you edit this file, your changes will get overridden :)
|
||||
-->
|
||||
# Polymer Elements
|
||||
## Guide for Contributors
|
||||
|
||||
Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
|
||||
|
||||
### Filing Issues
|
||||
|
||||
**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
|
||||
|
||||
1. **Who will use the feature?** _“As someone filling out a form…”_
|
||||
2. **When will they use the feature?** _“When I enter an invalid value…”_
|
||||
3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
|
||||
|
||||
**If you are filing an issue to report a bug**, please provide:
|
||||
|
||||
1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
|
||||
|
||||
```markdown
|
||||
The `paper-foo` element causes the page to turn pink when clicked.
|
||||
|
||||
## Expected outcome
|
||||
|
||||
The page stays the same color.
|
||||
|
||||
## Actual outcome
|
||||
|
||||
The page turns pink.
|
||||
|
||||
## Steps to reproduce
|
||||
|
||||
1. Put a `paper-foo` element in the page.
|
||||
2. Open the page in a web browser.
|
||||
3. Click the `paper-foo` element.
|
||||
```
|
||||
|
||||
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
|
||||
|
||||
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
|
||||
|
||||
### Submitting Pull Requests
|
||||
|
||||
**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
|
||||
|
||||
When submitting pull requests, please provide:
|
||||
|
||||
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
|
||||
|
||||
```markdown
|
||||
(For a single issue)
|
||||
Fixes #20
|
||||
|
||||
(For multiple issues)
|
||||
Fixes #32, #40
|
||||
```
|
||||
|
||||
2. **A succinct description of the design** used to fix any related issues. For example:
|
||||
|
||||
```markdown
|
||||
This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
|
||||
```
|
||||
|
||||
3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
|
||||
|
||||
If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "paper-radio-group",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"description": "A group of material design radio buttons",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
|
@ -22,7 +22,7 @@
|
|||
"dependencies": {
|
||||
"iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0",
|
||||
"iron-selector": "PolymerElements/iron-selector#^1.0.0",
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
"polymer": "Polymer/polymer#^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
|
@ -30,7 +30,8 @@
|
|||
"paper-radio-button": "PolymerElements/paper-radio-button#^1.0.0",
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "*",
|
||||
"web-component-tester": "polymer/web-component-tester#^3.4.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
}
|
||||
},
|
||||
"main": "paper-radio-group.html"
|
||||
}
|
||||
|
|
|
@ -50,20 +50,19 @@ information about `paper-radio-button`.
|
|||
-->
|
||||
|
||||
<dom-module id="paper-radio-group">
|
||||
<style>
|
||||
:host {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
:host ::content > * {
|
||||
padding: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<content id="items" select="*"></content>
|
||||
</template>
|
||||
<style>
|
||||
:host {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
:host ::content > * {
|
||||
padding: 12px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<content id="items" select="*"></content>
|
||||
</template>
|
||||
</dom-module>
|
||||
|
||||
<script>
|
||||
|
|
|
@ -16,10 +16,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<script src="../../test-fixture/test-fixture-mocha.js"></script>
|
||||
<script src="../../iron-test-helpers/mock-interactions.js"></script>
|
||||
|
||||
<link rel="import" href="../../test-fixture/test-fixture.html">
|
||||
<link rel="import" href="../paper-radio-group.html">
|
||||
|
||||
</head>
|
||||
|
@ -60,122 +57,152 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|||
var LEFT_ARROW = 37;
|
||||
var RIGHT_ARROW = 39;
|
||||
|
||||
test('group can have no selection', function () {
|
||||
test('group can have no selection', function (done) {
|
||||
var g = fixture('NoSelection');
|
||||
expect(g.selected).to.not.be.ok;
|
||||
var items = g.items;
|
||||
expect(items.length).to.be.equal(3);
|
||||
expect(items[0].checked).to.be.equal(false);
|
||||
expect(items[1].checked).to.be.equal(false);
|
||||
expect(items[2].checked).to.be.equal(false);
|
||||
|
||||
// Needs to be async since the underlying iron-selector uses observeNodes.
|
||||
Polymer.Base.async(function() {
|
||||
expect(g.selected).to.not.be.ok;
|
||||
var items = g.items;
|
||||
expect(items.length).to.be.equal(3);
|
||||
|
||||
expect(items[0].checked).to.be.equal(false);
|
||||
expect(items[1].checked).to.be.equal(false);
|
||||
expect(items[2].checked).to.be.equal(false);
|
||||
|
||||
done();
|
||||
}, 1);
|
||||
|
||||
});
|
||||
|
||||
test('group can have a selection', function () {
|
||||
test('group can have a selection', function (done) {
|
||||
var g = fixture('WithSelection');
|
||||
expect(g.selected).to.be.ok;
|
||||
var items = g.items;
|
||||
expect(items.length).to.be.equal(3);
|
||||
|
||||
expect(items[0].checked).to.be.equal(true);
|
||||
expect(items[1].checked).to.be.equal(false);
|
||||
expect(items[2].checked).to.be.equal(false);
|
||||
expect(items[0].getAttribute('name')).to.be.equal(g.selected);
|
||||
// Needs to be async since the underlying iron-selector uses observeNodes.
|
||||
Polymer.Base.async(function() {
|
||||
expect(g.selected).to.be.ok;
|
||||
var items = g.items;
|
||||
expect(items.length).to.be.equal(3);
|
||||
|
||||
expect(items[0].checked).to.be.equal(true);
|
||||
expect(items[1].checked).to.be.equal(false);
|
||||
expect(items[2].checked).to.be.equal(false);
|
||||
expect(items[0].getAttribute('name')).to.be.equal(g.selected);
|
||||
|
||||
done();
|
||||
}, 1);
|
||||
});
|
||||
|
||||
test('right arrow advances the selection', function (done) {
|
||||
var g = fixture('WithSelection');
|
||||
var items = g.items;
|
||||
|
||||
expect(items[0].checked).to.be.equal(true);
|
||||
// Needs to be async since the underlying iron-selector uses observeNodes.
|
||||
Polymer.Base.async(function() {
|
||||
var items = g.items;
|
||||
expect(items[0].checked).to.be.equal(true);
|
||||
|
||||
g.addEventListener('paper-radio-group-changed', function () {
|
||||
expect(items[0].checked).to.be.equal(false);
|
||||
expect(items[1].checked).to.be.equal(true);
|
||||
expect(items[2].checked).to.be.equal(false);
|
||||
done();
|
||||
});
|
||||
|
||||
MockInteractions.keyDownOn(g, RIGHT_ARROW);
|
||||
g.addEventListener('paper-radio-group-changed', function () {
|
||||
expect(items[0].checked).to.be.equal(false);
|
||||
expect(items[1].checked).to.be.equal(true);
|
||||
expect(items[2].checked).to.be.equal(false);
|
||||
done();
|
||||
});
|
||||
MockInteractions.keyDownOn(g, RIGHT_ARROW);
|
||||
}, 1);
|
||||
});
|
||||
|
||||
test('left arrow reverses the selection', function (done) {
|
||||
var g = fixture('WithSelection');
|
||||
var items = g.items;
|
||||
|
||||
expect(items[0].checked).to.be.equal(true);
|
||||
// Needs to be async since the underlying iron-selector uses observeNodes.
|
||||
Polymer.Base.async(function() {
|
||||
var items = g.items;
|
||||
expect(items[0].checked).to.be.equal(true);
|
||||
|
||||
g.addEventListener('paper-radio-group-changed', function () {
|
||||
expect(items[0].checked).to.be.equal(false);
|
||||
expect(items[1].checked).to.be.equal(false);
|
||||
expect(items[2].checked).to.be.equal(true);
|
||||
done();
|
||||
});
|
||||
MockInteractions.keyDownOn(g, LEFT_ARROW);
|
||||
g.addEventListener('paper-radio-group-changed', function () {
|
||||
expect(items[0].checked).to.be.equal(false);
|
||||
expect(items[1].checked).to.be.equal(false);
|
||||
expect(items[2].checked).to.be.equal(true);
|
||||
done();
|
||||
});
|
||||
MockInteractions.keyDownOn(g, LEFT_ARROW);
|
||||
}, 1);
|
||||
});
|
||||
|
||||
test('selection should skip disabled items', function (done) {
|
||||
var g = fixture('WithDisabled');
|
||||
var items = g.items;
|
||||
|
||||
expect(items[0].checked).to.be.equal(true);
|
||||
// Needs to be async since the underlying iron-selector uses observeNodes.
|
||||
Polymer.Base.async(function() {
|
||||
var items = g.items;
|
||||
expect(items[0].checked).to.be.equal(true);
|
||||
|
||||
g.addEventListener('paper-radio-group-changed', function () {
|
||||
expect(items[0].checked).to.be.equal(false);
|
||||
expect(items[1].checked).to.be.equal(false);
|
||||
expect(items[2].checked).to.be.equal(true);
|
||||
done();
|
||||
});
|
||||
MockInteractions.keyDownOn(g, RIGHT_ARROW);
|
||||
g.addEventListener('paper-radio-group-changed', function () {
|
||||
expect(items[0].checked).to.be.equal(false);
|
||||
expect(items[1].checked).to.be.equal(false);
|
||||
expect(items[2].checked).to.be.equal(true);
|
||||
done();
|
||||
});
|
||||
MockInteractions.keyDownOn(g, RIGHT_ARROW);
|
||||
}, 1);
|
||||
});
|
||||
|
||||
test('clicking should change the selection', function (done) {
|
||||
var g = fixture('WithSelection');
|
||||
var items = g.items;
|
||||
|
||||
expect(items[0].checked).to.be.equal(true);
|
||||
// Needs to be async since the underlying iron-selector uses observeNodes.
|
||||
Polymer.Base.async(function() {
|
||||
var items = g.items;
|
||||
expect(items[0].checked).to.be.equal(true);
|
||||
|
||||
g.addEventListener('paper-radio-group-changed', function () {
|
||||
expect(items[0].checked).to.be.equal(false);
|
||||
expect(items[1].checked).to.be.equal(true);
|
||||
expect(items[2].checked).to.be.equal(false);
|
||||
done();
|
||||
});
|
||||
|
||||
MockInteractions.tap(items[1]);
|
||||
g.addEventListener('paper-radio-group-changed', function () {
|
||||
expect(items[0].checked).to.be.equal(false);
|
||||
expect(items[1].checked).to.be.equal(true);
|
||||
expect(items[2].checked).to.be.equal(false);
|
||||
done();
|
||||
});
|
||||
MockInteractions.tap(items[1]);
|
||||
}, 1);
|
||||
});
|
||||
|
||||
test('clicking the selected item should not deselect', function (done) {
|
||||
var g = fixture('WithSelection');
|
||||
var items = g.items;
|
||||
|
||||
expect(items[0].checked).to.be.equal(true);
|
||||
MockInteractions.tap(items[0]);
|
||||
|
||||
// The selection should not change, but wait for a little bit just
|
||||
// in case it would and an event would be fired.
|
||||
setTimeout(function() {
|
||||
// Needs to be async since the underlying iron-selector uses observeNodes.
|
||||
Polymer.Base.async(function() {
|
||||
var items = g.items;
|
||||
expect(items[0].checked).to.be.equal(true);
|
||||
expect(items[1].checked).to.be.equal(false);
|
||||
expect(items[2].checked).to.be.equal(false);
|
||||
done();
|
||||
|
||||
// The selection should not change, but wait for a little bit just
|
||||
// in case it would and an event would be fired.
|
||||
setTimeout(function() {
|
||||
expect(items[0].checked).to.be.equal(true);
|
||||
expect(items[1].checked).to.be.equal(false);
|
||||
expect(items[2].checked).to.be.equal(false);
|
||||
done();
|
||||
}, 1);
|
||||
MockInteractions.tap(items[0]);
|
||||
}, 1);
|
||||
});
|
||||
|
||||
test('clicking the selected item should deselect if allow-empty-selection is set', function (done) {
|
||||
var g = fixture('WithSelection');
|
||||
g.allowEmptySelection = true;
|
||||
var items = g.items;
|
||||
|
||||
expect(items[0].checked).to.be.equal(true);
|
||||
MockInteractions.tap(items[0]);
|
||||
// Needs to be async since the underlying iron-selector uses observeNodes.
|
||||
Polymer.Base.async(function() {
|
||||
var items = g.items;
|
||||
expect(items[0].checked).to.be.equal(true);
|
||||
|
||||
// The selection should not change, but wait for a little bit just
|
||||
// in case it would and an event would be fired.
|
||||
setTimeout(function() {
|
||||
expect(items[0].checked).to.be.equal(false);
|
||||
expect(items[1].checked).to.be.equal(false);
|
||||
expect(items[2].checked).to.be.equal(false);
|
||||
done();
|
||||
// The selection should not change, but wait for a little bit just
|
||||
// in case it would and an event would be fired.
|
||||
setTimeout(function() {
|
||||
expect(items[0].checked).to.be.equal(false);
|
||||
expect(items[1].checked).to.be.equal(false);
|
||||
expect(items[2].checked).to.be.equal(false);
|
||||
done();
|
||||
}, 1);
|
||||
MockInteractions.tap(items[0]);
|
||||
}, 1);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue