mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update polymer components
This commit is contained in:
parent
aa272fb404
commit
8fe136f23c
17 changed files with 183 additions and 180 deletions
|
@ -39,6 +39,6 @@
|
||||||
"commit": "cec8e49744a1e18b14a711eea77e201bb70de544"
|
"commit": "cec8e49744a1e18b14a711eea77e201bb70de544"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/desandro/doc-ready.git",
|
"_source": "git://github.com/desandro/doc-ready.git",
|
||||||
"_target": "~1.0.4",
|
"_target": "1.0.x",
|
||||||
"_originalSource": "doc-ready"
|
"_originalSource": "doc-ready"
|
||||||
}
|
}
|
|
@ -30,6 +30,6 @@
|
||||||
"commit": "14d2ca3df97da64c820829a8310f9198fbafbcfa"
|
"commit": "14d2ca3df97da64c820829a8310f9198fbafbcfa"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/desandro/eventie.git",
|
"_source": "git://github.com/desandro/eventie.git",
|
||||||
"_target": "~1.0.3",
|
"_target": "^1",
|
||||||
"_originalSource": "eventie"
|
"_originalSource": "eventie"
|
||||||
}
|
}
|
|
@ -29,14 +29,14 @@
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "https://github.com/polymerelements/iron-behaviors",
|
"homepage": "https://github.com/PolymerElements/iron-behaviors",
|
||||||
"_release": "1.0.11",
|
"_release": "1.0.11",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.11",
|
"tag": "v1.0.11",
|
||||||
"commit": "084fbc7f60343d717bb2208f350774f4c9899777"
|
"commit": "084fbc7f60343d717bb2208f350774f4c9899777"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-behaviors.git",
|
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/iron-behaviors"
|
"_originalSource": "PolymerElements/iron-behaviors"
|
||||||
}
|
}
|
|
@ -27,14 +27,14 @@
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
|
||||||
"iron-component-page": "polymerelements/iron-component-page#^1.0.0"
|
"iron-component-page": "polymerelements/iron-component-page#^1.0.0"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/polymerelements/iron-flex-layout",
|
"homepage": "https://github.com/PolymerElements/iron-flex-layout",
|
||||||
"_release": "1.2.0",
|
"_release": "1.2.0",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.2.0",
|
"tag": "v1.2.0",
|
||||||
"commit": "4bf53ba623140d0d2663a404e91ee45b96299118"
|
"commit": "4bf53ba623140d0d2663a404e91ee45b96299118"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-flex-layout.git",
|
"_source": "git://github.com/PolymerElements/iron-flex-layout.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/iron-flex-layout"
|
"_originalSource": "PolymerElements/iron-flex-layout"
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paper-checkbox",
|
"name": "paper-checkbox",
|
||||||
"version": "1.0.14",
|
"version": "1.0.15",
|
||||||
"description": "A material design checkbox",
|
"description": "A material design checkbox",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
|
@ -36,11 +36,11 @@
|
||||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
||||||
},
|
},
|
||||||
"main": "paper-checkbox.html",
|
"main": "paper-checkbox.html",
|
||||||
"_release": "1.0.14",
|
"_release": "1.0.15",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.14",
|
"tag": "v1.0.15",
|
||||||
"commit": "be311b93234bbb15b527220ace17a30706657948"
|
"commit": "fe884a3da56b03998731d5ae299dd2fe893b3b8a"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/paper-checkbox.git",
|
"_source": "git://github.com/PolymerElements/paper-checkbox.git",
|
||||||
"_target": "~1.0.5",
|
"_target": "~1.0.5",
|
||||||
|
|
|
@ -1,28 +1,22 @@
|
||||||
language: node_js
|
language: node_js
|
||||||
sudo: false
|
sudo: false
|
||||||
matrix:
|
before_script:
|
||||||
include:
|
- npm install web-component-tester
|
||||||
- node_js: stable
|
- npm install bower
|
||||||
script: xvfb-run wct
|
- 'export PATH=$PWD/node_modules/.bin:$PATH'
|
||||||
addons:
|
- bower install
|
||||||
firefox: latest
|
env:
|
||||||
|
global:
|
||||||
|
- secure: PkxMaBcKe8HD1Jv8O6qiyQ4Nux6DfaVyN/ss9opajX9Oqa2ECJRI/OCsjDSrgXKhuAc2dw0L/KwSb/j4hg3/9BzHlJYQmeR9b9+MsO377TseNw5aKlywgVRu2bj8ODv2naQ4pB4B/Us/n9K7J0vlHIwM8UAJJwGjYm2oYTQxCAw=
|
||||||
|
- secure: WQNRMEQEm6k5e+rzN08Lg0IBC83AZLz1QLP89z59JHLrAOeBu7CBh/LFG0OkhUnTC+dG2JdfIZbdQVCEciDyONjSIKzmM4ze9/LrGzFpROE8bU0ylYSLqX+3CK/6i7VMR3pJo79e1KOeprppHiJSRLVBJfhG+5uNgwAXws/sLQ4=
|
||||||
|
node_js: 4
|
||||||
|
addons:
|
||||||
|
firefox: '42.0'
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- google-chrome
|
- google-chrome
|
||||||
packages:
|
packages:
|
||||||
- google-chrome-stable
|
- google-chrome-stable
|
||||||
- node_js: node
|
script:
|
||||||
script:
|
- xvfb-run wct
|
||||||
- |
|
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
||||||
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: PkxMaBcKe8HD1Jv8O6qiyQ4Nux6DfaVyN/ss9opajX9Oqa2ECJRI/OCsjDSrgXKhuAc2dw0L/KwSb/j4hg3/9BzHlJYQmeR9b9+MsO377TseNw5aKlywgVRu2bj8ODv2naQ4pB4B/Us/n9K7J0vlHIwM8UAJJwGjYm2oYTQxCAw=
|
|
||||||
- secure: WQNRMEQEm6k5e+rzN08Lg0IBC83AZLz1QLP89z59JHLrAOeBu7CBh/LFG0OkhUnTC+dG2JdfIZbdQVCEciDyONjSIKzmM4ze9/LrGzFpROE8bU0ylYSLqX+3CK/6i7VMR3pJo79e1KOeprppHiJSRLVBJfhG+5uNgwAXws/sLQ4=
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paper-checkbox",
|
"name": "paper-checkbox",
|
||||||
"version": "1.0.14",
|
"version": "1.0.15",
|
||||||
"description": "A material design checkbox",
|
"description": "A material design checkbox",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
|
|
|
@ -70,6 +70,7 @@ Custom property | Description | Default
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
|
min-width: 18px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
background-color: var(--paper-checkbox-unchecked-background-color, transparent);
|
background-color: var(--paper-checkbox-unchecked-background-color, transparent);
|
||||||
}
|
}
|
||||||
|
@ -114,31 +115,19 @@ Custom property | Description | Default
|
||||||
|
|
||||||
@-webkit-keyframes checkmark-expand {
|
@-webkit-keyframes checkmark-expand {
|
||||||
0% {
|
0% {
|
||||||
top: 9px;
|
-webkit-transform: scale(0, 0) rotate(45deg);
|
||||||
left: 6px;
|
|
||||||
width: 0px;
|
|
||||||
height: 0px;
|
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
top: -1px;
|
-webkit-transform: scale(1, 1) rotate(45deg);
|
||||||
left: 4px;
|
|
||||||
width: 5px;
|
|
||||||
height: 10px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes checkmark-expand {
|
@keyframes checkmark-expand {
|
||||||
0% {
|
0% {
|
||||||
top: 9px;
|
transform: scale(0, 0) rotate(45deg);
|
||||||
left: 6px;
|
|
||||||
width: 0px;
|
|
||||||
height: 0px;
|
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
top: -1px;
|
transform: scale(1, 1) rotate(45deg);
|
||||||
left: 4px;
|
|
||||||
width: 5px;
|
|
||||||
height: 10px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,11 +137,7 @@ Custom property | Description | Default
|
||||||
}
|
}
|
||||||
|
|
||||||
#checkmark {
|
#checkmark {
|
||||||
-webkit-transform: rotate(45deg);
|
|
||||||
transform: rotate(45deg);
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -1px;
|
|
||||||
left: 4px;
|
|
||||||
width: 5px;
|
width: 5px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
|
@ -161,6 +146,8 @@ Custom property | Description | Default
|
||||||
border-right-width: 2px;
|
border-right-width: 2px;
|
||||||
border-bottom-width: 2px;
|
border-bottom-width: 2px;
|
||||||
border-color: var(--paper-checkbox-checkmark-color, white);
|
border-color: var(--paper-checkbox-checkmark-color, white);
|
||||||
|
transform-origin: 97% 86%;
|
||||||
|
-webkit-transform-origin: 97% 86%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* label */
|
/* label */
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paper-input",
|
"name": "paper-input",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "Material design text fields",
|
"description": "Material design text fields",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
"homepage": "https://github.com/PolymerElements/paper-input",
|
"homepage": "https://github.com/PolymerElements/paper-input",
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"polymer": "Polymer/polymer#^1.2.0",
|
"polymer": "Polymer/polymer#^1.1.0",
|
||||||
"iron-autogrow-textarea": "PolymerElements/iron-autogrow-textarea#^1.0.0",
|
"iron-autogrow-textarea": "PolymerElements/iron-autogrow-textarea#^1.0.0",
|
||||||
"iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
|
"iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
|
||||||
"iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0",
|
"iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0",
|
||||||
|
@ -44,11 +44,11 @@
|
||||||
"web-component-tester": "Polymer/web-component-tester#^3.3.0",
|
"web-component-tester": "Polymer/web-component-tester#^3.3.0",
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"_release": "1.1.0",
|
"_release": "1.1.1",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.1.0",
|
"tag": "v1.1.1",
|
||||||
"commit": "4da53c84914bea289a1748dcaf883d48801ec9e3"
|
"commit": "1bbce220b027dc030b294163f7da6f3e9052ab13"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/paper-input.git",
|
"_source": "git://github.com/polymerelements/paper-input.git",
|
||||||
"_target": "^1.0.9",
|
"_target": "^1.0.9",
|
||||||
|
|
|
@ -1,28 +1,22 @@
|
||||||
language: node_js
|
language: node_js
|
||||||
sudo: false
|
sudo: false
|
||||||
matrix:
|
before_script:
|
||||||
include:
|
- npm install web-component-tester
|
||||||
- node_js: stable
|
- npm install bower
|
||||||
script: xvfb-run wct
|
- 'export PATH=$PWD/node_modules/.bin:$PATH'
|
||||||
addons:
|
- bower install
|
||||||
firefox: latest
|
env:
|
||||||
|
global:
|
||||||
|
- secure: TcDqx+YdNCa/DRQjdKt9dgYCPgXtPl2EZ7Nnv6bRvbcmUjW2eSr7Zwb+e0fO8wgwms/RqFaVx+u5jo7D1lnC4Ybcg1HKiMOvCyzY36MjF9oB/VKSEUC+p4tMVQfw1IZ/RmK3dD+WEWaoT/EKmNfctz7v5kR+yk2lZo44D9I7rrc=
|
||||||
|
- secure: nh65tvhnhOrK05qKvDJKMV7Jm9yiCoG1wFkP3ZnqOHix9Ny+KmcTa41Bl6NXQdvYaMTFtzS7lMZX5cqIziyKyGWHVN30LzGMHJNz12fhcMi3nJ84trhQGcu/9qR9yDv16q9ouGlcz1VxnDOHaRAHnIKjLIbhN3aJtMtZBbnWihA=
|
||||||
|
node_js: 4
|
||||||
|
addons:
|
||||||
|
firefox: '42.0'
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
- google-chrome
|
- google-chrome
|
||||||
packages:
|
packages:
|
||||||
- google-chrome-stable
|
- google-chrome-stable
|
||||||
- node_js: node
|
script:
|
||||||
script:
|
- xvfb-run wct
|
||||||
- |
|
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
||||||
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: TcDqx+YdNCa/DRQjdKt9dgYCPgXtPl2EZ7Nnv6bRvbcmUjW2eSr7Zwb+e0fO8wgwms/RqFaVx+u5jo7D1lnC4Ybcg1HKiMOvCyzY36MjF9oB/VKSEUC+p4tMVQfw1IZ/RmK3dD+WEWaoT/EKmNfctz7v5kR+yk2lZo44D9I7rrc=
|
|
||||||
- secure: nh65tvhnhOrK05qKvDJKMV7Jm9yiCoG1wFkP3ZnqOHix9Ny+KmcTa41Bl6NXQdvYaMTFtzS7lMZX5cqIziyKyGWHVN30LzGMHJNz12fhcMi3nJ84trhQGcu/9qR9yDv16q9ouGlcz1VxnDOHaRAHnIKjLIbhN3aJtMtZBbnWihA=
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "paper-input",
|
"name": "paper-input",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "Material design text fields",
|
"description": "Material design text fields",
|
||||||
"authors": [
|
"authors": [
|
||||||
"The Polymer Authors"
|
"The Polymer Authors"
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
"homepage": "https://github.com/PolymerElements/paper-input",
|
"homepage": "https://github.com/PolymerElements/paper-input",
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"polymer": "Polymer/polymer#^1.2.0",
|
"polymer": "Polymer/polymer#^1.1.0",
|
||||||
"iron-autogrow-textarea": "PolymerElements/iron-autogrow-textarea#^1.0.0",
|
"iron-autogrow-textarea": "PolymerElements/iron-autogrow-textarea#^1.0.0",
|
||||||
"iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
|
"iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
|
||||||
"iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0",
|
"iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0",
|
||||||
|
|
|
@ -461,21 +461,6 @@ This element is `display:block` by default, but you can set the `inline` attribu
|
||||||
} else {
|
} else {
|
||||||
this._handleValue(this._inputElement);
|
this._handleValue(this._inputElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._numberOfPrefixNodes = 0;
|
|
||||||
this._prefixObserver = Polymer.dom(this.$.prefix).observeNodes(
|
|
||||||
function(mutations) {
|
|
||||||
// Keep track whether there's at least one prefix node, since it
|
|
||||||
// affects laying out the floating label.
|
|
||||||
this._numberOfPrefixNodes += mutations.addedNodes.length -
|
|
||||||
mutations.removedNodes.length;
|
|
||||||
}.bind(this));
|
|
||||||
},
|
|
||||||
|
|
||||||
detached: function() {
|
|
||||||
if (this._prefixObserver) {
|
|
||||||
Polymer.dom(this.$.prefix).unobserveNodes(this._prefixObserver);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onAddonAttached: function(event) {
|
_onAddonAttached: function(event) {
|
||||||
|
@ -567,16 +552,15 @@ This element is `display:block` by default, but you can set the `inline` attribu
|
||||||
|
|
||||||
if (alwaysFloatLabel || _inputHasContent) {
|
if (alwaysFloatLabel || _inputHasContent) {
|
||||||
cls += ' label-is-floating';
|
cls += ' label-is-floating';
|
||||||
|
// If the label is floating, ignore any offsets that may have been
|
||||||
|
// applied from a prefix element.
|
||||||
|
this.$.labelAndInputContainer.style.position = 'static';
|
||||||
|
|
||||||
if (invalid) {
|
if (invalid) {
|
||||||
cls += ' is-invalid';
|
cls += ' is-invalid';
|
||||||
} else if (focused) {
|
} else if (focused) {
|
||||||
cls += " label-is-highlighted";
|
cls += " label-is-highlighted";
|
||||||
}
|
}
|
||||||
// If a prefix element exists, the label has a horizontal offset
|
|
||||||
// which needs to be undone when displayed as a floating label.
|
|
||||||
if (this._numberOfPrefixNodes > 0) {
|
|
||||||
this.$.labelAndInputContainer.style.position = 'static';
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// When the label is not floating, it should overlap the input element.
|
// When the label is not floating, it should overlap the input element.
|
||||||
if (label) {
|
if (label) {
|
||||||
|
|
|
@ -40,6 +40,26 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
</template>
|
</template>
|
||||||
</test-fixture>
|
</test-fixture>
|
||||||
|
|
||||||
|
<test-fixture id="prefix">
|
||||||
|
<template>
|
||||||
|
<paper-input-container>
|
||||||
|
<div prefix>$</div>
|
||||||
|
<label id="l">label</label>
|
||||||
|
<input is="iron-input" id="i">
|
||||||
|
</paper-input-container>
|
||||||
|
</template>
|
||||||
|
</test-fixture>
|
||||||
|
|
||||||
|
<test-fixture id="prefix-has-value">
|
||||||
|
<template>
|
||||||
|
<paper-input-container>
|
||||||
|
<div prefix>$</div>
|
||||||
|
<label id="l">label</label>
|
||||||
|
<input is="iron-input" id="i" value="foo">
|
||||||
|
</paper-input-container>
|
||||||
|
</template>
|
||||||
|
</test-fixture>
|
||||||
|
|
||||||
<test-fixture id="has-value">
|
<test-fixture id="has-value">
|
||||||
<template>
|
<template>
|
||||||
<paper-input-container>
|
<paper-input-container>
|
||||||
|
@ -119,9 +139,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
assert.equal(getComputedStyle(container.querySelector('#l')).visibility, 'visible', 'label has visibility:visible');
|
assert.equal(getComputedStyle(container.querySelector('#l')).visibility, 'visible', 'label has visibility:visible');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('label is floated if value is initialized to not null', function() {
|
test('label is floated if value is initialized to not null', function(done) {
|
||||||
var container = fixture('has-value');
|
var container = fixture('has-value');
|
||||||
|
requestAnimationFrame(function() {
|
||||||
assert.notEqual(getTransform(container.querySelector('#l')), 'none', 'label has transform');
|
assert.notEqual(getTransform(container.querySelector('#l')), 'none', 'label has transform');
|
||||||
|
done();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
test('label is invisible if no-label-float and value is initialized to not null', function() {
|
test('label is invisible if no-label-float and value is initialized to not null', function() {
|
||||||
|
@ -132,7 +155,36 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||||
test('label is floated if always-float-label is true', function() {
|
test('label is floated if always-float-label is true', function() {
|
||||||
var container = fixture('always-float');
|
var container = fixture('always-float');
|
||||||
assert.notEqual(getTransform(container.querySelector('#l')), 'none', 'label has transform');
|
assert.notEqual(getTransform(container.querySelector('#l')), 'none', 'label has transform');
|
||||||
})
|
});
|
||||||
|
|
||||||
|
test('label is floated correctly with a prefix', function(done) {
|
||||||
|
var container = fixture('prefix');
|
||||||
|
var label = Polymer.dom(container).querySelector('#l');
|
||||||
|
var input = Polymer.dom(container).querySelector('#i');
|
||||||
|
|
||||||
|
// Label is initially visible.
|
||||||
|
assert.equal(getComputedStyle(label).visibility, 'visible', 'label has visibility:visible');
|
||||||
|
|
||||||
|
// After entering text, the label floats, and it is not indented.
|
||||||
|
input.bindValue = 'foobar';
|
||||||
|
requestAnimationFrame(function() {
|
||||||
|
assert.notEqual(getTransform(label), 'none', 'label has transform');
|
||||||
|
assert.equal(label.getBoundingClientRect().left, container.getBoundingClientRect().left);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test('label is floated correctly with a prefix and prefilled value', function(done) {
|
||||||
|
var container = fixture('prefix-has-value');
|
||||||
|
var label = Polymer.dom(container).querySelector('#l');
|
||||||
|
|
||||||
|
// The label floats, and it is not indented.
|
||||||
|
requestAnimationFrame(function() {
|
||||||
|
assert.notEqual(getTransform(label), 'none', 'label has transform');
|
||||||
|
assert.equal(label.getBoundingClientRect().left, container.getBoundingClientRect().left);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "requirejs",
|
"name": "requirejs",
|
||||||
"version": "2.1.20",
|
"version": "2.1.21",
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "http://requirejs.org",
|
"homepage": "http://requirejs.org",
|
||||||
"authors": [
|
"authors": [
|
||||||
|
@ -15,11 +15,11 @@
|
||||||
"BSD-3-Clause",
|
"BSD-3-Clause",
|
||||||
"MIT"
|
"MIT"
|
||||||
],
|
],
|
||||||
"_release": "2.1.20",
|
"_release": "2.1.21",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "2.1.20",
|
"tag": "2.1.21",
|
||||||
"commit": "eaec2af816f2550c0a4a2b69a4f3a635aec48d29"
|
"commit": "3c1c4d7d6fd882e58828ab561d2a80f744167cd9"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/jrburke/requirejs-bower.git",
|
"_source": "git://github.com/jrburke/requirejs-bower.git",
|
||||||
"_target": "~2.1.19",
|
"_target": "~2.1.19",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "requirejs",
|
"name": "requirejs",
|
||||||
"version": "2.1.19",
|
"version": "2.1.21",
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "http://requirejs.org",
|
"homepage": "http://requirejs.org",
|
||||||
"authors": [
|
"authors": [
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/** vim: et:ts=4:sw=4:sts=4
|
/** vim: et:ts=4:sw=4:sts=4
|
||||||
* @license RequireJS 2.1.20 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
|
* @license RequireJS 2.1.21 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
|
||||||
* Available via the MIT or new BSD license.
|
* Available via the MIT or new BSD license.
|
||||||
* see: http://github.com/jrburke/requirejs for details
|
* see: http://github.com/jrburke/requirejs for details
|
||||||
*/
|
*/
|
||||||
|
@ -12,7 +12,7 @@ var requirejs, require, define;
|
||||||
(function (global) {
|
(function (global) {
|
||||||
var req, s, head, baseElement, dataMain, src,
|
var req, s, head, baseElement, dataMain, src,
|
||||||
interactiveScript, currentlyAddingScript, mainScript, subPath,
|
interactiveScript, currentlyAddingScript, mainScript, subPath,
|
||||||
version = '2.1.20',
|
version = '2.1.21',
|
||||||
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
|
commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
|
||||||
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
|
cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
|
||||||
jsSuffixRegExp = /\.js$/,
|
jsSuffixRegExp = /\.js$/,
|
||||||
|
@ -861,22 +861,11 @@ var requirejs, require, define;
|
||||||
|
|
||||||
if (this.depCount < 1 && !this.defined) {
|
if (this.depCount < 1 && !this.defined) {
|
||||||
if (isFunction(factory)) {
|
if (isFunction(factory)) {
|
||||||
//If there is an error listener, favor passing
|
|
||||||
//to that instead of throwing an error. However,
|
|
||||||
//only do it for define()'d modules. require
|
|
||||||
//errbacks should not be called for failures in
|
|
||||||
//their callbacks (#699). However if a global
|
|
||||||
//onError is set, use that.
|
|
||||||
if ((this.events.error && this.map.isDefine) ||
|
|
||||||
req.onError !== defaultOnError) {
|
|
||||||
try {
|
try {
|
||||||
exports = context.execCb(id, factory, depExports, exports);
|
exports = context.execCb(id, factory, depExports, exports);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
err = e;
|
err = e;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
exports = context.execCb(id, factory, depExports, exports);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Favor return value over exports. If node/cjs in play,
|
// Favor return value over exports. If node/cjs in play,
|
||||||
// then will not have a return value anyway. Favor
|
// then will not have a return value anyway. Favor
|
||||||
|
@ -892,12 +881,30 @@ var requirejs, require, define;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
|
// If there is an error listener, favor passing
|
||||||
|
// to that instead of throwing an error. However,
|
||||||
|
// only do it for define()'d modules. require
|
||||||
|
// errbacks should not be called for failures in
|
||||||
|
// their callbacks (#699). However if a global
|
||||||
|
// onError is set, use that.
|
||||||
|
if ((this.events.error && this.map.isDefine) ||
|
||||||
|
req.onError !== defaultOnError) {
|
||||||
err.requireMap = this.map;
|
err.requireMap = this.map;
|
||||||
err.requireModules = this.map.isDefine ? [this.map.id] : null;
|
err.requireModules = this.map.isDefine ? [this.map.id] : null;
|
||||||
err.requireType = this.map.isDefine ? 'define' : 'require';
|
err.requireType = this.map.isDefine ? 'define' : 'require';
|
||||||
return onError((this.error = err));
|
return onError((this.error = err));
|
||||||
|
} else if (typeof console !== 'undefined' &&
|
||||||
|
console.error) {
|
||||||
|
// Log the error for debugging. If promises could be
|
||||||
|
// used, this would be different, but making do.
|
||||||
|
console.error(err);
|
||||||
|
} else {
|
||||||
|
// Do not want to completely lose the error. While this
|
||||||
|
// will mess up processing and lead to similar results
|
||||||
|
// as bug 1440, it at least surfaces the error.
|
||||||
|
req.onError(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//Just a literal value
|
//Just a literal value
|
||||||
exports = factory;
|
exports = factory;
|
||||||
|
@ -1704,9 +1711,23 @@ var requirejs, require, define;
|
||||||
* Callback for script errors.
|
* Callback for script errors.
|
||||||
*/
|
*/
|
||||||
onScriptError: function (evt) {
|
onScriptError: function (evt) {
|
||||||
var data = getScriptData(evt);
|
data = getScriptData(evt);
|
||||||
if (!hasPathFallback(data.id)) {
|
if (!hasPathFallback(data.id)) {
|
||||||
return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id]));
|
var parents = [];
|
||||||
|
eachProp(registry, function(value, key) {
|
||||||
|
if (key.indexOf('_@r') !== 0) {
|
||||||
|
each(value.depMaps, function(depMap) {
|
||||||
|
if (depMap.id === data.id) {
|
||||||
|
parents.push(key);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return onError(makeError('scripterror', 'Script error for "' + data.id +
|
||||||
|
(parents.length ?
|
||||||
|
'", needed by: ' + parents.join(', ') :
|
||||||
|
'"'), evt, [data.id]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1933,9 +1954,9 @@ var requirejs, require, define;
|
||||||
//In a web worker, use importScripts. This is not a very
|
//In a web worker, use importScripts. This is not a very
|
||||||
//efficient use of importScripts, importScripts will block until
|
//efficient use of importScripts, importScripts will block until
|
||||||
//its script is downloaded and evaluated. However, if web workers
|
//its script is downloaded and evaluated. However, if web workers
|
||||||
//are in play, the expectation that a build has been done so that
|
//are in play, the expectation is that a build has been done so
|
||||||
//only one script needs to be loaded anyway. This may need to be
|
//that only one script needs to be loaded anyway. This may need
|
||||||
//reevaluated if other use cases become common.
|
//to be reevaluated if other use cases become common.
|
||||||
importScripts(url);
|
importScripts(url);
|
||||||
|
|
||||||
//Account for anonymous modules
|
//Account for anonymous modules
|
||||||
|
|
|
@ -18528,21 +18528,6 @@ is separate from validation, and `allowed-pattern` does not affect how the input
|
||||||
} else {
|
} else {
|
||||||
this._handleValue(this._inputElement);
|
this._handleValue(this._inputElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._numberOfPrefixNodes = 0;
|
|
||||||
this._prefixObserver = Polymer.dom(this.$.prefix).observeNodes(
|
|
||||||
function(mutations) {
|
|
||||||
// Keep track whether there's at least one prefix node, since it
|
|
||||||
// affects laying out the floating label.
|
|
||||||
this._numberOfPrefixNodes += mutations.addedNodes.length -
|
|
||||||
mutations.removedNodes.length;
|
|
||||||
}.bind(this));
|
|
||||||
},
|
|
||||||
|
|
||||||
detached: function() {
|
|
||||||
if (this._prefixObserver) {
|
|
||||||
Polymer.dom(this.$.prefix).unobserveNodes(this._prefixObserver);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_onAddonAttached: function(event) {
|
_onAddonAttached: function(event) {
|
||||||
|
@ -18634,16 +18619,15 @@ is separate from validation, and `allowed-pattern` does not affect how the input
|
||||||
|
|
||||||
if (alwaysFloatLabel || _inputHasContent) {
|
if (alwaysFloatLabel || _inputHasContent) {
|
||||||
cls += ' label-is-floating';
|
cls += ' label-is-floating';
|
||||||
|
// If the label is floating, ignore any offsets that may have been
|
||||||
|
// applied from a prefix element.
|
||||||
|
this.$.labelAndInputContainer.style.position = 'static';
|
||||||
|
|
||||||
if (invalid) {
|
if (invalid) {
|
||||||
cls += ' is-invalid';
|
cls += ' is-invalid';
|
||||||
} else if (focused) {
|
} else if (focused) {
|
||||||
cls += " label-is-highlighted";
|
cls += " label-is-highlighted";
|
||||||
}
|
}
|
||||||
// If a prefix element exists, the label has a horizontal offset
|
|
||||||
// which needs to be undone when displayed as a floating label.
|
|
||||||
if (this._numberOfPrefixNodes > 0) {
|
|
||||||
this.$.labelAndInputContainer.style.position = 'static';
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// When the label is not floating, it should overlap the input element.
|
// When the label is not floating, it should overlap the input element.
|
||||||
if (label) {
|
if (label) {
|
||||||
|
@ -19940,6 +19924,7 @@ is separate from validation, and `allowed-pattern` does not affect how the input
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
|
min-width: 18px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
background-color: var(--paper-checkbox-unchecked-background-color, transparent);
|
background-color: var(--paper-checkbox-unchecked-background-color, transparent);
|
||||||
}
|
}
|
||||||
|
@ -19984,31 +19969,19 @@ is separate from validation, and `allowed-pattern` does not affect how the input
|
||||||
|
|
||||||
@-webkit-keyframes checkmark-expand {
|
@-webkit-keyframes checkmark-expand {
|
||||||
0% {
|
0% {
|
||||||
top: 9px;
|
-webkit-transform: scale(0, 0) rotate(45deg);
|
||||||
left: 6px;
|
|
||||||
width: 0px;
|
|
||||||
height: 0px;
|
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
top: -1px;
|
-webkit-transform: scale(1, 1) rotate(45deg);
|
||||||
left: 4px;
|
|
||||||
width: 5px;
|
|
||||||
height: 10px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes checkmark-expand {
|
@keyframes checkmark-expand {
|
||||||
0% {
|
0% {
|
||||||
top: 9px;
|
transform: scale(0, 0) rotate(45deg);
|
||||||
left: 6px;
|
|
||||||
width: 0px;
|
|
||||||
height: 0px;
|
|
||||||
}
|
}
|
||||||
100% {
|
100% {
|
||||||
top: -1px;
|
transform: scale(1, 1) rotate(45deg);
|
||||||
left: 4px;
|
|
||||||
width: 5px;
|
|
||||||
height: 10px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20018,11 +19991,7 @@ is separate from validation, and `allowed-pattern` does not affect how the input
|
||||||
}
|
}
|
||||||
|
|
||||||
#checkmark {
|
#checkmark {
|
||||||
-webkit-transform: rotate(45deg);
|
|
||||||
transform: rotate(45deg);
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -1px;
|
|
||||||
left: 4px;
|
|
||||||
width: 5px;
|
width: 5px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
|
@ -20031,6 +20000,8 @@ is separate from validation, and `allowed-pattern` does not affect how the input
|
||||||
border-right-width: 2px;
|
border-right-width: 2px;
|
||||||
border-bottom-width: 2px;
|
border-bottom-width: 2px;
|
||||||
border-color: var(--paper-checkbox-checkmark-color, white);
|
border-color: var(--paper-checkbox-checkmark-color, white);
|
||||||
|
transform-origin: 97% 86%;
|
||||||
|
-webkit-transform-origin: 97% 86%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* label */
|
/* label */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue