diff --git a/homeassistant/components/frontend/version.py b/homeassistant/components/frontend/version.py index 36b9ca680b2..45088ca50ef 100644 --- a/homeassistant/components/frontend/version.py +++ b/homeassistant/components/frontend/version.py @@ -1,2 +1,2 @@ """ DO NOT MODIFY. Auto-generated by build_frontend script """ -VERSION = "9f0bcf911d2900bfa3649c0003508d86" +VERSION = "ada3e736a0a6e9909f49fd69aaf7b3f7" diff --git a/homeassistant/components/frontend/www_static/frontend.html b/homeassistant/components/frontend/www_static/frontend.html index 53c0bfa021c..a39d69ea9bd 100644 --- a/homeassistant/components/frontend/www_static/frontend.html +++ b/homeassistant/components/frontend/www_static/frontend.html @@ -141,6 +141,12 @@ this.copyOwnProperty(n, api, prototype); } return prototype || api; }, +mixin: function (target, source) { +for (var i in source) { +target[i] = source[i]; +} +return target; +}, copyOwnProperty: function (name, source, target) { var pd = Object.getOwnPropertyDescriptor(source, name); if (pd) { @@ -516,7 +522,7 @@ debouncer.stop(); } } }); -Polymer.version = '1.0.3'; +Polymer.version = '1.0.6'; Polymer.Base._addFeature({ _registerFeatures: function () { this._prepIs(); @@ -540,13 +546,6 @@ this._marshalBehaviors(); - - - @@ -10567,17 +10877,6 @@ is separate from validation, and `allowed-pattern` does not affect how the input - @@ -13072,10 +13431,7 @@ typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Yn._=Zn, def /** * Called when the animation finishes. */ - complete: function() { - // FIXME not sure about non-bubbling event - this.fire(this.animationEndEvent, null, {bubbles: false}); - } + complete: function() {} }; @@ -13094,8 +13450,8 @@ typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Yn._=Zn, def // See the License for the specific language governing permissions and // limitations under the License. -!function(a,b){b["true"]=a;var c={},d={},e={},f=null;!function(a){function b(b,c){var d={delay:0,endDelay:0,fill:c?"both":"none",iterationStart:0,iterations:1,duration:c?"auto":0,playbackRate:1,direction:"normal",easing:"linear"};return"number"!=typeof b||isNaN(b)?void 0!==b&&Object.getOwnPropertyNames(b).forEach(function(c){if("auto"!=b[c]){if(("number"==typeof d[c]||"duration"==c)&&("number"!=typeof b[c]||isNaN(b[c])))return;if("fill"==c&&-1==p.indexOf(b[c]))return;if("direction"==c&&-1==q.indexOf(b[c]))return;if("playbackRate"==c&&1!==b[c]&&a.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;d[c]=b[c]}}):d.duration=b,d}function c(a,c){var d=b(a,c);return d.easing=f(d.easing),d}function d(a,b,c,d){return 0>a||a>1||0>c||c>1?y:function(e){function f(a,b,c){return 3*a*(1-c)*(1-c)*c+3*b*(1-c)*c*c+c*c*c}for(var g=0,h=1;;){var i=(g+h)/2,j=f(a,c,i);if(Math.abs(e-j)<.001)return f(b,d,i);e>j?g=i:h=i}}}function e(a,b){return function(c){if(c>=1)return 1;var d=1/a;return c+=b*d,c-c%d}}function f(a){var b=w.exec(a);if(b)return d.apply(this,b.slice(1).map(Number));var c=x.exec(a);if(c)return e(Number(c[1]),{start:r,middle:s,end:t}[c[2]]);var f=u[a];return f?f:y}function g(a){return Math.abs(h(a)/a.playbackRate)}function h(a){return a.duration*a.iterations}function i(a,b,c){return null==b?z:b=c.delay+a?B:C}function j(a,b,c,d,e){switch(d){case A:return"backwards"==b||"both"==b?0:null;case C:return c-e;case B:return"forwards"==b||"both"==b?a:null;case z:return null}}function k(a,b,c,d){return(d.playbackRate<0?b-a:b)*d.playbackRate+c}function l(a,b,c,d,e){return 1/0===c||c===-1/0||c-d==b&&e.iterations&&(e.iterations+e.iterationStart)%1==0?a:c%a}function m(a,b,c,d){return 0===c?0:b==a?d.iterationStart+d.iterations-1:Math.floor(c/a)}function n(a,b,c,d){var e=a%2>=1,f="normal"==d.direction||d.direction==(e?"alternate-reverse":"alternate"),g=f?c:b-c,h=g/b;return b*d.easing(h)}function o(a,b,c){var d=i(a,b,c),e=j(a,c.fill,b,d,c.delay);if(null===e)return null;if(0===a)return d===A?0:1;var f=c.iterationStart*c.duration,g=k(a,e,f,c),o=l(c.duration,h(c),g,f,c),p=m(c.duration,o,g,c);return n(p,c.duration,o,c)/c.duration}var p="backwards|forwards|both|none".split("|"),q="reverse|alternate|alternate-reverse".split("|"),r=1,s=.5,t=0,u={ease:d(.25,.1,.25,1),"ease-in":d(.42,0,1,1),"ease-out":d(0,0,.58,1),"ease-in-out":d(.42,0,.58,1),"step-start":e(1,r),"step-middle":e(1,s),"step-end":e(1,t)},v="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",w=new RegExp("cubic-bezier\\("+v+","+v+","+v+","+v+"\\)"),x=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,y=function(a){return a},z=0,A=1,B=2,C=3;a.makeTiming=b,a.normalizeTimingInput=c,a.calculateActiveDuration=g,a.calculateTimeFraction=o,a.calculatePhase=i,a.toTimingFunction=f}(c,f),function(a){function b(a,b){return a in h?h[a][b]||b:b}function c(a,c,d){var g=e[a];if(g){f.style[a]=c;for(var h in g){var i=g[h],j=f.style[i];d[i]=b(i,j)}}else d[a]=b(a,c)}function d(b){function d(){var a=e.length;null==e[a-1].offset&&(e[a-1].offset=1),a>1&&null==e[0].offset&&(e[0].offset=0);for(var b=0,c=e[0].offset,d=1;a>d;d++){var f=e[d].offset;if(null!=f){for(var g=1;d-b>g;g++)e[b+g].offset=c+(f-c)*g/(d-b);b=d,c=f}}}if(!Array.isArray(b)&&null!==b)throw new TypeError("Keyframes must be null or an array of keyframes");if(null==b)return[];for(var e=b.map(function(b){var d={};for(var e in b){var f=b[e];if("offset"==e){if(null!=f&&(f=Number(f),!isFinite(f)))throw new TypeError("keyframe offsets must be numbers.")}else{if("composite"==e)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};f="easing"==e?a.toTimingFunction(f):""+f}c(e,f,d)}return void 0==d.offset&&(d.offset=null),void 0==d.easing&&(d.easing=a.toTimingFunction("linear")),d}),f=!0,g=-1/0,h=0;hi)throw{code:DOMException.INVALID_MODIFICATION_ERR,name:"InvalidModificationError",message:"Keyframes are not loosely sorted by offset. Sort or specify offsets."};g=i}else f=!1}return e=e.filter(function(a){return a.offset>=0&&a.offset<=1}),f||d(),e}var e={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},f=document.createElementNS("http://www.w3.org/1999/xhtml","div"),g={thin:"1px",medium:"3px",thick:"5px"},h={borderBottomWidth:g,borderLeftWidth:g,borderRightWidth:g,borderTopWidth:g,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:g,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};a.normalizeKeyframes=d}(c,f),function(a){var b={};a.isDeprecated=function(a,c,d,e){var f=e?"are":"is",g=new Date,h=new Date(c);return h.setMonth(h.getMonth()+3),h>g?(a in b||console.warn("Web Animations: "+a+" "+f+" deprecated and will stop working on "+h.toDateString()+". "+d),b[a]=!0,!1):!0},a.deprecated=function(b,c,d,e){var f=e?"are":"is";if(a.isDeprecated(b,c,d,e))throw new Error(b+" "+f+" no longer supported. "+d)}}(c),function(){if(document.documentElement.animate){var a=document.documentElement.animate([],0),b=!0;if(a&&(b=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(c){void 0===a[c]&&(b=!0)})),!b)return}!function(a,b){function c(a){for(var b={},c=0;c=c&&0==a.startTime||c>=1&&1==a.endTime||c>=a.startTime&&c<=a.endTime}).forEach(function(d){var e=c-d.startTime,f=d.endTime-d.startTime,g=0==f?0:d.easing(e/f);b.apply(a,d.property,d.interpolation(g))});else for(var d in g)"offset"!=d&&"easing"!=d&&"composite"!=d&&b.clear(a,d)}}}(c,d,f),function(a){function b(a,b,c){e[c]=e[c]||[],e[c].push([a,b])}function c(a,c,d){for(var e=0;ed?a:c;if(a.length==c.length){for(var e=[],f=0;f0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(b){b=+b,isNaN(b)||(a.restart(),this.paused||null==this._startTime||(this._startTime=this._timeline.currentTime-b/this._playbackRate),this._currentTimePending=!1,this._currentTime!=b&&(this._tickCurrentTime(b,!0),a.invalidateEffects()))},get startTime(){return this._startTime},set startTime(b){b=+b,isNaN(b)||this.paused||this._idle||(this._startTime=b,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),a.invalidateEffects())},get playbackRate(){return this._playbackRate},set playbackRate(a){if(a!=this._playbackRate){var b=this.currentTime;this._playbackRate=a,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&this.play(),null!=b&&(this.currentTime=b)}},get finished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this.paused&&0!=this.playbackRate||this._currentTimePending?"pending":this.paused?"paused":this.finished?"finished":"running"},play:function(){this.paused=!1,(this.finished||this._idle)&&(this._currentTime=this._playbackRate>0?0:this._totalDuration,this._startTime=null,a.invalidateEffects()),this._finishedFlag=!1,a.restart(),this._idle=!1,this._ensureAlive()},pause:function(){this.finished||this.paused||this._idle||(this._currentTimePending=!0),this._startTime=null,this.paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1)},cancel:function(){this._inEffect=!1,this._idle=!0,this.currentTime=0,this._startTime=null},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(a,b){"function"==typeof b&&"finish"==a&&this._finishHandlers.push(b)},removeEventListener:function(a,b){if("finish"==a){var c=this._finishHandlers.indexOf(b);c>=0&&this._finishHandlers.splice(c,1)}},_fireEvents:function(a){var b=this.finished;if((b||this._idle)&&!this._finishedFlag){var d=new c(this,this._currentTime,a),e=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){e.forEach(function(a){a.call(d.target,d)})},0)}this._finishedFlag=b},_tick:function(a){return this._idle||this.paused||(null==this._startTime?this.startTime=a-this._currentTime/this.playbackRate:this.finished||this._tickCurrentTime((a-this._startTime)*this.playbackRate)),this._currentTimePending=!1,this._fireEvents(a),!this._idle&&(this._inEffect||!this._finishedFlag)}}}(d,f),function(a,b){function c(a){var b=i;i=[],g(a),b.forEach(function(b){b[1](a)}),m&&g(a),f()}function d(a,b){return a._sequenceNumber-b._sequenceNumber}function e(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function f(){n.forEach(function(a){a()}),n.length=0}function g(a){l=!1;var c=b.timeline;c.currentTime=a,c._animations.sort(d),k=!1;var e=c._animations;c._animations=[];var f=[],g=[];e=e.filter(function(b){return b._inTimeline=b._tick(a),b._inEffect?g.push(b._effect):f.push(b._effect),b.finished||b.paused||b._idle||(k=!0),b._inTimeline}),n.push.apply(n,f),n.push.apply(n,g),c._animations.push.apply(c._animations,e),m=!1,k&&requestAnimationFrame(function(){})}var h=window.requestAnimationFrame,i=[],j=0;window.requestAnimationFrame=function(a){var b=j++;return 0==i.length&&h(c),i.push([b,a]),b},window.cancelAnimationFrame=function(a){i.forEach(function(b){b[0]==a&&(b[1]=function(){})})},e.prototype={_play:function(c){c._timing=a.normalizeTimingInput(c.timing);var d=new b.Animation(c);return d._idle=!1,d._timeline=this,this._animations.push(d),b.restart(),b.invalidateEffects(),d}};var k=!1,l=!1;b.restart=function(){return k||(k=!0,requestAnimationFrame(function(){}),l=!0),l};var m=!1;b.invalidateEffects=function(){m=!0};var n=[],o=window.getComputedStyle;Object.defineProperty(window,"getComputedStyle",{configurable:!0,enumerable:!0,value:function(){return m&&g(p.currentTime),f(),o.apply(this,arguments)}});var p=new e;b.timeline=p}(c,d,f),function(a){function b(a,b){var c=a.exec(b);return c?(c=a.ignoreCase?c[0].toLowerCase():c[0],[c,b.substr(c.length)]):void 0}function c(a,b){b=b.replace(/^\s*/,"");var c=a(b);return c?[c[0],c[1].replace(/^\s*/,"")]:void 0}function d(a,d,e){a=c.bind(null,a);for(var f=[];;){var g=a(e);if(!g)return[f,e];if(f.push(g[0]),e=g[1],g=b(d,e),!g||""==g[1])return[f,e];e=g[1]}}function e(a,b){for(var c=0,d=0;d=c))break;var e=a(b.substr(0,d));return void 0==e?void 0:[e,b.substr(d)]}function f(a,b){for(var c=a,d=b;c&&d;)c>d?c%=d:d%=c;return c=a*b/(c+d)}function g(a){return function(b){var c=a(b);return c&&(c[0]=void 0),c}}function h(a,b){return function(c){var d=a(c);return d?d:[b,c]}}function i(b,c){for(var d=[],e=0;ek;k++){var l=b(d[k%d.length],e[k%e.length]);if(!l)return;g.push(l[0]),h.push(l[1]),i.push(l[2])}return[g,h,function(b){var d=b.map(function(a,b){return i[b](a)}).join(c);return a?a(d):d}]}function k(a,b,c){for(var d=[],e=[],f=[],g=0,h=0;h=c?a:c>=1?b:"visible"}]:void 0}a.addPropertiesHandler(String,b,["visibility"])}(d),function(a){function b(a){a=a.trim(),e.fillStyle="#000",e.fillStyle=a;var b=e.fillStyle;if(e.fillStyle="#fff",e.fillStyle=a,b==e.fillStyle){e.fillRect(0,0,1,1);var c=e.getImageData(0,0,1,1).data;e.clearRect(0,0,1,1);var d=c[3]/255;return[c[0]*d,c[1]*d,c[2]*d,d]}}function c(b,c){return[b,c,function(b){function c(a){return Math.max(0,Math.min(255,a))}if(b[3])for(var d=0;3>d;d++)b[d]=Math.round(c(b[d]/b[3]));return b[3]=a.numberToString(a.clamp(0,1,b[3])),"rgba("+b.join(",")+")"}]}var d=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");d.width=d.height=1;var e=d.getContext("2d");a.addPropertiesHandler(b,c,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","outline-color","text-decoration-color"]),a.consumeColor=a.consumeParenthesised.bind(null,b),a.mergeColors=c}(d,f),function(a,b){function c(a,b){if(b=b.trim().toLowerCase(),"0"==b&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var c={};b=b.replace(a,function(a){return c[a]=null,"U"+a});for(var d="U("+a.source+")",e=b.replace(/[-+]?(\d*\.)?\d+/g,"N").replace(new RegExp("N"+d,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),f=[/N\*(D)/g,/(N|D)[*/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],g=0;g1?"calc("+c+")":c}]}var f="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",g=c.bind(null,new RegExp(f,"g")),h=c.bind(null,new RegExp(f+"|%","g")),i=c.bind(null,/deg|rad|grad|turn/g);a.parseLength=g,a.parseLengthOrPercent=h,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,h),a.parseAngle=i,a.mergeDimensions=e;var j=a.consumeParenthesised.bind(null,g),k=a.consumeRepeated.bind(void 0,j,/^/),l=a.consumeRepeated.bind(void 0,k,/^,/);a.consumeSizePairList=l;var m=function(a){var b=l(a);return b&&""==b[1]?b[0]:void 0},n=a.mergeNestedRepeated.bind(void 0,d," "),o=a.mergeNestedRepeated.bind(void 0,n,",");a.mergeNonNegativeSizePair=n,a.addPropertiesHandler(m,o,["background-size"]),a.addPropertiesHandler(h,d,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(h,e,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","text-indent","top","vertical-align","word-spacing"])}(d,f),function(a){function b(b){return a.consumeLengthOrPercent(b)||a.consumeToken(/^auto/,b)}function c(c){var d=a.consumeList([a.ignore(a.consumeToken.bind(null,/^rect/)),a.ignore(a.consumeToken.bind(null,/^\(/)),a.consumeRepeated.bind(null,b,/^,/),a.ignore(a.consumeToken.bind(null,/^\)/))],c);return d&&4==d[0].length?d[0]:void 0}function d(b,c){return"auto"==b||"auto"==c?[!0,!1,function(d){var e=d?b:c;if("auto"==e)return"auto";var f=a.mergeDimensions(e,e);return f[2](f[0])}]:a.mergeDimensions(b,c)}function e(a){return"rect("+a+")"}var f=a.mergeWrappedNestedRepeated.bind(null,e,d,", ");a.parseBox=c,a.mergeBoxes=f,a.addPropertiesHandler(c,f,["clip"])}(d,f),function(a){function b(a){return function(b){var c=0;return a.map(function(a){return a===j?b[c++]:a})}}function c(a){return a}function d(b){if(b=b.toLowerCase().trim(),"none"==b)return[];for(var c,d=/\s*(\w+)\(([^)]*)\)/g,e=[],f=0;c=d.exec(b);){if(c.index!=f)return;f=c.index+c[0].length;var g=c[1],h=m[g];if(!h)return;var i=c[2].split(","),j=h[0];if(j.lengtha||a>1||0>c||c>1?z:function(e){function f(a,b,c){return 3*a*(1-c)*(1-c)*c+3*b*(1-c)*c*c+c*c*c}if(0==e||1==e)return e;for(var g=0,h=1;;){var i=(g+h)/2,j=f(a,c,i);if(Math.abs(e-j)<.001)return f(b,d,i);e>j?g=i:h=i}}}function f(a,b){return function(c){if(c>=1)return 1;var d=1/a;return c+=b*d,c-c%d}}function g(a){var b=x.exec(a);if(b)return e.apply(this,b.slice(1).map(Number));var c=y.exec(a);if(c)return f(Number(c[1]),{start:s,middle:t,end:u}[c[2]]);var d=v[a];return d?d:z}function h(a){return Math.abs(i(a)/a.playbackRate)}function i(a){return a.duration*a.iterations}function j(a,b,c){return null==b?A:b=c.delay+a?C:D}function k(a,b,c,d,e){switch(d){case B:return"backwards"==b||"both"==b?0:null;case D:return c-e;case C:return"forwards"==b||"both"==b?a:null;case A:return null}}function l(a,b,c,d){return(d.playbackRate<0?b-a:b)*d.playbackRate+c}function m(a,b,c,d,e){return 1/0===c||c===-1/0||c-d==b&&e.iterations&&(e.iterations+e.iterationStart)%1==0?a:c%a}function n(a,b,c,d){return 0===c?0:b==a?d.iterationStart+d.iterations-1:Math.floor(c/a)}function o(a,b,c,d){var e=a%2>=1,f="normal"==d.direction||d.direction==(e?"alternate-reverse":"alternate"),g=f?c:b-c,h=g/b;return b*d.easing(h)}function p(a,b,c){var d=j(a,b,c),e=k(a,c.fill,b,d,c.delay);if(null===e)return null;if(0===a)return d===B?0:1;var f=c.iterationStart*c.duration,g=l(a,e,f,c),h=m(c.duration,i(c),g,f,c),p=n(c.duration,h,g,c);return o(p,c.duration,h,c)/c.duration}var q="backwards|forwards|both|none".split("|"),r="reverse|alternate|alternate-reverse".split("|"),s=1,t=.5,u=0,v={ease:e(.25,.1,.25,1),"ease-in":e(.42,0,1,1),"ease-out":e(0,0,.58,1),"ease-in-out":e(.42,0,.58,1),"step-start":f(1,s),"step-middle":f(1,t),"step-end":f(1,u)},w="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",x=new RegExp("cubic-bezier\\("+w+","+w+","+w+","+w+"\\)"),y=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,z=function(a){return a},A=0,B=1,C=2,D=3;a.cloneTimingInput=b,a.makeTiming=c,a.normalizeTimingInput=d,a.calculateActiveDuration=h,a.calculateTimeFraction=p,a.calculatePhase=j,a.toTimingFunction=g}(c,f),function(a){function b(a,b){return a in h?h[a][b]||b:b}function c(a,c,d){var g=e[a];if(g){f.style[a]=c;for(var h in g){var i=g[h],j=f.style[i];d[i]=b(i,j)}}else d[a]=b(a,c)}function d(b){function d(){var a=e.length;null==e[a-1].offset&&(e[a-1].offset=1),a>1&&null==e[0].offset&&(e[0].offset=0);for(var b=0,c=e[0].offset,d=1;a>d;d++){var f=e[d].offset;if(null!=f){for(var g=1;d-b>g;g++)e[b+g].offset=c+(f-c)*g/(d-b);b=d,c=f}}}if(!Array.isArray(b)&&null!==b)throw new TypeError("Keyframes must be null or an array of keyframes");if(null==b)return[];for(var e=b.map(function(b){var d={};for(var e in b){var f=b[e];if("offset"==e){if(null!=f&&(f=Number(f),!isFinite(f)))throw new TypeError("keyframe offsets must be numbers.")}else{if("composite"==e)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};f="easing"==e?a.toTimingFunction(f):""+f}c(e,f,d)}return void 0==d.offset&&(d.offset=null),void 0==d.easing&&(d.easing=a.toTimingFunction("linear")),d}),f=!0,g=-1/0,h=0;hi)throw{code:DOMException.INVALID_MODIFICATION_ERR,name:"InvalidModificationError",message:"Keyframes are not loosely sorted by offset. Sort or specify offsets."};g=i}else f=!1}return e=e.filter(function(a){return a.offset>=0&&a.offset<=1}),f||d(),e}var e={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},f=document.createElementNS("http://www.w3.org/1999/xhtml","div"),g={thin:"1px",medium:"3px",thick:"5px"},h={borderBottomWidth:g,borderLeftWidth:g,borderRightWidth:g,borderTopWidth:g,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:g,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};a.normalizeKeyframes=d}(c,f),function(a){var b={};a.isDeprecated=function(a,c,d,e){var f=e?"are":"is",g=new Date,h=new Date(c);return h.setMonth(h.getMonth()+3),h>g?(a in b||console.warn("Web Animations: "+a+" "+f+" deprecated and will stop working on "+h.toDateString()+". "+d),b[a]=!0,!1):!0},a.deprecated=function(b,c,d,e){var f=e?"are":"is";if(a.isDeprecated(b,c,d,e))throw new Error(b+" "+f+" no longer supported. "+d)}}(c),function(){if(document.documentElement.animate){var a=document.documentElement.animate([],0),b=!0;if(a&&(b=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(c){void 0===a[c]&&(b=!0)})),!b)return}!function(a,b){function c(a){for(var b={},c=0;c=c&&0==a.startTime||c>=1&&1==a.endTime||c>=a.startTime&&c<=a.endTime}).forEach(function(d){var e=c-d.startTime,f=d.endTime-d.startTime,g=0==f?0:d.easing(e/f);b.apply(a,d.property,d.interpolation(g))});else for(var d in g)"offset"!=d&&"easing"!=d&&"composite"!=d&&b.clear(a,d)}}}(c,d,f),function(a){function b(a,b,c){e[c]=e[c]||[],e[c].push([a,b])}function c(a,c,d){for(var e=0;ed?a:c;if(a.length==c.length){for(var e=[],f=0;f0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(a){a=+a,isNaN(a)||(b.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-a/this._playbackRate),this._currentTimePending=!1,this._currentTime!=a&&(this._tickCurrentTime(a,!0),b.invalidateEffects()))},get startTime(){return this._startTime},set startTime(a){a=+a,isNaN(a)||this._paused||this._idle||(this._startTime=a,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),b.invalidateEffects())},get playbackRate(){return this._playbackRate},set playbackRate(a){if(a!=this._playbackRate){var b=this.currentTime;this._playbackRate=a,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&this.play(),null!=b&&(this.currentTime=b)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._currentTime=this._playbackRate>0?0:this._totalDuration,this._startTime=null,b.invalidateEffects()),this._finishedFlag=!1,b.restart(),this._idle=!1,this._ensureAlive()},pause:function(){this._isFinished||this._paused||this._idle||(this._currentTimePending=!0),this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1)},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this.currentTime=0,this._startTime=null,this._effect._update(null),b.invalidateEffects(),b.restart())},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(a,b){"function"==typeof b&&"finish"==a&&this._finishHandlers.push(b)},removeEventListener:function(a,b){if("finish"==a){var c=this._finishHandlers.indexOf(b);c>=0&&this._finishHandlers.splice(c,1)}},_fireEvents:function(a){var b=this._isFinished;if((b||this._idle)&&!this._finishedFlag){var d=new c(this,this._currentTime,a),e=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){e.forEach(function(a){a.call(d.target,d)})},0)}this._finishedFlag=b},_tick:function(a){return this._idle||this._paused||(null==this._startTime?this.startTime=a-this._currentTime/this.playbackRate:this._isFinished||this._tickCurrentTime((a-this._startTime)*this.playbackRate)),this._currentTimePending=!1,this._fireEvents(a),!this._idle&&(this._inEffect||!this._finishedFlag)}}}(c,d,f),function(a,b){function c(a){var b=i;i=[],a0&&(s.currentTime+=q*(Math.floor((a-s.currentTime)/q)+1)),g(s.currentTime)}return f(),r.apply(this,arguments)}});var s=new e;b.timeline=s}(c,d,f),function(a){function b(a,b){var c=a.exec(b);return c?(c=a.ignoreCase?c[0].toLowerCase():c[0],[c,b.substr(c.length)]):void 0}function c(a,b){b=b.replace(/^\s*/,"");var c=a(b);return c?[c[0],c[1].replace(/^\s*/,"")]:void 0}function d(a,d,e){a=c.bind(null,a);for(var f=[];;){var g=a(e);if(!g)return[f,e];if(f.push(g[0]),e=g[1],g=b(d,e),!g||""==g[1])return[f,e];e=g[1]}}function e(a,b){for(var c=0,d=0;d=c))break;var e=a(b.substr(0,d));return void 0==e?void 0:[e,b.substr(d)]}function f(a,b){for(var c=a,d=b;c&&d;)c>d?c%=d:d%=c;return c=a*b/(c+d)}function g(a){return function(b){var c=a(b);return c&&(c[0]=void 0),c}}function h(a,b){return function(c){var d=a(c);return d?d:[b,c]}}function i(b,c){for(var d=[],e=0;ek;k++){var l=b(d[k%d.length],e[k%e.length]);if(!l)return;g.push(l[0]),h.push(l[1]),i.push(l[2])}return[g,h,function(b){var d=b.map(function(a,b){return i[b](a)}).join(c);return a?a(d):d}]}function k(a,b,c){for(var d=[],e=[],f=[],g=0,h=0;h=c?a:c>=1?b:"visible"}]:void 0}a.addPropertiesHandler(String,b,["visibility"])}(d),function(a){function b(a){a=a.trim(),e.fillStyle="#000",e.fillStyle=a;var b=e.fillStyle;if(e.fillStyle="#fff",e.fillStyle=a,b==e.fillStyle){e.fillRect(0,0,1,1);var c=e.getImageData(0,0,1,1).data;e.clearRect(0,0,1,1);var d=c[3]/255;return[c[0]*d,c[1]*d,c[2]*d,d]}}function c(b,c){return[b,c,function(b){function c(a){return Math.max(0,Math.min(255,a))}if(b[3])for(var d=0;3>d;d++)b[d]=Math.round(c(b[d]/b[3]));return b[3]=a.numberToString(a.clamp(0,1,b[3])),"rgba("+b.join(",")+")"}]}var d=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");d.width=d.height=1;var e=d.getContext("2d");a.addPropertiesHandler(b,c,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","outline-color","text-decoration-color"]),a.consumeColor=a.consumeParenthesised.bind(null,b),a.mergeColors=c}(d,f),function(a,b){function c(a,b){if(b=b.trim().toLowerCase(),"0"==b&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var c={};b=b.replace(a,function(a){return c[a]=null,"U"+a});for(var d="U("+a.source+")",e=b.replace(/[-+]?(\d*\.)?\d+/g,"N").replace(new RegExp("N"+d,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),f=[/N\*(D)/g,/(N|D)[*/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],g=0;g1?"calc("+c+")":c}]}var f="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",g=c.bind(null,new RegExp(f,"g")),h=c.bind(null,new RegExp(f+"|%","g")),i=c.bind(null,/deg|rad|grad|turn/g);a.parseLength=g,a.parseLengthOrPercent=h,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,h),a.parseAngle=i,a.mergeDimensions=e;var j=a.consumeParenthesised.bind(null,g),k=a.consumeRepeated.bind(void 0,j,/^/),l=a.consumeRepeated.bind(void 0,k,/^,/);a.consumeSizePairList=l;var m=function(a){var b=l(a);return b&&""==b[1]?b[0]:void 0},n=a.mergeNestedRepeated.bind(void 0,d," "),o=a.mergeNestedRepeated.bind(void 0,n,",");a.mergeNonNegativeSizePair=n,a.addPropertiesHandler(m,o,["background-size"]),a.addPropertiesHandler(h,d,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(h,e,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","text-indent","top","vertical-align","word-spacing"])}(d,f),function(a){function b(b){return a.consumeLengthOrPercent(b)||a.consumeToken(/^auto/,b)}function c(c){var d=a.consumeList([a.ignore(a.consumeToken.bind(null,/^rect/)),a.ignore(a.consumeToken.bind(null,/^\(/)),a.consumeRepeated.bind(null,b,/^,/),a.ignore(a.consumeToken.bind(null,/^\)/))],c);return d&&4==d[0].length?d[0]:void 0}function d(b,c){return"auto"==b||"auto"==c?[!0,!1,function(d){var e=d?b:c;if("auto"==e)return"auto";var f=a.mergeDimensions(e,e);return f[2](f[0])}]:a.mergeDimensions(b,c)}function e(a){return"rect("+a+")"}var f=a.mergeWrappedNestedRepeated.bind(null,e,d,", ");a.parseBox=c,a.mergeBoxes=f,a.addPropertiesHandler(c,f,["clip"])}(d,f),function(a){function b(a){return function(b){var c=0;return a.map(function(a){return a===j?b[c++]:a})}}function c(a){return a}function d(b){if(b=b.toLowerCase().trim(),"none"==b)return[];for(var c,d=/\s*(\w+)\(([^)]*)\)/g,e=[],f=0;c=d.exec(b);){if(c.index!=f)return;f=c.index+c[0].length;var g=c[1],h=m[g];if(!h)return;var i=c[2].split(","),j=h[0];if(j.length @@ -13274,9 +13630,10 @@ typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Yn._=Zn, def /** * `Polymer.NeonAnimationRunnerBehavior` adds a method to run animations. - * @polymerBehavior + * + * @polymerBehavior Polymer.NeonAnimationRunnerBehavior */ - Polymer.NeonAnimationRunnerBehavior = [Polymer.NeonAnimatableBehavior, { + Polymer.NeonAnimationRunnerBehaviorImpl = { properties: { @@ -13287,6 +13644,7 @@ typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Yn._=Zn, def } }, + /** @type {?Object} */ _player: { type: Object } @@ -13317,7 +13675,7 @@ typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Yn._=Zn, def }, _runAnimationEffects: function(allEffects) { - return player = document.timeline.play(new GroupEffect(allEffects)); + return document.timeline.play(new GroupEffect(allEffects)); }, _completeAnimations: function(allAnimations) { @@ -13328,6 +13686,8 @@ typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Yn._=Zn, def /** * Plays an animation with an optional `type`. + * @param {string=} type + * @param {!Object=} cookie */ playAnimation: function(type, cookie) { var allConfigs = this.getAnimationConfig(type); @@ -13365,8 +13725,13 @@ typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Yn._=Zn, def this._player.cancel(); } } + }; - }]; + /** @polymerBehavior Polymer.NeonAnimationRunnerBehavior */ + Polymer.NeonAnimationRunnerBehavior = [ + Polymer.NeonAnimatableBehavior, + Polymer.NeonAnimationRunnerBehaviorImpl + ]; - @@ -15527,6 +15930,7 @@ window.hass.uiUtil.domainIcon = function(domain, state) { this.wave.style.transform = 'scale3d(' + scale + ',' + scale + ',1)'; }, + /** @param {Event=} event */ downAction: function(event) { var xCenter = this.containerMetrics.width / 2; var yCenter = this.containerMetrics.height / 2; @@ -15571,6 +15975,7 @@ window.hass.uiUtil.domainIcon = function(domain, state) { this.waveContainer.style.height = this.containerMetrics.size + 'px'; }, + /** @param {Event=} event */ upAction: function(event) { if (!this.isMouseDown) { return; @@ -15694,11 +16099,9 @@ window.hass.uiUtil.domainIcon = function(domain, state) { var ownerRoot = Polymer.dom(this).getOwnerRoot(); var target; - if (ownerRoot) { + if (this.parentNode.nodeType == 11) { // DOCUMENT_FRAGMENT_NODE target = ownerRoot.host; - } - - if (!target) { + } else { target = this.parentNode; } @@ -15712,8 +16115,8 @@ window.hass.uiUtil.domainIcon = function(domain, state) { }, attached: function() { - this._listen(this.target, 'up', this.upAction.bind(this)); - this._listen(this.target, 'down', this.downAction.bind(this)); + this.listen(this.target, 'up', 'upAction'); + this.listen(this.target, 'down', 'downAction'); if (!this.target.hasAttribute('noink')) { this.keyEventTarget = this.target; @@ -15739,6 +16142,7 @@ window.hass.uiUtil.domainIcon = function(domain, state) { }, 1); }, + /** @param {Event=} event */ downAction: function(event) { if (this.holdDown && this.ripples.length > 0) { return; @@ -15753,6 +16157,7 @@ window.hass.uiUtil.domainIcon = function(domain, state) { } }, + /** @param {Event=} event */ upAction: function(event) { if (this.holdDown) { return; @@ -15888,12 +16293,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN left: -15px; width: 48px; height: 48px; - color: var(--paper-checkbox-unchecked-ink-color); + color: var(--paper-checkbox-unchecked-ink-color, --primary-text-color); opacity: 0.6; } :host #ink[checked] { - color: var(--paper-checkbox-checked-ink-color); + color: var(--paper-checkbox-checked-ink-color, --default-primary-color); } :host #checkbox { @@ -15901,7 +16306,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN box-sizing: border-box; height: 100%; border: solid 2px; - border-color: var(--paper-checkbox-unchecked-color); + border-color: var(--paper-checkbox-unchecked-color, --primary-text-color); border-radius: 2px; pointer-events: none; -webkit-transition: background-color 140ms, border-color 140ms; @@ -15945,8 +16350,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN } :host #checkbox.checked { - background-color: var(--paper-checkbox-checked-color); - border-color: var(--paper-checkbox-checked-color); + background-color: var(--paper-checkbox-checked-color, --default-primary-color); + border-color: var(--paper-checkbox-checked-color, --default-primary-color); } :host #checkmark { @@ -15973,7 +16378,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN padding-left: 8px; white-space: normal; pointer-events: none; - color: var(--paper-checkbox-label-color); + color: var(--paper-checkbox-label-color, --primary-text-color); } #checkboxLabel[hidden] { @@ -15987,11 +16392,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN :host([disabled]) #checkbox { opacity: 0.5; - border-color: var(--paper-checkbox-unchecked-color); + border-color: var(--paper-checkbox-unchecked-color, --primary-text-color); } :host([disabled][checked]) #checkbox { - background-color: var(--paper-checkbox-unchecked-color); + background-color: var(--paper-checkbox-unchecked-color, --primary-text-color); opacity: 0.5; } @@ -16019,7 +16424,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN is: 'paper-checkbox', behaviors: [ - Polymer.PaperRadioButtonBehavior + Polymer.PaperInkyFocusBehavior ], hostAttributes: { @@ -16092,12 +16497,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN if (checked) { return 'checked'; } + return ''; }, _computeCheckmarkClass: function(checked) { if (!checked) { return 'hidden'; } + return ''; } }) @@ -16320,7 +16727,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN background: var(--paper-input-container-focus-color, --default-primary-color); } - .is-highlighted .focused-line { + .underline.is-highlighted .focused-line { -webkit-transform: none; transform: none; -webkit-transition: -webkit-transform 0.25s; @@ -16329,7 +16736,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN @apply(--paper-transition-easing); } - .is-invalid .focused-line { + .underline.is-invalid .focused-line { background: var(--paper-input-container-invalid-color, --google-red-500); -webkit-transform: none; @@ -16516,10 +16923,10 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, _addons: { - type: Array, - value: function() { - return []; - } + type: Array + // do not set a default value here intentionally - it will be initialized lazily when a + // distributed child is attached, which may occur before configuration for this element + // in polyfill. }, _inputHasContent: { @@ -16549,7 +16956,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN _boundOnInput: { type: Function, value: function() { - this._onInput.bind(this) + return this._onInput.bind(this); } }, @@ -16580,6 +16987,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, ready: function() { + if (!this._addons) { + this._addons = []; + } this.addEventListener('focus', this._boundOnFocus, true); this.addEventListener('blur', this._boundOnBlur, true); if (this.attrForValue) { @@ -16594,8 +17004,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN }, _onAddonAttached: function(event) { - this._addons.push(event.target); - this._handleValue(this._inputElement); + if (!this._addons) { + this._addons = []; + } + var target = event.target; + if (this._addons.indexOf(target) === -1) { + this._addons.push(target); + if (this.isAttached) { + this._handleValue(this._inputElement); + } + } }, _onFocus: function() { @@ -17428,8 +17846,8 @@ 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 - */ + :host { display: block; position: absolute; @@ -17446,16 +17864,16 @@ iron-selector > #drawer { left: 0; height: 100%; background-color: white; - will-change: transform; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; @apply(--paper-drawer-panel-drawer-container); } .transition > #drawer { - transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s; - transition: transform ease-in-out 0.3s, width ease-in-out 0.3s; + transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s, visibility 0.3s; + transition: transform ease-in-out 0.3s, width ease-in-out 0.3s, visibility 0.3s; } .left-drawer > #drawer { @@ -17510,6 +17928,10 @@ iron-selector > #main { background-color: rgba(0, 0, 0, 0.3); } +.narrow-layout > #drawer { + will-change: transform; +} + .narrow-layout > #drawer.iron-selected { box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15); } @@ -17529,19 +17951,24 @@ iron-selector > #main { .right-drawer.narrow-layout > #drawer:not(.iron-selected) { left: auto; + visibility: hidden; + -webkit-transform: translateX(100%); transform: translateX(100%); } +.right-drawer.narrow-layout.dragging > #drawer:not(.iron-selected), +.right-drawer.narrow-layout.peeking > #drawer:not(.iron-selected) { + visibility: visible; +} + .narrow-layout > #main { - left: 0 !important; padding: 0; } .right-drawer.narrow-layout > #main { left: 0; right: 0; - padding: 0; } .narrow-layout > #main:not(.iron-selected) > #scrim, @@ -17555,8 +17982,9 @@ iron-selector > #main { min-height: 100%; left: 0; right: 0; - box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { @@ -17568,7 +17996,7 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { - +
@@ -17617,17 +18045,24 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { */ /** - * Fired when the selected panel changes. + * Fired when the a panel is selected. * * Listening for this event is an alternative to observing changes in the `selected` attribute. - * This event is fired both when a panel is selected and deselected. - * The `isSelected` detail property contains the selection state. + * This event is fired both when a panel is selected. * - * @event paper-select {{isSelected: boolean, item: Object}} detail - - * isSelected: True for selection and false for deselection. + * @event iron-select {{item: Object}} detail - * item: The panel that the event refers to. */ + /** + * Fired when a panel is deselected. + * + * Listening for this event is an alternative to observing changes in the `selected` attribute. + * This event is fired both when a panel is deselected. + * + * @event iron-deselect {{item: Object}} detail - + * item: The panel that the event refers to. + */ properties: { /** @@ -17660,7 +18095,9 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { */ dragging: { type: Boolean, - value: false + value: false, + readOnly: true, + notify: true }, /** @@ -17716,6 +18153,7 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { reflectToAttribute: true, type: Boolean, value: false, + readOnly: true, notify: true }, @@ -17724,7 +18162,9 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { */ peeking: { type: Boolean, - value: false + value: false, + readOnly: true, + notify: true }, /** @@ -17749,6 +18189,7 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { */ selected: { reflectToAttribute: true, + notify: true, type: String, value: null }, @@ -17820,13 +18261,14 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { this.transition = true; }, - _computeIronSelectorClass: function(narrow, transition, dragging, rightDrawer) { + _computeIronSelectorClass: function(narrow, transition, dragging, rightDrawer, peeking) { return classNames({ dragging: dragging, 'narrow-layout': narrow, 'right-drawer': rightDrawer, 'left-drawer': !rightDrawer, - transition: transition + transition: transition, + peeking: peeking }); }, @@ -17841,8 +18283,6 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { if (rightDrawer) { style += 'right:' + (narrow ? '' : drawerWidth) + ';'; - } else { - style += 'right:;'; } return style; @@ -17856,26 +18296,26 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { return !narrow || disableEdgeSwipe; }, - _onTrack: function(e) { + _onTrack: function(event) { if (sharedPanel && this !== sharedPanel) { return; } - switch (e.detail.state) { + switch (event.detail.state) { case 'start': - this._trackStart(e); + this._trackStart(event); break; case 'track': - this._trackX(e); + this._trackX(event); break; case 'end': - this._trackEnd(e); + this._trackEnd(event); break; } }, _responsiveChange: function(narrow) { - this.narrow = narrow; + this._setNarrow(narrow); if (this.narrow) { this.selected = this.defaultSelected; @@ -17885,8 +18325,8 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { this.fire('paper-responsive-change', {narrow: this.narrow}); }, - _onQueryMatchesChanged: function(e) { - this._responsiveChange(e.detail.value); + _onQueryMatchesChanged: function(event) { + this._responsiveChange(event.detail.value); }, _forceNarrowChanged: function() { @@ -17906,19 +18346,21 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { this.width = this.$.drawer.offsetWidth; this._moveDrawer(this._translateXForDeltaX(this.rightDrawer ? -this.edgeSwipeSensitivity : this.edgeSwipeSensitivity)); - this.peeking = true; + this._setPeeking(true); }, _stopEdgePeek: function() { if (this.peeking) { - this.peeking = false; + this._setPeeking(false); this._moveDrawer(null); } }, - _downHandler: function(e) { - if (!this.dragging && this._isMainSelected() && this._isEdgeTouch(e) && !sharedPanel) { + _downHandler: function(event) { + if (!this.dragging && this._isMainSelected() && this._isEdgeTouch(event) && !sharedPanel) { this._startEdgePeek(); + // cancel selection + event.preventDefault(); // grab this panel sharedPanel = this; } @@ -17930,8 +18372,8 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { sharedPanel = null; }, - _onTap: function(e) { - var targetElement = Polymer.dom(e).localTarget; + _onTap: function(event) { + var targetElement = Polymer.dom(event).localTarget; var isTargetToggleElement = targetElement && this.drawerToggleAttribute && targetElement.hasAttribute(this.drawerToggleAttribute); @@ -17941,8 +18383,8 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { } }, - _isEdgeTouch: function(e) { - var x = e.detail.x; + _isEdgeTouch: function(event) { + var x = event.detail.x; return !this.disableEdgeSwipe && this._swipeAllowed() && (this.rightDrawer ? @@ -17950,13 +18392,13 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { x <= this.edgeSwipeSensitivity); }, - _trackStart: function() { + _trackStart: function(event) { if (this._swipeAllowed()) { sharedPanel = this; - this.dragging = true; + this._setDragging(true); if (this._isMainSelected()) { - this.dragging = this.peeking || this._isEdgeTouch(event); + this._setDragging(this.peeking || this._isEdgeTouch(event)); } if (this.dragging) { @@ -17976,27 +18418,27 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { } }, - _trackX: function(e) { + _trackX: function(event) { if (this.dragging) { - var dx = e.detail.dx; + var dx = event.detail.dx; if (this.peeking) { if (Math.abs(dx) <= this.edgeSwipeSensitivity) { // Ignore trackx until we move past the edge peek. return; } - this.peeking = false; + this._setPeeking(false); } this._moveDrawer(this._translateXForDeltaX(dx)); } }, - _trackEnd: function(e) { + _trackEnd: function(event) { if (this.dragging) { - var xDirection = e.detail.dx > 0; + var xDirection = event.detail.dx > 0; - this.dragging = false; + this._setDragging(false); this.transition = true; sharedPanel = null; this._moveDrawer(null); @@ -18019,13 +18461,7 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { }, _moveDrawer: function(translateX) { - var s = this.$.drawer.style; - - if (this.hasTransform) { - s.transform = this._transformForTranslateX(translateX); - } else { - s.webkitTransform = this._transformForTranslateX(translateX); - } + this.transform(this._transformForTranslateX(translateX), this.$.drawer); } }); @@ -18057,7 +18493,7 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { } :host([disabled]) { - color: var(--paper-icon-button-disabled-text, #fff); + color: var(--paper-icon-button-disabled-text, --disabled-text-color); pointer-events: none; cursor: auto; @apply(--paper-icon-button-disabled); @@ -18065,16 +18501,20 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] { - +