update components

This commit is contained in:
Luke Pulverenti 2015-12-15 10:45:40 -05:00
parent abb1b78b2b
commit 27d49b3466
32 changed files with 739 additions and 380 deletions

View file

@ -1,6 +1,6 @@
{
"name": "paper-toggle-button",
"version": "1.0.11",
"version": "1.0.12",
"description": "A material design toggle button control",
"authors": [
"The Polymer Authors"
@ -21,24 +21,26 @@
"ignore": [],
"dependencies": {
"polymer": "Polymer/polymer#^1.1.0",
"paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
"iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0",
"paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
"iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0"
"paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
"paper-styles": "PolymerElements/paper-styles#^1.0.0"
},
"devDependencies": {
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"web-component-tester": "Polymer/web-component-tester#^3.3.0",
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0"
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
"web-component-tester": "Polymer/web-component-tester#^3.3.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"_release": "1.0.11",
"main": "paper-toggle-button.html",
"_release": "1.0.12",
"_resolution": {
"type": "version",
"tag": "v1.0.11",
"commit": "a6c8e6d76c4645042b4f346dedad18bcd6d8ad10"
"tag": "v1.0.12",
"commit": "363fb16086662fea165668ffe10be233e02e0aa9"
},
"_source": "git://github.com/PolymerElements/paper-toggle-button.git",
"_target": "~1.0.5",

View file

@ -0,0 +1,24 @@
language: node_js
sudo: false
before_script:
- npm install web-component-tester
- npm install bower
- 'export PATH=$PWD/node_modules/.bin:$PATH'
- bower install
- npm install polylint
- polylint
env:
global:
- secure: T4tEkegUT5RhgMTQAUxtXQROsEEIGYyQZ3MzrEX9Xf8XjCYk7pZmK50UXuHa61xO5F5M1bQV0mu4lPcl41Nzws3GKOmKrprbwdhLGfJY5DsqRr6rVnWKvCf57T1jXciEbr17dQyW0kqP41m4LSvNRRJwxv52bk9Nxu22X1HMrD0=
- secure: rKcth+F7zQJu/nMxEdxRDgyNAR/IQVuduPEmrgbUShIsbN48QoI+Bwdqj38NPpKj8LdVE8pgpuiN7FkQ8cipsQNiXTp5cl9t9k/gKGmXfsKE0K85H4bHYoPv6OH2bSyRuUzVlFWQH4FVNXGdDLwSLV/4VQT4+P19MTZRSm4oG1A=
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"

View 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 users 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 dont be afraid to ask us if you need help with that!

View file

@ -1,6 +1,6 @@
{
"name": "paper-toggle-button",
"version": "1.0.11",
"version": "1.0.12",
"description": "A material design toggle button control",
"authors": [
"The Polymer Authors"
@ -21,17 +21,19 @@
"ignore": [],
"dependencies": {
"polymer": "Polymer/polymer#^1.1.0",
"paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
"iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0",
"paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
"iron-checked-element-behavior": "PolymerElements/iron-checked-element-behavior#^1.0.0"
"paper-ripple": "PolymerElements/paper-ripple#^1.0.0",
"paper-styles": "PolymerElements/paper-styles#^1.0.0"
},
"devDependencies": {
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"web-component-tester": "Polymer/web-component-tester#^3.3.0",
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0"
}
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
"web-component-tester": "Polymer/web-component-tester#^3.3.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"main": "paper-toggle-button.html"
}

View file

@ -17,101 +17,71 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<meta name="apple-mobile-web-app-capable" content="yes">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
<link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
<link rel="import" href="../../paper-styles/demo-pages.html">
<link rel="import" href="../paper-toggle-button.html">
<style is="custom-style">
<style is="custom-style" include="demo-pages-shared-styles">
.vertical-section-container {
max-width: 600px;
}
paper-toggle-button {
margin-bottom: 40px;
display: block;
}
paper-toggle-button:last-child {
margin-bottom: 0;
}
paper-toggle-button.blue {
--paper-toggle-button-checked-bar-color: var(--paper-light-blue-500);
--paper-toggle-button-checked-button-color: var(--paper-light-blue-500);
--paper-toggle-button-checked-ink-color: var(--paper-light-blue-500);
--paper-toggle-button-unchecked-bar-color: var(--paper-light-blue-900);
--paper-toggle-button-unchecked-button-color: var(--paper-light-blue-900);
--paper-toggle-button-unchecked-ink-color: var(--paper-light-blue-900);
}
paper-toggle-button.red {
--paper-toggle-button-checked-bar-color: var(--paper-red-500);
--paper-toggle-button-checked-button-color: var(--paper-red-500);
--paper-toggle-button-checked-ink-color: var(--paper-red-500);
--paper-toggle-button-unchecked-bar-color: var(--paper-red-900);
--paper-toggle-button-unchecked-button-color: var(--paper-red-900);
--paper-toggle-button-unchecked-ink-color: var(--paper-red-900);
}
paper-toggle-button.green {
--paper-toggle-button-checked-bar-color: var(--paper-green-500);
--paper-toggle-button-checked-button-color: var(--paper-green-500);
--paper-toggle-button-checked-ink-color: var(--paper-green-500);
--paper-toggle-button-unchecked-bar-color: var(--paper-green-900);
--paper-toggle-button-unchecked-button-color: var(--paper-green-900);
--paper-toggle-button-unchecked-ink-color: var(--paper-green-900);
}
paper-toggle-button.orange {
--paper-toggle-button-checked-bar-color: var(--paper-orange-500);
--paper-toggle-button-checked-button-color: var(--paper-orange-500);
--paper-toggle-button-checked-ink-color: var(--paper-orange-500);
--paper-toggle-button-unchecked-bar-color: var(--paper-orange-900);
--paper-toggle-button-unchecked-button-color: var(--paper-orange-900);
--paper-toggle-button-unchecked-ink-color: var(--paper-orange-900);
margin-left: 10px;
margin-right: 10px;
}
</style>
</head>
<body unresolved>
<div class="horizontal-section-container">
<div>
<h4>Enabled</h4>
<div class="horizontal-section">
<paper-toggle-button>Oxygen</paper-toggle-button>
<paper-toggle-button>Carbon</paper-toggle-button>
<paper-toggle-button checked>Hydrogen</paper-toggle-button>
<paper-toggle-button checked>Nitrogen</paper-toggle-button>
<paper-toggle-button checked>Calcium</paper-toggle-button>
</div>
</div>
<div class="vertical-section-container centered">
<h3>Toggle buttons can be checked and disabled</h3>
<demo-snippet class="centered-demo">
<template>
<paper-toggle-button>Toggle</paper-toggle-button>
<paper-toggle-button checked>Toggle</paper-toggle-button>
<paper-toggle-button disabled>Disabled</paper-toggle-button>
</template>
</demo-snippet>
</div>
<div>
<h4>Disabled</h4>
<div class="horizontal-section">
<paper-toggle-button disabled>Oxygen</paper-toggle-button>
<paper-toggle-button disabled>Carbon</paper-toggle-button>
<paper-toggle-button checked disabled>Hydrogen</paper-toggle-button>
<paper-toggle-button checked disabled>Nitrogen</paper-toggle-button>
<paper-toggle-button checked disabled>Calcium</paper-toggle-button>
</div>
</div>
<div class="vertical-section-container centered">
<h3>Toggle buttons can hide the ripple effect using the <i>noink</i> attribute</h3>
<demo-snippet class="centered-demo">
<template>
<paper-toggle-button noink>Toggle</paper-toggle-button>
</template>
</demo-snippet>
</div>
<div>
<h4>Color</h4>
<div class="horizontal-section">
<paper-toggle-button class="blue">Oxygen</paper-toggle-button>
<paper-toggle-button class="red">Carbon</paper-toggle-button>
<paper-toggle-button checked class="orange">Hydrogen</paper-toggle-button>
<paper-toggle-button checked class="green">Nitrogen</paper-toggle-button>
<paper-toggle-button checked class="blue">Calcium</paper-toggle-button>
</div>
</div>
<div class="vertical-section-container centered">
<h3>Toggle buttons can be styled using custom properties</h3>
<demo-snippet class="centered-demo">
<template>
<style is="custom-style">
paper-toggle-button.green {
--paper-toggle-button-checked-bar-color: var(--paper-green-500);
--paper-toggle-button-checked-button-color: var(--paper-green-500);
--paper-toggle-button-checked-ink-color: var(--paper-green-500);
--paper-toggle-button-unchecked-bar-color: var(--paper-teal-500);
--paper-toggle-button-unchecked-button-color: var(--paper-teal-500);
--paper-toggle-button-unchecked-ink-color: var(--paper-teal-500);
}
paper-toggle-button.pink {
--paper-toggle-button-checked-bar-color: var(--paper-pink-500);
--paper-toggle-button-checked-button-color: var(--paper-pink-500);
--paper-toggle-button-checked-ink-color: var(--paper-pink-500);
--paper-toggle-button-unchecked-bar-color: var(--paper-indigo-900);
--paper-toggle-button-unchecked-button-color: var(--paper-indigo-900);
--paper-toggle-button-unchecked-ink-color: var(--paper-indigo-900);
}
</style>
<div>
<h4>Noink</h4>
<div class="horizontal-section">
<paper-toggle-button noink>Oxygen</paper-toggle-button>
<paper-toggle-button noink>Carbon</paper-toggle-button>
<paper-toggle-button checked noink>Hydrogen</paper-toggle-button>
<paper-toggle-button checked noink>Nitrogen</paper-toggle-button>
<paper-toggle-button checked noink>Calcium</paper-toggle-button>
</div>
</div>
<paper-toggle-button class="green">Toggle</paper-toggle-button>
<paper-toggle-button checked class="pink">Toggle</paper-toggle-button>
</template>
</demo-snippet>
</div>
</body>
</html>

View file

@ -2,11 +2,11 @@
<!--
@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
The complete set of authors may be found at http://polymer.github.io/AUTHORS
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
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
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<html>
<head>

View file

@ -1,5 +1,4 @@
<!doctype html>
<!--
<!DOCTYPE html><!--
@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
@ -7,9 +6,7 @@ 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>
--><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-toggle-button tests</title>
@ -18,8 +15,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<body>
<script>
WCT.loadSuites([
'basic.html'
'basic.html',
'basic.html?dom=shadow'
]);
</script>
</body>
</html>
</body></html>