1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

make sure ._ osx files are properly ignored

This commit is contained in:
Luke Pulverenti 2015-11-04 18:49:06 -05:00
parent cb8119840a
commit 67524136ed
48 changed files with 1239 additions and 387 deletions

View file

@ -39,6 +39,6 @@
"commit": "cec8e49744a1e18b14a711eea77e201bb70de544"
},
"_source": "git://github.com/desandro/doc-ready.git",
"_target": "~1.0.4",
"_target": "1.0.x",
"_originalSource": "doc-ready"
}

View file

@ -30,6 +30,6 @@
"commit": "14d2ca3df97da64c820829a8310f9198fbafbcfa"
},
"_source": "git://github.com/desandro/eventie.git",
"_target": "^1",
"_target": "~1.0.3",
"_originalSource": "eventie"
}

View file

@ -31,6 +31,6 @@
"commit": "34fc5e4a0f252964ed2790138b8d7d30d04b55c1"
},
"_source": "git://github.com/desandro/get-style-property.git",
"_target": "~1.0.4",
"_target": "1.x",
"_originalSource": "get-style-property"
}

View file

@ -1,6 +1,6 @@
{
"name": "iron-behaviors",
"version": "1.0.9",
"version": "1.0.10",
"description": "Provides a set of behaviors for the iron elements",
"private": true,
"authors": [
@ -28,11 +28,11 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"homepage": "https://github.com/PolymerElements/iron-behaviors",
"_release": "1.0.9",
"_release": "1.0.10",
"_resolution": {
"type": "version",
"tag": "v1.0.9",
"commit": "4b8cab62a4916cc4b1dbd262cbb7eb1eec624b6f"
"tag": "v1.0.10",
"commit": "da937a6c5841fc9dba57f3087083445c9ad709a8"
},
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
"_target": "^1.0.0",

View file

@ -0,0 +1,30 @@
language: node_js
sudo: false
cache:
directories:
- node_modules
matrix:
include:
- node_js: stable
script: xvfb-run -a wct --simpleOutput -l firefox -l chrome
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
- node_js: node
script:
- |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
wct --simpleOutput -s 'Windows 10/microsoftedge' -s 'Windows 8.1/internet explorer@11' -s 'Windows 7/internet explorer@10' -s 'OS X 10.10/safari@8' -s 'OS X 10.9/safari@7'
fi
before_script:
- npm install bower web-component-tester
- export PATH=$PWD/node_modules/.bin:$PATH
- bower install
env:
global:
- secure: ZOqj2XVNVwfT74rHxg/ljcAsS6FnmDpRSsXbsy1Icv9DcLHrMlmyQ10gWBjE/YXYF0Uv4akQ1qqn0TJaKOtp9HZeH+P6OPAYk2vJbWD7qp52pPtIqEFomcsUyflt4IjfaXKuN4FMod7PSWVSGJ+DxSguJvZKILkrs5d/rJdFv3c=
- secure: clkqemGQG16TXyAPkv9LBv6x3SbT3ZM0eo8LETx4uNKi3WzlwgXxZA9b5Sr5wYzxyxFFpnhDXW7CL4+UjYu1atGNeTW2TuSaYUPHtgu67OFDr8Jbw047p1XQb5enPSt9+YxrHKfjHBiJvWulJ8rCSQshU9Rhe0DC6NrFRPFgk0A=

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": "iron-behaviors",
"version": "1.0.9",
"version": "1.0.10",
"description": "Provides a set of behaviors for the iron elements",
"private": true,
"authors": [

View file

@ -21,7 +21,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<link href="simple-button.html" rel="import">
<style>
.vertical-section {
text-align: center;
}

View file

@ -136,14 +136,43 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
this._setPressed(false);
},
__isFocusedLightDescendant: function(target) {
var root = Polymer.dom(this).getOwnerRoot() || document;
var focusedElement = root.activeElement;
// TODO(noms): remove the `this !== target` check once polymer#2610 is fixed.
return this !== target && this.isLightDescendant(target) && target == focusedElement;
},
/**
* @param {!KeyboardEvent} event .
*/
_spaceKeyDownHandler: function(event) {
var keyboardEvent = event.detail.keyboardEvent;
var target = Polymer.dom(keyboardEvent).localTarget;
// Ignore the event if this is coming from a focused light child, since that
// element will deal with it.
if (this.__isFocusedLightDescendant(target))
return;
keyboardEvent.preventDefault();
keyboardEvent.stopImmediatePropagation();
this._setPressed(true);
},
_spaceKeyUpHandler: function() {
/**
* @param {!KeyboardEvent} event .
*/
_spaceKeyUpHandler: function(event) {
var keyboardEvent = event.detail.keyboardEvent;
var target = Polymer.dom(keyboardEvent).localTarget;
// Ignore the event if this is coming from a focused light child, since that
// element will deal with it.
if (this.__isFocusedLightDescendant(target))
return;
if (this.pressed) {
this._asyncClick();
}

View file

@ -72,9 +72,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
// handled). In either case, we can disregard `event.path`.
if (event.target === this) {
var focused = event.type === 'focus';
this._setFocused(focused);
} else if (!this.shadowRoot) {
this._setFocused(event.type === 'focus');
} else if (!this.shadowRoot && !this.isLightDescendant(event.target)) {
this.fire(event.type, {sourceEvent: event}, {
node: this,
bubbles: event.bubbles,

View file

@ -33,6 +33,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template>
</test-fixture>
<test-fixture id="ButtonWithInput">
<template>
<test-light-dom><input id="input"></test-light-dom>
</template>
</test-fixture>
<script>
suite('active-state', function() {
var activeTarget;
@ -192,6 +198,39 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
MockInteractions.pressEnter(activeTarget);
});
});
suite('nested input inside button', function() {
test('space in light child input does not trigger a button click event', function(done) {
var item = fixture('ButtonWithInput');
var input = item.querySelector('#input');
var itemClickHandler = sinon.spy();
item.addEventListener('click', itemClickHandler);
input.focus();
MockInteractions.pressSpace(input);
setTimeout(function(){
expect(itemClickHandler.callCount).to.be.equal(0);
done();
}, 100);
});
test('space in button triggers a button click event', function(done) {
var item = fixture('ButtonWithInput');
var input = item.querySelector('#input');
var itemClickHandler = sinon.spy();
item.addEventListener('click', itemClickHandler);
MockInteractions.pressSpace(item);
setTimeout(function(){
expect(itemClickHandler.callCount).to.be.equal(1);
done();
}, 100);
});
});
});
</script>
</body>

View file

@ -34,6 +34,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</template>
</test-fixture>
<test-fixture id="LightDOM">
<template>
<test-light-dom>
<input id="input">
</test-light-dom>
</template>
</test-fixture>
<script>
suite('focused-state', function() {
var focusTarget;
@ -112,6 +120,29 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
});
suite('elements in the light dom', function() {
var lightDOM, input;
setup(function() {
lightDOM = fixture('LightDOM');
input = document.querySelector('#input');
});
test('should not fire the focus event', function() {
var nFocusEvents = 0;
lightDOM.addEventListener('focus', function() {
nFocusEvents += 1;
});
MockInteractions.focus(input);
expect(nFocusEvents).to.be.equal(0);
});
});
</script>
</body>

View file

@ -64,3 +64,26 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
});
</script>
<dom-module id="test-light-dom">
<template>
<content select="*"></content>
</template>
</dom-module>
<script>
Polymer({
is: 'test-light-dom',
behaviors: [
Polymer.IronControlState,
Polymer.IronButtonState
]
});
</script>

View file

@ -1,6 +1,6 @@
{
"name": "iron-flex-layout",
"version": "1.0.4",
"version": "1.0.5",
"description": "Provide flexbox-based layouts",
"keywords": [
"web-components",
@ -22,15 +22,17 @@
},
"devDependencies": {
"paper-styles": "polymerelements/paper-styles#^1.0.0",
"marked-element": "polymerelements/marked-element#^1.0.0",
"prism-element": "PolymerElements/prism-element#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"iron-component-page": "polymerelements/iron-component-page#^1.0.0"
},
"homepage": "https://github.com/PolymerElements/iron-flex-layout",
"_release": "1.0.4",
"_release": "1.0.5",
"_resolution": {
"type": "version",
"tag": "v1.0.4",
"commit": "dcfc54b0d358269bf0c72180b4ab090fc4931ecd"
"tag": "v1.0.5",
"commit": "00daa8acc95fe53d7cbbe5f9059241c4648ff22e"
},
"_source": "git://github.com/PolymerElements/iron-flex-layout.git",
"_target": "^1.0.0",

View file

@ -0,0 +1,28 @@
language: node_js
sudo: false
matrix:
include:
- node_js: stable
script: xvfb-run wct
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
- node_js: node
script:
- |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
wct -s 'default'
fi
before_script:
- npm install web-component-tester
- npm install bower
- export PATH=$PWD/node_modules/.bin:$PATH
- bower install
env:
global:
- secure: jFaXkmco40NlJT4VyFYM34Zv9D1XVfLXgixobnyHQyJDBKSXrNLcwDuvrGUpJx/pwBCxEhKAbvxeJ+PBMUv8QV08MAdw2S6QOsIe3CUxAehoNoOMJw5duhE8faWlz8qzmCWEowHVFUeVsd0ZUsgOu6RTspj2A51D/CztQuW0Ljw=
- secure: fKrO5yMx8kZM1WQ3k0bzo6MCREKGW2WkCl2suDjuEtb1SQ/SaZa9Tun0fcqIHVJqg9+jOS1Romt/+MN27Nc6IT1tv/NdLd+uWjtMA+OzLyv48gzcdu8Ls/TISUGm5Wb7XHkcvMAb1tRoBs5BOvQ/85FilZLEq1km8snG9ZsOOWI=

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": "iron-flex-layout",
"version": "1.0.4",
"version": "1.0.5",
"description": "Provide flexbox-based layouts",
"keywords": [
"web-components",
@ -22,6 +22,8 @@
},
"devDependencies": {
"paper-styles": "polymerelements/paper-styles#^1.0.0",
"marked-element": "polymerelements/marked-element#^1.0.0",
"prism-element": "PolymerElements/prism-element#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"iron-component-page": "polymerelements/iron-component-page#^1.0.0"
}

View file

@ -0,0 +1,94 @@
<!--
@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="../../prism-element/prism-highlighter.html">
<link rel="import" href="../../marked-element/marked-element.html">
<!--
Quick element that can display the source of a code snippet and a rendered demo.
<demo-snippet>
<template>
<style is="custom-style">
#demo6 {
@apply(--layout-horizontal);
@apply(--layout-start);
height: 120px;
}
</style>
<div class="container" id="demo6">
<div>start</div>
</div>
</template>
</demo-snippet>
-->
<dom-module id="demo-snippet">
<style>
:host {
display:inline-block;
}
.demo {
border-bottom: 1px solid #e5e5e5;
margin: 0;
}
.code {
padding: 0;
margin: 0;
background-color: #fafafa;
font-size: 13px;
word-wrap: break-word;
}
.code > pre {
margin: 0;
padding: 0 0 10px 0;
}
</style>
<template>
<prism-highlighter></prism-highlighter>
<div class="demo">
<content id="content"></content>
</div>
<marked-element markdown=[[_markdown]]>
<div class="markdown-html code"></div>
</marked-element>
</template>
<script>
Polymer({
is: 'demo-snippet',
properties: {
_markdown: {
type: String,
value: ''
}
},
attached: function() {
var template = Polymer.dom(this).queryDistributedElements('template')[0];
var snippet = Polymer.domInnerHTML.getInnerHTML(template);
this._markdown = '```\n' + snippet + '\n' + '```';
// Stamp the template.
Polymer.dom(this).appendChild(document.importNode(template.content, true));
}
});
</script>
</dom-module>

View file

@ -12,31 +12,378 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<html>
<head>
<title>iron-flex-layout</title>
<title>iron-flex-layout demo</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../../paper-styles/paper-styles.html">
<link rel="import" href="x-app.html">
<link rel="import" href="../../paper-styles/demo-pages.html">
<link rel="import" href="demo-snippet.html">
<link rel="import" href="../iron-flex-layout.html">
<style>
html, body, x-app {
height: 100%;
}
body {
.container {
background-color: #ccc;
padding: 5px;
margin: 0;
}
.container > div {
padding: 15px;
margin: 5px;
background-color: white;
min-height: 20px;
}
demo-snippet {
width: 100%;
}
.vertical-section {
padding: 0 !important;
}
</style>
</head>
<body class="fullbleed">
<body unresolved class="fullbleed">
<x-app></x-app>
<h4>Horizontal and vertical layout</h4>
<div class="vertical-section">
<demo-snippet>
<template>
<style is="custom-style">
#demo1 {
@apply(--layout-horizontal);
}
</style>
<div class="container" id="demo1">
<div>one</div>
<div>two</div>
<div>three</div>
</div>
</template>
</demo-snippet>
</div>
<h4>Flexible children</h4>
<div class="vertical-section">
<demo-snippet>
<template>
<style is="custom-style">
#demo2 {
@apply(--layout-horizontal);
}
.flexchild {
@apply(--layout-flex);
}
</style>
<div class="container" id="demo2">
<div>one</div>
<div class="flexchild">two (flex)</div>
<div>three</div>
</div>
</template>
</demo-snippet>
</div>
<h4>Flexible children in vertical layouts</h4>
<div class="vertical-section">
<demo-snippet>
<template>
<style is="custom-style">
#demo3 {
@apply(--layout-vertical);
}
.flexchild {
@apply(--layout-flex);
}
</style>
<div class="container" id="demo3">
<div>one</div>
<div class="flexchild">two (flex)</div>
<div>three</div>
</div>
</template>
</demo-snippet>
</div>
<h4>Flex ratios</h4>
<div class="vertical-section">
<demo-snippet>
<template>
<style is="custom-style">
#demo4 {
@apply(--layout-horizontal);
}
.flexchild {
@apply(--layout-flex);
}
.flex2child {
@apply(--layout-flex-2);
}
.flex3child {
@apply(--layout-flex-3);
}
</style>
<div class="container" id="demo4">
<div class="flex3child">one</div>
<div class="flexchild">two</div>
<div class="flex2child">three</div>
</div>
</template>
</demo-snippet>
</div>
<h4>Cross-axis center alignment</h4>
<div class="vertical-section">
<demo-snippet>
<template>
<style is="custom-style">
#demo5 {
@apply(--layout-horizontal);
@apply(--layout-center);
height: 120px;
}
</style>
<div class="container" id="demo5">
<div>center</div>
</div>
</template>
</demo-snippet>
</div>
<h4>Cross-axis start alignment</h4>
<div class="vertical-section">
<demo-snippet>
<template>
<style is="custom-style">
#demo6 {
@apply(--layout-horizontal);
@apply(--layout-start);
height: 120px;
}
</style>
<div class="container" id="demo6">
<div>start</div>
</div>
</template>
</demo-snippet>
</div>
<h4>Cross-axis end alignment</h4>
<div class="vertical-section">
<demo-snippet>
<template>
<style is="custom-style">
#demo7 {
@apply(--layout-horizontal);
@apply(--layout-end);
height: 120px;
}
</style>
<div class="container" id="demo7">
<div>end</div>
</div>
</template>
</demo-snippet>
</div>
<h4>Justification, start justified</h4>
<div class="vertical-section">
<demo-snippet>
<template>
<style is="custom-style">
#demo8 {
@apply(--layout-horizontal);
@apply(--layout-start-justified);
}
</style>
<div class="container" id="demo8">
<div>start-justified</div>
</div>
</template>
</demo-snippet>
</div>
<h4>Justification, start justified</h4>
<div class="vertical-section">
<demo-snippet>
<template>
<style is="custom-style">
#demo9 {
@apply(--layout-horizontal);
@apply(--layout-center-justified);
}
</style>
<div class="container" id="demo9">
<div>center-justified</div>
</div>
</template>
</demo-snippet>
</div>
<h4>Justification, end justified</h4>
<div class="vertical-section">
<demo-snippet>
<template>
<style is="custom-style">
#demo10 {
@apply(--layout-horizontal);
@apply(--layout-end-justified);
}
</style>
<div class="container" id="demo10">
<div>end-justified</div>
</div>
</template>
</demo-snippet>
</div>
<h4>Justification, equal space between elements</h4>
<div class="vertical-section">
<demo-snippet>
<template>
<style is="custom-style">
#demo10 {
@apply(--layout-horizontal);
@apply(--layout-justified);
}
</style>
<div class="container" id="demo10">
<div>justified</div>
<div>justified</div>
<div>justified</div>
</div>
</template>
</demo-snippet>
</div>
<h4>Justification, equal space around each element</h4>
<div class="vertical-section">
<demo-snippet>
<template>
<style is="custom-style">
#demo11 {
@apply(--layout-horizontal);
@apply(--layout-around-justified);
}
</style>
<div class="container" id="demo11">
<div>around-justified</div>
<div>around-justified</div>
</div>
</template>
</demo-snippet>
</div>
<h4>Self alignment</h4>
<div class="vertical-section">
<demo-snippet>
<template>
<style is="custom-style">
#demo12 {
@apply(--layout-horizontal);
@apply(--layout-justified);
height: 120px;
}
#demo12 div {
@apply(--layout-flex);
}
.child1 {
@apply(--layout-self-start);
}
.child2 {
@apply(--layout-self-center);
}
.child3 {
@apply(--layout-self-end);
}
.child4 {
@apply(--layout-self-stretch);
}
</style>
<div class="container" id="demo12">
<div class="child1">one</div>
<div class="child2">two</div>
<div class="child3">three</div>
<div class="child4">four</div>
</div>
</template>
</demo-snippet>
</div>
<h4>Wrapping</h4>
<div class="vertical-section">
<demo-snippet>
<template>
<style is="custom-style">
#demo13 {
@apply(--layout-horizontal);
@apply(--layout-wrap);
width: 200px;
}
</style>
<div class="container" id="demo13">
<div>one</div>
<div>two</div>
<div>three</div>
<div>four</div>
</div>
</template>
</demo-snippet>
</div>
<h4>General purpose ruls</h4>
<div class="vertical-section">
<demo-snippet>
<template>
<style is="custom-style">
#demo14 {
width: 100%;
}
#demo14 > div {
background-color: #ccc;
padding: 4px;
margin: 12px;
}
.block {
@apply(--layout-block);
}
.invisible {
@apply(--layout-invisible);
}
.relative {
@apply(--layout-relative);
}
.fit {
@apply(--layout-fit);
}
</style>
<div id="demo14">
<div>Before <span>[A Span]</span> After</div>
<div>Before <span class="block">[A Block Span]</span> After</div>
<div>Before invisible span <span class="invisible">Not displayed</span> After invisible span</div>
<div class="relative" style="height: 100px;">
<div class="fit" style="background-color: #000;color: white">Fit</div>
</div>
</div>
</template>
</demo-snippet>
</div>
</body>
</html>

View file

@ -1,118 +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
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
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
-->
<link rel="import" href="../iron-flex-layout.html">
<dom-module id="x-app">
<style>
:host {
@apply(--layout-horizontal);
@apply(--paper-font-body2);
}
[nav] {
@apply(--layout-vertical);
width: 200px;
background-color: var(--paper-grey-300);
}
[item] {
@apply(--layout-horizontal);
@apply(--layout-center);
height: 60px;
padding-left: 16px;
border-bottom: 1px solid var(--paper-grey-400);
}
[main] {
@apply(--layout-flex);
@apply(--layout-vertical);
}
[header] {
@apply(--layout-horizontal);
@apply(--layout-center);
@apply(--paper-font-subhead);
height: 60px;
background-color: var(--google-blue-700);
padding: 0 16px;
color: white;
}
[tool] {
@apply(--layout-inline);
}
[content] {
@apply(--layout-flex);
overflow: auto;
padding: 0 10px;
}
[card] {
@apply(--layout-vertical);
@apply(--layout-center-center);
@apply(--shadow-elevation-2dp);
height: 300px;
max-width: 800px;
margin: 16px auto;
font-weight: bold;
background-color: var(--paper-grey-200);
}
</style>
<template>
<div nav>
<div content>
<div item>ITEM 1</div>
<div item>ITEM 2</div>
<div item>ITEM 3</div>
<div item>ITEM 4</div>
<div item>ITEM 5</div>
</div>
</div>
<div main>
<div header>
<div tool>Foo</div>
<div class="flex"></div>
<div tool>Bar</div>
</div>
<div content>
<div card>CARD 1</div>
<div card>CARD 2</div>
<div card>CARD 3</div>
<div card>CARD 4</div>
<div card>CARD 5</div>
</div>
</div>
</template>
</dom-module>
<script>
Polymer({
is: 'x-app'
});
</script>

View file

@ -1,7 +1,7 @@
{
"name": "iron-iconset-svg",
"description": "Manages a set of svg icons",
"version": "1.0.8",
"version": "1.0.9",
"keywords": [
"web-components",
"polymer",
@ -29,12 +29,13 @@
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"web-component-tester": "*"
},
"main": "iron-iconset-svg.html",
"homepage": "https://github.com/polymerelements/iron-iconset-svg",
"_release": "1.0.8",
"_release": "1.0.9",
"_resolution": {
"type": "version",
"tag": "v1.0.8",
"commit": "7f8b0a5800254247cb518356aee983155374f519"
"tag": "v1.0.9",
"commit": "ce9b2ea1f73d936cffdd05f3fe34b1f69d1d32db"
},
"_source": "git://github.com/polymerelements/iron-iconset-svg.git",
"_target": "^1.0.0",

View file

@ -0,0 +1,28 @@
language: node_js
sudo: false
matrix:
include:
- node_js: stable
script: xvfb-run wct
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
- node_js: node
script:
- |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
wct -s 'default'
fi
before_script:
- npm install web-component-tester
- npm install bower
- export PATH=$PWD/node_modules/.bin:$PATH
- bower install
env:
global:
- secure: UR1rxThVZH+l6fFHhAlgNIWs9wHmC5A102oAQBtCuQqKiXPZCDAPQHdjufX8z6hH93JkR+Esh2VPv0baSXFrHteKTRN6bsNDTMFDdHJ5BiRAdhVoV6bsdNH2GTgRXQ+ACMgrh4sXLA5+2Z+JGq7m0zaHehDfNZqmo/1U59qImP8=
- secure: PmWDypBdjKlUGPn9UoBEkjoYiyJFQGe2QiACmdOgueOLSLeA6xW+/1521uFIBHpwuWn29mxVYv5gS1D8hafWhZdXn4OYQl550RrT092jXIO6+mMKZXPmUaKCkPMY6QYJJ5j9ZOC36KgF//IpoE7OCxpLReYOD2KBR3mhw0jOYJA=

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,7 +1,7 @@
{
"name": "iron-iconset-svg",
"description": "Manages a set of svg icons",
"version": "1.0.8",
"version": "1.0.9",
"keywords": [
"web-components",
"polymer",
@ -28,5 +28,6 @@
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"web-component-tester": "*"
}
},
"main": "iron-iconset-svg.html"
}

View file

@ -42,6 +42,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
fill: navy;
}
iron-icon:nth-of-type(4) {
fill: red;
}
iron-icon {
transition: all 0.5s;
-webkit-transition: all 0.5s;
@ -59,6 +63,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<iron-icon icon="svg-sample-icons:codepen"></iron-icon>
<iron-icon icon="svg-sample-icons:twitter"></iron-icon>
<iron-icon icon="svg-sample-icons:youtube"></iron-icon>
<iron-icon icon="inline:shape"></iron-icon>
</div>
</body>

View file

@ -65,5 +65,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</g>
</defs>
</svg>
</iron-iconset-svg>
<iron-iconset-svg name="inline" size="24">
<svg>
<defs>
<g id="shape">
<rect x="12" y="0" width="12" height="24" />
<circle cx="12" cy="12" r="12" />
</g>
</defs>
</svg>
</iron-iconset-svg>

View file

@ -28,8 +28,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* <svg>
* <defs>
* <g id="shape">
* <rect x="50" y="50" width="50" height="50" />
* <circle cx="50" cy="50" r="50" />
* <rect x="12" y="0" width="12" height="24" />
* <circle cx="12" cy="12" r="12" />
* </g>
* </defs>
* </svg>
@ -69,7 +69,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
}
},
attached: function() {
this.style.display = 'none';
},

View file

@ -1,6 +1,6 @@
{
"name": "iron-meta",
"version": "1.1.0",
"version": "1.1.1",
"keywords": [
"web-components",
"polymer"
@ -25,12 +25,13 @@
"web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"main": "iron-meta.html",
"homepage": "https://github.com/polymerelements/iron-meta",
"_release": "1.1.0",
"_release": "1.1.1",
"_resolution": {
"type": "version",
"tag": "v1.1.0",
"commit": "be7ccf8df650aef1446a4e23af33f5d4e9f3000f"
"tag": "v1.1.1",
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
},
"_source": "git://github.com/polymerelements/iron-meta.git",
"_target": "^1.0.0",

View file

@ -0,0 +1,28 @@
language: node_js
sudo: false
matrix:
include:
- node_js: stable
script: xvfb-run wct
addons:
firefox: latest
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
- node_js: node
script:
- |
if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
wct -s 'default'
fi
before_script:
- npm install web-component-tester
- npm install bower
- export PATH=$PWD/node_modules/.bin:$PATH
- bower install
env:
global:
- secure: eGcuDAJt+1GPrC6u95vHufjnSXWbVBZpW7oKQhZjcHrN19l9COdOb7RVkTPsZzEanHaH/D6Psr4WJKyd72Wx5wj+bqGh4nPHTFSnK3+gNT4eJAgLvsxLwHxW8QkYYHEdZe8Wd6sOdal9geeLZ8fG9xELYEtuJR6lww5uLvFv/cw=
- secure: DoBz8LDaS4/lQ9sTXE5pnp8fqEvG47mmdQaQ14EnHQ+wLbajIaLk59vRfau5c7mIef8dEgaT40r/kVP5QRr3OiH5UJY3jLnCMVIxWJ3ZTkuGGuU6QDQvoGSSBhdA+b+G94bbK6LtHQxRBrkiyT9d0IzT5ZiHlDlteGbjdDWAgw0=

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": "iron-meta",
"version": "1.1.0",
"version": "1.1.1",
"keywords": [
"web-components",
"polymer"
@ -24,5 +24,6 @@
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"web-component-tester": "*",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
}
},
"main": "iron-meta.html"
}

View file

@ -33,7 +33,7 @@ attributes or use child nodes to define additional metadata.
Now I can access that element (and it's metadata) from any iron-meta instance
via the byKey method, e.g.
meta.byKey('info').getAttribute('value').
meta.byKey('info').getAttribute('value');
Pure imperative form would be like:
@ -118,6 +118,8 @@ Or, in a Polymer element, you can include a meta in your template:
/**
* Only runs if someone invokes the factory/constructor directly
* e.g. `new Polymer.IronMeta()`
*
* @param {{type: (string|undefined), key: (string|undefined), value}=} config
*/
factoryImpl: function(config) {
if (config) {
@ -282,6 +284,8 @@ Or, in a Polymer element, you can include a meta in your template:
/**
* Actually a factory method, not a true constructor. Only runs if
* someone invokes it directly (via `new Polymer.IronMeta()`);
*
* @param {{type: (string|undefined), key: (string|undefined)}=} config
*/
factoryImpl: function(config) {
if (config) {

View file

@ -44,7 +44,7 @@
"tag": "v1.0.9",
"commit": "d9c0398cbaf3881bef3533b5b2b6127fc4d0960c"
},
"_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"
}

View file

@ -1,6 +1,6 @@
{
"name": "paper-tabs",
"version": "1.0.9",
"version": "1.0.10",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "Material design tabs",
"private": true,
@ -36,14 +36,15 @@
"paper-toolbar": "polymerelements/paper-toolbar#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"web-component-tester": "*"
"web-component-tester": "*",
"iron-pages": "PolymerElements/iron-pages#^1.0.0"
},
"homepage": "https://github.com/PolymerElements/paper-tabs",
"_release": "1.0.9",
"_release": "1.0.10",
"_resolution": {
"type": "version",
"tag": "v1.0.9",
"commit": "d931f9ef024cc029d9545efd86c65df3e2ad5b47"
"tag": "v1.0.10",
"commit": "d9f518810b7313f3e5a29383d3bb86de0b260319"
},
"_source": "git://github.com/PolymerElements/paper-tabs.git",
"_target": "~1.0.0",

View file

@ -1,6 +1,6 @@
{
"name": "paper-tabs",
"version": "1.0.9",
"version": "1.0.10",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "Material design tabs",
"private": true,
@ -36,6 +36,7 @@
"paper-toolbar": "polymerelements/paper-toolbar#^1.0.0",
"test-fixture": "polymerelements/test-fixture#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
"web-component-tester": "*"
"web-component-tester": "*",
"iron-pages": "PolymerElements/iron-pages#^1.0.0"
}
}

View file

@ -25,43 +25,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
<link rel="import" href="../paper-tabs.html">
<link rel="import" href="../paper-tab.html">
<style is="custom-style">
:root {
--paper-toolbar-background: #00bcd4;
}
body {
font-family: sans-serif;
margin: 0;
padding: 24px;
color: #333;
}
<link rel="import" href="tabs-with-content-example.html">
<link rel="import" href="paper-tabs-demo-styles.html">
paper-tabs, paper-toolbar {
background-color: #00bcd4;
color: #fff;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.2);
}
paper-toolbar paper-tabs {
box-shadow: none;
}
paper-tabs[noink][no-bar] paper-tab.iron-selected {
color: #ffff8d;
}
paper-tabs[align-bottom] {
box-shadow: 0px -2px 6px rgba(0, 0, 0, 0.15);
}
h3 {
font-size: 16px;
font-weight: 400;
padding-top: 20px;
}
</style>
<style is="custom-style" include="paper-tabs-demo-styles"></style>
</head>
<body unresolved>
@ -194,5 +162,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
</paper-tabs>
</template>
<h3>J. Controlling content</h3>
<tabs-with-content-example></tabs-with-content-example>
</body>
</html>

View file

@ -0,0 +1,41 @@
<dom-module id="paper-tabs-demo-styles">
<template>
<style>
:root {
--paper-toolbar-background: #00bcd4;
}
body {
font-family: sans-serif;
margin: 0;
padding: 24px;
color: #333;
}
paper-tabs, paper-toolbar {
background-color: #00bcd4;
color: #fff;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.2);
}
paper-toolbar paper-tabs {
box-shadow: none;
}
paper-tabs[noink][no-bar] paper-tab.iron-selected {
color: #ffff8d;
}
paper-tabs[align-bottom] {
box-shadow: 0px -2px 6px rgba(0, 0, 0, 0.15);
}
h3 {
font-size: 16px;
font-weight: 400;
padding-top: 20px;
}
</style>
</template>
</dom-module>

View file

@ -0,0 +1,40 @@
<link rel="import" href="../paper-tabs.html">
<link rel="import" href="../paper-tab.html">
<link rel="import" href="../../iron-pages/iron-pages.html">
<link rel="import" href="paper-tabs-demo-styles.html">
<dom-module is="tabs-with-content-example">
<template>
<style include="paper-tabs-demo-styles"></style>
<style>
iron-pages {
border: 1px solid #ccc;
border-top: none;
padding: 8px;
}
</style>
<paper-tabs selected="{{selected}}">
<paper-tab>ITEM ONE</paper-tab>
<paper-tab>ITEM TWO</paper-tab>
<paper-tab>ITEM THREE</paper-tab>
</paper-tabs>
<iron-pages selected="{{selected}}">
<div>CONTENT ONE</div>
<div>CONTENT TWO</div>
<div>CONTENT THREE</div>
</iron-pages>
</template>
<script>
Polymer({
is: 'tabs-with-content-example',
properties: {
selected: {
type: Number,
value: 0
}
}
});
</script>
</dom-module>