add bower components to third party
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "angular-animate",
|
||||
"version": "1.3.15",
|
||||
"main": "./angular-animate.js",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"angular": "1.3.15"
|
||||
},
|
||||
"homepage": "https://github.com/angular/bower-angular-animate",
|
||||
"_release": "1.3.15",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.3.15",
|
||||
"commit": "30fb369974560dbeb8a5311861c124e094944dab"
|
||||
},
|
||||
"_source": "git://github.com/angular/bower-angular-animate.git",
|
||||
"_target": "1.3.x",
|
||||
"_originalSource": "angular-animate"
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
# packaged angular-animate
|
||||
|
||||
This repo is for distribution on `npm` and `bower`. The source for this module is in the
|
||||
[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngAnimate).
|
||||
Please file issues and pull requests against that repo.
|
||||
|
||||
## Install
|
||||
|
||||
You can install this package either with `npm` or with `bower`.
|
||||
|
||||
### npm
|
||||
|
||||
```shell
|
||||
npm install angular-animate
|
||||
```
|
||||
|
||||
Then add `ngAnimate` as a dependency for your app:
|
||||
|
||||
```javascript
|
||||
angular.module('myApp', [require('angular-animate')]);
|
||||
```
|
||||
|
||||
### bower
|
||||
|
||||
```shell
|
||||
bower install angular-animate
|
||||
```
|
||||
|
||||
Then add a `<script>` to your `index.html`:
|
||||
|
||||
```html
|
||||
<script src="/bower_components/angular-animate/angular-animate.js"></script>
|
||||
```
|
||||
|
||||
Then add `ngAnimate` as a dependency for your app:
|
||||
|
||||
```javascript
|
||||
angular.module('myApp', ['ngAnimate']);
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation is available on the
|
||||
[AngularJS docs site](http://docs.angularjs.org/api/ngAnimate).
|
||||
|
||||
## License
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
AngularJS v1.3.15
|
||||
(c) 2010-2014 Google, Inc. http://angularjs.org
|
||||
License: MIT
|
||||
*/
|
||||
(function(N,f,W){'use strict';f.module("ngAnimate",["ng"]).directive("ngAnimateChildren",function(){return function(X,C,g){g=g.ngAnimateChildren;f.isString(g)&&0===g.length?C.data("$$ngAnimateChildren",!0):X.$watch(g,function(f){C.data("$$ngAnimateChildren",!!f)})}}).factory("$$animateReflow",["$$rAF","$document",function(f,C){return function(g){return f(function(){g()})}}]).config(["$provide","$animateProvider",function(X,C){function g(f){for(var n=0;n<f.length;n++){var g=f[n];if(1==g.nodeType)return g}}
|
||||
function ba(f,n){return g(f)==g(n)}var t=f.noop,n=f.forEach,da=C.$$selectors,aa=f.isArray,ea=f.isString,ga=f.isObject,r={running:!0},u;X.decorator("$animate",["$delegate","$$q","$injector","$sniffer","$rootElement","$$asyncCallback","$rootScope","$document","$templateRequest","$$jqLite",function(O,N,M,Y,y,H,P,W,Z,Q){function R(a,c){var b=a.data("$$ngAnimateState")||{};c&&(b.running=!0,b.structural=!0,a.data("$$ngAnimateState",b));return b.disabled||b.running&&b.structural}function D(a){var c,b=N.defer();
|
||||
b.promise.$$cancelFn=function(){c&&c()};P.$$postDigest(function(){c=a(function(){b.resolve()})});return b.promise}function I(a){if(ga(a))return a.tempClasses&&ea(a.tempClasses)&&(a.tempClasses=a.tempClasses.split(/\s+/)),a}function S(a,c,b){b=b||{};var d={};n(b,function(e,a){n(a.split(" "),function(a){d[a]=e})});var h=Object.create(null);n((a.attr("class")||"").split(/\s+/),function(e){h[e]=!0});var f=[],l=[];n(c&&c.classes||[],function(e,a){var b=h[a],c=d[a]||{};!1===e?(b||"addClass"==c.event)&&
|
||||
l.push(a):!0===e&&(b&&"removeClass"!=c.event||f.push(a))});return 0<f.length+l.length&&[f.join(" "),l.join(" ")]}function T(a){if(a){var c=[],b={};a=a.substr(1).split(".");(Y.transitions||Y.animations)&&c.push(M.get(da[""]));for(var d=0;d<a.length;d++){var f=a[d],k=da[f];k&&!b[f]&&(c.push(M.get(k)),b[f]=!0)}return c}}function U(a,c,b,d){function h(e,a){var b=e[a],c=e["before"+a.charAt(0).toUpperCase()+a.substr(1)];if(b||c)return"leave"==a&&(c=b,b=null),u.push({event:a,fn:b}),J.push({event:a,fn:c}),
|
||||
!0}function k(c,l,w){var E=[];n(c,function(a){a.fn&&E.push(a)});var m=0;n(E,function(c,f){var p=function(){a:{if(l){(l[f]||t)();if(++m<E.length)break a;l=null}w()}};switch(c.event){case "setClass":l.push(c.fn(a,e,A,p,d));break;case "animate":l.push(c.fn(a,b,d.from,d.to,p));break;case "addClass":l.push(c.fn(a,e||b,p,d));break;case "removeClass":l.push(c.fn(a,A||b,p,d));break;default:l.push(c.fn(a,p,d))}});l&&0===l.length&&w()}var l=a[0];if(l){d&&(d.to=d.to||{},d.from=d.from||{});var e,A;aa(b)&&(e=
|
||||
b[0],A=b[1],e?A?b=e+" "+A:(b=e,c="addClass"):(b=A,c="removeClass"));var w="setClass"==c,E=w||"addClass"==c||"removeClass"==c||"animate"==c,p=a.attr("class")+" "+b;if(x(p)){var ca=t,m=[],J=[],g=t,s=[],u=[],p=(" "+p).replace(/\s+/g,".");n(T(p),function(a){!h(a,c)&&w&&(h(a,"addClass"),h(a,"removeClass"))});return{node:l,event:c,className:b,isClassBased:E,isSetClassOperation:w,applyStyles:function(){d&&a.css(f.extend(d.from||{},d.to||{}))},before:function(a){ca=a;k(J,m,function(){ca=t;a()})},after:function(a){g=
|
||||
a;k(u,s,function(){g=t;a()})},cancel:function(){m&&(n(m,function(a){(a||t)(!0)}),ca(!0));s&&(n(s,function(a){(a||t)(!0)}),g(!0))}}}}}function G(a,c,b,d,h,k,l,e){function A(e){var l="$animate:"+e;J&&J[l]&&0<J[l].length&&H(function(){b.triggerHandler(l,{event:a,className:c})})}function w(){A("before")}function E(){A("after")}function p(){p.hasBeenRun||(p.hasBeenRun=!0,k())}function g(){if(!g.hasBeenRun){m&&m.applyStyles();g.hasBeenRun=!0;l&&l.tempClasses&&n(l.tempClasses,function(a){u.removeClass(b,
|
||||
a)});var w=b.data("$$ngAnimateState");w&&(m&&m.isClassBased?B(b,c):(H(function(){var e=b.data("$$ngAnimateState")||{};fa==e.index&&B(b,c,a)}),b.data("$$ngAnimateState",w)));A("close");e()}}var m=U(b,a,c,l);if(!m)return p(),w(),E(),g(),t;a=m.event;c=m.className;var J=f.element._data(m.node),J=J&&J.events;d||(d=h?h.parent():b.parent());if(z(b,d))return p(),w(),E(),g(),t;d=b.data("$$ngAnimateState")||{};var L=d.active||{},s=d.totalActive||0,q=d.last;h=!1;if(0<s){s=[];if(m.isClassBased)"setClass"==q.event?
|
||||
(s.push(q),B(b,c)):L[c]&&(v=L[c],v.event==a?h=!0:(s.push(v),B(b,c)));else if("leave"==a&&L["ng-leave"])h=!0;else{for(var v in L)s.push(L[v]);d={};B(b,!0)}0<s.length&&n(s,function(a){a.cancel()})}!m.isClassBased||m.isSetClassOperation||"animate"==a||h||(h="addClass"==a==b.hasClass(c));if(h)return p(),w(),E(),A("close"),e(),t;L=d.active||{};s=d.totalActive||0;if("leave"==a)b.one("$destroy",function(a){a=f.element(this);var e=a.data("$$ngAnimateState");e&&(e=e.active["ng-leave"])&&(e.cancel(),B(a,"ng-leave"))});
|
||||
u.addClass(b,"ng-animate");l&&l.tempClasses&&n(l.tempClasses,function(a){u.addClass(b,a)});var fa=K++;s++;L[c]=m;b.data("$$ngAnimateState",{last:m,active:L,index:fa,totalActive:s});w();m.before(function(e){var l=b.data("$$ngAnimateState");e=e||!l||!l.active[c]||m.isClassBased&&l.active[c].event!=a;p();!0===e?g():(E(),m.after(g))});return m.cancel}function q(a){if(a=g(a))a=f.isFunction(a.getElementsByClassName)?a.getElementsByClassName("ng-animate"):a.querySelectorAll(".ng-animate"),n(a,function(a){a=
|
||||
f.element(a);(a=a.data("$$ngAnimateState"))&&a.active&&n(a.active,function(a){a.cancel()})})}function B(a,c){if(ba(a,y))r.disabled||(r.running=!1,r.structural=!1);else if(c){var b=a.data("$$ngAnimateState")||{},d=!0===c;!d&&b.active&&b.active[c]&&(b.totalActive--,delete b.active[c]);if(d||!b.totalActive)u.removeClass(a,"ng-animate"),a.removeData("$$ngAnimateState")}}function z(a,c){if(r.disabled)return!0;if(ba(a,y))return r.running;var b,d,g;do{if(0===c.length)break;var k=ba(c,y),l=k?r:c.data("$$ngAnimateState")||
|
||||
{};if(l.disabled)return!0;k&&(g=!0);!1!==b&&(k=c.data("$$ngAnimateChildren"),f.isDefined(k)&&(b=k));d=d||l.running||l.last&&!l.last.isClassBased}while(c=c.parent());return!g||!b&&d}u=Q;y.data("$$ngAnimateState",r);var $=P.$watch(function(){return Z.totalPendingRequests},function(a,c){0===a&&($(),P.$$postDigest(function(){P.$$postDigest(function(){r.running=!1})}))}),K=0,V=C.classNameFilter(),x=V?function(a){return V.test(a)}:function(){return!0};return{animate:function(a,c,b,d,h){d=d||"ng-inline-animate";
|
||||
h=I(h)||{};h.from=b?c:null;h.to=b?b:c;return D(function(b){return G("animate",d,f.element(g(a)),null,null,t,h,b)})},enter:function(a,c,b,d){d=I(d);a=f.element(a);c=c&&f.element(c);b=b&&f.element(b);R(a,!0);O.enter(a,c,b);return D(function(h){return G("enter","ng-enter",f.element(g(a)),c,b,t,d,h)})},leave:function(a,c){c=I(c);a=f.element(a);q(a);R(a,!0);return D(function(b){return G("leave","ng-leave",f.element(g(a)),null,null,function(){O.leave(a)},c,b)})},move:function(a,c,b,d){d=I(d);a=f.element(a);
|
||||
c=c&&f.element(c);b=b&&f.element(b);q(a);R(a,!0);O.move(a,c,b);return D(function(h){return G("move","ng-move",f.element(g(a)),c,b,t,d,h)})},addClass:function(a,c,b){return this.setClass(a,c,[],b)},removeClass:function(a,c,b){return this.setClass(a,[],c,b)},setClass:function(a,c,b,d){d=I(d);a=f.element(a);a=f.element(g(a));if(R(a))return O.$$setClassImmediately(a,c,b,d);var h,k=a.data("$$animateClasses"),l=!!k;k||(k={classes:{}});h=k.classes;c=aa(c)?c:c.split(" ");n(c,function(a){a&&a.length&&(h[a]=
|
||||
!0)});b=aa(b)?b:b.split(" ");n(b,function(a){a&&a.length&&(h[a]=!1)});if(l)return d&&k.options&&(k.options=f.extend(k.options||{},d)),k.promise;a.data("$$animateClasses",k={classes:h,options:d});return k.promise=D(function(e){var l=a.parent(),b=g(a),c=b.parentNode;if(!c||c.$$NG_REMOVED||b.$$NG_REMOVED)e();else{b=a.data("$$animateClasses");a.removeData("$$animateClasses");var c=a.data("$$ngAnimateState")||{},d=S(a,b,c.active);return d?G("setClass",d,a,l,null,function(){d[0]&&O.$$addClassImmediately(a,
|
||||
d[0]);d[1]&&O.$$removeClassImmediately(a,d[1])},b.options,e):e()}})},cancel:function(a){a.$$cancelFn()},enabled:function(a,c){switch(arguments.length){case 2:if(a)B(c);else{var b=c.data("$$ngAnimateState")||{};b.disabled=!0;c.data("$$ngAnimateState",b)}break;case 1:r.disabled=!a;break;default:a=!r.disabled}return!!a}}}]);C.register("",["$window","$sniffer","$timeout","$$animateReflow",function(r,C,M,Y){function y(){b||(b=Y(function(){c=[];b=null;x={}}))}function H(a,e){b&&b();c.push(e);b=Y(function(){n(c,
|
||||
function(a){a()});c=[];b=null;x={}})}function P(a,e){var b=g(a);a=f.element(b);k.push(a);b=Date.now()+e;b<=h||(M.cancel(d),h=b,d=M(function(){X(k);k=[]},e,!1))}function X(a){n(a,function(a){(a=a.data("$$ngAnimateCSS3Data"))&&n(a.closeAnimationFns,function(a){a()})})}function Z(a,e){var b=e?x[e]:null;if(!b){var c=0,d=0,f=0,g=0;n(a,function(a){if(1==a.nodeType){a=r.getComputedStyle(a)||{};c=Math.max(Q(a[z+"Duration"]),c);d=Math.max(Q(a[z+"Delay"]),d);g=Math.max(Q(a[K+"Delay"]),g);var e=Q(a[K+"Duration"]);
|
||||
0<e&&(e*=parseInt(a[K+"IterationCount"],10)||1);f=Math.max(e,f)}});b={total:0,transitionDelay:d,transitionDuration:c,animationDelay:g,animationDuration:f};e&&(x[e]=b)}return b}function Q(a){var e=0;a=ea(a)?a.split(/\s*,\s*/):[];n(a,function(a){e=Math.max(parseFloat(a)||0,e)});return e}function R(b,e,c,d){b=0<=["ng-enter","ng-leave","ng-move"].indexOf(c);var f,p=e.parent(),h=p.data("$$ngAnimateKey");h||(p.data("$$ngAnimateKey",++a),h=a);f=h+"-"+g(e).getAttribute("class");var p=f+" "+c,h=x[p]?++x[p].total:
|
||||
0,m={};if(0<h){var n=c+"-stagger",m=f+" "+n;(f=!x[m])&&u.addClass(e,n);m=Z(e,m);f&&u.removeClass(e,n)}u.addClass(e,c);var n=e.data("$$ngAnimateCSS3Data")||{},k=Z(e,p);f=k.transitionDuration;k=k.animationDuration;if(b&&0===f&&0===k)return u.removeClass(e,c),!1;c=d||b&&0<f;b=0<k&&0<m.animationDelay&&0===m.animationDuration;e.data("$$ngAnimateCSS3Data",{stagger:m,cacheKey:p,running:n.running||0,itemIndex:h,blockTransition:c,closeAnimationFns:n.closeAnimationFns||[]});p=g(e);c&&(I(p,!0),d&&e.css(d));
|
||||
b&&(p.style[K+"PlayState"]="paused");return!0}function D(a,e,b,c,d){function f(){e.off(D,h);u.removeClass(e,k);u.removeClass(e,t);z&&M.cancel(z);G(e,b);var a=g(e),c;for(c in s)a.style.removeProperty(s[c])}function h(a){a.stopPropagation();var b=a.originalEvent||a;a=b.$manualTimeStamp||b.timeStamp||Date.now();b=parseFloat(b.elapsedTime.toFixed(3));Math.max(a-H,0)>=C&&b>=x&&c()}var m=g(e);a=e.data("$$ngAnimateCSS3Data");if(-1!=m.getAttribute("class").indexOf(b)&&a){var k="",t="";n(b.split(" "),function(a,
|
||||
b){var e=(0<b?" ":"")+a;k+=e+"-active";t+=e+"-pending"});var s=[],q=a.itemIndex,v=a.stagger,r=0;if(0<q){r=0;0<v.transitionDelay&&0===v.transitionDuration&&(r=v.transitionDelay*q);var y=0;0<v.animationDelay&&0===v.animationDuration&&(y=v.animationDelay*q,s.push(B+"animation-play-state"));r=Math.round(100*Math.max(r,y))/100}r||(u.addClass(e,k),a.blockTransition&&I(m,!1));var F=Z(e,a.cacheKey+" "+k),x=Math.max(F.transitionDuration,F.animationDuration);if(0===x)u.removeClass(e,k),G(e,b),c();else{!r&&
|
||||
d&&0<Object.keys(d).length&&(F.transitionDuration||(e.css("transition",F.animationDuration+"s linear all"),s.push("transition")),e.css(d));var q=Math.max(F.transitionDelay,F.animationDelay),C=1E3*q;0<s.length&&(v=m.getAttribute("style")||"",";"!==v.charAt(v.length-1)&&(v+=";"),m.setAttribute("style",v+" "));var H=Date.now(),D=V+" "+$,q=1E3*(r+1.5*(q+x)),z;0<r&&(u.addClass(e,t),z=M(function(){z=null;0<F.transitionDuration&&I(m,!1);0<F.animationDuration&&(m.style[K+"PlayState"]="");u.addClass(e,k);
|
||||
u.removeClass(e,t);d&&(0===F.transitionDuration&&e.css("transition",F.animationDuration+"s linear all"),e.css(d),s.push("transition"))},1E3*r,!1));e.on(D,h);a.closeAnimationFns.push(function(){f();c()});a.running++;P(e,q);return f}}else c()}function I(a,b){a.style[z+"Property"]=b?"none":""}function S(a,b,c,d){if(R(a,b,c,d))return function(a){a&&G(b,c)}}function T(a,b,c,d,f){if(b.data("$$ngAnimateCSS3Data"))return D(a,b,c,d,f);G(b,c);d()}function U(a,b,c,d,f){var g=S(a,b,c,f.from);if(g){var h=g;H(b,
|
||||
function(){h=T(a,b,c,d,f.to)});return function(a){(h||t)(a)}}y();d()}function G(a,b){u.removeClass(a,b);var c=a.data("$$ngAnimateCSS3Data");c&&(c.running&&c.running--,c.running&&0!==c.running||a.removeData("$$ngAnimateCSS3Data"))}function q(a,b){var c="";a=aa(a)?a:a.split(/\s+/);n(a,function(a,d){a&&0<a.length&&(c+=(0<d?" ":"")+a+b)});return c}var B="",z,$,K,V;N.ontransitionend===W&&N.onwebkittransitionend!==W?(B="-webkit-",z="WebkitTransition",$="webkitTransitionEnd transitionend"):(z="transition",
|
||||
$="transitionend");N.onanimationend===W&&N.onwebkitanimationend!==W?(B="-webkit-",K="WebkitAnimation",V="webkitAnimationEnd animationend"):(K="animation",V="animationend");var x={},a=0,c=[],b,d=null,h=0,k=[];return{animate:function(a,b,c,d,f,g){g=g||{};g.from=c;g.to=d;return U("animate",a,b,f,g)},enter:function(a,b,c){c=c||{};return U("enter",a,"ng-enter",b,c)},leave:function(a,b,c){c=c||{};return U("leave",a,"ng-leave",b,c)},move:function(a,b,c){c=c||{};return U("move",a,"ng-move",b,c)},beforeSetClass:function(a,
|
||||
b,c,d,f){f=f||{};b=q(c,"-remove")+" "+q(b,"-add");if(f=S("setClass",a,b,f.from))return H(a,d),f;y();d()},beforeAddClass:function(a,b,c,d){d=d||{};if(b=S("addClass",a,q(b,"-add"),d.from))return H(a,c),b;y();c()},beforeRemoveClass:function(a,b,c,d){d=d||{};if(b=S("removeClass",a,q(b,"-remove"),d.from))return H(a,c),b;y();c()},setClass:function(a,b,c,d,f){f=f||{};c=q(c,"-remove");b=q(b,"-add");return T("setClass",a,c+" "+b,d,f.to)},addClass:function(a,b,c,d){d=d||{};return T("addClass",a,q(b,"-add"),
|
||||
c,d.to)},removeClass:function(a,b,c,d){d=d||{};return T("removeClass",a,q(b,"-remove"),c,d.to)}}}])}])})(window,window.angular);
|
||||
//# sourceMappingURL=angular-animate.min.js.map
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"name": "angular-animate",
|
||||
"version": "1.3.15",
|
||||
"main": "./angular-animate.js",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"angular": "1.3.15"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
require('./angular-animate');
|
||||
module.exports = 'ngAnimate';
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "angular-animate",
|
||||
"version": "1.3.15",
|
||||
"description": "AngularJS module for animations",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/angular/angular.js.git"
|
||||
},
|
||||
"keywords": [
|
||||
"angular",
|
||||
"framework",
|
||||
"browser",
|
||||
"animation",
|
||||
"client-side"
|
||||
],
|
||||
"author": "Angular Core Team <angular-core+npm@google.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/angular/angular.js/issues"
|
||||
},
|
||||
"homepage": "http://angularjs.org"
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "angular-aria",
|
||||
"version": "1.3.15",
|
||||
"main": "./angular-aria.js",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"angular": "1.3.15"
|
||||
},
|
||||
"homepage": "https://github.com/angular/bower-angular-aria",
|
||||
"_release": "1.3.15",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.3.15",
|
||||
"commit": "d838769dec2546c1c80f7ccfa96f9d9b0989ea90"
|
||||
},
|
||||
"_source": "git://github.com/angular/bower-angular-aria.git",
|
||||
"_target": "1.3.x",
|
||||
"_originalSource": "angular-aria"
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
# packaged angular-aria
|
||||
|
||||
This repo is for distribution on `npm` and `bower`. The source for this module is in the
|
||||
[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngAria).
|
||||
Please file issues and pull requests against that repo.
|
||||
|
||||
## Install
|
||||
|
||||
You can install this package either with `npm` or with `bower`.
|
||||
|
||||
### npm
|
||||
|
||||
```shell
|
||||
npm install angular-aria
|
||||
```
|
||||
Then add `ngAria` as a dependency for your app:
|
||||
|
||||
```javascript
|
||||
angular.module('myApp', [require('angular-aria')]);
|
||||
```
|
||||
|
||||
### bower
|
||||
|
||||
```shell
|
||||
bower install angular-aria
|
||||
```
|
||||
|
||||
Add a `<script>` to your `index.html`:
|
||||
|
||||
```html
|
||||
<script src="/bower_components/angular-aria/angular-aria.js"></script>
|
||||
```
|
||||
|
||||
Then add `ngAria` as a dependency for your app:
|
||||
|
||||
```javascript
|
||||
angular.module('myApp', ['ngAria']);
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation is available on the
|
||||
[AngularJS docs site](http://docs.angularjs.org/api/ngAria).
|
||||
|
||||
## License
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -0,0 +1,364 @@
|
|||
/**
|
||||
* @license AngularJS v1.3.15
|
||||
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
||||
* License: MIT
|
||||
*/
|
||||
(function(window, angular, undefined) {'use strict';
|
||||
|
||||
/**
|
||||
* @ngdoc module
|
||||
* @name ngAria
|
||||
* @description
|
||||
*
|
||||
* The `ngAria` module provides support for common
|
||||
* [<abbr title="Accessible Rich Internet Applications">ARIA</abbr>](http://www.w3.org/TR/wai-aria/)
|
||||
* attributes that convey state or semantic information about the application for users
|
||||
* of assistive technologies, such as screen readers.
|
||||
*
|
||||
* <div doc-module-components="ngAria"></div>
|
||||
*
|
||||
* ## Usage
|
||||
*
|
||||
* For ngAria to do its magic, simply include the module as a dependency. The directives supported
|
||||
* by ngAria are:
|
||||
* `ngModel`, `ngDisabled`, `ngShow`, `ngHide`, `ngClick`, `ngDblClick`, and `ngMessages`.
|
||||
*
|
||||
* Below is a more detailed breakdown of the attributes handled by ngAria:
|
||||
*
|
||||
* | Directive | Supported Attributes |
|
||||
* |---------------------------------------------|----------------------------------------------------------------------------------------|
|
||||
* | {@link ng.directive:ngDisabled ngDisabled} | aria-disabled |
|
||||
* | {@link ng.directive:ngShow ngShow} | aria-hidden |
|
||||
* | {@link ng.directive:ngHide ngHide} | aria-hidden |
|
||||
* | {@link ng.directive:ngDblclick ngDblclick} | tabindex |
|
||||
* | {@link module:ngMessages ngMessages} | aria-live |
|
||||
* | {@link ng.directive:ngModel ngModel} | aria-checked, aria-valuemin, aria-valuemax, aria-valuenow, aria-invalid, aria-required, input roles |
|
||||
* | {@link ng.directive:ngClick ngClick} | tabindex, keypress event, button role |
|
||||
*
|
||||
* Find out more information about each directive by reading the
|
||||
* {@link guide/accessibility ngAria Developer Guide}.
|
||||
*
|
||||
* ##Example
|
||||
* Using ngDisabled with ngAria:
|
||||
* ```html
|
||||
* <md-checkbox ng-disabled="disabled">
|
||||
* ```
|
||||
* Becomes:
|
||||
* ```html
|
||||
* <md-checkbox ng-disabled="disabled" aria-disabled="true">
|
||||
* ```
|
||||
*
|
||||
* ##Disabling Attributes
|
||||
* It's possible to disable individual attributes added by ngAria with the
|
||||
* {@link ngAria.$ariaProvider#config config} method. For more details, see the
|
||||
* {@link guide/accessibility Developer Guide}.
|
||||
*/
|
||||
/* global -ngAriaModule */
|
||||
var ngAriaModule = angular.module('ngAria', ['ng']).
|
||||
provider('$aria', $AriaProvider);
|
||||
|
||||
/**
|
||||
* @ngdoc provider
|
||||
* @name $ariaProvider
|
||||
*
|
||||
* @description
|
||||
*
|
||||
* Used for configuring the ARIA attributes injected and managed by ngAria.
|
||||
*
|
||||
* ```js
|
||||
* angular.module('myApp', ['ngAria'], function config($ariaProvider) {
|
||||
* $ariaProvider.config({
|
||||
* ariaValue: true,
|
||||
* tabindex: false
|
||||
* });
|
||||
* });
|
||||
*```
|
||||
*
|
||||
* ## Dependencies
|
||||
* Requires the {@link ngAria} module to be installed.
|
||||
*
|
||||
*/
|
||||
function $AriaProvider() {
|
||||
var config = {
|
||||
ariaHidden: true,
|
||||
ariaChecked: true,
|
||||
ariaDisabled: true,
|
||||
ariaRequired: true,
|
||||
ariaInvalid: true,
|
||||
ariaMultiline: true,
|
||||
ariaValue: true,
|
||||
tabindex: true,
|
||||
bindKeypress: true
|
||||
};
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $ariaProvider#config
|
||||
*
|
||||
* @param {object} config object to enable/disable specific ARIA attributes
|
||||
*
|
||||
* - **ariaHidden** – `{boolean}` – Enables/disables aria-hidden tags
|
||||
* - **ariaChecked** – `{boolean}` – Enables/disables aria-checked tags
|
||||
* - **ariaDisabled** – `{boolean}` – Enables/disables aria-disabled tags
|
||||
* - **ariaRequired** – `{boolean}` – Enables/disables aria-required tags
|
||||
* - **ariaInvalid** – `{boolean}` – Enables/disables aria-invalid tags
|
||||
* - **ariaMultiline** – `{boolean}` – Enables/disables aria-multiline tags
|
||||
* - **ariaValue** – `{boolean}` – Enables/disables aria-valuemin, aria-valuemax and aria-valuenow tags
|
||||
* - **tabindex** – `{boolean}` – Enables/disables tabindex tags
|
||||
* - **bindKeypress** – `{boolean}` – Enables/disables keypress event binding on `<div>` and
|
||||
* `<li>` elements with ng-click
|
||||
*
|
||||
* @description
|
||||
* Enables/disables various ARIA attributes
|
||||
*/
|
||||
this.config = function(newConfig) {
|
||||
config = angular.extend(config, newConfig);
|
||||
};
|
||||
|
||||
function watchExpr(attrName, ariaAttr, negate) {
|
||||
return function(scope, elem, attr) {
|
||||
var ariaCamelName = attr.$normalize(ariaAttr);
|
||||
if (config[ariaCamelName] && !attr[ariaCamelName]) {
|
||||
scope.$watch(attr[attrName], function(boolVal) {
|
||||
if (negate) {
|
||||
boolVal = !boolVal;
|
||||
}
|
||||
elem.attr(ariaAttr, boolVal);
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @ngdoc service
|
||||
* @name $aria
|
||||
*
|
||||
* @description
|
||||
* @priority 200
|
||||
*
|
||||
* The $aria service contains helper methods for applying common
|
||||
* [ARIA](http://www.w3.org/TR/wai-aria/) attributes to HTML directives.
|
||||
*
|
||||
* ngAria injects common accessibility attributes that tell assistive technologies when HTML
|
||||
* elements are enabled, selected, hidden, and more. To see how this is performed with ngAria,
|
||||
* let's review a code snippet from ngAria itself:
|
||||
*
|
||||
*```js
|
||||
* ngAriaModule.directive('ngDisabled', ['$aria', function($aria) {
|
||||
* return $aria.$$watchExpr('ngDisabled', 'aria-disabled');
|
||||
* }])
|
||||
*```
|
||||
* Shown above, the ngAria module creates a directive with the same signature as the
|
||||
* traditional `ng-disabled` directive. But this ngAria version is dedicated to
|
||||
* solely managing accessibility attributes. The internal `$aria` service is used to watch the
|
||||
* boolean attribute `ngDisabled`. If it has not been explicitly set by the developer,
|
||||
* `aria-disabled` is injected as an attribute with its value synchronized to the value in
|
||||
* `ngDisabled`.
|
||||
*
|
||||
* Because ngAria hooks into the `ng-disabled` directive, developers do not have to do
|
||||
* anything to enable this feature. The `aria-disabled` attribute is automatically managed
|
||||
* simply as a silent side-effect of using `ng-disabled` with the ngAria module.
|
||||
*
|
||||
* The full list of directives that interface with ngAria:
|
||||
* * **ngModel**
|
||||
* * **ngShow**
|
||||
* * **ngHide**
|
||||
* * **ngClick**
|
||||
* * **ngDblclick**
|
||||
* * **ngMessages**
|
||||
* * **ngDisabled**
|
||||
*
|
||||
* Read the {@link guide/accessibility ngAria Developer Guide} for a thorough explanation of each
|
||||
* directive.
|
||||
*
|
||||
*
|
||||
* ## Dependencies
|
||||
* Requires the {@link ngAria} module to be installed.
|
||||
*/
|
||||
this.$get = function() {
|
||||
return {
|
||||
config: function(key) {
|
||||
return config[key];
|
||||
},
|
||||
$$watchExpr: watchExpr
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
ngAriaModule.directive('ngShow', ['$aria', function($aria) {
|
||||
return $aria.$$watchExpr('ngShow', 'aria-hidden', true);
|
||||
}])
|
||||
.directive('ngHide', ['$aria', function($aria) {
|
||||
return $aria.$$watchExpr('ngHide', 'aria-hidden', false);
|
||||
}])
|
||||
.directive('ngModel', ['$aria', function($aria) {
|
||||
|
||||
function shouldAttachAttr(attr, normalizedAttr, elem) {
|
||||
return $aria.config(normalizedAttr) && !elem.attr(attr);
|
||||
}
|
||||
|
||||
function shouldAttachRole(role, elem) {
|
||||
return !elem.attr('role') && (elem.attr('type') === role) && (elem[0].nodeName !== 'INPUT');
|
||||
}
|
||||
|
||||
function getShape(attr, elem) {
|
||||
var type = attr.type,
|
||||
role = attr.role;
|
||||
|
||||
return ((type || role) === 'checkbox' || role === 'menuitemcheckbox') ? 'checkbox' :
|
||||
((type || role) === 'radio' || role === 'menuitemradio') ? 'radio' :
|
||||
(type === 'range' || role === 'progressbar' || role === 'slider') ? 'range' :
|
||||
(type || role) === 'textbox' || elem[0].nodeName === 'TEXTAREA' ? 'multiline' : '';
|
||||
}
|
||||
|
||||
return {
|
||||
restrict: 'A',
|
||||
require: '?ngModel',
|
||||
priority: 200, //Make sure watches are fired after any other directives that affect the ngModel value
|
||||
link: function(scope, elem, attr, ngModel) {
|
||||
var shape = getShape(attr, elem);
|
||||
var needsTabIndex = shouldAttachAttr('tabindex', 'tabindex', elem);
|
||||
|
||||
function ngAriaWatchModelValue() {
|
||||
return ngModel.$modelValue;
|
||||
}
|
||||
|
||||
function getRadioReaction() {
|
||||
if (needsTabIndex) {
|
||||
needsTabIndex = false;
|
||||
return function ngAriaRadioReaction(newVal) {
|
||||
var boolVal = (attr.value == ngModel.$viewValue);
|
||||
elem.attr('aria-checked', boolVal);
|
||||
elem.attr('tabindex', 0 - !boolVal);
|
||||
};
|
||||
} else {
|
||||
return function ngAriaRadioReaction(newVal) {
|
||||
elem.attr('aria-checked', (attr.value == ngModel.$viewValue));
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function ngAriaCheckboxReaction(newVal) {
|
||||
elem.attr('aria-checked', !ngModel.$isEmpty(ngModel.$viewValue));
|
||||
}
|
||||
|
||||
switch (shape) {
|
||||
case 'radio':
|
||||
case 'checkbox':
|
||||
if (shouldAttachRole(shape, elem)) {
|
||||
elem.attr('role', shape);
|
||||
}
|
||||
if (shouldAttachAttr('aria-checked', 'ariaChecked', elem)) {
|
||||
scope.$watch(ngAriaWatchModelValue, shape === 'radio' ?
|
||||
getRadioReaction() : ngAriaCheckboxReaction);
|
||||
}
|
||||
break;
|
||||
case 'range':
|
||||
if (shouldAttachRole(shape, elem)) {
|
||||
elem.attr('role', 'slider');
|
||||
}
|
||||
if ($aria.config('ariaValue')) {
|
||||
if (attr.min && !elem.attr('aria-valuemin')) {
|
||||
elem.attr('aria-valuemin', attr.min);
|
||||
}
|
||||
if (attr.max && !elem.attr('aria-valuemax')) {
|
||||
elem.attr('aria-valuemax', attr.max);
|
||||
}
|
||||
if (!elem.attr('aria-valuenow')) {
|
||||
scope.$watch(ngAriaWatchModelValue, function ngAriaValueNowReaction(newVal) {
|
||||
elem.attr('aria-valuenow', newVal);
|
||||
});
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'multiline':
|
||||
if (shouldAttachAttr('aria-multiline', 'ariaMultiline', elem)) {
|
||||
elem.attr('aria-multiline', true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (needsTabIndex) {
|
||||
elem.attr('tabindex', 0);
|
||||
}
|
||||
|
||||
if (ngModel.$validators.required && shouldAttachAttr('aria-required', 'ariaRequired', elem)) {
|
||||
scope.$watch(function ngAriaRequiredWatch() {
|
||||
return ngModel.$error.required;
|
||||
}, function ngAriaRequiredReaction(newVal) {
|
||||
elem.attr('aria-required', !!newVal);
|
||||
});
|
||||
}
|
||||
|
||||
if (shouldAttachAttr('aria-invalid', 'ariaInvalid', elem)) {
|
||||
scope.$watch(function ngAriaInvalidWatch() {
|
||||
return ngModel.$invalid;
|
||||
}, function ngAriaInvalidReaction(newVal) {
|
||||
elem.attr('aria-invalid', !!newVal);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
}])
|
||||
.directive('ngDisabled', ['$aria', function($aria) {
|
||||
return $aria.$$watchExpr('ngDisabled', 'aria-disabled');
|
||||
}])
|
||||
.directive('ngMessages', function() {
|
||||
return {
|
||||
restrict: 'A',
|
||||
require: '?ngMessages',
|
||||
link: function(scope, elem, attr, ngMessages) {
|
||||
if (!elem.attr('aria-live')) {
|
||||
elem.attr('aria-live', 'assertive');
|
||||
}
|
||||
}
|
||||
};
|
||||
})
|
||||
.directive('ngClick',['$aria', '$parse', function($aria, $parse) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
compile: function(elem, attr) {
|
||||
var fn = $parse(attr.ngClick, /* interceptorFn */ null, /* expensiveChecks */ true);
|
||||
return function(scope, elem, attr) {
|
||||
|
||||
var nodeBlackList = ['BUTTON', 'A', 'INPUT', 'TEXTAREA'];
|
||||
|
||||
function isNodeOneOf(elem, nodeTypeArray) {
|
||||
if (nodeTypeArray.indexOf(elem[0].nodeName) !== -1) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (!elem.attr('role') && !isNodeOneOf(elem, nodeBlackList)) {
|
||||
elem.attr('role', 'button');
|
||||
}
|
||||
|
||||
if ($aria.config('tabindex') && !elem.attr('tabindex')) {
|
||||
elem.attr('tabindex', 0);
|
||||
}
|
||||
|
||||
if ($aria.config('bindKeypress') && !attr.ngKeypress && !isNodeOneOf(elem, nodeBlackList)) {
|
||||
elem.on('keypress', function(event) {
|
||||
if (event.keyCode === 32 || event.keyCode === 13) {
|
||||
scope.$apply(callback);
|
||||
}
|
||||
|
||||
function callback() {
|
||||
fn(scope, { $event: event });
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}])
|
||||
.directive('ngDblclick', ['$aria', function($aria) {
|
||||
return function(scope, elem, attr) {
|
||||
if ($aria.config('tabindex') && !elem.attr('tabindex')) {
|
||||
elem.attr('tabindex', 0);
|
||||
}
|
||||
};
|
||||
}]);
|
||||
|
||||
|
||||
})(window, window.angular);
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
AngularJS v1.3.15
|
||||
(c) 2010-2014 Google, Inc. http://angularjs.org
|
||||
License: MIT
|
||||
*/
|
||||
(function(r,n,s){'use strict';n.module("ngAria",["ng"]).provider("$aria",function(){function a(a,f,g){return function(b,c,d){var k=d.$normalize(f);e[k]&&!d[k]&&b.$watch(d[a],function(b){g&&(b=!b);c.attr(f,b)})}}var e={ariaHidden:!0,ariaChecked:!0,ariaDisabled:!0,ariaRequired:!0,ariaInvalid:!0,ariaMultiline:!0,ariaValue:!0,tabindex:!0,bindKeypress:!0};this.config=function(a){e=n.extend(e,a)};this.$get=function(){return{config:function(a){return e[a]},$$watchExpr:a}}}).directive("ngShow",["$aria",function(a){return a.$$watchExpr("ngShow",
|
||||
"aria-hidden",!0)}]).directive("ngHide",["$aria",function(a){return a.$$watchExpr("ngHide","aria-hidden",!1)}]).directive("ngModel",["$aria",function(a){function e(e,b,c){return a.config(b)&&!c.attr(e)}function h(a,b){return!b.attr("role")&&b.attr("type")===a&&"INPUT"!==b[0].nodeName}function f(a,b){var c=a.type,d=a.role;return"checkbox"===(c||d)||"menuitemcheckbox"===d?"checkbox":"radio"===(c||d)||"menuitemradio"===d?"radio":"range"===c||"progressbar"===d||"slider"===d?"range":"textbox"===(c||d)||
|
||||
"TEXTAREA"===b[0].nodeName?"multiline":""}return{restrict:"A",require:"?ngModel",priority:200,link:function(g,b,c,d){function k(){return d.$modelValue}function p(){return m?(m=!1,function(a){a=c.value==d.$viewValue;b.attr("aria-checked",a);b.attr("tabindex",0-!a)}):function(a){b.attr("aria-checked",c.value==d.$viewValue)}}function q(a){b.attr("aria-checked",!d.$isEmpty(d.$viewValue))}var l=f(c,b),m=e("tabindex","tabindex",b);switch(l){case "radio":case "checkbox":h(l,b)&&b.attr("role",l);e("aria-checked",
|
||||
"ariaChecked",b)&&g.$watch(k,"radio"===l?p():q);break;case "range":h(l,b)&&b.attr("role","slider");a.config("ariaValue")&&(c.min&&!b.attr("aria-valuemin")&&b.attr("aria-valuemin",c.min),c.max&&!b.attr("aria-valuemax")&&b.attr("aria-valuemax",c.max),b.attr("aria-valuenow")||g.$watch(k,function(a){b.attr("aria-valuenow",a)}));break;case "multiline":e("aria-multiline","ariaMultiline",b)&&b.attr("aria-multiline",!0)}m&&b.attr("tabindex",0);d.$validators.required&&e("aria-required","ariaRequired",b)&&
|
||||
g.$watch(function(){return d.$error.required},function(a){b.attr("aria-required",!!a)});e("aria-invalid","ariaInvalid",b)&&g.$watch(function(){return d.$invalid},function(a){b.attr("aria-invalid",!!a)})}}}]).directive("ngDisabled",["$aria",function(a){return a.$$watchExpr("ngDisabled","aria-disabled")}]).directive("ngMessages",function(){return{restrict:"A",require:"?ngMessages",link:function(a,e,h,f){e.attr("aria-live")||e.attr("aria-live","assertive")}}}).directive("ngClick",["$aria","$parse",function(a,
|
||||
e){return{restrict:"A",compile:function(h,f){var g=e(f.ngClick,null,!0);return function(b,c,d){function e(b,a){if(-1!==a.indexOf(b[0].nodeName))return!0}var f=["BUTTON","A","INPUT","TEXTAREA"];c.attr("role")||e(c,f)||c.attr("role","button");a.config("tabindex")&&!c.attr("tabindex")&&c.attr("tabindex",0);if(a.config("bindKeypress")&&!d.ngKeypress&&!e(c,f))c.on("keypress",function(a){function c(){g(b,{$event:a})}32!==a.keyCode&&13!==a.keyCode||b.$apply(c)})}}}}]).directive("ngDblclick",["$aria",function(a){return function(e,
|
||||
h,f){a.config("tabindex")&&!h.attr("tabindex")&&h.attr("tabindex",0)}}])})(window,window.angular);
|
||||
//# sourceMappingURL=angular-aria.min.js.map
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"name": "angular-aria",
|
||||
"version": "1.3.15",
|
||||
"main": "./angular-aria.js",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"angular": "1.3.15"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
require('./angular-aria');
|
||||
module.exports = 'ngAria';
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"name": "angular-aria",
|
||||
"version": "1.3.15",
|
||||
"description": "AngularJS module for making accessibility easy",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/angular/angular.js.git"
|
||||
},
|
||||
"keywords": [
|
||||
"angular",
|
||||
"framework",
|
||||
"browser",
|
||||
"accessibility",
|
||||
"a11y",
|
||||
"client-side"
|
||||
],
|
||||
"author": "Angular Core Team <angular-core+npm@google.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/angular/angular.js/issues"
|
||||
},
|
||||
"homepage": "http://angularjs.org"
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "angular-cookies",
|
||||
"version": "1.3.15",
|
||||
"main": "./angular-cookies.js",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"angular": "1.3.15"
|
||||
},
|
||||
"homepage": "https://github.com/angular/bower-angular-cookies",
|
||||
"_release": "1.3.15",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.3.15",
|
||||
"commit": "846700fd8e45eefa1a43cf1865bcb7aaf95a68e0"
|
||||
},
|
||||
"_source": "git://github.com/angular/bower-angular-cookies.git",
|
||||
"_target": "1.3.x",
|
||||
"_originalSource": "angular-cookies"
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
# packaged angular-cookies
|
||||
|
||||
This repo is for distribution on `npm` and `bower`. The source for this module is in the
|
||||
[main AngularJS repo](https://github.com/angular/angular.js/tree/master/src/ngCookies).
|
||||
Please file issues and pull requests against that repo.
|
||||
|
||||
## Install
|
||||
|
||||
You can install this package either with `npm` or with `bower`.
|
||||
|
||||
### npm
|
||||
|
||||
```shell
|
||||
npm install angular-cookies
|
||||
```
|
||||
|
||||
Then add `ngCookies` as a dependency for your app:
|
||||
|
||||
```javascript
|
||||
angular.module('myApp', [require('angular-cookies')]);
|
||||
```
|
||||
|
||||
### bower
|
||||
|
||||
```shell
|
||||
bower install angular-cookies
|
||||
```
|
||||
|
||||
Add a `<script>` to your `index.html`:
|
||||
|
||||
```html
|
||||
<script src="/bower_components/angular-cookies/angular-cookies.js"></script>
|
||||
```
|
||||
|
||||
Then add `ngCookies` as a dependency for your app:
|
||||
|
||||
```javascript
|
||||
angular.module('myApp', ['ngCookies']);
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Documentation is available on the
|
||||
[AngularJS docs site](http://docs.angularjs.org/api/ngCookies).
|
||||
|
||||
## License
|
||||
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2010-2015 Google, Inc. http://angularjs.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -0,0 +1,206 @@
|
|||
/**
|
||||
* @license AngularJS v1.3.15
|
||||
* (c) 2010-2014 Google, Inc. http://angularjs.org
|
||||
* License: MIT
|
||||
*/
|
||||
(function(window, angular, undefined) {'use strict';
|
||||
|
||||
/**
|
||||
* @ngdoc module
|
||||
* @name ngCookies
|
||||
* @description
|
||||
*
|
||||
* # ngCookies
|
||||
*
|
||||
* The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies.
|
||||
*
|
||||
*
|
||||
* <div doc-module-components="ngCookies"></div>
|
||||
*
|
||||
* See {@link ngCookies.$cookies `$cookies`} and
|
||||
* {@link ngCookies.$cookieStore `$cookieStore`} for usage.
|
||||
*/
|
||||
|
||||
|
||||
angular.module('ngCookies', ['ng']).
|
||||
/**
|
||||
* @ngdoc service
|
||||
* @name $cookies
|
||||
*
|
||||
* @description
|
||||
* Provides read/write access to browser's cookies.
|
||||
*
|
||||
* Only a simple Object is exposed and by adding or removing properties to/from this object, new
|
||||
* cookies are created/deleted at the end of current $eval.
|
||||
* The object's properties can only be strings.
|
||||
*
|
||||
* Requires the {@link ngCookies `ngCookies`} module to be installed.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* ```js
|
||||
* angular.module('cookiesExample', ['ngCookies'])
|
||||
* .controller('ExampleController', ['$cookies', function($cookies) {
|
||||
* // Retrieving a cookie
|
||||
* var favoriteCookie = $cookies.myFavorite;
|
||||
* // Setting a cookie
|
||||
* $cookies.myFavorite = 'oatmeal';
|
||||
* }]);
|
||||
* ```
|
||||
*/
|
||||
factory('$cookies', ['$rootScope', '$browser', function($rootScope, $browser) {
|
||||
var cookies = {},
|
||||
lastCookies = {},
|
||||
lastBrowserCookies,
|
||||
runEval = false,
|
||||
copy = angular.copy,
|
||||
isUndefined = angular.isUndefined;
|
||||
|
||||
//creates a poller fn that copies all cookies from the $browser to service & inits the service
|
||||
$browser.addPollFn(function() {
|
||||
var currentCookies = $browser.cookies();
|
||||
if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl
|
||||
lastBrowserCookies = currentCookies;
|
||||
copy(currentCookies, lastCookies);
|
||||
copy(currentCookies, cookies);
|
||||
if (runEval) $rootScope.$apply();
|
||||
}
|
||||
})();
|
||||
|
||||
runEval = true;
|
||||
|
||||
//at the end of each eval, push cookies
|
||||
//TODO: this should happen before the "delayed" watches fire, because if some cookies are not
|
||||
// strings or browser refuses to store some cookies, we update the model in the push fn.
|
||||
$rootScope.$watch(push);
|
||||
|
||||
return cookies;
|
||||
|
||||
|
||||
/**
|
||||
* Pushes all the cookies from the service to the browser and verifies if all cookies were
|
||||
* stored.
|
||||
*/
|
||||
function push() {
|
||||
var name,
|
||||
value,
|
||||
browserCookies,
|
||||
updated;
|
||||
|
||||
//delete any cookies deleted in $cookies
|
||||
for (name in lastCookies) {
|
||||
if (isUndefined(cookies[name])) {
|
||||
$browser.cookies(name, undefined);
|
||||
}
|
||||
}
|
||||
|
||||
//update all cookies updated in $cookies
|
||||
for (name in cookies) {
|
||||
value = cookies[name];
|
||||
if (!angular.isString(value)) {
|
||||
value = '' + value;
|
||||
cookies[name] = value;
|
||||
}
|
||||
if (value !== lastCookies[name]) {
|
||||
$browser.cookies(name, value);
|
||||
updated = true;
|
||||
}
|
||||
}
|
||||
|
||||
//verify what was actually stored
|
||||
if (updated) {
|
||||
updated = false;
|
||||
browserCookies = $browser.cookies();
|
||||
|
||||
for (name in cookies) {
|
||||
if (cookies[name] !== browserCookies[name]) {
|
||||
//delete or reset all cookies that the browser dropped from $cookies
|
||||
if (isUndefined(browserCookies[name])) {
|
||||
delete cookies[name];
|
||||
} else {
|
||||
cookies[name] = browserCookies[name];
|
||||
}
|
||||
updated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}]).
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc service
|
||||
* @name $cookieStore
|
||||
* @requires $cookies
|
||||
*
|
||||
* @description
|
||||
* Provides a key-value (string-object) storage, that is backed by session cookies.
|
||||
* Objects put or retrieved from this storage are automatically serialized or
|
||||
* deserialized by angular's toJson/fromJson.
|
||||
*
|
||||
* Requires the {@link ngCookies `ngCookies`} module to be installed.
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* ```js
|
||||
* angular.module('cookieStoreExample', ['ngCookies'])
|
||||
* .controller('ExampleController', ['$cookieStore', function($cookieStore) {
|
||||
* // Put cookie
|
||||
* $cookieStore.put('myFavorite','oatmeal');
|
||||
* // Get cookie
|
||||
* var favoriteCookie = $cookieStore.get('myFavorite');
|
||||
* // Removing a cookie
|
||||
* $cookieStore.remove('myFavorite');
|
||||
* }]);
|
||||
* ```
|
||||
*/
|
||||
factory('$cookieStore', ['$cookies', function($cookies) {
|
||||
|
||||
return {
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $cookieStore#get
|
||||
*
|
||||
* @description
|
||||
* Returns the value of given cookie key
|
||||
*
|
||||
* @param {string} key Id to use for lookup.
|
||||
* @returns {Object} Deserialized cookie value.
|
||||
*/
|
||||
get: function(key) {
|
||||
var value = $cookies[key];
|
||||
return value ? angular.fromJson(value) : value;
|
||||
},
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $cookieStore#put
|
||||
*
|
||||
* @description
|
||||
* Sets a value for given cookie key
|
||||
*
|
||||
* @param {string} key Id for the `value`.
|
||||
* @param {Object} value Value to be stored.
|
||||
*/
|
||||
put: function(key, value) {
|
||||
$cookies[key] = angular.toJson(value);
|
||||
},
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $cookieStore#remove
|
||||
*
|
||||
* @description
|
||||
* Remove given cookie
|
||||
*
|
||||
* @param {string} key Id of the key-value pair to delete.
|
||||
*/
|
||||
remove: function(key) {
|
||||
delete $cookies[key];
|
||||
}
|
||||
};
|
||||
|
||||
}]);
|
||||
|
||||
|
||||
})(window, window.angular);
|
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
AngularJS v1.3.15
|
||||
(c) 2010-2014 Google, Inc. http://angularjs.org
|
||||
License: MIT
|
||||
*/
|
||||
(function(p,f,n){'use strict';f.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(e,b){var c={},g={},h,k=!1,l=f.copy,m=f.isUndefined;b.addPollFn(function(){var a=b.cookies();h!=a&&(h=a,l(a,g),l(a,c),k&&e.$apply())})();k=!0;e.$watch(function(){var a,d,e;for(a in g)m(c[a])&&b.cookies(a,n);for(a in c)d=c[a],f.isString(d)||(d=""+d,c[a]=d),d!==g[a]&&(b.cookies(a,d),e=!0);if(e)for(a in d=b.cookies(),c)c[a]!==d[a]&&(m(d[a])?delete c[a]:c[a]=d[a])});return c}]).factory("$cookieStore",
|
||||
["$cookies",function(e){return{get:function(b){return(b=e[b])?f.fromJson(b):b},put:function(b,c){e[b]=f.toJson(c)},remove:function(b){delete e[b]}}}])})(window,window.angular);
|
||||
//# sourceMappingURL=angular-cookies.min.js.map
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"version":3,
|
||||
"file":"angular-cookies.min.js",
|
||||
"lineCount":7,
|
||||
"mappings":"A;;;;;aAKC,SAAQ,CAACA,CAAD,CAASC,CAAT,CAAkBC,CAAlB,CAA6B,CAmBtCD,CAAAE,OAAA,CAAe,WAAf,CAA4B,CAAC,IAAD,CAA5B,CAAAC,QAAA,CA0BW,UA1BX,CA0BuB,CAAC,YAAD,CAAe,UAAf,CAA2B,QAAQ,CAACC,CAAD,CAAaC,CAAb,CAAuB,CAAA,IACvEC,EAAU,EAD6D,CAEvEC,EAAc,EAFyD,CAGvEC,CAHuE,CAIvEC,EAAU,CAAA,CAJ6D,CAKvEC,EAAOV,CAAAU,KALgE,CAMvEC,EAAcX,CAAAW,YAGlBN,EAAAO,UAAA,CAAmB,QAAQ,EAAG,CAC5B,IAAIC,EAAiBR,CAAAC,QAAA,EACjBE,EAAJ,EAA0BK,CAA1B,GACEL,CAGA,CAHqBK,CAGrB,CAFAH,CAAA,CAAKG,CAAL,CAAqBN,CAArB,CAEA,CADAG,CAAA,CAAKG,CAAL,CAAqBP,CAArB,CACA,CAAIG,CAAJ,EAAaL,CAAAU,OAAA,EAJf,CAF4B,CAA9B,CAAA,EAUAL,EAAA,CAAU,CAAA,CAKVL,EAAAW,OAAA,CASAC,QAAa,EAAG,CAAA,IACVC,CADU,CAEVC,CAFU,CAIVC,CAGJ,KAAKF,CAAL,GAAaV,EAAb,CACMI,CAAA,CAAYL,CAAA,CAAQW,CAAR,CAAZ,CAAJ,EACEZ,CAAAC,QAAA,CAAiBW,CAAjB,CAAuBhB,CAAvB,CAKJ,KAAKgB,CAAL,GAAaX,EAAb,CACEY,CAKA,CALQZ,CAAA,CAAQW,CAAR,CAKR,CAJKjB,CAAAoB,SAAA,CAAiBF,CAAjB,CAIL,GAHEA,CACA,CADQ,EACR,CADaA,CACb,CAAAZ,CAAA,CAAQW,CAAR,CAAA,CAAgBC,CAElB,EAAIA,CAAJ,GAAcX,CAAA,CAAYU,CAAZ,CAAd,GACEZ,CAAAC,QAAA,CAAiBW,CAAjB,CAAuBC,CAAvB,CACA,CAAAC,CAAA,CAAU,CAAA,CAFZ,CAOF,IAAIA,CAAJ,CAIE,IAAKF,CAAL,GAFAI,EAEaf,CAFID,CAAAC,QAAA,EAEJA,CAAAA,CAAb,CACMA,CAAA,CAAQW,CAAR,CAAJ,GAAsBI,CAAA,CAAeJ,CAAf,CAAtB,GAEMN,CAAA,CAAYU,CAAA,CAAeJ,CAAf,CAAZ,CAAJ,CACE,OAAOX,CAAA,CAAQW,CAAR,CADT,CAGEX,CAAA,CAAQW,CAAR,CAHF,CAGkBI,CAAA,CAAeJ,CAAf,CALpB,CAhCU,CAThB,CAEA,OAAOX,EA1BoE,CAA1D,CA1BvB,CAAAH,QAAA,CAoIW,cApIX;AAoI2B,CAAC,UAAD,CAAa,QAAQ,CAACmB,CAAD,CAAW,CAErD,MAAO,CAWLC,IAAKA,QAAQ,CAACC,CAAD,CAAM,CAEjB,MAAO,CADHN,CACG,CADKI,CAAA,CAASE,CAAT,CACL,EAAQxB,CAAAyB,SAAA,CAAiBP,CAAjB,CAAR,CAAkCA,CAFxB,CAXd,CA0BLQ,IAAKA,QAAQ,CAACF,CAAD,CAAMN,CAAN,CAAa,CACxBI,CAAA,CAASE,CAAT,CAAA,CAAgBxB,CAAA2B,OAAA,CAAeT,CAAf,CADQ,CA1BrB,CAuCLU,OAAQA,QAAQ,CAACJ,CAAD,CAAM,CACpB,OAAOF,CAAA,CAASE,CAAT,CADa,CAvCjB,CAF8C,CAAhC,CApI3B,CAnBsC,CAArC,CAAD,CAwMGzB,MAxMH,CAwMWA,MAAAC,QAxMX;",
|
||||
"sources":["angular-cookies.js"],
|
||||
"names":["window","angular","undefined","module","factory","$rootScope","$browser","cookies","lastCookies","lastBrowserCookies","runEval","copy","isUndefined","addPollFn","currentCookies","$apply","$watch","push","name","value","updated","isString","browserCookies","$cookies","get","key","fromJson","put","toJson","remove"]
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"name": "angular-cookies",
|
||||
"version": "1.3.15",
|
||||
"main": "./angular-cookies.js",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"angular": "1.3.15"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
require('./angular-cookies');
|
||||
module.exports = 'ngCookies';
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "angular-cookies",
|
||||
"version": "1.3.15",
|
||||
"description": "AngularJS module for cookies",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/angular/angular.js.git"
|
||||
},
|
||||
"keywords": [
|
||||
"angular",
|
||||
"framework",
|
||||
"browser",
|
||||
"cookies",
|
||||
"client-side"
|
||||
],
|
||||
"author": "Angular Core Team <angular-core+npm@google.com>",
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/angular/angular.js/issues"
|
||||
},
|
||||
"homepage": "http://angularjs.org"
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"name": "angular-css",
|
||||
"main": "./angular-css.js",
|
||||
"version": "1.0.7",
|
||||
"homepage": "http://door3.github.io/angular-css",
|
||||
"authors": [
|
||||
"Alex Castillo <alex@castillo.io>"
|
||||
],
|
||||
"description": "CSS on-demand for AngularJS",
|
||||
"keywords": [
|
||||
"angularjs",
|
||||
"ng-route",
|
||||
"ui-router",
|
||||
"css"
|
||||
],
|
||||
"dependencies": {
|
||||
"angular": ">= 1.3.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/door3/angular-css"
|
||||
},
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"component.json",
|
||||
"package.json",
|
||||
"lib",
|
||||
"config",
|
||||
"demo",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"_release": "1.0.7",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.7",
|
||||
"commit": "06232156c8c21aeee0626a3a6bf4d0499516c7e8"
|
||||
},
|
||||
"_source": "git://github.com/door3/angular-css.git",
|
||||
"_target": "1.0.x",
|
||||
"_originalSource": "angular-css"
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
'use strict';
|
||||
|
||||
module.exports = function(grunt) {
|
||||
grunt.initConfig({
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
|
||||
karma: {
|
||||
unit: {
|
||||
options: {
|
||||
files: [
|
||||
'node_modules/angular/angular.js',
|
||||
'node_modules/angular-mocks/angular-mocks.js',
|
||||
'node_modules/chai/chai.js',
|
||||
'angular-css.js',
|
||||
'test/spec.js'
|
||||
]
|
||||
},
|
||||
|
||||
frameworks: ['mocha'],
|
||||
|
||||
browsers: [
|
||||
'Chrome',
|
||||
'PhantomJS',
|
||||
'Firefox'
|
||||
],
|
||||
|
||||
singleRun: true
|
||||
}
|
||||
},
|
||||
|
||||
uglify: {
|
||||
options: {
|
||||
banner: '/*! <%= pkg.name %> <%= pkg.version %> | Copyright (c) <%= grunt.template.today("yyyy") %> DOOR3, Alex Castillo | MIT License */'
|
||||
},
|
||||
|
||||
build: {
|
||||
src: '<%= pkg.name %>.js',
|
||||
dest: '<%= pkg.name %>.min.js'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-karma');
|
||||
|
||||
grunt.registerTask('test', ['karma']);
|
||||
|
||||
grunt.registerTask('default', [
|
||||
'test',
|
||||
'uglify'
|
||||
]);
|
||||
};
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License
|
||||
|
||||
Copyright (c) 2014 DOOR3, Alex Castillo
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -0,0 +1,371 @@
|
|||
# AngularCSS
|
||||
|
||||
##### CSS on-demand for AngularJS
|
||||
Optimize the presentation layer of your single-page apps by dynamically injecting stylesheets as needed.
|
||||
|
||||
AngularCSS listens for [route](https://github.com/angular/bower-angular-route) (or [states](https://github.com/angular-ui/ui-router)) change events, adds the CSS defined on the current route and removes the CSS from the previous route. It also works with directives in the same fashion with the compile and scope destroy events. See the code samples below for more details.
|
||||
|
||||
##### Read the Article
|
||||
|
||||
[Introducing AngularCSS: CSS On-Demand for AngularJS](http://door3.com/insights/introducing-angularcss-css-demand-angularjs)
|
||||
|
||||
### Demos
|
||||
|
||||
[Angular's ngRoute Demo](http://door3.github.io/angular-css) ([source](../gh-pages/app.routes.js))
|
||||
|
||||
[UI Router Demo](http://door3.github.io/angular-css/states.html) ([source](../gh-pages/app.states.js))
|
||||
|
||||
|
||||
### Quick Start
|
||||
|
||||
Install and manage with [Bower](http://bower.io). A [CDN](http://cdnjs.com/libraries/angular-css) is also provided by cdnjs.com
|
||||
|
||||
``` bash
|
||||
$ bower install angular-css
|
||||
```
|
||||
|
||||
|
||||
1) Include the required JavaScript libraries in your `index.html` (ngRoute and UI Router are optional).
|
||||
|
||||
``` html
|
||||
<script src="/libs/angularjs/1.3.7/angular.min.js"></script>
|
||||
<script src="/libs/angularjs/1.3.7/angular-routes.min.js"></script>
|
||||
<script src="/libs/angular-css/angular-css.min.js"></script>
|
||||
```
|
||||
|
||||
2) Add `door3.css` as a dependency for your app.
|
||||
|
||||
``` js
|
||||
var myApp = angular.module('myApp', ['ngRoute','door3.css']);
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
This module can be used by adding a css property in your routes values, directives or by calling the `$css` service methods from controllers and services.
|
||||
|
||||
The css property supports a string, an array of strings, object notation or an array of objects.
|
||||
|
||||
See examples below for more information.
|
||||
|
||||
|
||||
#### In Directives
|
||||
|
||||
``` js
|
||||
myApp.directive('myDirective', function () {
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: 'my-directive/my-directive.html',
|
||||
/* Binding css to directives */
|
||||
css: 'my-directive/my-directive.css'
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
#### In Controllers
|
||||
|
||||
``` js
|
||||
myApp.controller('pageCtrl', function ($scope, $css) {
|
||||
|
||||
// Binds stylesheet(s) to scope create/destroy events (recommended over add/remove)
|
||||
$css.bind({
|
||||
href: 'my-page/my-page.css'
|
||||
}, $scope);
|
||||
|
||||
// Simply add stylesheet(s)
|
||||
$css.add('my-page/my-page.css');
|
||||
|
||||
// Simply remove stylesheet(s)
|
||||
$css.remove(['my-page/my-page.css','my-page/my-page2.css']);
|
||||
|
||||
// Remove all stylesheets
|
||||
$css.removeAll();
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
#### For Routes (Angular's ngRoute)
|
||||
|
||||
Requires [ngRoute](https://github.com/angular/bower-angular-route) as a dependency
|
||||
|
||||
|
||||
``` js
|
||||
myApp.config(function($routeProvider) {
|
||||
|
||||
$routeProvider
|
||||
.when('/page1', {
|
||||
templateUrl: 'page1/page1.html',
|
||||
controller: 'page1Ctrl',
|
||||
/* Now you can bind css to routes */
|
||||
css: 'page1/page1.css'
|
||||
})
|
||||
.when('/page2', {
|
||||
templateUrl: 'page2/page2.html',
|
||||
controller: 'page2Ctrl',
|
||||
/* You can also enable features like bust cache, persist and preload */
|
||||
css: {
|
||||
href: 'page2/page2.css',
|
||||
bustCache: true
|
||||
}
|
||||
})
|
||||
.when('/page3', {
|
||||
templateUrl: 'page3/page3.html',
|
||||
controller: 'page3Ctrl',
|
||||
/* This is how you can include multiple stylesheets */
|
||||
css: ['page3/page3.css','page3/page3-2.css']
|
||||
})
|
||||
.when('/page4', {
|
||||
templateUrl: 'page4/page4.html',
|
||||
controller: 'page4Ctrl',
|
||||
css: [
|
||||
{
|
||||
href: 'page4/page4.css',
|
||||
persist: true
|
||||
}, {
|
||||
href: 'page4/page4.mobile.css',
|
||||
/* Media Query support via window.matchMedia API
|
||||
* This will only add the stylesheet if the breakpoint matches */
|
||||
media: 'screen and (max-width : 768px)'
|
||||
}, {
|
||||
href: 'page4/page4.print.css',
|
||||
media: 'print'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
#### For States (UI Router)
|
||||
|
||||
Requires [ui.router](https://github.com/angular-ui/ui-router) as a dependency
|
||||
|
||||
|
||||
``` js
|
||||
myApp.config(function($stateProvider) {
|
||||
|
||||
$stateProvider
|
||||
.state('page1', {
|
||||
url: '/page1',
|
||||
templateUrl: 'page1/page1.html',
|
||||
css: 'page1/page1.css'
|
||||
})
|
||||
.state('page2', {
|
||||
url: '/page2',
|
||||
templateUrl: 'page2/page2.html',
|
||||
css: {
|
||||
href: 'page2/page2.css',
|
||||
preload: true,
|
||||
persist: true
|
||||
}
|
||||
})
|
||||
.state('page3', {
|
||||
url: '/page3',
|
||||
templateUrl: 'page3/page3.html',
|
||||
css: ['page3/page3.css','page3/page3-2.css'],
|
||||
views: {
|
||||
'state1': {
|
||||
templateUrl: 'page3/states/page3-state1.html',
|
||||
css: 'page3/states/page3-state1.css'
|
||||
},
|
||||
'state2': {
|
||||
templateUrl: 'page3/states/page3-state2.html',
|
||||
css: ['page3/states/page3-state2.css']
|
||||
},
|
||||
'state3': {
|
||||
templateUrl: 'page3/states/page3-state3.html',
|
||||
css: {
|
||||
href: 'page3/states/page3-state3.css'
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('page4', {
|
||||
url: '/page4',
|
||||
templateUrl: 'page4/page4.html',
|
||||
views: {
|
||||
'state1': {
|
||||
templateUrl: 'states/page4/page4-state1.html',
|
||||
css: 'states/page4/page4-state1.css'
|
||||
},
|
||||
'state2': {
|
||||
templateUrl: 'states/page4/page4-state2.html',
|
||||
css: ['states/page4/page4-state2.css']
|
||||
},
|
||||
'state3': {
|
||||
templateUrl: 'states/page4/page4-state3.html',
|
||||
css: {
|
||||
href: 'states/page4/page4-state3.css'
|
||||
}
|
||||
}
|
||||
},
|
||||
css: [
|
||||
{
|
||||
href: 'page4/page4.css',
|
||||
}, {
|
||||
href: 'page4/page4.mobile.css',
|
||||
media: 'screen and (max-width : 768px)'
|
||||
}, {
|
||||
href: 'page4/page4.print.css',
|
||||
media: 'print'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
### Responsive Design
|
||||
|
||||
AngularCSS supports "smart media queries". This means that stylesheets with media queries will be only added when the breakpoint matches.
|
||||
This will significantly optimize the load time of your apps.
|
||||
|
||||
```js
|
||||
$routeProvider
|
||||
.when('/my-page', {
|
||||
templateUrl: 'my-page/my-page.html',
|
||||
css: [
|
||||
{
|
||||
href: 'my-page/my-page.mobile.css',
|
||||
media: '(max-width: 480px)'
|
||||
}, {
|
||||
href: 'my-page/my-page.tablet.css',
|
||||
media: '(min-width: 768px) and (max-width: 1024px)'
|
||||
}, {
|
||||
href: 'my-page/my-page.desktop.css',
|
||||
media: '(min-width: 1224px)'
|
||||
}
|
||||
]
|
||||
});
|
||||
```
|
||||
|
||||
Even though you can use the `media` property to specify media queries, the best way to manage your breakpoins is by settings them in the provider's defaults. For example:
|
||||
|
||||
```js
|
||||
myApp.config(function($routeProvider, $cssProvider) {
|
||||
|
||||
angular.extend($cssProvider.defaults, {
|
||||
breakpoints: {
|
||||
mobile: '(max-width: 480px)',
|
||||
tablet: '(min-width: 768px) and (max-width: 1024px)',
|
||||
desktop: '(min-width: 1224px)'
|
||||
}
|
||||
});
|
||||
|
||||
$routeProvider
|
||||
.when('/my-page', {
|
||||
templateUrl: 'my-page/my-page.html',
|
||||
css: [
|
||||
{
|
||||
href: 'my-page/my-page.mobile.css',
|
||||
breakpoint: 'mobile'
|
||||
}, {
|
||||
href: 'my-page/my-page.tablet.css',
|
||||
breakpoint: 'tablet'
|
||||
}, {
|
||||
href: 'my-page/my-page.desktop.css',
|
||||
breakpoint: 'desktop'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
### Config
|
||||
|
||||
You can configure AngularCSS at the global level or at the stylesheet level.
|
||||
|
||||
#### Configuring global options
|
||||
|
||||
These options are applied during the `config` phase of your app via `$cssProvider`.
|
||||
|
||||
``` js
|
||||
myApp.config(function($cssProvider) {
|
||||
|
||||
angular.extend($cssProvider.defaults, {
|
||||
container: 'head',
|
||||
method: 'append',
|
||||
persist: false,
|
||||
preload: false,
|
||||
bustCache: false
|
||||
});
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
#### Configuring CSS options
|
||||
|
||||
These options are applied at the stylesheet level.
|
||||
|
||||
``` js
|
||||
css: {
|
||||
href: 'file-path.css',
|
||||
rel: 'stylesheet',
|
||||
type: 'text/css',
|
||||
media: false,
|
||||
persist: false,
|
||||
preload: false,
|
||||
bustCache: false,
|
||||
weight: 0
|
||||
}
|
||||
```
|
||||
|
||||
### Support
|
||||
|
||||
AngularCSS is fully supported by AngularJS 1.3+
|
||||
|
||||
There is partial support for AngularJS 1.2. It does not support `css` property via DDO (Directive Definition Object).
|
||||
The workarond is to bind (or add) the CSS in the directive's controller or link function via `$css` service.
|
||||
|
||||
``` js
|
||||
myApp.directive('myDirective', function () {
|
||||
return {
|
||||
restrict: 'E',
|
||||
templateUrl: 'my-directive/my-directive.html',
|
||||
controller: function ($scope, $css) {
|
||||
$css.bind('my-directive/my-directive.css', $scope);
|
||||
}
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
#### Browsers
|
||||
|
||||
Chrome, Firefox, Safari, iOS Safari, Android and IE9+
|
||||
|
||||
IE9 Does not support [matchMedia](http://caniuse.com/#feat=matchmedia) API. This means that in IE9, stylesheets with media queries will be added without checking if the breakpoint matches.
|
||||
|
||||
|
||||
### Contributing
|
||||
|
||||
Please submit all pull requests the against master branch. If your pull request contains JavaScript patches or features, you should include relevant unit tests.
|
||||
|
||||
### Copyright and license
|
||||
|
||||
```
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2014 DOOR3, Alex Castillo
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
```
|
|
@ -0,0 +1,613 @@
|
|||
/**
|
||||
* AngularCSS - CSS on-demand for AngularJS
|
||||
* @version v1.0.7
|
||||
* @author DOOR3, Alex Castillo
|
||||
* @link http://door3.github.io/angular-css
|
||||
* @license MIT License, http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
(function (angular) {
|
||||
|
||||
/**
|
||||
* AngularCSS Module
|
||||
* Contains: config, constant, provider and run
|
||||
**/
|
||||
var angularCSS = angular.module('door3.css', []);
|
||||
|
||||
// Config
|
||||
angularCSS.config(['$logProvider', function ($logProvider) {
|
||||
// Turn off/on in order to see console logs during dev mode
|
||||
$logProvider.debugEnabled(false);
|
||||
}]);
|
||||
|
||||
// Provider
|
||||
angularCSS.provider('$css', [function $cssProvider() {
|
||||
|
||||
// Defaults - default options that can be overridden from application config
|
||||
var defaults = this.defaults = {
|
||||
element: 'link',
|
||||
rel: 'stylesheet',
|
||||
type: 'text/css',
|
||||
container: 'head',
|
||||
method: 'append',
|
||||
weight: 0
|
||||
};
|
||||
|
||||
this.$get = ['$rootScope','$injector','$q','$window','$timeout','$compile','$http','$filter','$log',
|
||||
function $get($rootScope, $injector, $q, $window, $timeout, $compile, $http, $filter, $log) {
|
||||
|
||||
var $css = {};
|
||||
|
||||
var template = '<link ng-repeat="stylesheet in stylesheets track by $index | orderBy: \'weight\' " rel="{{ stylesheet.rel }}" type="{{ stylesheet.type }}" ng-href="{{ stylesheet.href }}" ng-attr-media="{{ stylesheet.media }}">';
|
||||
|
||||
// Variables - default options that can be overridden from application config
|
||||
var mediaQuery = {}, mediaQueryListener = {}, mediaQueriesToIgnore = ['print'], options = angular.extend({}, defaults),
|
||||
container = angular.element(document.querySelector ? document.querySelector(options.container) : document.getElementsByTagName(options.container)[0]),
|
||||
dynamicPaths = [];
|
||||
|
||||
// Parse all directives
|
||||
angular.forEach($directives, function (directive, key) {
|
||||
if (directive.hasOwnProperty('css')) {
|
||||
$directives[key] = parse(directive.css);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Listen for directive add event in order to add stylesheet(s)
|
||||
**/
|
||||
function $directiveAddEventListener(event, directive, scope) {
|
||||
// Binds directive's css
|
||||
if (scope && directive.hasOwnProperty('css')) {
|
||||
$css.bind([parse(directive.css)], scope);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Listen for route change event and add/remove stylesheet(s)
|
||||
**/
|
||||
function $routeEventListener(event, current, prev) {
|
||||
// Removes previously added css rules
|
||||
if (prev) {
|
||||
$css.remove($css.getFromRoute(prev).concat(dynamicPaths));
|
||||
// Reset dynamic paths array
|
||||
dynamicPaths.length = 0;
|
||||
}
|
||||
// Adds current css rules
|
||||
if (current) {
|
||||
$css.add($css.getFromRoute(current));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Listen for state change event and add/remove stylesheet(s)
|
||||
**/
|
||||
function $stateEventListener(event, current, params, prev) {
|
||||
// Removes previously added css rules
|
||||
if (prev) {
|
||||
$css.remove($css.getFromState(prev).concat(dynamicPaths));
|
||||
// Reset dynamic paths array
|
||||
dynamicPaths.length = 0;
|
||||
}
|
||||
// Adds current css rules
|
||||
if (current) {
|
||||
$css.add($css.getFromState(current));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Map breakpoitns defined in defaults to stylesheet media attribute
|
||||
**/
|
||||
function mapBreakpointToMedia(stylesheet) {
|
||||
if (angular.isDefined(options.breakpoints)) {
|
||||
if (stylesheet.breakpoint in options.breakpoints) {
|
||||
stylesheet.media = options.breakpoints[stylesheet.breakpoint];
|
||||
}
|
||||
delete stylesheet.breakpoints;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse: returns array with full all object based on defaults
|
||||
**/
|
||||
function parse(obj) {
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
// Function syntax
|
||||
if (angular.isFunction(obj)) {
|
||||
obj = angular.copy($injector.invoke(obj));
|
||||
}
|
||||
// String syntax
|
||||
if (angular.isString(obj)) {
|
||||
obj = angular.extend({
|
||||
href: obj
|
||||
}, options);
|
||||
}
|
||||
// Array of strings syntax
|
||||
if (angular.isArray(obj) && angular.isString(obj[0])) {
|
||||
angular.forEach(obj, function (item) {
|
||||
obj = angular.extend({
|
||||
href: item
|
||||
}, options);
|
||||
});
|
||||
}
|
||||
// Object syntax
|
||||
if (angular.isObject(obj) && !angular.isArray(obj)) {
|
||||
obj = angular.extend(obj, options);
|
||||
}
|
||||
// Array of objects syntax
|
||||
if (angular.isArray(obj) && angular.isObject(obj[0])) {
|
||||
angular.forEach(obj, function (item) {
|
||||
obj = angular.extend(item, options);
|
||||
});
|
||||
}
|
||||
// Map breakpoint to media attribute
|
||||
mapBreakpointToMedia(obj);
|
||||
return obj;
|
||||
}
|
||||
|
||||
// Add stylesheets to scope
|
||||
$rootScope.stylesheets = [];
|
||||
|
||||
// Adds compiled link tags to container element
|
||||
container[options.method]($compile(template)($rootScope));
|
||||
|
||||
// Directive event listener (emulated internally)
|
||||
$rootScope.$on('$directiveAdd', $directiveAddEventListener);
|
||||
|
||||
// Routes event listener ($route required)
|
||||
$rootScope.$on('$routeChangeSuccess', $routeEventListener);
|
||||
|
||||
// States event listener ($state required)
|
||||
$rootScope.$on('$stateChangeSuccess', $stateEventListener);
|
||||
|
||||
/**
|
||||
* Bust Cache
|
||||
**/
|
||||
function bustCache(stylesheet) {
|
||||
if (!stylesheet) {
|
||||
return $log.error('No stylesheets provided');
|
||||
}
|
||||
var queryString = '?cache=';
|
||||
// Append query string for bust cache only once
|
||||
if (stylesheet.href.indexOf(queryString) === -1) {
|
||||
stylesheet.href = stylesheet.href + (stylesheet.bustCache ? queryString + (new Date().getTime()) : '');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter By: returns an array of routes based on a property option
|
||||
**/
|
||||
function filterBy(array, prop) {
|
||||
if (!array || !prop) {
|
||||
return $log.error('filterBy: missing array or property');
|
||||
}
|
||||
return $filter('filter')(array, function (item) {
|
||||
return item[prop];
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Media Query
|
||||
**/
|
||||
function addViaMediaQuery(stylesheet) {
|
||||
if (!stylesheet) {
|
||||
return $log.error('No stylesheet provided');
|
||||
}
|
||||
// Media query object
|
||||
mediaQuery[stylesheet.href] = $window.matchMedia(stylesheet.media);
|
||||
// Media Query Listener function
|
||||
mediaQueryListener[stylesheet.href] = function(mediaQuery) {
|
||||
// Trigger digest
|
||||
$timeout(function () {
|
||||
if (mediaQuery.matches) {
|
||||
// Add stylesheet
|
||||
$rootScope.stylesheets.push(stylesheet);
|
||||
} else {
|
||||
var index = $rootScope.stylesheets.indexOf($filter('filter')($rootScope.stylesheets, {
|
||||
href: stylesheet.href
|
||||
})[0]);
|
||||
// Remove stylesheet
|
||||
if (index !== -1) {
|
||||
$rootScope.stylesheets.splice(index, 1);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
// Listen for media query changes
|
||||
mediaQuery[stylesheet.href].addListener(mediaQueryListener[stylesheet.href]);
|
||||
// Invoke first media query check
|
||||
mediaQueryListener[stylesheet.href](mediaQuery[stylesheet.href]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove Media Query
|
||||
**/
|
||||
function removeViaMediaQuery(stylesheet) {
|
||||
if (!stylesheet) {
|
||||
return $log.error('No stylesheet provided');
|
||||
}
|
||||
// Remove media query listener
|
||||
if ($rootScope && angular.isDefined(mediaQuery)
|
||||
&& mediaQuery[stylesheet.href]
|
||||
&& angular.isDefined(mediaQueryListener)) {
|
||||
mediaQuery[stylesheet.href].removeListener(mediaQueryListener[stylesheet.href]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Is Media Query: checks for media settings, media queries to be ignore and match media support
|
||||
**/
|
||||
function isMediaQuery(stylesheet) {
|
||||
if (!stylesheet) {
|
||||
return $log.error('No stylesheet provided');
|
||||
}
|
||||
return !!(
|
||||
// Check for media query setting
|
||||
stylesheet.media
|
||||
// Check for media queries to be ignored
|
||||
&& (mediaQueriesToIgnore.indexOf(stylesheet.media) === -1)
|
||||
// Check for matchMedia support
|
||||
&& $window.matchMedia
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get From Route: returns array of css objects from single route
|
||||
**/
|
||||
$css.getFromRoute = function (route) {
|
||||
if (!route) {
|
||||
return $log.error('Get From Route: No route provided');
|
||||
}
|
||||
var css = null, result = [];
|
||||
if (route.$$route && route.$$route.css) {
|
||||
css = route.$$route.css;
|
||||
}
|
||||
else if (route.css) {
|
||||
css = route.css;
|
||||
}
|
||||
// Adds route css rules to array
|
||||
if (css) {
|
||||
if (angular.isArray(css)) {
|
||||
angular.forEach(css, function (cssItem) {
|
||||
if (angular.isFunction(cssItem)) {
|
||||
dynamicPaths.push(parse(cssItem));
|
||||
}
|
||||
result.push(parse(cssItem));
|
||||
});
|
||||
} else {
|
||||
if (angular.isFunction(css)) {
|
||||
dynamicPaths.push(parse(css));
|
||||
}
|
||||
result.push(parse(css));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get From Routes: returns array of css objects from ng routes
|
||||
**/
|
||||
$css.getFromRoutes = function (routes) {
|
||||
if (!routes) {
|
||||
return $log.error('Get From Routes: No routes provided');
|
||||
}
|
||||
var result = [];
|
||||
// Make array of all routes
|
||||
angular.forEach(routes, function (route) {
|
||||
var css = $css.getFromRoute(route);
|
||||
if (css.length) {
|
||||
result.push(css[0]);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get From State: returns array of css objects from single state
|
||||
**/
|
||||
$css.getFromState = function (state) {
|
||||
if (!state) {
|
||||
return $log.error('Get From State: No state provided');
|
||||
}
|
||||
var result = [];
|
||||
// State "views" notation
|
||||
if (angular.isDefined(state.views)) {
|
||||
angular.forEach(state.views, function (item) {
|
||||
if (item.css) {
|
||||
if (angular.isFunction(item.css)) {
|
||||
dynamicPaths.push(parse(item.css));
|
||||
}
|
||||
result.push(parse(item.css));
|
||||
}
|
||||
});
|
||||
}
|
||||
// State "children" notation
|
||||
if (angular.isDefined(state.children)) {
|
||||
angular.forEach(state.children, function (child) {
|
||||
if (child.css) {
|
||||
if (angular.isFunction(child.css)) {
|
||||
dynamicPaths.push(parse(child.css));
|
||||
}
|
||||
result.push(parse(child.css));
|
||||
}
|
||||
if (angular.isDefined(child.children)) {
|
||||
angular.forEach(child.children, function (childChild) {
|
||||
if (childChild.css) {
|
||||
if (angular.isFunction(childChild.css)) {
|
||||
dynamicPaths.push(parse(childChild.css));
|
||||
}
|
||||
result.push(parse(childChild.css));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// State default notation
|
||||
if (angular.isDefined(state.css)) {
|
||||
// For multiple stylesheets
|
||||
if (angular.isArray(state.css)) {
|
||||
angular.forEach(state.css, function (itemCss) {
|
||||
if (angular.isFunction(itemCss)) {
|
||||
dynamicPaths.push(parse(itemCss));
|
||||
}
|
||||
result.push(parse(itemCss));
|
||||
});
|
||||
// For single stylesheets
|
||||
} else {
|
||||
if (angular.isFunction(state.css)) {
|
||||
dynamicPaths.push(parse(state.css));
|
||||
}
|
||||
result.push(parse(state.css));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Get From States: returns array of css objects from states
|
||||
**/
|
||||
$css.getFromStates = function (states) {
|
||||
if (!states) {
|
||||
return $log.error('Get From States: No states provided');
|
||||
}
|
||||
var result = [];
|
||||
// Make array of all routes
|
||||
angular.forEach(states, function (state) {
|
||||
var css = $css.getFromState(state);
|
||||
if (angular.isArray(css)) {
|
||||
angular.forEach(css, function (cssItem) {
|
||||
result.push(cssItem);
|
||||
});
|
||||
} else {
|
||||
result.push(css);
|
||||
}
|
||||
});
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Preload: preloads css via http request
|
||||
**/
|
||||
$css.preload = function (stylesheets, callback) {
|
||||
// If no stylesheets provided, then preload all
|
||||
if (!stylesheets) {
|
||||
stylesheets = [];
|
||||
// Add all stylesheets from custom directives to array
|
||||
if ($directives.length) {
|
||||
Array.prototype.push.apply(stylesheets, $directives);
|
||||
}
|
||||
// Add all stylesheets from ngRoute to array
|
||||
if ($injector.has('$route')) {
|
||||
Array.prototype.push.apply(stylesheets, $css.getFromRoutes($injector.get('$route').routes));
|
||||
}
|
||||
// Add all stylesheets from UI Router to array
|
||||
if ($injector.has('$state')) {
|
||||
Array.prototype.push.apply(stylesheets, $css.getFromStates($injector.get('$state').get()));
|
||||
}
|
||||
stylesheets = filterBy(stylesheets, 'preload');
|
||||
}
|
||||
if (!angular.isArray(stylesheets)) {
|
||||
stylesheets = [stylesheets];
|
||||
}
|
||||
var stylesheetLoadPromises = [];
|
||||
angular.forEach(stylesheets, function(stylesheet, key) {
|
||||
stylesheet = stylesheets[key] = parse(stylesheet);
|
||||
stylesheetLoadPromises.push(
|
||||
// Preload via ajax request
|
||||
$http.get(stylesheet.href).error(function (response) {
|
||||
$log.error('AngularCSS: Incorrect path for ' + stylesheet.href);
|
||||
})
|
||||
);
|
||||
});
|
||||
if (angular.isFunction(callback)) {
|
||||
$q.all(stylesheetLoadPromises).then(function () {
|
||||
callback(stylesheets);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Bind: binds css in scope with own scope create/destroy events
|
||||
**/
|
||||
$css.bind = function (css, $scope) {
|
||||
if (!css || !$scope) {
|
||||
return $log.error('No scope or stylesheets provided');
|
||||
}
|
||||
var result = [];
|
||||
// Adds route css rules to array
|
||||
if (angular.isArray(css)) {
|
||||
angular.forEach(css, function (cssItem) {
|
||||
result.push(parse(cssItem));
|
||||
});
|
||||
} else {
|
||||
result.push(parse(css));
|
||||
}
|
||||
$css.add(result);
|
||||
$log.debug('$css.bind(): Added', result);
|
||||
$scope.$on('$destroy', function () {
|
||||
$css.remove(result);
|
||||
$log.debug('$css.bind(): Removed', result);
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Add: adds stylesheets to scope
|
||||
**/
|
||||
$css.add = function (stylesheets, callback) {
|
||||
if (!stylesheets) {
|
||||
return $log.error('No stylesheets provided');
|
||||
}
|
||||
if (!angular.isArray(stylesheets)) {
|
||||
stylesheets = [stylesheets];
|
||||
}
|
||||
angular.forEach(stylesheets, function(stylesheet) {
|
||||
stylesheet = parse(stylesheet);
|
||||
// Avoid adding duplicate stylesheets
|
||||
if (stylesheet.href && !$filter('filter')($rootScope.stylesheets, { href: stylesheet.href }).length) {
|
||||
// Bust Cache feature
|
||||
bustCache(stylesheet)
|
||||
// Media Query add support check
|
||||
if (isMediaQuery(stylesheet)) {
|
||||
addViaMediaQuery(stylesheet);
|
||||
}
|
||||
else {
|
||||
$rootScope.stylesheets.push(stylesheet);
|
||||
}
|
||||
$log.debug('$css.add(): ' + stylesheet.href);
|
||||
}
|
||||
});
|
||||
// Broadcasts custom event for css add
|
||||
$rootScope.$broadcast('$cssAdd', stylesheets, $rootScope.stylesheets);
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove: removes stylesheets from scope
|
||||
**/
|
||||
$css.remove = function (stylesheets, callback) {
|
||||
if (!stylesheets) {
|
||||
return $log.error('No stylesheets provided');
|
||||
}
|
||||
if (!angular.isArray(stylesheets)) {
|
||||
stylesheets = [stylesheets];
|
||||
}
|
||||
// Only proceed based on persist setting
|
||||
stylesheets = $filter('filter')(stylesheets, function (stylesheet) {
|
||||
return !stylesheet.persist;
|
||||
});
|
||||
angular.forEach(stylesheets, function(stylesheet) {
|
||||
stylesheet = parse(stylesheet);
|
||||
// Get index of current item to be removed based on href
|
||||
var index = $rootScope.stylesheets.indexOf($filter('filter')($rootScope.stylesheets, {
|
||||
href: stylesheet.href
|
||||
})[0]);
|
||||
// Remove stylesheet from scope (if found)
|
||||
if (index !== -1) {
|
||||
$rootScope.stylesheets.splice(index, 1);
|
||||
}
|
||||
// Remove stylesheet via media query
|
||||
removeViaMediaQuery(stylesheet);
|
||||
$log.debug('$css.remove(): ' + stylesheet.href);
|
||||
});
|
||||
// Broadcasts custom event for css remove
|
||||
$rootScope.$broadcast('$cssRemove', stylesheets, $rootScope.stylesheets);
|
||||
};
|
||||
|
||||
/**
|
||||
* Remove All: removes all style tags from the DOM
|
||||
**/
|
||||
$css.removeAll = function () {
|
||||
// Remove all stylesheets from scope
|
||||
if ($rootScope && $rootScope.hasOwnProperty('stylesheets')) {
|
||||
$rootScope.stylesheets.length = 0;
|
||||
}
|
||||
$log.debug('all stylesheets removed');
|
||||
};
|
||||
|
||||
// Preload all stylesheets
|
||||
$css.preload();
|
||||
|
||||
return $css;
|
||||
|
||||
}];
|
||||
|
||||
}]);
|
||||
|
||||
/**
|
||||
* Links filter - renders the stylesheets array in html format
|
||||
**/
|
||||
angularCSS.filter('$cssLinks', function () {
|
||||
return function (stylesheets) {
|
||||
if (!stylesheets || !angular.isArray(stylesheets)) {
|
||||
return stylesheets;
|
||||
}
|
||||
var result = '';
|
||||
angular.forEach(stylesheets, function (stylesheet) {
|
||||
result += '<link rel="' + stylesheet.rel + '" type="' + stylesheet.type + '" href="' + stylesheet.href + '"';
|
||||
result += (stylesheet.media ? ' media="' + stylesheet.media + '"' : '')
|
||||
result += '>\n\n';
|
||||
});
|
||||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Run - auto instantiate the $css provider by injecting it in the run phase of this module
|
||||
**/
|
||||
angularCSS.run(['$css', function ($css) { } ]);
|
||||
|
||||
/**
|
||||
* AngularJS hack - This way we can get and decorate all custom directives
|
||||
* in order to broadcast a custom $directiveAdd event
|
||||
**/
|
||||
var $directives = [];
|
||||
var originalModule = angular.module;
|
||||
angular.module = function () {
|
||||
var module = originalModule.apply(this, arguments);
|
||||
var originalDirective = module.directive;
|
||||
module.directive = function(directiveName, directiveFactory) {
|
||||
var originalDirectiveFactory = angular.isFunction(directiveFactory) ?
|
||||
directiveFactory : directiveFactory[directiveFactory.length - 1];
|
||||
try {
|
||||
var directive = angular.copy(originalDirectiveFactory)();
|
||||
directive.directiveName = directiveName;
|
||||
if (directive.hasOwnProperty('css')) {
|
||||
$directives.push(directive);
|
||||
}
|
||||
} catch (e) { }
|
||||
return originalDirective.apply(this, arguments);
|
||||
};
|
||||
module.config(['$provide','$injector', function ($provide, $injector) {
|
||||
angular.forEach($directives, function ($directive) {
|
||||
var dirProvider = $directive.directiveName + 'Directive';
|
||||
if ($injector.has(dirProvider)) {
|
||||
$provide.decorator(dirProvider, ['$delegate', '$rootScope', '$timeout', function ($delegate, $rootScope, $timeout) {
|
||||
var directive = $delegate[0];
|
||||
var compile = directive.compile;
|
||||
if (directive.css) {
|
||||
$directive.css = directive.css;
|
||||
}
|
||||
directive.compile = function() {
|
||||
var link = compile ? compile.apply(this, arguments): false;
|
||||
return function(scope) {
|
||||
var linkArgs = arguments;
|
||||
$timeout(function () {
|
||||
if (link) {
|
||||
link.apply(this, linkArgs);
|
||||
}
|
||||
});
|
||||
$rootScope.$broadcast('$directiveAdd', directive, scope);
|
||||
};
|
||||
};
|
||||
return $delegate;
|
||||
}]);
|
||||
}
|
||||
});
|
||||
}]);
|
||||
return module;
|
||||
};
|
||||
/* End of hack */
|
||||
|
||||
})(angular);
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"name": "angular-css",
|
||||
"main": "./angular-css.js",
|
||||
"version": "1.0.7",
|
||||
"homepage": "http://door3.github.io/angular-css",
|
||||
"authors": [
|
||||
"Alex Castillo <alex@castillo.io>"
|
||||
],
|
||||
"description": "CSS on-demand for AngularJS",
|
||||
"keywords": [
|
||||
"angularjs",
|
||||
"ng-route",
|
||||
"ui-router",
|
||||
"css"
|
||||
],
|
||||
"dependencies": {
|
||||
"angular": ">= 1.3.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/door3/angular-css"
|
||||
},
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"component.json",
|
||||
"package.json",
|
||||
"lib",
|
||||
"config",
|
||||
"demo",
|
||||
"test",
|
||||
"tests"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"name": "angular-filter",
|
||||
"version": "0.5.4",
|
||||
"main": "dist/angular-filter.js",
|
||||
"description": "Bunch of useful filters for angularJS(with no external dependencies!)",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/a8m/angular-filter.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"angular": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"angular-mocks": "*"
|
||||
},
|
||||
"ignore": [
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"package.json",
|
||||
"lib",
|
||||
"test",
|
||||
"src",
|
||||
"Gruntfile.js",
|
||||
".gitignore",
|
||||
"README.md",
|
||||
"travis.yml",
|
||||
".bowercc"
|
||||
],
|
||||
"homepage": "https://github.com/a8m/angular-filter",
|
||||
"_release": "0.5.4",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.5.4",
|
||||
"commit": "13c430b3df656e3d0a3a78953d63bbce93f0ffe9"
|
||||
},
|
||||
"_source": "git://github.com/a8m/angular-filter.git",
|
||||
"_target": "~0.5.1",
|
||||
"_originalSource": "angular-filter"
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"directory": "bower_components"
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- '0.10'
|
||||
before_script:
|
||||
- export DISPLAY=:99.0
|
||||
- sh -e /etc/init.d/xvfb start
|
||||
- 'npm install -g bower grunt-cli'
|
||||
- 'bower install --config.interactive=false'
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"name": "angular-filter",
|
||||
"version": "0.5.4",
|
||||
"main": "dist/angular-filter.js",
|
||||
"description": "Bunch of useful filters for angularJS(with no external dependencies!)",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/a8m/angular-filter.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"angular": "*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"angular-mocks": "*"
|
||||
},
|
||||
"ignore": [
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"package.json",
|
||||
"lib",
|
||||
"test",
|
||||
"src",
|
||||
"Gruntfile.js",
|
||||
".gitignore",
|
||||
"README.md",
|
||||
"travis.yml",
|
||||
".bowercc"
|
||||
]
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License
|
||||
|
||||
Copyright (c) 2015 Ariel Mashraki
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"author": {
|
||||
"name": "Brian Park",
|
||||
"email": "yaru22@gmail.com"
|
||||
},
|
||||
"name": "angular-json-human",
|
||||
"description": "Angular directive to convert JSON into human readable table. Inspired by https://github.com/marianoguerra/json.human.js.",
|
||||
"version": "1.2.1",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/yaru22/angular-json-human",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/yaru22/angular-json-human.git"
|
||||
},
|
||||
"main": [
|
||||
"dist/angular-json-human.js",
|
||||
"dist/angular-json-human.css"
|
||||
],
|
||||
"ignore": [
|
||||
".editorconfig",
|
||||
".gitattributes",
|
||||
".gitignore",
|
||||
".gittrack",
|
||||
".jshintrc",
|
||||
"demo/",
|
||||
"Gruntfile.js",
|
||||
"karma-unit.conf.js",
|
||||
"package.json",
|
||||
"src/",
|
||||
"template/",
|
||||
"test/"
|
||||
],
|
||||
"dependencies": {
|
||||
"angular": "^1.2.0",
|
||||
"lodash": "~2.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"angular-mocks": "^1.2.0",
|
||||
"chai": "~1.9.0",
|
||||
"jquery": "~2.1.0"
|
||||
},
|
||||
"_release": "1.2.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.2.1",
|
||||
"commit": "b778d1e1436c600c4d35e4f156fe931c765d559d"
|
||||
},
|
||||
"_source": "git://github.com/yaru22/angular-json-human.git",
|
||||
"_target": "~1.2.1",
|
||||
"_originalSource": "angular-json-human"
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-2014 Brian Park <yaru22@gmail.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -0,0 +1,64 @@
|
|||
angular-json-human [![Analytics](https://ga-beacon.appspot.com/UA-2694988-7/angular-json-human/readme?pixel)](https://github.com/yaru22/angular-json-human)
|
||||
==================
|
||||
Angular directive to convert JSON into human readable table. Inspired by https://github.com/marianoguerra/json.human.js.
|
||||
|
||||
Demo
|
||||
----
|
||||
Check out the demo [here](http://www.brianpark.ca/projects/angular_json_human/demo/).
|
||||
|
||||
Dependency
|
||||
----------
|
||||
This directive requires `lodash`. I'm going to remove the dependency in the future release.
|
||||
|
||||
How to Use
|
||||
----------
|
||||
Install it via `bower`:
|
||||
```
|
||||
$ bower install angular-json-human
|
||||
```
|
||||
|
||||
Include `angular-json-human.(js|css)` in your project. Load the directive after loading `angular.js`
|
||||
|
||||
```
|
||||
<script src="<path to angular.js>"></script>
|
||||
<script src="<path to angular-json-human.js>"></script>
|
||||
```
|
||||
|
||||
Specify angular-json-human as a dependency of your Angular module.
|
||||
|
||||
```
|
||||
var app = angular.module('ngApp', [
|
||||
'yaru22.jsonHuman'
|
||||
]);
|
||||
```
|
||||
|
||||
Use it in your project.
|
||||
|
||||
```
|
||||
<html ng-app="ngApp">
|
||||
...
|
||||
<body ng-controller="MainCtrl">
|
||||
<div json-human="jsonStr"></div>
|
||||
...
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
or check out my [Plunker](http://plnkr.co/edit/0wEPmUsw5kKbBo9RjXW4?p=preview) for the minimal setup.
|
||||
|
||||
|
||||
How to Contribute
|
||||
-----------------
|
||||
```
|
||||
$ git clone https://github.com/yaru22/angular-json-human.git
|
||||
$ cd angular-json-human
|
||||
$ npm install; bower install
|
||||
$ # modify the source code in src/
|
||||
$ grunt clean; grunt build
|
||||
$ # test your changes; you can modify demo/ and serve it locally to see the changes.
|
||||
$ # submit a pull request
|
||||
```
|
||||
|
||||
TODO
|
||||
----
|
||||
- Remove the dependency on Lodash.
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"author": {
|
||||
"name": "Brian Park",
|
||||
"email": "yaru22@gmail.com"
|
||||
},
|
||||
|
||||
"name": "angular-json-human",
|
||||
"description": "Angular directive to convert JSON into human readable table. Inspired by https://github.com/marianoguerra/json.human.js.",
|
||||
"version": "1.2.1",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/yaru22/angular-json-human",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/yaru22/angular-json-human.git"
|
||||
},
|
||||
"main": [
|
||||
"dist/angular-json-human.js",
|
||||
"dist/angular-json-human.css"
|
||||
],
|
||||
"ignore": [
|
||||
".editorconfig",
|
||||
".gitattributes",
|
||||
".gitignore",
|
||||
".gittrack",
|
||||
".jshintrc",
|
||||
"demo/",
|
||||
"Gruntfile.js",
|
||||
"karma-unit.conf.js",
|
||||
"package.json",
|
||||
"src/",
|
||||
"template/",
|
||||
"test/"
|
||||
],
|
||||
|
||||
"dependencies": {
|
||||
"angular": "^1.2.0",
|
||||
"lodash": "~2.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"angular-mocks": "^1.2.0",
|
||||
"chai": "~1.9.0",
|
||||
"jquery": "~2.1.0"
|
||||
}
|
||||
}
|
102
third_party/ui/bower_components/angular-json-human/dist/angular-json-human.css
vendored
Normal file
|
@ -0,0 +1,102 @@
|
|||
/**
|
||||
* Angular directive to convert JSON into human readable table. Inspired by https://github.com/marianoguerra/json.human.js.
|
||||
* @version v1.2.1 - 2014-12-22
|
||||
* @link https://github.com/yaru22/angular-json-human
|
||||
* @author Brian Park <yaru22@gmail.com>
|
||||
* @license MIT License, http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
/**
|
||||
* DISCLAIMER: This CSS is copied from https://github.com/marianoguerra/json.human.js
|
||||
*/
|
||||
|
||||
.jh-root,
|
||||
.jh-type-object,
|
||||
.jh-type-array,
|
||||
.jh-key,
|
||||
.jh-value,
|
||||
.jh-root tr {
|
||||
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
|
||||
-moz-box-sizing: border-box; /* Firefox, other Gecko */
|
||||
box-sizing: border-box; /* Opera/IE 8+ */
|
||||
}
|
||||
|
||||
.jh-key,
|
||||
.jh-value {
|
||||
margin: 0;
|
||||
padding: 0.2em;
|
||||
}
|
||||
|
||||
.jh-value {
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.jh-type-bool,
|
||||
.jh-type-number {
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
color: #5286BC;
|
||||
}
|
||||
|
||||
.jh-type-string {
|
||||
font-style: italic;
|
||||
color: #839B00;
|
||||
}
|
||||
|
||||
.jh-array-key {
|
||||
font-style: italic;
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.jh-object-key,
|
||||
.jh-array-key {
|
||||
color: #444;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.jh-type-object > tbody > tr:nth-child(odd),
|
||||
.jh-type-array > tbody > tr:nth-child(odd) {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.jh-type-object > tbody > tr:nth-child(even),
|
||||
.jh-type-array > tbody > tr:nth-child(even) {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.jh-type-object,
|
||||
.jh-type-array {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.jh-root {
|
||||
border: 1px solid #ccc;
|
||||
margin: 0.2em;
|
||||
}
|
||||
|
||||
th.jh-key {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.jh-type-object > tbody > tr,
|
||||
.jh-type-array > tbody > tr {
|
||||
border: 1px solid #ddd;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.jh-type-object > tbody > tr:last-child,
|
||||
.jh-type-array > tbody > tr:last-child {
|
||||
border-bottom: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.jh-type-object > tbody > tr:hover,
|
||||
.jh-type-array > tbody > tr:hover {
|
||||
border: 1px solid #F99927;
|
||||
}
|
||||
|
||||
.jh-empty {
|
||||
font-style: italic;
|
||||
color: #999;
|
||||
font-size: small;
|
||||
}
|
76
third_party/ui/bower_components/angular-json-human/dist/angular-json-human.js
vendored
Normal file
|
@ -0,0 +1,76 @@
|
|||
/**
|
||||
* Angular directive to convert JSON into human readable table. Inspired by https://github.com/marianoguerra/json.human.js.
|
||||
* @version v1.2.1 - 2014-12-22
|
||||
* @link https://github.com/yaru22/angular-json-human
|
||||
* @author Brian Park <yaru22@gmail.com>
|
||||
* @license MIT License, http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
/* global _, angular */
|
||||
'use strict';
|
||||
angular.module('yaru22.jsonHuman', ['yaru22.jsonHuman.tmpls']).factory('RecursionHelper', [
|
||||
'$compile',
|
||||
function ($compile) {
|
||||
var RecursionHelper = {
|
||||
compile: function (element) {
|
||||
var contents = element.contents().remove();
|
||||
var compiledContents;
|
||||
return function (scope, element) {
|
||||
if (!compiledContents) {
|
||||
compiledContents = $compile(contents);
|
||||
}
|
||||
compiledContents(scope, function (clone) {
|
||||
element.append(clone);
|
||||
});
|
||||
var json = scope.json;
|
||||
scope.isBoolean = _.isBoolean(json);
|
||||
scope.isNumber = _.isNumber(json);
|
||||
scope.isString = _.isString(json);
|
||||
scope.isPrimitive = scope.isBoolean || scope.isNumber || scope.isString;
|
||||
scope.isObject = _.isPlainObject(json);
|
||||
scope.isArray = _.isArray(json);
|
||||
scope.isEmpty = _.isEmpty(json);
|
||||
};
|
||||
}
|
||||
};
|
||||
return RecursionHelper;
|
||||
}
|
||||
]).directive('jsonHuman', function () {
|
||||
return {
|
||||
restrict: 'A',
|
||||
scope: { data: '=jsonHuman' },
|
||||
templateUrl: 'template/angular-json-human-root.tmpl',
|
||||
link: function (scope) {
|
||||
scope.$watch('data', function (json) {
|
||||
if (typeof json === 'string') {
|
||||
try {
|
||||
json = JSON.parse(json);
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
scope.json = json;
|
||||
scope.isObject = _.isPlainObject(json);
|
||||
scope.isArray = _.isArray(json);
|
||||
});
|
||||
}
|
||||
};
|
||||
}).directive('jsonHumanHelper', [
|
||||
'RecursionHelper',
|
||||
function (RecursionHelper) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
scope: { json: '=jsonHumanHelper' },
|
||||
templateUrl: 'template/angular-json-human.tmpl',
|
||||
compile: function (tElem) {
|
||||
return RecursionHelper.compile(tElem);
|
||||
}
|
||||
};
|
||||
}
|
||||
]);
|
||||
angular.module('yaru22.jsonHuman.tmpls', []).run([
|
||||
'$templateCache',
|
||||
function ($templateCache) {
|
||||
'use strict';
|
||||
$templateCache.put('template/angular-json-human-root.tmpl', '<table class=jh-root ng-class="{ \'jh-type-array\': isArray, \'jh-type-object\': isObject }" json-human-helper=json></table>');
|
||||
$templateCache.put('template/angular-json-human.tmpl', '<span ng-if=isPrimitive ng-class="{ \'jh-type-bool\': isBoolean, \'jh-type-number\': isNumber, \'jh-type-string\': isString, \'jh-type-array\': isArray, \'jh-type-object\': isObject }">{{ json }} <span ng-if="isEmpty && isString" class=jh-empty>(Empty String)</span></span> <span ng-if="isEmpty && isArray" class=jh-empty>(Empty List)</span> <span ng-if="isEmpty && isObject" class=jh-empty>(Empty Object)</span><table ng-if="!isEmpty && !isPrimitive" ng-class="{ \'jh-type-array\': isArray, \'jh-type-object\': isObject }"><tbody><tr ng-repeat="(key, val) in json track by $index"><th class=jh-key ng-class="{ \'jh-array-key\': isArray, \'jh-object-key\': isObject }">{{ key }}</th><td class=jh-value ng-class="{ \'jh-array-value\': isArray, \'jh-object-value\': isObject }" json-human-helper=val></td></tr></tbody></table>');
|
||||
}
|
||||
]);
|
1
third_party/ui/bower_components/angular-json-human/dist/angular-json-human.min.css
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.jh-key,.jh-root,.jh-root tr,.jh-type-array,.jh-type-object,.jh-value{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.jh-key,.jh-value{margin:0;padding:.2em}.jh-value{border-left:1px solid #ddd}.jh-type-bool,.jh-type-number{font-weight:700;text-align:center;color:#5286BC}.jh-type-string{font-style:italic;color:#839B00}.jh-array-key{font-style:italic;font-size:small;text-align:center}.jh-array-key,.jh-object-key{color:#444;vertical-align:top}.jh-type-array>tbody>tr:nth-child(odd),.jh-type-object>tbody>tr:nth-child(odd){background-color:#f5f5f5}.jh-type-array>tbody>tr:nth-child(even),.jh-type-object>tbody>tr:nth-child(even){background-color:#fff}.jh-type-array,.jh-type-object{width:100%;border-collapse:collapse}.jh-root{border:1px solid #ccc;margin:.2em}th.jh-key{text-align:left}.jh-type-array>tbody>tr,.jh-type-object>tbody>tr{border:1px solid #ddd;border-bottom:none}.jh-type-array>tbody>tr:last-child,.jh-type-object>tbody>tr:last-child{border-bottom:1px solid #ddd}.jh-type-array>tbody>tr:hover,.jh-type-object>tbody>tr:hover{border:1px solid #F99927}.jh-empty{font-style:italic;color:#999;font-size:small}
|
8
third_party/ui/bower_components/angular-json-human/dist/angular-json-human.min.js
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
/**
|
||||
* Angular directive to convert JSON into human readable table. Inspired by https://github.com/marianoguerra/json.human.js.
|
||||
* @version v1.2.1 - 2014-12-22
|
||||
* @link https://github.com/yaru22/angular-json-human
|
||||
* @author Brian Park <yaru22@gmail.com>
|
||||
* @license MIT License, http://www.opensource.org/licenses/MIT
|
||||
*/
|
||||
"use strict";angular.module("yaru22.jsonHuman",["yaru22.jsonHuman.tmpls"]).factory("RecursionHelper",["$compile",function(a){var b={compile:function(b){var c,d=b.contents().remove();return function(b,e){c||(c=a(d)),c(b,function(a){e.append(a)});var f=b.json;b.isBoolean=_.isBoolean(f),b.isNumber=_.isNumber(f),b.isString=_.isString(f),b.isPrimitive=b.isBoolean||b.isNumber||b.isString,b.isObject=_.isPlainObject(f),b.isArray=_.isArray(f),b.isEmpty=_.isEmpty(f)}}};return b}]).directive("jsonHuman",function(){return{restrict:"A",scope:{data:"=jsonHuman"},templateUrl:"template/angular-json-human-root.tmpl",link:function(a){a.$watch("data",function(b){if("string"==typeof b)try{b=JSON.parse(b)}catch(c){}a.json=b,a.isObject=_.isPlainObject(b),a.isArray=_.isArray(b)})}}}).directive("jsonHumanHelper",["RecursionHelper",function(a){return{restrict:"A",scope:{json:"=jsonHumanHelper"},templateUrl:"template/angular-json-human.tmpl",compile:function(b){return a.compile(b)}}}]),angular.module("yaru22.jsonHuman.tmpls",[]).run(["$templateCache",function(a){a.put("template/angular-json-human-root.tmpl","<table class=jh-root ng-class=\"{ 'jh-type-array': isArray, 'jh-type-object': isObject }\" json-human-helper=json></table>"),a.put("template/angular-json-human.tmpl","<span ng-if=isPrimitive ng-class=\"{ 'jh-type-bool': isBoolean, 'jh-type-number': isNumber, 'jh-type-string': isString, 'jh-type-array': isArray, 'jh-type-object': isObject }\">{{ json }} <span ng-if=\"isEmpty && isString\" class=jh-empty>(Empty String)</span></span> <span ng-if=\"isEmpty && isArray\" class=jh-empty>(Empty List)</span> <span ng-if=\"isEmpty && isObject\" class=jh-empty>(Empty Object)</span><table ng-if=\"!isEmpty && !isPrimitive\" ng-class=\"{ 'jh-type-array': isArray, 'jh-type-object': isObject }\"><tbody><tr ng-repeat=\"(key, val) in json track by $index\"><th class=jh-key ng-class=\"{ 'jh-array-key': isArray, 'jh-object-key': isObject }\">{{ key }}</th><td class=jh-value ng-class=\"{ 'jh-array-value': isArray, 'jh-object-value': isObject }\" json-human-helper=val></td></tr></tbody></table>")}]);
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"name": "angular-material",
|
||||
"version": "0.8.1",
|
||||
"dependencies": {
|
||||
"angular": "1.3.x",
|
||||
"angular-animate": "1.3.x",
|
||||
"angular-aria": "1.3.x"
|
||||
},
|
||||
"main": [
|
||||
"angular-material.js",
|
||||
"angular-material.css"
|
||||
],
|
||||
"homepage": "https://github.com/angular/bower-material",
|
||||
"_release": "0.8.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v0.8.1",
|
||||
"commit": "53d48104a6d48b8e87bd97016acd7b5a4d7d1f3c"
|
||||
},
|
||||
"_source": "git://github.com/angular/bower-material.git",
|
||||
"_target": "0.8.1",
|
||||
"_originalSource": "angular-material"
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
The MIT License
|
||||
|
||||
Copyright (c) 2014 Google, Inc. http://angularjs.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -0,0 +1,169 @@
|
|||
This repo is for distribution on `npm` and `bower`. The source for this module is in the
|
||||
[main Angular Material repo](https://github.com/angular/material).
|
||||
Please file issues and pull requests against that repo.
|
||||
|
||||
## Installing Angular Material
|
||||
|
||||
You can install this package locally either with `npm` or with `bower`.
|
||||
|
||||
### npm
|
||||
|
||||
```shell
|
||||
npm install angular-material
|
||||
```
|
||||
|
||||
Note that this package is not in CommonJS format, so doing `require('angular-material')`
|
||||
will return `undefined`. If you're using
|
||||
[Browserify](https://github.com/substack/node-browserify), you can use
|
||||
[exposify](https://github.com/thlorenz/exposify) to have `require('angular-material')`
|
||||
return the `angular-material` global.
|
||||
|
||||
### bower
|
||||
|
||||
```shell
|
||||
# To get the latest stable version, use bower from the command line.
|
||||
bower install angular-material
|
||||
|
||||
# To get the most recent, last committed-to-master version use:
|
||||
bower install angular-material#master
|
||||
|
||||
# To save the bower settings for future use:
|
||||
bower install angular-material --save
|
||||
|
||||
# Later, you can use easily update with:
|
||||
bower update
|
||||
```
|
||||
|
||||
> Please note that Angular Material requires **Angular 1.3.x** or higher.
|
||||
|
||||
|
||||
### Using the Angular Material Library
|
||||
|
||||
Now that you have installed the Angular libraries, simply include the scripts and
|
||||
stylesheet in your main HTML file, in the order shown in the example below. Note that npm
|
||||
will install the files under `/node_modules/angular-material/` and bower will install them
|
||||
under `/bower_components/angular-material/`.
|
||||
|
||||
### npm
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
|
||||
<link rel="stylesheet" href="/node_modules/angular-material/angular-material.css">
|
||||
</head>
|
||||
<body ng-app="YourApp">
|
||||
|
||||
<div ng-controller="YourController">
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/node_modules/angular/angular.js"></script>
|
||||
<script src="/node_modules/angular-aria/angular-aria.js"></script>
|
||||
<script src="/node_modules/angular-animate/angular-animate.js"></script>
|
||||
<script src="/node_modules/angular-material/angular-material.js"></script>
|
||||
<script>
|
||||
|
||||
// Include app dependency on ngMaterial
|
||||
|
||||
angular.module( 'YourApp', [ 'ngMaterial' ] )
|
||||
.controller("YourController", YourController );
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### bower
|
||||
|
||||
```html
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
|
||||
<link rel="stylesheet" href="/bower_components/angular-material/angular-material.css">
|
||||
</head>
|
||||
<body ng-app="YourApp">
|
||||
|
||||
<div ng-controller="YourController">
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/bower_components/angular/angular.js"></script>
|
||||
<script src="/bower_components/angular-aria/angular-aria.js"></script>
|
||||
<script src="/bower_components/angular-animate/angular-animate.js"></script>
|
||||
<script src="/bower_components/angular-material/angular-material.js"></script>
|
||||
<script>
|
||||
|
||||
// Include app dependency on ngMaterial
|
||||
|
||||
angular.module( 'YourApp', [ 'ngMaterial' ] )
|
||||
.controller("YourController", YourController );
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
#### CDN
|
||||
|
||||
CDN versions of Angular Material are now available at
|
||||
[Google Hosted Libraries](https://developers.google.com/speed/libraries/devguide#angularmaterial).
|
||||
|
||||
With the Google CDN, you will not need to download local copies of the distribution files.
|
||||
Instead simply reference the CDN urls to easily use those remote library files.
|
||||
This is especially useful when using online tools such as CodePen, Plunkr, or jsFiddle.
|
||||
|
||||
```html
|
||||
<head>
|
||||
|
||||
<!-- Angular Material CSS now available via Google CDN; version 0.7.1 used here -->
|
||||
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/angular_material/0.7.1/angular-material.min.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Angular Material Dependencies -->
|
||||
<script src="//cdn.jsdelivr.net/hammerjs/2.0.4/hammer.min.js"></script>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular.min.js"></script>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular-animate.min.js"></script>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular-aria.min.js"></script>
|
||||
|
||||
<!-- Angular Material Javascript now available via Google CDN; version 0.7.1 used here -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/angular_material/0.7.1/angular-material.min.js"></script>
|
||||
|
||||
</body>
|
||||
```
|
||||
|
||||
> Note that the above sample references the 0.7.1 CDN release. Your version will change
|
||||
based on the latest stable release version.
|
||||
|
||||
Developers seeking the latest, most-current build versions can use [RawGit.com](//rawgit.com) to
|
||||
pull directly from the distribution GitHub
|
||||
[Bower-Material](https://github.com/angular/bower-material) repository:
|
||||
|
||||
```html
|
||||
<head>
|
||||
|
||||
<!-- Angular Material CSS using RawGit to load directly from `bower-material/master` -->
|
||||
<link rel="stylesheet" href="//rawgit.com/angular/bower-material/master/angular-material.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Angular Material Dependencies -->
|
||||
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular.js"></script>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular-animate.js"></script>
|
||||
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.6/angular-aria.js"></script>
|
||||
|
||||
<!-- Angular Material Javascript using RawGit to load directly from `bower-material/master` -->
|
||||
<script src="//rawgit.com/angular/bower-material/master/angular-material.js"></script>
|
||||
|
||||
</body>
|
||||
```
|
||||
|
||||
> Please note that the above RawGit access is intended **ONLY** for development purposes or sharing
|
||||
low-traffic, temporary examples or demos with small numbers of people.
|
|
@ -0,0 +1 @@
|
|||
{ "name": "angular-material", "version": "0.8.1", "dependencies": { "angular": "1.3.x", "angular-animate": "1.3.x", "angular-aria": "1.3.x" }, "main": [ "angular-material.js", "angular-material.css" ] }
|
|
@ -0,0 +1,467 @@
|
|||
md-autocomplete {
|
||||
background: '{{background-50}}'; }
|
||||
md-autocomplete button md-icon path {
|
||||
fill: '{{background-600}}'; }
|
||||
md-autocomplete button:after {
|
||||
background: '{{background-600-0.3}}'; }
|
||||
md-autocomplete ul {
|
||||
background: '{{background-50}}'; }
|
||||
md-autocomplete ul li {
|
||||
border-top: 1px solid '{{background-400}}';
|
||||
color: '{{background-900}}'; }
|
||||
md-autocomplete ul li .highlight {
|
||||
color: '{{background-600}}'; }
|
||||
md-autocomplete ul li:hover, md-autocomplete ul li.selected {
|
||||
background: '{{background-200}}'; }
|
||||
|
||||
md-backdrop.md-opaque.md-THEME_NAME-theme {
|
||||
background-color: '{{foreground-4-0.5}}'; }
|
||||
|
||||
md-bottom-sheet.md-THEME_NAME-theme {
|
||||
background-color: '{{background-50}}';
|
||||
border-top-color: '{{background-300}}'; }
|
||||
md-bottom-sheet.md-THEME_NAME-theme.md-list md-item {
|
||||
color: '{{foreground-1}}'; }
|
||||
md-bottom-sheet.md-THEME_NAME-theme .md-subheader {
|
||||
background-color: '{{background-50}}'; }
|
||||
md-bottom-sheet.md-THEME_NAME-theme .md-subheader {
|
||||
color: '{{foreground-1}}'; }
|
||||
|
||||
md-toolbar .md-button.md-THEME_NAME-theme.md-fab {
|
||||
background-color: white; }
|
||||
|
||||
.md-button.md-THEME_NAME-theme {
|
||||
border-radius: 3px; }
|
||||
.md-button.md-THEME_NAME-theme:not([disabled]):hover, .md-button.md-THEME_NAME-theme:not([disabled]):focus {
|
||||
background-color: '{{background-500-0.2}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-primary {
|
||||
color: '{{primary-color}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-primary.md-raised, .md-button.md-THEME_NAME-theme.md-primary.md-fab {
|
||||
color: '{{primary-contrast}}';
|
||||
background-color: '{{primary-color}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):focus, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):focus {
|
||||
background-color: '{{primary-600}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-fab {
|
||||
border-radius: 50%;
|
||||
background-color: '{{accent-color}}';
|
||||
color: '{{accent-contrast}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):focus {
|
||||
background-color: '{{accent-A700}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-raised {
|
||||
color: '{{background-contrast}}';
|
||||
background-color: '{{background-50}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-raised:not([disabled]):focus {
|
||||
background-color: '{{background-200}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-warn {
|
||||
color: '{{warn-color}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-warn.md-raised, .md-button.md-THEME_NAME-theme.md-warn.md-fab {
|
||||
color: '{{warn-contrast}}';
|
||||
background-color: '{{warn-color}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):focus, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):focus {
|
||||
background-color: '{{warn-700}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-accent {
|
||||
color: '{{accent-color}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-accent.md-raised, .md-button.md-THEME_NAME-theme.md-accent.md-fab {
|
||||
color: '{{accent-contrast}}';
|
||||
background-color: '{{accent-color}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):focus, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):focus {
|
||||
background-color: '{{accent-700}}'; }
|
||||
.md-button.md-THEME_NAME-theme[disabled], .md-button.md-THEME_NAME-theme.md-raised[disabled], .md-button.md-THEME_NAME-theme.md-fab[disabled] {
|
||||
color: '{{foreground-3}}';
|
||||
background-color: transparent;
|
||||
cursor: not-allowed; }
|
||||
|
||||
md-card.md-THEME_NAME-theme {
|
||||
border-radius: 2px; }
|
||||
md-card.md-THEME_NAME-theme .md-card-image {
|
||||
border-radius: 2px 2px 0 0; }
|
||||
|
||||
md-checkbox.md-THEME_NAME-theme .md-ripple {
|
||||
color: '{{accent-600}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme.md-checked .md-ripple {
|
||||
color: '{{background-600}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme .md-icon {
|
||||
border-color: '{{foreground-2}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme.md-checked .md-icon {
|
||||
background-color: '{{accent-color-0.87}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme.md-checked .md-icon:after {
|
||||
border-color: '{{background-200}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ripple {
|
||||
color: '{{primary-600}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ripple {
|
||||
color: '{{background-600}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-icon {
|
||||
border-color: '{{foreground-2}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon {
|
||||
background-color: '{{primary-color-0.87}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon:after {
|
||||
border-color: '{{background-200}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ripple {
|
||||
color: '{{warn-600}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-icon {
|
||||
border-color: '{{foreground-2}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon {
|
||||
background-color: '{{warn-color-0.87}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon:after {
|
||||
border-color: '{{background-200}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme[disabled] .md-icon {
|
||||
border-color: '{{foreground-3}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon {
|
||||
background-color: '{{foreground-3}}'; }
|
||||
|
||||
md-content.md-THEME_NAME-theme {
|
||||
background-color: '{{background-hue-3}}'; }
|
||||
|
||||
md-dialog.md-THEME_NAME-theme {
|
||||
border-radius: 4px;
|
||||
background-color: '{{background-hue-3}}'; }
|
||||
md-dialog.md-THEME_NAME-theme.md-content-overflow .md-actions {
|
||||
border-top-color: '{{foreground-4}}'; }
|
||||
|
||||
md-divider.md-THEME_NAME-theme {
|
||||
border-top-color: '{{foreground-4}}'; }
|
||||
|
||||
md-icon.md-THEME_NAME-theme.md-primary {
|
||||
color: '{{primary-color}}'; }
|
||||
md-icon.md-THEME_NAME-theme.md-accent {
|
||||
color: '{{accent-color}}'; }
|
||||
md-icon.md-THEME_NAME-theme.md-warn {
|
||||
color: '{{warn-color}}'; }
|
||||
md-icon.md-THEME_NAME-theme.md-danger {
|
||||
color: '{{danger-color}}'; }
|
||||
|
||||
md-input-container.md-THEME_NAME-theme .md-input {
|
||||
color: '{{foreground-1}}';
|
||||
border-color: '{{foreground-4}}';
|
||||
text-shadow: '{{foreground-shadow}}'; }
|
||||
md-input-container.md-THEME_NAME-theme .md-input::-webkit-input-placeholder, md-input-container.md-THEME_NAME-theme .md-input::-moz-placeholder, md-input-container.md-THEME_NAME-theme .md-input:-moz-placeholder, md-input-container.md-THEME_NAME-theme .md-input:-ms-input-placeholder {
|
||||
color: '{{foreground-3}}'; }
|
||||
md-input-container.md-THEME_NAME-theme label, md-input-container.md-THEME_NAME-theme .md-placeholder {
|
||||
text-shadow: '{{foreground-shadow}}';
|
||||
color: '{{foreground-3}}'; }
|
||||
md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-has-value label {
|
||||
color: '{{foreground-2}}'; }
|
||||
md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused .md-input {
|
||||
border-color: '{{primary-500}}'; }
|
||||
md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused label {
|
||||
color: '{{primary-500}}'; }
|
||||
md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent .md-input {
|
||||
border-color: '{{accent-500}}'; }
|
||||
md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent label {
|
||||
color: '{{accent-500}}'; }
|
||||
md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn .md-input {
|
||||
border-color: '{{warn-500}}'; }
|
||||
md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn label {
|
||||
color: '{{warn-500}}'; }
|
||||
md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input {
|
||||
border-color: '{{warn-500}}'; }
|
||||
md-input-container.md-THEME_NAME-theme.md-input-invalid label {
|
||||
color: '{{warn-500}}'; }
|
||||
md-input-container.md-THEME_NAME-theme.md-input-invalid ng-message, md-input-container.md-THEME_NAME-theme.md-input-invalid data-ng-message, md-input-container.md-THEME_NAME-theme.md-input-invalid x-ng-message, md-input-container.md-THEME_NAME-theme.md-input-invalid [ng-message], md-input-container.md-THEME_NAME-theme.md-input-invalid [data-ng-message], md-input-container.md-THEME_NAME-theme.md-input-invalid [x-ng-message], md-input-container.md-THEME_NAME-theme.md-input-invalid .md-char-counter {
|
||||
color: '{{warn-500}}'; }
|
||||
md-input-container.md-THEME_NAME-theme .md-input[disabled], [disabled] md-input-container.md-THEME_NAME-theme .md-input {
|
||||
border-bottom-color: transparent;
|
||||
color: '{{foreground-3}}';
|
||||
background-image: linear-gradient(to right, '{{foreground-4}}' 0%, '{{foreground-4}}' 33%, transparent 0%);
|
||||
background-image: -ms-linear-gradient(left, transparent 0%, '{{foreground-4}}' 100%); }
|
||||
|
||||
md-progress-circular.md-THEME_NAME-theme {
|
||||
background-color: transparent; }
|
||||
md-progress-circular.md-THEME_NAME-theme .md-inner .md-gap {
|
||||
border-top-color: '{{primary-color}}';
|
||||
border-bottom-color: '{{primary-color}}'; }
|
||||
md-progress-circular.md-THEME_NAME-theme .md-inner .md-left .md-half-circle, md-progress-circular.md-THEME_NAME-theme .md-inner .md-right .md-half-circle {
|
||||
border-top-color: '{{primary-color}}'; }
|
||||
md-progress-circular.md-THEME_NAME-theme .md-inner .md-right .md-half-circle {
|
||||
border-right-color: '{{primary-color}}'; }
|
||||
md-progress-circular.md-THEME_NAME-theme .md-inner .md-left .md-half-circle {
|
||||
border-left-color: '{{primary-color}}'; }
|
||||
md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-gap {
|
||||
border-top-color: '{{warn-color}}';
|
||||
border-bottom-color: '{{warn-color}}'; }
|
||||
md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-left .md-half-circle, md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-right .md-half-circle {
|
||||
border-top-color: '{{warn-color}}'; }
|
||||
md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-right .md-half-circle {
|
||||
border-right-color: '{{warn-color}}'; }
|
||||
md-progress-circular.md-THEME_NAME-theme.md-warn .md-inner .md-left .md-half-circle {
|
||||
border-left-color: '{{warn-color}}'; }
|
||||
md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-gap {
|
||||
border-top-color: '{{accent-color}}';
|
||||
border-bottom-color: '{{accent-color}}'; }
|
||||
md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-left .md-half-circle, md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-right .md-half-circle {
|
||||
border-top-color: '{{accent-color}}'; }
|
||||
md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-right .md-half-circle {
|
||||
border-right-color: '{{accent-color}}'; }
|
||||
md-progress-circular.md-THEME_NAME-theme.md-accent .md-inner .md-left .md-half-circle {
|
||||
border-left-color: '{{accent-color}}'; }
|
||||
|
||||
md-progress-linear.md-THEME_NAME-theme .md-container {
|
||||
background-color: '{{primary-100}}'; }
|
||||
md-progress-linear.md-THEME_NAME-theme .md-bar {
|
||||
background-color: '{{primary-color}}'; }
|
||||
md-progress-linear.md-THEME_NAME-theme.md-warn .md-container {
|
||||
background-color: '{{warn-100}}'; }
|
||||
md-progress-linear.md-THEME_NAME-theme.md-warn .md-bar {
|
||||
background-color: '{{warn-color}}'; }
|
||||
md-progress-linear.md-THEME_NAME-theme.md-accent .md-container {
|
||||
background-color: '{{accent-100}}'; }
|
||||
md-progress-linear.md-THEME_NAME-theme.md-accent .md-bar {
|
||||
background-color: '{{accent-color}}'; }
|
||||
md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-bar1 {
|
||||
background-color: '{{warn-100}}'; }
|
||||
md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-dashed:before {
|
||||
background: radial-gradient('{{warn-100}}' 0%, '{{warn-100}}' 16%, transparent 42%); }
|
||||
md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-bar1 {
|
||||
background-color: '{{accent-100}}'; }
|
||||
md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-dashed:before {
|
||||
background: radial-gradient('{{accent-100}}' 0%, '{{accent-100}}' 16%, transparent 42%); }
|
||||
|
||||
md-radio-button.md-THEME_NAME-theme .md-off {
|
||||
border-color: '{{foreground-2}}'; }
|
||||
md-radio-button.md-THEME_NAME-theme .md-on {
|
||||
background-color: '{{accent-color-0.87}}'; }
|
||||
md-radio-button.md-THEME_NAME-theme.md-checked .md-off {
|
||||
border-color: '{{accent-color-0.87}}'; }
|
||||
md-radio-button.md-THEME_NAME-theme.md-checked .md-ink-ripple {
|
||||
color: '{{accent-color-0.87}}'; }
|
||||
md-radio-button.md-THEME_NAME-theme .md-container .md-ripple {
|
||||
color: '{{accent-600}}'; }
|
||||
md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-on {
|
||||
background-color: '{{primary-color-0.87}}'; }
|
||||
md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off {
|
||||
border-color: '{{primary-color-0.87}}'; }
|
||||
md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple {
|
||||
color: '{{primary-color-0.87}}'; }
|
||||
md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple {
|
||||
color: '{{primary-600}}'; }
|
||||
md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-on {
|
||||
background-color: '{{warn-color-0.87}}'; }
|
||||
md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off {
|
||||
border-color: '{{warn-color-0.87}}'; }
|
||||
md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple {
|
||||
color: '{{warn-color-0.87}}'; }
|
||||
md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple {
|
||||
color: '{{warn-600}}'; }
|
||||
md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-off {
|
||||
border-color: '{{foreground-3}}'; }
|
||||
md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-on {
|
||||
border-color: '{{foreground-3}}'; }
|
||||
|
||||
md-radio-group.md-THEME_NAME-theme:focus:not(:empty) {
|
||||
border-color: '{{foreground-1}}'; }
|
||||
|
||||
md-select.md-THEME_NAME-theme:focus .md-select-label {
|
||||
border-bottom-color: '{{primary-color}}';
|
||||
color: '{{ foreground-1 }}'; }
|
||||
md-select.md-THEME_NAME-theme:focus .md-select-label.md-placeholder {
|
||||
color: '{{ foreground-1 }}'; }
|
||||
md-select.md-THEME_NAME-theme:focus.md-accent .md-select-label {
|
||||
border-bottom-color: '{{accent-color}}'; }
|
||||
md-select.md-THEME_NAME-theme:focus.md-warn .md-select-label {
|
||||
border-bottom-color: '{{warn-color}}'; }
|
||||
md-select.md-THEME_NAME-theme .md-select-label {
|
||||
border-bottom-color: '{{foreground-4}}'; }
|
||||
md-select.md-THEME_NAME-theme .md-select-label.md-placeholder {
|
||||
color: '{{foreground-3}}'; }
|
||||
|
||||
md-select-menu.md-THEME_NAME-theme md-optgroup {
|
||||
color: '{{foreground-2}}'; }
|
||||
md-select-menu.md-THEME_NAME-theme md-optgroup md-option {
|
||||
color: '{{foreground-1}}'; }
|
||||
md-select-menu.md-THEME_NAME-theme md-option[selected] {
|
||||
background-color: '{{primary-50}}'; }
|
||||
md-select-menu.md-THEME_NAME-theme md-option[selected]:focus {
|
||||
background-color: '{{primary-100}}'; }
|
||||
md-select-menu.md-THEME_NAME-theme md-option[selected].md-accent {
|
||||
background-color: '{{accent-50}}'; }
|
||||
md-select-menu.md-THEME_NAME-theme md-option[selected].md-accent:focus {
|
||||
background-color: '{{accent-100}}'; }
|
||||
md-select-menu.md-THEME_NAME-theme md-option:focus:not([selected]) {
|
||||
background: '{{background-200}}'; }
|
||||
|
||||
md-sidenav.md-THEME_NAME-theme {
|
||||
background-color: '{{background-hue-3}}'; }
|
||||
|
||||
md-slider.md-THEME_NAME-theme .md-track {
|
||||
background-color: '{{foreground-3}}'; }
|
||||
md-slider.md-THEME_NAME-theme .md-track-ticks {
|
||||
background-color: '{{foreground-4}}'; }
|
||||
md-slider.md-THEME_NAME-theme .md-focus-thumb {
|
||||
background-color: '{{foreground-2}}'; }
|
||||
md-slider.md-THEME_NAME-theme .md-focus-ring {
|
||||
border-color: '{{foreground-4}}'; }
|
||||
md-slider.md-THEME_NAME-theme .md-disabled-thumb {
|
||||
border-color: '{{background-hue-3}}'; }
|
||||
md-slider.md-THEME_NAME-theme.md-min .md-thumb:after {
|
||||
background-color: '{{background-hue-3}}'; }
|
||||
md-slider.md-THEME_NAME-theme .md-track.md-track-fill {
|
||||
background-color: '{{accent-color}}'; }
|
||||
md-slider.md-THEME_NAME-theme .md-thumb:after {
|
||||
border-color: '{{accent-color}}';
|
||||
background-color: '{{accent-color}}'; }
|
||||
md-slider.md-THEME_NAME-theme .md-sign {
|
||||
background-color: '{{accent-color}}'; }
|
||||
md-slider.md-THEME_NAME-theme .md-sign:after {
|
||||
border-top-color: '{{accent-color}}'; }
|
||||
md-slider.md-THEME_NAME-theme .md-thumb-text {
|
||||
color: '{{accent-contrast}}'; }
|
||||
md-slider.md-THEME_NAME-theme.md-warn .md-track.md-track-fill {
|
||||
background-color: '{{warn-color}}'; }
|
||||
md-slider.md-THEME_NAME-theme.md-warn .md-thumb:after {
|
||||
border-color: '{{warn-color}}';
|
||||
background-color: '{{warn-color}}'; }
|
||||
md-slider.md-THEME_NAME-theme.md-warn .md-sign {
|
||||
background-color: '{{warn-color}}'; }
|
||||
md-slider.md-THEME_NAME-theme.md-warn .md-sign:after {
|
||||
border-top-color: '{{warn-color}}'; }
|
||||
md-slider.md-THEME_NAME-theme.md-warn .md-thumb-text {
|
||||
color: '{{warn-contrast}}'; }
|
||||
md-slider.md-THEME_NAME-theme.md-primary .md-track.md-track-fill {
|
||||
background-color: '{{primary-color}}'; }
|
||||
md-slider.md-THEME_NAME-theme.md-primary .md-thumb:after {
|
||||
border-color: '{{primary-color}}';
|
||||
background-color: '{{primary-color}}'; }
|
||||
md-slider.md-THEME_NAME-theme.md-primary .md-sign {
|
||||
background-color: '{{primary-color}}'; }
|
||||
md-slider.md-THEME_NAME-theme.md-primary .md-sign:after {
|
||||
border-top-color: '{{primary-color}}'; }
|
||||
md-slider.md-THEME_NAME-theme.md-primary .md-thumb-text {
|
||||
color: '{{primary-contrast}}'; }
|
||||
md-slider.md-THEME_NAME-theme[disabled] .md-thumb:after {
|
||||
border-color: '{{foreground-3}}'; }
|
||||
md-slider.md-THEME_NAME-theme[disabled]:not(.md-min) .md-thumb:after {
|
||||
background-color: '{{foreground-3}}'; }
|
||||
|
||||
.md-subheader.md-THEME_NAME-theme {
|
||||
color: '{{ foreground-2-0.23 }}';
|
||||
background-color: '{{background-hue-3}}'; }
|
||||
.md-subheader.md-THEME_NAME-theme.md-primary {
|
||||
color: '{{primary-color}}'; }
|
||||
.md-subheader.md-THEME_NAME-theme.md-accent {
|
||||
color: '{{accent-color}}'; }
|
||||
.md-subheader.md-THEME_NAME-theme.md-warn {
|
||||
color: '{{warn-color}}'; }
|
||||
|
||||
md-switch.md-THEME_NAME-theme .md-thumb {
|
||||
background-color: '{{background-50}}'; }
|
||||
md-switch.md-THEME_NAME-theme .md-bar {
|
||||
background-color: '{{background-500}}'; }
|
||||
md-switch.md-THEME_NAME-theme.md-checked .md-thumb {
|
||||
background-color: '{{accent-color}}'; }
|
||||
md-switch.md-THEME_NAME-theme.md-checked .md-bar {
|
||||
background-color: '{{accent-color-0.5}}'; }
|
||||
md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-thumb {
|
||||
background-color: '{{primary-color}}'; }
|
||||
md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-bar {
|
||||
background-color: '{{primary-color-0.5}}'; }
|
||||
md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-thumb {
|
||||
background-color: '{{warn-color}}'; }
|
||||
md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-bar {
|
||||
background-color: '{{warn-color-0.5}}'; }
|
||||
md-switch.md-THEME_NAME-theme[disabled] .md-thumb {
|
||||
background-color: '{{background-400}}'; }
|
||||
md-switch.md-THEME_NAME-theme[disabled] .md-bar {
|
||||
background-color: '{{foreground-4}}'; }
|
||||
md-switch.md-THEME_NAME-theme:focus .md-label:not(:empty) {
|
||||
border-color: '{{foreground-1}}';
|
||||
border-style: dotted; }
|
||||
|
||||
md-tabs.md-THEME_NAME-theme .md-header {
|
||||
background-color: transparent; }
|
||||
md-tabs.md-THEME_NAME-theme .md-paginator md-icon {
|
||||
color: '{{primary-color}}'; }
|
||||
md-tabs.md-THEME_NAME-theme.md-accent .md-header {
|
||||
background-color: '{{accent-color}}'; }
|
||||
md-tabs.md-THEME_NAME-theme.md-accent md-tab:not([disabled]) {
|
||||
color: '{{accent-100}}'; }
|
||||
md-tabs.md-THEME_NAME-theme.md-accent md-tab:not([disabled]).active {
|
||||
color: '{{accent-contrast}}'; }
|
||||
md-tabs.md-THEME_NAME-theme.md-primary .md-header {
|
||||
background-color: '{{primary-color}}'; }
|
||||
md-tabs.md-THEME_NAME-theme.md-primary md-tab:not([disabled]) {
|
||||
color: '{{primary-100}}'; }
|
||||
md-tabs.md-THEME_NAME-theme.md-primary md-tab:not([disabled]).active {
|
||||
color: '{{primary-contrast}}'; }
|
||||
md-tabs.md-THEME_NAME-theme.md-primary md-tab {
|
||||
color: '{{primary-100}}'; }
|
||||
md-tabs.md-THEME_NAME-theme.md-primary md-tab[disabled] {
|
||||
color: '{{foreground-3}}'; }
|
||||
md-tabs.md-THEME_NAME-theme.md-primary md-tab:focus {
|
||||
color: '{{primary-contrast}}';
|
||||
background-color: '{{primary-contrast-0.1}}'; }
|
||||
md-tabs.md-THEME_NAME-theme.md-primary md-tab.active {
|
||||
color: '{{primary-contrast}}'; }
|
||||
md-tabs.md-THEME_NAME-theme.md-primary md-tab .md-ripple-container {
|
||||
color: '{{primary-contrast}}'; }
|
||||
md-tabs.md-THEME_NAME-theme.md-warn .md-header {
|
||||
background-color: '{{warn-color}}'; }
|
||||
md-tabs.md-THEME_NAME-theme.md-warn md-tab:not([disabled]) {
|
||||
color: '{{warn-100}}'; }
|
||||
md-tabs.md-THEME_NAME-theme.md-warn md-tab:not([disabled]).active {
|
||||
color: '{{warn-contrast}}'; }
|
||||
md-tabs.md-THEME_NAME-theme md-tabs-ink-bar {
|
||||
color: '{{accent-color}}';
|
||||
background: '{{accent-color}}'; }
|
||||
md-tabs.md-THEME_NAME-theme md-tab {
|
||||
color: '{{foreground-2}}'; }
|
||||
md-tabs.md-THEME_NAME-theme md-tab[disabled] {
|
||||
color: '{{foreground-3}}'; }
|
||||
md-tabs.md-THEME_NAME-theme md-tab:focus {
|
||||
color: '{{foreground-1}}'; }
|
||||
md-tabs.md-THEME_NAME-theme md-tab.active {
|
||||
color: '{{primary-color}}'; }
|
||||
md-tabs.md-THEME_NAME-theme md-tab .md-ripple-container {
|
||||
color: '{{accent-100}}'; }
|
||||
|
||||
md-input-group.md-THEME_NAME-theme input, md-input-group.md-THEME_NAME-theme textarea {
|
||||
text-shadow: '{{foreground-shadow}}'; }
|
||||
md-input-group.md-THEME_NAME-theme input::-webkit-input-placeholder, md-input-group.md-THEME_NAME-theme input::-moz-placeholder, md-input-group.md-THEME_NAME-theme input:-moz-placeholder, md-input-group.md-THEME_NAME-theme input:-ms-input-placeholder, md-input-group.md-THEME_NAME-theme textarea::-webkit-input-placeholder, md-input-group.md-THEME_NAME-theme textarea::-moz-placeholder, md-input-group.md-THEME_NAME-theme textarea:-moz-placeholder, md-input-group.md-THEME_NAME-theme textarea:-ms-input-placeholder {
|
||||
color: '{{foreground-3}}'; }
|
||||
md-input-group.md-THEME_NAME-theme label {
|
||||
text-shadow: '{{foreground-shadow}}';
|
||||
color: '{{foreground-3}}'; }
|
||||
md-input-group.md-THEME_NAME-theme input, md-input-group.md-THEME_NAME-theme textarea {
|
||||
color: '{{foreground-1}}';
|
||||
border-color: '{{foreground-4}}'; }
|
||||
md-input-group.md-THEME_NAME-theme.md-input-focused input, md-input-group.md-THEME_NAME-theme.md-input-focused textarea {
|
||||
border-color: '{{primary-500}}'; }
|
||||
md-input-group.md-THEME_NAME-theme.md-input-focused label {
|
||||
color: '{{primary-500}}'; }
|
||||
md-input-group.md-THEME_NAME-theme.md-input-focused.md-accent input, md-input-group.md-THEME_NAME-theme.md-input-focused.md-accent textarea {
|
||||
border-color: '{{accent-500}}'; }
|
||||
md-input-group.md-THEME_NAME-theme.md-input-focused.md-accent label {
|
||||
color: '{{accent-500}}'; }
|
||||
md-input-group.md-THEME_NAME-theme.md-input-has-value:not(.md-input-focused) label {
|
||||
color: '{{foreground-2}}'; }
|
||||
md-input-group.md-THEME_NAME-theme .md-input[disabled] {
|
||||
border-bottom-color: '{{foreground-4}}';
|
||||
color: '{{foreground-3}}'; }
|
||||
|
||||
md-toast.md-THEME_NAME-theme {
|
||||
background-color: '{{foreground-1}}';
|
||||
color: '{{background-50}}'; }
|
||||
md-toast.md-THEME_NAME-theme .md-button {
|
||||
color: '{{background-50}}'; }
|
||||
md-toast.md-THEME_NAME-theme .md-button.md-highlight {
|
||||
color: '{{primary-A200}}'; }
|
||||
md-toast.md-THEME_NAME-theme .md-button.md-highlight.md-accent {
|
||||
color: '{{accent-A200}}'; }
|
||||
md-toast.md-THEME_NAME-theme .md-button.md-highlight.md-warn {
|
||||
color: '{{warn-A200}}'; }
|
||||
|
||||
md-toolbar.md-THEME_NAME-theme {
|
||||
background-color: '{{primary-color}}';
|
||||
color: '{{primary-contrast}}'; }
|
||||
md-toolbar.md-THEME_NAME-theme .md-button {
|
||||
color: '{{primary-contrast}}'; }
|
||||
md-toolbar.md-THEME_NAME-theme.md-accent {
|
||||
background-color: '{{accent-color}}';
|
||||
color: '{{accent-contrast}}'; }
|
||||
md-toolbar.md-THEME_NAME-theme.md-warn {
|
||||
background-color: '{{warn-color}}';
|
||||
color: '{{warn-contrast}}'; }
|
||||
|
||||
md-tooltip.md-THEME_NAME-theme {
|
||||
color: '{{background-A100}}'; }
|
||||
md-tooltip.md-THEME_NAME-theme .md-background {
|
||||
background-color: '{{foreground-2}}'; }
|
75
third_party/ui/bower_components/angular-material/demos/gridList/demoBasicUsage/style.scss
vendored
Normal file
|
@ -0,0 +1,75 @@
|
|||
md-icon {
|
||||
width:50%;height:50%
|
||||
}
|
||||
|
||||
md-icon svg {
|
||||
-webkit-border-radius: 50%;
|
||||
-moz-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.s64 {
|
||||
font-size:64px;
|
||||
}
|
||||
|
||||
.s32 {
|
||||
|
||||
font-size:48px;
|
||||
|
||||
}
|
||||
|
||||
md-icon.fa {
|
||||
display:block;
|
||||
padding-left:0px;
|
||||
}
|
||||
|
||||
md-icon.s32 span {
|
||||
padding-left:8px;
|
||||
}
|
||||
|
||||
md-grid-list {
|
||||
margin: 8px; }
|
||||
.gray {
|
||||
background: #f5f5f5; }
|
||||
.green {
|
||||
background: #b9f6ca; }
|
||||
.yellow {
|
||||
background: #ffff8d; }
|
||||
.blue {
|
||||
background: #84ffff; }
|
||||
.darkBlue {
|
||||
background: #80d8ff; }
|
||||
.deepBlue {
|
||||
background: #448aff; }
|
||||
.purple {
|
||||
background: #b388ff; }
|
||||
.lightPurple {
|
||||
background: #8c9eff; }
|
||||
.red {
|
||||
background: #ff8a80; }
|
||||
.pink {
|
||||
background: #ff80ab; }
|
||||
|
||||
md-grid-tile {
|
||||
-webkit-transition: all 500ms ease-out 100ms;
|
||||
-moz-transition: all 500ms ease-out 100ms;
|
||||
-o-transition: all 500ms ease-out 100ms;
|
||||
transition: all 500ms ease-out 100ms;
|
||||
}
|
||||
|
||||
md-grid-tile md-grid-tile-footer {
|
||||
background: rgba(0,0,0,.68);
|
||||
height: 36px;
|
||||
|
||||
}
|
||||
|
||||
md-grid-tile-footer figcaption {
|
||||
width:100%;
|
||||
}
|
||||
|
||||
md-grid-tile-footer figcaption h3 {
|
||||
margin:0px;
|
||||
font-weight:700;
|
||||
width:100%;
|
||||
text-align:center;
|
||||
}
|
78
third_party/ui/bower_components/angular-material/demos/gridList/demoDynamicTiles/style.scss
vendored
Normal file
|
@ -0,0 +1,78 @@
|
|||
md-icon {
|
||||
width:50%;height:50%
|
||||
}
|
||||
|
||||
md-icon svg {
|
||||
-webkit-border-radius: 50%;
|
||||
-moz-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.s64 {
|
||||
font-size:64px;
|
||||
}
|
||||
|
||||
.s32 {
|
||||
|
||||
font-size:48px;
|
||||
|
||||
}
|
||||
|
||||
md-icon.fa {
|
||||
display:block;
|
||||
padding-left:0px;
|
||||
}
|
||||
|
||||
md-icon.s32 span {
|
||||
padding-left:8px;
|
||||
}
|
||||
|
||||
md-grid-list {
|
||||
margin: 8px; }
|
||||
.gray {
|
||||
background: #f5f5f5; }
|
||||
.green {
|
||||
background: #b9f6ca; }
|
||||
.yellow {
|
||||
background: #ffff8d; }
|
||||
.blue {
|
||||
background: #84ffff; }
|
||||
.darkBlue {
|
||||
background: #80d8ff; }
|
||||
.deepBlue {
|
||||
background: #448aff; }
|
||||
.purple {
|
||||
background: #b388ff; }
|
||||
.lightPurple {
|
||||
background: #8c9eff; }
|
||||
.red {
|
||||
background: #ff8a80; }
|
||||
.pink {
|
||||
background: #ff80ab; }
|
||||
|
||||
|
||||
md-grid-tile {
|
||||
transition: all 300ms ease-out 50ms;
|
||||
}
|
||||
|
||||
|
||||
md-grid-tile md-icon {
|
||||
padding-bottom: 32px;
|
||||
}
|
||||
|
||||
md-grid-tile md-grid-tile-footer {
|
||||
background: rgba(0,0,0,.68);
|
||||
height: 36px;
|
||||
|
||||
}
|
||||
|
||||
md-grid-tile-footer figcaption {
|
||||
width:100%;
|
||||
}
|
||||
|
||||
md-grid-tile-footer figcaption h3 {
|
||||
margin:0px;
|
||||
font-weight:700;
|
||||
width:100%;
|
||||
text-align:center;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g id="addShoppingCart"><g id="add-shopping-cart"><path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"/></g></svg>
|
After Width: | Height: | Size: 503 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g id="android"><path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8 2 8.67 2 9.5v7c0 .83.67 1.5 1.5 1.5S5 17.33 5 16.5v-7C5 8.67 4.33 8 3.5 8zm17 0c-.83 0-1.5.67-1.5 1.5v7c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-7c0-.83-.67-1.5-1.5-1.5zm-4.97-5.84l1.3-1.3c.2-.2.2-.51 0-.71-.2-.2-.51-.2-.71 0l-1.48 1.48C13.85 1.23 12.95 1 12 1c-.96 0-1.86.23-2.66.63L7.85.15c-.2-.2-.51-.2-.71 0-.2.2-.2.51 0 .71l1.31 1.31C6.97 3.26 6 5.01 6 7h12c0-1.99-.97-3.75-2.47-4.84zM10 5H9V4h1v1zm5 0h-1V4h1v1z"/></g></svg>
|
After Width: | Height: | Size: 665 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g id="cake"><path d="M12 6c1.11 0 2-.9 2-2 0-.38-.1-.73-.29-1.03L12 0l-1.71 2.97c-.19.3-.29.65-.29 1.03 0 1.1.9 2 2 2zm4.6 9.99l-1.07-1.07-1.08 1.07c-1.3 1.3-3.58 1.31-4.89 0l-1.07-1.07-1.09 1.07C6.75 16.64 5.88 17 4.96 17c-.73 0-1.4-.23-1.96-.61V21c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-4.61c-.56.38-1.23.61-1.96.61-.92 0-1.79-.36-2.44-1.01zM18 9h-5V7h-2v2H6c-1.66 0-3 1.34-3 3v1.54c0 1.08.88 1.96 1.96 1.96.52 0 1.02-.2 1.38-.57l2.14-2.13 2.13 2.13c.74.74 2.03.74 2.77 0l2.14-2.13 2.13 2.13c.37.37.86.57 1.38.57 1.08 0 1.96-.88 1.96-1.96V12C21 10.34 19.66 9 18 9z"/></g></svg>
|
After Width: | Height: | Size: 636 B |
1
third_party/ui/bower_components/angular-material/demos/icon/demoSvgIconSets/assets/cake.svg
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g id="cake"><path d="M12 6c1.11 0 2-.9 2-2 0-.38-.1-.73-.29-1.03L12 0l-1.71 2.97c-.19.3-.29.65-.29 1.03 0 1.1.9 2 2 2zm4.6 9.99l-1.07-1.07-1.08 1.07c-1.3 1.3-3.58 1.31-4.89 0l-1.07-1.07-1.09 1.07C6.75 16.64 5.88 17 4.96 17c-.73 0-1.4-.23-1.96-.61V21c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-4.61c-.56.38-1.23.61-1.96.61-.92 0-1.79-.36-2.44-1.01zM18 9h-5V7h-2v2H6c-1.66 0-3 1.34-3 3v1.54c0 1.08.88 1.96 1.96 1.96.52 0 1.02-.2 1.38-.57l2.14-2.13 2.13 2.13c.74.74 2.03.74 2.77 0l2.14-2.13 2.13 2.13c.37.37.86.57 1.38.57 1.08 0 1.96-.88 1.96-1.96V12C21 10.34 19.66 9 18 9z"/></g></svg>
|
After Width: | Height: | Size: 636 B |
|
@ -0,0 +1,26 @@
|
|||
<svg><defs>
|
||||
<g id="3d-rotation"><path d="M7.52 21.48C4.25 19.94 1.91 16.76 1.55 13H.05C.56 19.16 5.71 24 12 24l.66-.03-3.81-3.81-1.33 1.32zm.89-6.52c-.19 0-.37-.03-.52-.08-.16-.06-.29-.13-.4-.24-.11-.1-.2-.22-.26-.37-.06-.14-.09-.3-.09-.47h-1.3c0 .36.07.68.21.95.14.27.33.5.56.69.24.18.51.32.82.41.3.1.62.15.96.15.37 0 .72-.05 1.03-.15.32-.1.6-.25.83-.44s.42-.43.55-.72c.13-.29.2-.61.2-.97 0-.19-.02-.38-.07-.56-.05-.18-.12-.35-.23-.51-.1-.16-.24-.3-.4-.43-.17-.13-.37-.23-.61-.31.2-.09.37-.2.52-.33.15-.13.27-.27.37-.42.1-.15.17-.3.22-.46.05-.16.07-.32.07-.48 0-.36-.06-.68-.18-.96-.12-.28-.29-.51-.51-.69-.2-.19-.47-.33-.77-.43C9.1 8.05 8.76 8 8.39 8c-.36 0-.69.05-1 .16-.3.11-.57.26-.79.45-.21.19-.38.41-.51.67-.12.26-.18.54-.18.85h1.3c0-.17.03-.32.09-.45s.14-.25.25-.34c.11-.09.23-.17.38-.22.15-.05.3-.08.48-.08.4 0 .7.1.89.31.19.2.29.49.29.86 0 .18-.03.34-.08.49-.05.15-.14.27-.25.37-.11.1-.25.18-.41.24-.16.06-.36.09-.58.09H7.5v1.03h.77c.22 0 .42.02.6.07s.33.13.45.23c.12.11.22.24.29.4.07.16.1.35.1.57 0 .41-.12.72-.35.93-.23.23-.55.33-.95.33zm8.55-5.92c-.32-.33-.7-.59-1.14-.77-.43-.18-.92-.27-1.46-.27H12v8h2.3c.55 0 1.06-.09 1.51-.27.45-.18.84-.43 1.16-.76.32-.33.57-.73.74-1.19.17-.47.26-.99.26-1.57v-.4c0-.58-.09-1.1-.26-1.57-.18-.47-.43-.87-.75-1.2zm-.39 3.16c0 .42-.05.79-.14 1.13-.1.33-.24.62-.43.85-.19.23-.43.41-.71.53-.29.12-.62.18-.99.18h-.91V9.12h.97c.72 0 1.27.23 1.64.69.38.46.57 1.12.57 1.99v.4zM12 0l-.66.03 3.81 3.81 1.33-1.33c3.27 1.55 5.61 4.72 5.96 8.48h1.5C23.44 4.84 18.29 0 12 0z"/></g>
|
||||
<g id="accessibility"><path d="M12 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 7h-6v13h-2v-6h-2v6H9V9H3V7h18v2z"/></g>
|
||||
<g id="account-balance"><path d="M4 10v7h3v-7H4zm6 0v7h3v-7h-3zM2 22h19v-3H2v3zm14-12v7h3v-7h-3zm-4.5-9L2 6v2h19V6l-9.5-5z"/></g>
|
||||
<g id="account-balance-wallet"><path d="M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
|
||||
<g id="account-box"><path d="M3 5v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2zm12 4c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zm-9 8c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1H6v-1z"/></g>
|
||||
<g id="account-child"><circle cx="12" cy="13.49" r="1.5"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 2.5c1.24 0 2.25 1.01 2.25 2.25S13.24 9 12 9 9.75 7.99 9.75 6.75 10.76 4.5 12 4.5zm5 10.56v2.5c-.45.41-.96.77-1.5 1.05v-.68c0-.34-.17-.65-.46-.92-.65-.62-1.89-1.02-3.04-1.02-.96 0-1.96.28-2.65.73l-.17.12-.21.17c.78.47 1.63.72 2.54.82l1.33.15c.37.04.66.36.66.75 0 .29-.16.53-.4.66-.28.15-.64.09-.95.09-.35 0-.69-.01-1.03-.05-.5-.06-.99-.17-1.46-.33-.49-.16-.97-.38-1.42-.64-.22-.13-.44-.27-.65-.43l-.31-.24c-.04-.02-.28-.18-.28-.23v-4.28c0-1.58 2.63-2.78 5-2.78s5 1.2 5 2.78v1.78z"/></g>
|
||||
<g id="account-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></g>
|
||||
<g id="add"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></g>
|
||||
<g id="add-box"><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></g>
|
||||
<g id="add-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></g>
|
||||
<g id="add-circle-outline"><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
|
||||
<g id="add-shopping-cart"><path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"/></g>
|
||||
<g id="alarm"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
|
||||
<g id="alarm-add"><path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm1-11h-2v3H8v2h3v3h2v-3h3v-2h-3V9z"/></g>
|
||||
<g id="alarm-off"><path d="M12 6c3.87 0 7 3.13 7 7 0 .84-.16 1.65-.43 2.4l1.52 1.52c.58-1.19.91-2.51.91-3.92 0-4.97-4.03-9-9-9-1.41 0-2.73.33-3.92.91L9.6 6.43C10.35 6.16 11.16 6 12 6zm10-.28l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM2.92 2.29L1.65 3.57 2.98 4.9l-1.11.93 1.42 1.42 1.11-.94.8.8C3.83 8.69 3 10.75 3 13c0 4.97 4.02 9 9 9 2.25 0 4.31-.83 5.89-2.2l2.2 2.2 1.27-1.27L3.89 3.27l-.97-.98zm13.55 16.1C15.26 19.39 13.7 20 12 20c-3.87 0-7-3.13-7-7 0-1.7.61-3.26 1.61-4.47l9.86 9.86zM8.02 3.28L6.6 1.86l-.86.71 1.42 1.42.86-.71z"/></g>
|
||||
<g id="alarm-on"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm-1.46-5.47L8.41 12.4l-1.06 1.06 3.18 3.18 6-6-1.06-1.06-4.93 4.95z"/></g>
|
||||
<g id="android"><path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8 2 8.67 2 9.5v7c0 .83.67 1.5 1.5 1.5S5 17.33 5 16.5v-7C5 8.67 4.33 8 3.5 8zm17 0c-.83 0-1.5.67-1.5 1.5v7c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-7c0-.83-.67-1.5-1.5-1.5zm-4.97-5.84l1.3-1.3c.2-.2.2-.51 0-.71-.2-.2-.51-.2-.71 0l-1.48 1.48C13.85 1.23 12.95 1 12 1c-.96 0-1.86.23-2.66.63L7.85.15c-.2-.2-.51-.2-.71 0-.2.2-.2.51 0 .71l1.31 1.31C6.97 3.26 6 5.01 6 7h12c0-1.99-.97-3.75-2.47-4.84zM10 5H9V4h1v1zm5 0h-1V4h1v1z"/></g>
|
||||
<g id="announcement"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 9h-2V5h2v6zm0 4h-2v-2h2v2z"/></g>
|
||||
<g id="apps"><path d="M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"/></g>
|
||||
<g id="archive"><path d="M20.54 5.23l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27zM12 17.5L6.5 12H10v-2h4v2h3.5L12 17.5zM5.12 5l.81-1h12l.94 1H5.12z"/></g>
|
||||
<g id="arrow-back"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></g>
|
||||
<g id="arrow-drop-down"><path d="M7 10l5 5 5-5z"/></g>
|
||||
<g id="arrow-drop-down-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 12l-4-4h8l-4 4z"/></g>
|
||||
<g id="arrow-drop-up"><path d="M7 14l5-5 5 5z"/></g>
|
||||
</defs></svg>
|
After Width: | Height: | Size: 6.9 KiB |
|
@ -0,0 +1,26 @@
|
|||
<svg><defs>
|
||||
<g id="cake"><path d="M12 6c1.11 0 2-.9 2-2 0-.38-.1-.73-.29-1.03L12 0l-1.71 2.97c-.19.3-.29.65-.29 1.03 0 1.1.9 2 2 2zm4.6 9.99l-1.07-1.07-1.08 1.07c-1.3 1.3-3.58 1.31-4.89 0l-1.07-1.07-1.09 1.07C6.75 16.64 5.88 17 4.96 17c-.73 0-1.4-.23-1.96-.61V21c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-4.61c-.56.38-1.23.61-1.96.61-.92 0-1.79-.36-2.44-1.01zM18 9h-5V7h-2v2H6c-1.66 0-3 1.34-3 3v1.54c0 1.08.88 1.96 1.96 1.96.52 0 1.02-.2 1.38-.57l2.14-2.13 2.13 2.13c.74.74 2.03.74 2.77 0l2.14-2.13 2.13 2.13c.37.37.86.57 1.38.57 1.08 0 1.96-.88 1.96-1.96V12C21 10.34 19.66 9 18 9z"/></g>
|
||||
<g id="domain"><path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"/></g>
|
||||
<g id="group"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></g>
|
||||
<g id="group-add"><path d="M8 10H5V7H3v3H0v2h3v3h2v-3h3v-2zm10 1c1.66 0 2.99-1.34 2.99-3S19.66 5 18 5c-.32 0-.63.05-.91.14.57.81.9 1.79.9 2.86s-.34 2.04-.9 2.86c.28.09.59.14.91.14zm-5 0c1.66 0 2.99-1.34 2.99-3S14.66 5 13 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm6.62 2.16c.83.73 1.38 1.66 1.38 2.84v2h3v-2c0-1.54-2.37-2.49-4.38-2.84zM13 13c-2 0-6 1-6 3v2h12v-2c0-2-4-3-6-3z"/></g>
|
||||
<g id="location-city"><path d="M15 11V5l-3-3-3 3v2H3v14h18V11h-6zm-8 8H5v-2h2v2zm0-4H5v-2h2v2zm0-4H5V9h2v2zm6 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V9h2v2zm0-4h-2V5h2v2zm6 12h-2v-2h2v2zm0-4h-2v-2h2v2z"/></g>
|
||||
<g id="mood"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"/></g>
|
||||
<g id="notifications"><path d="M11.5 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6.5-6v-5.5c0-3.07-2.13-5.64-5-6.32V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v.68c-2.87.68-5 3.25-5 6.32V16l-2 2v1h17v-1l-2-2z"/></g>
|
||||
<g id="notifications-none"><path d="M11.5 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6.5-6v-5.5c0-3.07-2.13-5.64-5-6.32V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v.68c-2.87.68-5 3.25-5 6.32V16l-2 2v1h17v-1l-2-2zm-2 1H7v-6.5C7 8.01 9.01 6 11.5 6S16 8.01 16 10.5V17z"/></g>
|
||||
<g id="notifications-off"><path d="M11.5 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zM18 10.5c0-3.07-2.13-5.64-5-6.32V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v.68c-.51.12-.99.32-1.45.56L18 14.18V10.5zm-.27 8.5l2 2L21 19.73 4.27 3 3 4.27l2.92 2.92C5.34 8.16 5 9.29 5 10.5V16l-2 2v1h14.73z"/></g>
|
||||
<g id="notifications-on"><path d="M6.58 3.58L5.15 2.15C2.76 3.97 1.18 6.8 1.03 10h2c.15-2.65 1.51-4.97 3.55-6.42zM19.97 10h2c-.15-3.2-1.73-6.03-4.13-7.85l-1.43 1.43c2.05 1.45 3.41 3.77 3.56 6.42zm-1.97.5c0-3.07-2.13-5.64-5-6.32V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v.68c-2.87.68-5 3.25-5 6.32V16l-2 2v1h17v-1l-2-2v-5.5zM11.5 22c.14 0 .27-.01.4-.04.65-.13 1.19-.58 1.44-1.18.1-.24.16-.5.16-.78h-4c0 1.1.9 2 2 2z"/></g>
|
||||
<g id="notifications-paused"><path d="M11.5 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6.5-6v-5.5c0-3.07-2.13-5.64-5-6.32V3.5c0-.83-.67-1.5-1.5-1.5S10 2.67 10 3.5v.68c-2.87.68-5 3.25-5 6.32V16l-2 2v1h17v-1l-2-2zm-4-6.2l-2.8 3.4H14V15H9v-1.8l2.8-3.4H9V8h5v1.8z"/></g>
|
||||
<g id="pages"><path d="M3 5v6h5L7 7l4 1V3H5c-1.1 0-2 .9-2 2zm5 8H3v6c0 1.1.9 2 2 2h6v-5l-4 1 1-4zm9 4l-4-1v5h6c1.1 0 2-.9 2-2v-6h-5l1 4zm2-14h-6v5l4-1-1 4h5V5c0-1.1-.9-2-2-2z"/></g>
|
||||
<g id="party-mode"><path d="M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-8 3c1.63 0 3.06.79 3.98 2H12c-1.66 0-3 1.34-3 3 0 .35.07.69.18 1H7.1c-.06-.32-.1-.66-.1-1 0-2.76 2.24-5 5-5zm0 10c-1.63 0-3.06-.79-3.98-2H12c1.66 0 3-1.34 3-3 0-.35-.07-.69-.18-1h2.08c.07.32.1.66.1 1 0 2.76-2.24 5-5 5z"/></g>
|
||||
<g id="people"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></g>
|
||||
<g id="people-outline"><path d="M16.5 13c-1.2 0-3.07.34-4.5 1-1.43-.67-3.3-1-4.5-1C5.33 13 1 14.08 1 16.25V19h22v-2.75c0-2.17-4.33-3.25-6.5-3.25zm-4 4.5h-10v-1.25c0-.54 2.56-1.75 5-1.75s5 1.21 5 1.75v1.25zm9 0H14v-1.25c0-.46-.2-.86-.52-1.22.88-.3 1.96-.53 3.02-.53 2.44 0 5 1.21 5 1.75v1.25zM7.5 12c1.93 0 3.5-1.57 3.5-3.5S9.43 5 7.5 5 4 6.57 4 8.5 5.57 12 7.5 12zm0-5.5c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 5.5c1.93 0 3.5-1.57 3.5-3.5S18.43 5 16.5 5 13 6.57 13 8.5s1.57 3.5 3.5 3.5zm0-5.5c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2z"/></g>
|
||||
<g id="person"><path d="M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></g>
|
||||
<g id="person-add"><path d="M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V7H4v3H1v2h3v3h2v-3h3v-2H6zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/></g>
|
||||
<g id="person-outline"><path d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"/></g>
|
||||
<g id="plus-one"><path d="M10 8H8v4H4v2h4v4h2v-4h4v-2h-4zm4.5-1.92V7.9l2.5-.5V18h2V5z"/></g>
|
||||
<g id="poll"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"/></g>
|
||||
<g id="public"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z"/></g>
|
||||
<g id="school"><path d="M5 13.18v4L12 21l7-3.82v-4L12 17l-7-3.82zM12 3L1 9l11 6 9-4.91V17h2V9L12 3z"/></g>
|
||||
<g id="share"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92 1.61 0 2.92-1.31 2.92-2.92s-1.31-2.92-2.92-2.92z"/></g>
|
||||
<g id="whatshot"><path d="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z"/></g>
|
||||
</defs></svg>
|
After Width: | Height: | Size: 6.8 KiB |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g id="addShoppingCart"><g id="add-shopping-cart"><path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"/></g></svg>
|
After Width: | Height: | Size: 503 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g id="android"><path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8 2 8.67 2 9.5v7c0 .83.67 1.5 1.5 1.5S5 17.33 5 16.5v-7C5 8.67 4.33 8 3.5 8zm17 0c-.83 0-1.5.67-1.5 1.5v7c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-7c0-.83-.67-1.5-1.5-1.5zm-4.97-5.84l1.3-1.3c.2-.2.2-.51 0-.71-.2-.2-.51-.2-.71 0l-1.48 1.48C13.85 1.23 12.95 1 12 1c-.96 0-1.86.23-2.66.63L7.85.15c-.2-.2-.51-.2-.71 0-.2.2-.2.51 0 .71l1.31 1.31C6.97 3.26 6 5.01 6 7h12c0-1.99-.97-3.75-2.47-4.84zM10 5H9V4h1v1zm5 0h-1V4h1v1z"/></g></svg>
|
After Width: | Height: | Size: 665 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g id="cake"><path d="M12 6c1.11 0 2-.9 2-2 0-.38-.1-.73-.29-1.03L12 0l-1.71 2.97c-.19.3-.29.65-.29 1.03 0 1.1.9 2 2 2zm4.6 9.99l-1.07-1.07-1.08 1.07c-1.3 1.3-3.58 1.31-4.89 0l-1.07-1.07-1.09 1.07C6.75 16.64 5.88 17 4.96 17c-.73 0-1.4-.23-1.96-.61V21c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-4.61c-.56.38-1.23.61-1.96.61-.92 0-1.79-.36-2.44-1.01zM18 9h-5V7h-2v2H6c-1.66 0-3 1.34-3 3v1.54c0 1.08.88 1.96 1.96 1.96.52 0 1.02-.2 1.38-.57l2.14-2.13 2.13 2.13c.74.74 2.03.74 2.77 0l2.14-2.13 2.13 2.13c.37.37.86.57 1.38.57 1.08 0 1.96-.88 1.96-1.96V12C21 10.34 19.66 9 18 9z"/></g></svg>
|
After Width: | Height: | Size: 636 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g id="android"><path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8 2 8.67 2 9.5v7c0 .83.67 1.5 1.5 1.5S5 17.33 5 16.5v-7C5 8.67 4.33 8 3.5 8zm17 0c-.83 0-1.5.67-1.5 1.5v7c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-7c0-.83-.67-1.5-1.5-1.5zm-4.97-5.84l1.3-1.3c.2-.2.2-.51 0-.71-.2-.2-.51-.2-.71 0l-1.48 1.48C13.85 1.23 12.95 1 12 1c-.96 0-1.86.23-2.66.63L7.85.15c-.2-.2-.51-.2-.71 0-.2.2-.2.51 0 .71l1.31 1.31C6.97 3.26 6 5.01 6 7h12c0-1.99-.97-3.75-2.47-4.84zM10 5H9V4h1v1zm5 0h-1V4h1v1z"/></g></svg>
|
After Width: | Height: | Size: 665 B |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g id="cake"><path d="M12 6c1.11 0 2-.9 2-2 0-.38-.1-.73-.29-1.03L12 0l-1.71 2.97c-.19.3-.29.65-.29 1.03 0 1.1.9 2 2 2zm4.6 9.99l-1.07-1.07-1.08 1.07c-1.3 1.3-3.58 1.31-4.89 0l-1.07-1.07-1.09 1.07C6.75 16.64 5.88 17 4.96 17c-.73 0-1.4-.23-1.96-.61V21c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-4.61c-.56.38-1.23.61-1.96.61-.92 0-1.79-.36-2.44-1.01zM18 9h-5V7h-2v2H6c-1.66 0-3 1.34-3 3v1.54c0 1.08.88 1.96 1.96 1.96.52 0 1.02-.2 1.38-.57l2.14-2.13 2.13 2.13c.74.74 2.03.74 2.77 0l2.14-2.13 2.13 2.13c.37.37.86.57 1.38.57 1.08 0 1.96-.88 1.96-1.96V12C21 10.34 19.66 9 18 9z"/></g></svg>
|
After Width: | Height: | Size: 636 B |
|
@ -0,0 +1,26 @@
|
|||
<svg><defs>
|
||||
<g id="3d-rotation"><path d="M7.52 21.48C4.25 19.94 1.91 16.76 1.55 13H.05C.56 19.16 5.71 24 12 24l.66-.03-3.81-3.81-1.33 1.32zm.89-6.52c-.19 0-.37-.03-.52-.08-.16-.06-.29-.13-.4-.24-.11-.1-.2-.22-.26-.37-.06-.14-.09-.3-.09-.47h-1.3c0 .36.07.68.21.95.14.27.33.5.56.69.24.18.51.32.82.41.3.1.62.15.96.15.37 0 .72-.05 1.03-.15.32-.1.6-.25.83-.44s.42-.43.55-.72c.13-.29.2-.61.2-.97 0-.19-.02-.38-.07-.56-.05-.18-.12-.35-.23-.51-.1-.16-.24-.3-.4-.43-.17-.13-.37-.23-.61-.31.2-.09.37-.2.52-.33.15-.13.27-.27.37-.42.1-.15.17-.3.22-.46.05-.16.07-.32.07-.48 0-.36-.06-.68-.18-.96-.12-.28-.29-.51-.51-.69-.2-.19-.47-.33-.77-.43C9.1 8.05 8.76 8 8.39 8c-.36 0-.69.05-1 .16-.3.11-.57.26-.79.45-.21.19-.38.41-.51.67-.12.26-.18.54-.18.85h1.3c0-.17.03-.32.09-.45s.14-.25.25-.34c.11-.09.23-.17.38-.22.15-.05.3-.08.48-.08.4 0 .7.1.89.31.19.2.29.49.29.86 0 .18-.03.34-.08.49-.05.15-.14.27-.25.37-.11.1-.25.18-.41.24-.16.06-.36.09-.58.09H7.5v1.03h.77c.22 0 .42.02.6.07s.33.13.45.23c.12.11.22.24.29.4.07.16.1.35.1.57 0 .41-.12.72-.35.93-.23.23-.55.33-.95.33zm8.55-5.92c-.32-.33-.7-.59-1.14-.77-.43-.18-.92-.27-1.46-.27H12v8h2.3c.55 0 1.06-.09 1.51-.27.45-.18.84-.43 1.16-.76.32-.33.57-.73.74-1.19.17-.47.26-.99.26-1.57v-.4c0-.58-.09-1.1-.26-1.57-.18-.47-.43-.87-.75-1.2zm-.39 3.16c0 .42-.05.79-.14 1.13-.1.33-.24.62-.43.85-.19.23-.43.41-.71.53-.29.12-.62.18-.99.18h-.91V9.12h.97c.72 0 1.27.23 1.64.69.38.46.57 1.12.57 1.99v.4zM12 0l-.66.03 3.81 3.81 1.33-1.33c3.27 1.55 5.61 4.72 5.96 8.48h1.5C23.44 4.84 18.29 0 12 0z"/></g>
|
||||
<g id="accessibility"><path d="M12 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 7h-6v13h-2v-6h-2v6H9V9H3V7h18v2z"/></g>
|
||||
<g id="account-balance"><path d="M4 10v7h3v-7H4zm6 0v7h3v-7h-3zM2 22h19v-3H2v3zm14-12v7h3v-7h-3zm-4.5-9L2 6v2h19V6l-9.5-5z"/></g>
|
||||
<g id="account-balance-wallet"><path d="M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"/></g>
|
||||
<g id="account-box"><path d="M3 5v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2zm12 4c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zm-9 8c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1H6v-1z"/></g>
|
||||
<g id="account-child"><circle cx="12" cy="13.49" r="1.5"/><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 2.5c1.24 0 2.25 1.01 2.25 2.25S13.24 9 12 9 9.75 7.99 9.75 6.75 10.76 4.5 12 4.5zm5 10.56v2.5c-.45.41-.96.77-1.5 1.05v-.68c0-.34-.17-.65-.46-.92-.65-.62-1.89-1.02-3.04-1.02-.96 0-1.96.28-2.65.73l-.17.12-.21.17c.78.47 1.63.72 2.54.82l1.33.15c.37.04.66.36.66.75 0 .29-.16.53-.4.66-.28.15-.64.09-.95.09-.35 0-.69-.01-1.03-.05-.5-.06-.99-.17-1.46-.33-.49-.16-.97-.38-1.42-.64-.22-.13-.44-.27-.65-.43l-.31-.24c-.04-.02-.28-.18-.28-.23v-4.28c0-1.58 2.63-2.78 5-2.78s5 1.2 5 2.78v1.78z"/></g>
|
||||
<g id="account-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></g>
|
||||
<g id="add"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/></g>
|
||||
<g id="add-box"><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></g>
|
||||
<g id="add-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"/></g>
|
||||
<g id="add-circle-outline"><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/></g>
|
||||
<g id="add-shopping-cart"><path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"/></g>
|
||||
<g id="alarm"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"/></g>
|
||||
<g id="alarm-add"><path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm1-11h-2v3H8v2h3v3h2v-3h3v-2h-3V9z"/></g>
|
||||
<g id="alarm-off"><path d="M12 6c3.87 0 7 3.13 7 7 0 .84-.16 1.65-.43 2.4l1.52 1.52c.58-1.19.91-2.51.91-3.92 0-4.97-4.03-9-9-9-1.41 0-2.73.33-3.92.91L9.6 6.43C10.35 6.16 11.16 6 12 6zm10-.28l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM2.92 2.29L1.65 3.57 2.98 4.9l-1.11.93 1.42 1.42 1.11-.94.8.8C3.83 8.69 3 10.75 3 13c0 4.97 4.02 9 9 9 2.25 0 4.31-.83 5.89-2.2l2.2 2.2 1.27-1.27L3.89 3.27l-.97-.98zm13.55 16.1C15.26 19.39 13.7 20 12 20c-3.87 0-7-3.13-7-7 0-1.7.61-3.26 1.61-4.47l9.86 9.86zM8.02 3.28L6.6 1.86l-.86.71 1.42 1.42.86-.71z"/></g>
|
||||
<g id="alarm-on"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm-1.46-5.47L8.41 12.4l-1.06 1.06 3.18 3.18 6-6-1.06-1.06-4.93 4.95z"/></g>
|
||||
<g id="android"><path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8 2 8.67 2 9.5v7c0 .83.67 1.5 1.5 1.5S5 17.33 5 16.5v-7C5 8.67 4.33 8 3.5 8zm17 0c-.83 0-1.5.67-1.5 1.5v7c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-7c0-.83-.67-1.5-1.5-1.5zm-4.97-5.84l1.3-1.3c.2-.2.2-.51 0-.71-.2-.2-.51-.2-.71 0l-1.48 1.48C13.85 1.23 12.95 1 12 1c-.96 0-1.86.23-2.66.63L7.85.15c-.2-.2-.51-.2-.71 0-.2.2-.2.51 0 .71l1.31 1.31C6.97 3.26 6 5.01 6 7h12c0-1.99-.97-3.75-2.47-4.84zM10 5H9V4h1v1zm5 0h-1V4h1v1z"/></g>
|
||||
<g id="announcement"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 9h-2V5h2v6zm0 4h-2v-2h2v2z"/></g>
|
||||
<g id="apps"><path d="M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"/></g>
|
||||
<g id="archive"><path d="M20.54 5.23l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27zM12 17.5L6.5 12H10v-2h4v2h3.5L12 17.5zM5.12 5l.81-1h12l.94 1H5.12z"/></g>
|
||||
<g id="arrow-back"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/></g>
|
||||
<g id="arrow-drop-down"><path d="M7 10l5 5 5-5z"/></g>
|
||||
<g id="arrow-drop-down-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 12l-4-4h8l-4 4z"/></g>
|
||||
<g id="arrow-drop-up"><path d="M7 14l5-5 5 5z"/></g>
|
||||
</defs></svg>
|
After Width: | Height: | Size: 6.9 KiB |
|
@ -0,0 +1,21 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
md-autocomplete {
|
||||
background: '{{background-50}}'; }
|
||||
md-autocomplete button md-icon path {
|
||||
fill: '{{background-600}}'; }
|
||||
md-autocomplete button:after {
|
||||
background: '{{background-600-0.3}}'; }
|
||||
md-autocomplete ul {
|
||||
background: '{{background-50}}'; }
|
||||
md-autocomplete ul li {
|
||||
border-top: 1px solid '{{background-400}}';
|
||||
color: '{{background-900}}'; }
|
||||
md-autocomplete ul li .highlight {
|
||||
color: '{{background-600}}'; }
|
||||
md-autocomplete ul li:hover, md-autocomplete ul li.selected {
|
||||
background: '{{background-200}}'; }
|
201
third_party/ui/bower_components/angular-material/modules/closure/autocomplete/autocomplete.css
vendored
Normal file
|
@ -0,0 +1,201 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
@-webkit-keyframes md-autocomplete-list-out {
|
||||
0% {
|
||||
-webkit-animation-timing-function: linear;
|
||||
animation-timing-function: linear; }
|
||||
|
||||
50% {
|
||||
opacity: 0;
|
||||
height: 40px;
|
||||
-webkit-animation-timing-function: ease-in;
|
||||
animation-timing-function: ease-in; }
|
||||
|
||||
100% {
|
||||
height: 0;
|
||||
opacity: 0; } }
|
||||
|
||||
@keyframes md-autocomplete-list-out {
|
||||
0% {
|
||||
-webkit-animation-timing-function: linear;
|
||||
animation-timing-function: linear; }
|
||||
|
||||
50% {
|
||||
opacity: 0;
|
||||
height: 40px;
|
||||
-webkit-animation-timing-function: ease-in;
|
||||
animation-timing-function: ease-in; }
|
||||
|
||||
100% {
|
||||
height: 0;
|
||||
opacity: 0; } }
|
||||
|
||||
@-webkit-keyframes md-autocomplete-list-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
height: 0;
|
||||
-webkit-animation-timing-function: ease-out;
|
||||
animation-timing-function: ease-out; }
|
||||
|
||||
50% {
|
||||
opacity: 0;
|
||||
height: 40px; }
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
height: 40px; } }
|
||||
|
||||
@keyframes md-autocomplete-list-in {
|
||||
0% {
|
||||
opacity: 0;
|
||||
height: 0;
|
||||
-webkit-animation-timing-function: ease-out;
|
||||
animation-timing-function: ease-out; }
|
||||
|
||||
50% {
|
||||
opacity: 0;
|
||||
height: 40px; }
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
height: 40px; } }
|
||||
|
||||
md-content {
|
||||
overflow: visible; }
|
||||
|
||||
md-autocomplete {
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
|
||||
border-radius: 2px;
|
||||
display: block;
|
||||
height: 40px;
|
||||
position: relative;
|
||||
overflow: visible; }
|
||||
md-autocomplete md-autocomplete-wrap {
|
||||
display: block;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
height: 40px; }
|
||||
md-autocomplete md-autocomplete-wrap md-progress-linear {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
transition: none; }
|
||||
md-autocomplete md-autocomplete-wrap md-progress-linear .md-container {
|
||||
transition: none;
|
||||
top: auto;
|
||||
height: 3px; }
|
||||
md-autocomplete md-autocomplete-wrap md-progress-linear.ng-enter {
|
||||
transition: opacity 0.15s linear; }
|
||||
md-autocomplete md-autocomplete-wrap md-progress-linear.ng-enter.ng-enter-active {
|
||||
opacity: 1; }
|
||||
md-autocomplete md-autocomplete-wrap md-progress-linear.ng-leave {
|
||||
transition: opacity 0.15s linear; }
|
||||
md-autocomplete md-autocomplete-wrap md-progress-linear.ng-leave.ng-leave-active {
|
||||
opacity: 0; }
|
||||
md-autocomplete input {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
padding: 0 15px;
|
||||
font-size: 14px;
|
||||
line-height: 40px;
|
||||
height: 40px;
|
||||
outline: none;
|
||||
z-index: 2;
|
||||
background: transparent; }
|
||||
md-autocomplete input::-ms-clear {
|
||||
display: none; }
|
||||
md-autocomplete button {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
line-height: 20px;
|
||||
z-index: 2;
|
||||
text-align: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
border-radius: 50%;
|
||||
padding: 0;
|
||||
font-size: 12px;
|
||||
background: transparent; }
|
||||
md-autocomplete button:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -6px;
|
||||
right: -6px;
|
||||
bottom: -6px;
|
||||
left: -6px;
|
||||
border-radius: 50%;
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0);
|
||||
opacity: 0;
|
||||
transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
|
||||
z-index: -1; }
|
||||
md-autocomplete button:focus:after {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1);
|
||||
opacity: 1; }
|
||||
md-autocomplete button md-icon {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
-webkit-transform: translate3d(-50%, -50%, 0) scale(0.9);
|
||||
transform: translate3d(-50%, -50%, 0) scale(0.9); }
|
||||
md-autocomplete button md-icon path {
|
||||
stroke-width: 0; }
|
||||
md-autocomplete button.ng-enter {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0);
|
||||
transition: -webkit-transform 0.15s ease-out;
|
||||
transition: transform 0.15s ease-out; }
|
||||
md-autocomplete button.ng-enter.ng-enter-active {
|
||||
-webkit-transform: scale(1);
|
||||
transform: scale(1); }
|
||||
md-autocomplete button.ng-leave {
|
||||
transition: -webkit-transform 0.15s ease-out;
|
||||
transition: transform 0.15s ease-out; }
|
||||
md-autocomplete button.ng-leave.ng-leave-active {
|
||||
-webkit-transform: scale(0);
|
||||
transform: scale(0); }
|
||||
md-autocomplete ul {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
overflow: auto;
|
||||
max-height: 225.5px;
|
||||
z-index: 49; }
|
||||
md-autocomplete ul li {
|
||||
border-top: 1px solid #ddd;
|
||||
padding: 0 15px;
|
||||
line-height: 40px;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
height: 40px;
|
||||
transition: background 0.15s linear;
|
||||
cursor: pointer;
|
||||
margin: 0; }
|
||||
md-autocomplete ul li.ng-enter, md-autocomplete ul li.ng-hide-remove {
|
||||
transition: none;
|
||||
-webkit-animation: md-autocomplete-list-in 0.2s;
|
||||
animation: md-autocomplete-list-in 0.2s; }
|
||||
md-autocomplete ul li.ng-leave, md-autocomplete ul li.ng-hide-add {
|
||||
transition: none;
|
||||
-webkit-animation: md-autocomplete-list-out 0.2s;
|
||||
animation: md-autocomplete-list-out 0.2s; }
|
386
third_party/ui/bower_components/angular-material/modules/closure/autocomplete/autocomplete.js
vendored
Normal file
|
@ -0,0 +1,386 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
goog.provide('ng.material.components.autocomplete');
|
||||
goog.require('ng.material.components.icon');
|
||||
goog.require('ng.material.core');
|
||||
(function () {
|
||||
'use strict';
|
||||
/**
|
||||
* @ngdoc module
|
||||
* @name material.components.autocomplete
|
||||
*/
|
||||
/*
|
||||
* @see js folder for autocomplete implementation
|
||||
*/
|
||||
angular.module('material.components.autocomplete', [
|
||||
'material.core',
|
||||
'material.components.icon'
|
||||
]);
|
||||
})();
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
angular
|
||||
.module('material.components.autocomplete')
|
||||
.controller('MdAutocompleteCtrl', MdAutocompleteCtrl);
|
||||
|
||||
function MdAutocompleteCtrl ($scope, $element, $timeout, $q, $mdUtil, $mdConstant) {
|
||||
|
||||
//-- private variables
|
||||
var self = this,
|
||||
itemParts = $scope.itemsExpr.split(/ in /i),
|
||||
itemExpr = itemParts[1],
|
||||
elements = {
|
||||
main: $element[0],
|
||||
ul: $element[0].getElementsByTagName('ul')[0],
|
||||
input: $element[0].getElementsByTagName('input')[0]
|
||||
},
|
||||
promise = null,
|
||||
cache = {};
|
||||
|
||||
//-- public variables
|
||||
self.scope = $scope;
|
||||
self.parent = $scope.$parent;
|
||||
self.itemName = itemParts[0];
|
||||
self.matches = [];
|
||||
self.loading = false;
|
||||
self.hidden = true;
|
||||
self.index = 0;
|
||||
self.keydown = keydown;
|
||||
self.blur = blur;
|
||||
self.clear = clearValue;
|
||||
self.select = select;
|
||||
self.getCurrentDisplayValue = getCurrentDisplayValue;
|
||||
self.fetch = $mdUtil.debounce(fetchResults);
|
||||
|
||||
return init();
|
||||
|
||||
//-- start method definitions
|
||||
function init () {
|
||||
configureWatchers();
|
||||
configureAria();
|
||||
}
|
||||
|
||||
function configureAria () {
|
||||
var ul = angular.element(elements.ul),
|
||||
input = angular.element(elements.input),
|
||||
id = ul.attr('id') || 'ul_' + $mdUtil.nextUid();
|
||||
ul.attr('id', id);
|
||||
input.attr('aria-owns', id);
|
||||
}
|
||||
|
||||
function getItemScope (item) {
|
||||
if (!item) return;
|
||||
var locals = {};
|
||||
if (self.itemName) locals[self.itemName] = $scope.selectedItem;
|
||||
return locals;
|
||||
}
|
||||
|
||||
function configureWatchers () {
|
||||
$scope.$watch('searchText', function (searchText) {
|
||||
self.index = -1;
|
||||
if (!searchText || searchText.length < Math.max(parseInt($scope.minLength, 10), 1)) {
|
||||
self.loading = false;
|
||||
self.matches = [];
|
||||
self.hidden = shouldHide();
|
||||
return;
|
||||
}
|
||||
var term = searchText.toLowerCase();
|
||||
if (promise && promise.cancel) {
|
||||
promise.cancel();
|
||||
promise = null;
|
||||
}
|
||||
if (!$scope.noCache && cache[term]) {
|
||||
self.matches = cache[term];
|
||||
} else {
|
||||
self.fetch(searchText);
|
||||
}
|
||||
self.hidden = shouldHide();
|
||||
if ($scope.textChange) $scope.textChange(getItemScope($scope.selectedItem));
|
||||
});
|
||||
$scope.$watch('selectedItem', function (selectedItem) {
|
||||
if ($scope.itemChange) $scope.itemChange(getItemScope(selectedItem));
|
||||
});
|
||||
}
|
||||
|
||||
function fetchResults (searchText) {
|
||||
var items = $scope.$parent.$eval(itemExpr),
|
||||
term = searchText.toLowerCase();
|
||||
if (angular.isArray(items)) {
|
||||
handleResults(items);
|
||||
} else {
|
||||
self.loading = true;
|
||||
promise = $q.when(items).then(handleResults);
|
||||
}
|
||||
function handleResults (matches) {
|
||||
cache[term] = matches;
|
||||
if (searchText !== $scope.searchText) return; //-- just cache the results if old request
|
||||
promise = null;
|
||||
self.loading = false;
|
||||
self.matches = matches;
|
||||
self.hidden = shouldHide();
|
||||
}
|
||||
}
|
||||
|
||||
function blur () {
|
||||
self.hidden = true;
|
||||
}
|
||||
|
||||
function keydown (event) {
|
||||
switch (event.keyCode) {
|
||||
case $mdConstant.KEY_CODE.DOWN_ARROW:
|
||||
if (self.loading) return;
|
||||
event.preventDefault();
|
||||
self.index = Math.min(self.index + 1, self.matches.length - 1);
|
||||
updateScroll();
|
||||
break;
|
||||
case $mdConstant.KEY_CODE.UP_ARROW:
|
||||
if (self.loading) return;
|
||||
event.preventDefault();
|
||||
self.index = Math.max(0, self.index - 1);
|
||||
updateScroll();
|
||||
break;
|
||||
case $mdConstant.KEY_CODE.ENTER:
|
||||
if (self.loading || self.index < 0) return;
|
||||
event.preventDefault();
|
||||
select(self.index);
|
||||
break;
|
||||
case $mdConstant.KEY_CODE.ESCAPE:
|
||||
self.matches = [];
|
||||
self.hidden = true;
|
||||
self.index = -1;
|
||||
break;
|
||||
case $mdConstant.KEY_CODE.TAB:
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
function clearValue () {
|
||||
$scope.searchText = '';
|
||||
select(-1);
|
||||
elements.input.focus();
|
||||
}
|
||||
|
||||
function shouldHide () {
|
||||
return self.matches.length === 1 && $scope.searchText === getDisplayValue(self.matches[0]);
|
||||
}
|
||||
|
||||
function getCurrentDisplayValue () {
|
||||
return getDisplayValue(self.matches[self.index]);
|
||||
}
|
||||
|
||||
function getDisplayValue (item) {
|
||||
return (item && $scope.itemText) ? $scope.itemText(getItemScope(item)) : item;
|
||||
}
|
||||
|
||||
function select (index) {
|
||||
$scope.selectedItem = self.matches[index];
|
||||
$scope.searchText = getDisplayValue($scope.selectedItem) || $scope.searchText;
|
||||
self.hidden = true;
|
||||
self.index = -1;
|
||||
self.matches = [];
|
||||
}
|
||||
|
||||
function updateScroll () {
|
||||
var top = 41 * self.index,
|
||||
bot = top + 41,
|
||||
hgt = 41 * 5.5;
|
||||
if (top < elements.ul.scrollTop) {
|
||||
elements.ul.scrollTop = top;
|
||||
} else if (bot > elements.ul.scrollTop + hgt) {
|
||||
elements.ul.scrollTop = bot - hgt;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
MdAutocompleteCtrl.$inject = ["$scope", "$element", "$timeout", "$q", "$mdUtil", "$mdConstant"];
|
||||
})();
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
angular
|
||||
.module('material.components.autocomplete')
|
||||
.directive('mdAutocomplete', MdAutocomplete);
|
||||
|
||||
/**
|
||||
* @ngdoc directive
|
||||
* @name mdAutocomplete
|
||||
* @module material.components.autocomplete
|
||||
*
|
||||
* @description
|
||||
* `<md-autocomplete>` is a special input component with a drop-down of all possible matches to a custom query.
|
||||
* This component allows you to provide real-time suggestions as the user types in the input area.
|
||||
*
|
||||
* @param {string=} md-search-text A model to bind the search query text to
|
||||
* @param {object=} md-selected-item A model to bind the selected item to
|
||||
* @param {expression} md-items An expression in the format of `item in items` to iterate over matches for your search.
|
||||
* @param {string=} md-item-text An expression that will convert your object to a single string.
|
||||
* @param {string=} placeholder Placeholder text that will be forwarded to the input.
|
||||
* @param {boolean=} md-no-cache Disables the internal caching that happens in autocomplete
|
||||
* @param {expression} md-selected-item-change An expression to be run each time a new item is selected
|
||||
* @param {expression} md-search-text-change An expression to be run each time the search text updates
|
||||
* @param {boolean=} ng-disabled Determines whether or not to disable the input field
|
||||
* @param {number=} md-min-length Specifies the minimum length of text before autocomplete will make suggestions
|
||||
*
|
||||
* @usage
|
||||
* <hljs lang="html">
|
||||
* <md-autocomplete
|
||||
* md-selected-item="selectedItem"
|
||||
* md-search-text="searchText"
|
||||
* md-items="item in getMatches(searchText)"
|
||||
* md-item-text="item.display">
|
||||
* <span md-highlight-text="searchText">{{item.display}}</span>
|
||||
* </md-autocomplete>
|
||||
* </hljs>
|
||||
*/
|
||||
|
||||
function MdAutocomplete () {
|
||||
return {
|
||||
template: '\
|
||||
<md-autocomplete-wrap role="listbox">\
|
||||
<input type="text"\
|
||||
ng-disabled="isDisabled"\
|
||||
ng-model="searchText"\
|
||||
ng-keydown="$mdAutocompleteCtrl.keydown($event)"\
|
||||
ng-blur="$mdAutocompleteCtrl.blur()"\
|
||||
placeholder="{{placeholder}}"\
|
||||
aria-label="{{placeholder}}"\
|
||||
aria-autocomplete="list"\
|
||||
aria-haspopup="true"\
|
||||
aria-activedescendant=""\
|
||||
aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/>\
|
||||
<button\
|
||||
type="button"\
|
||||
ng-if="searchText"\
|
||||
ng-click="$mdAutocompleteCtrl.clear()">\
|
||||
<md-icon md-svg-icon="cancel"></md-icon>\
|
||||
<span class="visually-hidden">Clear</span>\
|
||||
</button>\
|
||||
<md-progress-linear ng-if="$mdAutocompleteCtrl.loading" md-mode="indeterminate"></md-progress-linear>\
|
||||
</md-autocomplete-wrap>\
|
||||
<ul role="presentation">\
|
||||
<li ng-repeat="(index, item) in $mdAutocompleteCtrl.matches"\
|
||||
ng-class="{ selected: index === $mdAutocompleteCtrl.index }"\
|
||||
ng-show="searchText && !$mdAutocompleteCtrl.hidden"\
|
||||
ng-click="$mdAutocompleteCtrl.select(index)"\
|
||||
ng-transclude\
|
||||
md-autocomplete-list-item="$mdAutocompleteCtrl.itemName">\
|
||||
</li>\
|
||||
</ul>\
|
||||
<aria-status\
|
||||
class="visually-hidden"\
|
||||
role="status"\
|
||||
aria-live="assertive">\
|
||||
<p ng-if="$mdAutocompleteCtrl.index === -1 && $mdAutocompleteCtrl.matches.length === 1">There is 1 match available.</p>\
|
||||
<p ng-if="$mdAutocompleteCtrl.index === -1 && $mdAutocompleteCtrl.matches.length > 1">There are {{$mdAutocompleteCtrl.matches.length}} matches available.</p>\
|
||||
<p ng-if="$mdAutocompleteCtrl.index >= 0">{{ $mdAutocompleteCtrl.getCurrentDisplayValue() }}</p>\
|
||||
</aria-status>',
|
||||
transclude: true,
|
||||
controller: 'MdAutocompleteCtrl',
|
||||
controllerAs: '$mdAutocompleteCtrl',
|
||||
scope: {
|
||||
searchText: '=mdSearchText',
|
||||
selectedItem: '=mdSelectedItem',
|
||||
itemsExpr: '@mdItems',
|
||||
itemText: '&mdItemText',
|
||||
placeholder: '@placeholder',
|
||||
noCache: '=mdNoCache',
|
||||
itemChange: '&mdSelectedItemChange',
|
||||
textChange: '&mdSearchTextChange',
|
||||
isDisabled: '=ngDisabled',
|
||||
minLength: '=mdMinLength'
|
||||
}
|
||||
};
|
||||
}
|
||||
})();
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
angular
|
||||
.module('material.components.autocomplete')
|
||||
.controller('MdHighlightCtrl', MdHighlightCtrl);
|
||||
|
||||
function MdHighlightCtrl ($scope, $element, $interpolate) {
|
||||
var term = $element.attr('md-highlight-text'),
|
||||
text = $interpolate($element.text())($scope);
|
||||
$scope.$watch(term, function (term) {
|
||||
var regex = new RegExp('^' + sanitize(term), 'i'),
|
||||
html = text.replace(regex, '<span class="highlight">$&</span>');
|
||||
$element.html(html);
|
||||
});
|
||||
|
||||
function sanitize (term) {
|
||||
if (!term) return term;
|
||||
return term.replace(/[\*\[\]\(\)\{\}\\\^\$]/g, '\\$&');
|
||||
}
|
||||
}
|
||||
MdHighlightCtrl.$inject = ["$scope", "$element", "$interpolate"];
|
||||
|
||||
})();
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
angular
|
||||
.module('material.components.autocomplete')
|
||||
.directive('mdHighlightText', MdHighlight);
|
||||
|
||||
/**
|
||||
* @ngdoc directive
|
||||
* @name mdHighlightText
|
||||
* @module material.components.autocomplete
|
||||
*
|
||||
* @description
|
||||
* The `md-highlight-text` directive allows you to specify text that should be highlighted within
|
||||
* an element. Highlighted text will be wrapped in `<span class="highlight"></span>` which can
|
||||
* be styled through CSS. Please note that child elements may not be used with this directive.
|
||||
*
|
||||
* @param {string=} md-highlight-text A model to be searched for
|
||||
*
|
||||
* @usage
|
||||
* <hljs lang="html">
|
||||
* <input placeholder="Enter a search term..." ng-model="searchTerm" type="text" />
|
||||
* <ul>
|
||||
* <li ng-repeat="result in results" md-highlight-text="searchTerm">
|
||||
* {{result.text}}
|
||||
* </li>
|
||||
* </ul>
|
||||
* </hljs>
|
||||
*/
|
||||
|
||||
function MdHighlight () {
|
||||
return {
|
||||
terminal: true,
|
||||
scope: false,
|
||||
controller: 'MdHighlightCtrl'
|
||||
};
|
||||
}
|
||||
})();
|
||||
|
||||
(function () {
|
||||
'use strict';
|
||||
angular
|
||||
.module('material.components.autocomplete')
|
||||
.directive('mdAutocompleteListItem', MdAutocompleteListItem);
|
||||
|
||||
function MdAutocompleteListItem ($compile, $mdUtil) {
|
||||
return {
|
||||
require: '^?mdAutocomplete',
|
||||
terminal: true,
|
||||
link: link,
|
||||
scope: false
|
||||
};
|
||||
function link (scope, element, attr, ctrl) {
|
||||
var newScope = ctrl.parent.$new(false, ctrl.parent),
|
||||
itemName = ctrl.scope.$eval(attr.mdAutocompleteListItem);
|
||||
newScope[itemName] = scope.item;
|
||||
$compile(element.contents())(newScope);
|
||||
element.attr({ 'role': 'option', 'id': 'item_' + $mdUtil.nextUid() });
|
||||
}
|
||||
}
|
||||
MdAutocompleteListItem.$inject = ["$compile", "$mdUtil"];
|
||||
})();
|
|
@ -0,0 +1,8 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
md-backdrop.md-opaque.md-THEME_NAME-theme {
|
||||
background-color: '{{foreground-4-0.5}}'; }
|
56
third_party/ui/bower_components/angular-material/modules/closure/backdrop/backdrop.css
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
md-backdrop {
|
||||
z-index: 50;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0; }
|
||||
md-backdrop.md-select-backdrop {
|
||||
z-index: 81; }
|
||||
md-backdrop.md-dialog-backdrop {
|
||||
z-index: 79; }
|
||||
md-backdrop.md-bottom-sheet-backdrop {
|
||||
z-index: 69; }
|
||||
md-backdrop.md-sidenav-backdrop {
|
||||
z-index: 59; }
|
||||
md-backdrop.ng-enter {
|
||||
-webkit-animation: cubic-bezier(0.25, 0.8, 0.25, 1) mdBackdropFadeIn 0.5s both;
|
||||
animation: cubic-bezier(0.25, 0.8, 0.25, 1) mdBackdropFadeIn 0.5s both; }
|
||||
md-backdrop.ng-leave {
|
||||
-webkit-animation: cubic-bezier(0.55, 0, 0.55, 0.2) mdBackdropFadeOut 0.2s both;
|
||||
animation: cubic-bezier(0.55, 0, 0.55, 0.2) mdBackdropFadeOut 0.2s both; }
|
||||
|
||||
@-webkit-keyframes mdBackdropFadeIn {
|
||||
from {
|
||||
opacity: 0; }
|
||||
|
||||
to {
|
||||
opacity: 1; } }
|
||||
|
||||
@keyframes mdBackdropFadeIn {
|
||||
from {
|
||||
opacity: 0; }
|
||||
|
||||
to {
|
||||
opacity: 1; } }
|
||||
|
||||
@-webkit-keyframes mdBackdropFadeOut {
|
||||
from {
|
||||
opacity: 1; }
|
||||
|
||||
to {
|
||||
opacity: 0; } }
|
||||
|
||||
@keyframes mdBackdropFadeOut {
|
||||
from {
|
||||
opacity: 1; }
|
||||
|
||||
to {
|
||||
opacity: 0; } }
|
40
third_party/ui/bower_components/angular-material/modules/closure/backdrop/backdrop.js
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
goog.provide('ng.material.components.backdrop');
|
||||
goog.require('ng.material.core');
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
/*
|
||||
* @ngdoc module
|
||||
* @name material.components.backdrop
|
||||
* @description Backdrop
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc directive
|
||||
* @name mdBackdrop
|
||||
* @module material.components.backdrop
|
||||
*
|
||||
* @restrict E
|
||||
*
|
||||
* @description
|
||||
* `<md-backdrop>` is a backdrop element used by other coponents, such as dialog and bottom sheet.
|
||||
* Apply class `opaque` to make the backdrop use the theme backdrop color.
|
||||
*
|
||||
*/
|
||||
|
||||
angular.module('material.components.backdrop', [
|
||||
'material.core'
|
||||
])
|
||||
.directive('mdBackdrop', BackdropDirective);
|
||||
|
||||
function BackdropDirective($mdTheming) {
|
||||
return $mdTheming;
|
||||
}
|
||||
BackdropDirective.$inject = ["$mdTheming"];
|
||||
})();
|
|
@ -0,0 +1,15 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
md-bottom-sheet.md-THEME_NAME-theme {
|
||||
background-color: '{{background-50}}';
|
||||
border-top-color: '{{background-300}}'; }
|
||||
md-bottom-sheet.md-THEME_NAME-theme.md-list md-item {
|
||||
color: '{{foreground-1}}'; }
|
||||
md-bottom-sheet.md-THEME_NAME-theme .md-subheader {
|
||||
background-color: '{{background-50}}'; }
|
||||
md-bottom-sheet.md-THEME_NAME-theme .md-subheader {
|
||||
color: '{{foreground-1}}'; }
|
161
third_party/ui/bower_components/angular-material/modules/closure/bottomSheet/bottomSheet.css
vendored
Normal file
|
@ -0,0 +1,161 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
md-bottom-sheet {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
padding: 8px 16px 88px 16px;
|
||||
z-index: 70;
|
||||
border-top: 1px solid;
|
||||
-webkit-transform: translate3d(0, 80px, 0);
|
||||
transform: translate3d(0, 80px, 0);
|
||||
transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
|
||||
transition-property: -webkit-transform;
|
||||
transition-property: transform; }
|
||||
md-bottom-sheet.md-has-header {
|
||||
padding-top: 0; }
|
||||
md-bottom-sheet.ng-enter {
|
||||
opacity: 0;
|
||||
-webkit-transform: translate3d(0, 100%, 0);
|
||||
transform: translate3d(0, 100%, 0); }
|
||||
md-bottom-sheet.ng-enter-active {
|
||||
opacity: 1;
|
||||
display: block;
|
||||
-webkit-transform: translate3d(0, 80px, 0) !important;
|
||||
transform: translate3d(0, 80px, 0) !important; }
|
||||
md-bottom-sheet.ng-leave-active {
|
||||
-webkit-transform: translate3d(0, 100%, 0) !important;
|
||||
transform: translate3d(0, 100%, 0) !important;
|
||||
transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2); }
|
||||
md-bottom-sheet .md-subheader {
|
||||
background-color: transparent;
|
||||
font-family: RobotoDraft, Roboto, 'Helvetica Neue', sans-serif;
|
||||
line-height: 56px;
|
||||
padding: 0;
|
||||
white-space: nowrap; }
|
||||
md-bottom-sheet md-inline-icon {
|
||||
display: inline-block;
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
fill: #444; }
|
||||
md-bottom-sheet md-item {
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
outline: none; }
|
||||
md-bottom-sheet md-item:hover {
|
||||
cursor: pointer; }
|
||||
md-bottom-sheet.md-list md-item {
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
height: 48px; }
|
||||
md-bottom-sheet.md-list md-item div.md-icon-container {
|
||||
display: inline-block;
|
||||
height: 24px;
|
||||
margin-right: 32px; }
|
||||
md-bottom-sheet.md-grid {
|
||||
padding-left: 24px;
|
||||
padding-right: 24px;
|
||||
padding-top: 0; }
|
||||
md-bottom-sheet.md-grid md-list {
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: row;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-webkit-flex-wrap: wrap;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
transition: all 0.5s;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center; }
|
||||
md-bottom-sheet.md-grid md-item {
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
transition: all 0.5s;
|
||||
height: 96px;
|
||||
margin-top: 8px;
|
||||
margin-bottom: 8px;
|
||||
/* Mixin for how many grid items to show per row */ }
|
||||
@media screen and (max-width: 600px) {
|
||||
md-bottom-sheet.md-grid md-item {
|
||||
-webkit-flex: 1 1 33.33333%;
|
||||
-ms-flex: 1 1 33.33333%;
|
||||
flex: 1 1 33.33333%;
|
||||
max-width: 33.33333%; }
|
||||
md-bottom-sheet.md-grid md-item:nth-of-type(3n+1) {
|
||||
-webkit-align-items: flex-start;
|
||||
-ms-flex-align: start;
|
||||
align-items: flex-start; }
|
||||
md-bottom-sheet.md-grid md-item:nth-of-type(3n) {
|
||||
-webkit-align-items: flex-end;
|
||||
-ms-flex-align: end;
|
||||
align-items: flex-end; } }
|
||||
@media screen and (min-width: 600px) and (max-width: 960px) {
|
||||
md-bottom-sheet.md-grid md-item {
|
||||
-webkit-flex: 1 1 25%;
|
||||
-ms-flex: 1 1 25%;
|
||||
flex: 1 1 25%;
|
||||
max-width: 25%; } }
|
||||
@media screen and (min-width: 960px) and (max-width: 1200px) {
|
||||
md-bottom-sheet.md-grid md-item {
|
||||
-webkit-flex: 1 1 16.66667%;
|
||||
-ms-flex: 1 1 16.66667%;
|
||||
flex: 1 1 16.66667%;
|
||||
max-width: 16.66667%; } }
|
||||
@media screen and (min-width: 1200px) {
|
||||
md-bottom-sheet.md-grid md-item {
|
||||
-webkit-flex: 1 1 14.28571%;
|
||||
-ms-flex: 1 1 14.28571%;
|
||||
flex: 1 1 14.28571%;
|
||||
max-width: 14.28571%; } }
|
||||
md-bottom-sheet.md-grid md-item .md-item-content {
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
width: 48px;
|
||||
padding-bottom: 16px; }
|
||||
md-bottom-sheet.md-grid md-item .md-grid-item-content {
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
width: 80px; }
|
||||
md-bottom-sheet.md-grid md-item .md-icon-container {
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
margin: 0 0; }
|
||||
md-bottom-sheet.md-grid md-item p.md-grid-text {
|
||||
font-weight: 300;
|
||||
line-height: 16px;
|
||||
font-size: 13px;
|
||||
margin: 0;
|
||||
white-space: nowrap;
|
||||
width: 64px;
|
||||
text-align: center;
|
||||
padding-top: 8px; }
|
266
third_party/ui/bower_components/angular-material/modules/closure/bottomSheet/bottomSheet.js
vendored
Normal file
|
@ -0,0 +1,266 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
goog.provide('ng.material.components.bottomSheet');
|
||||
goog.require('ng.material.components.backdrop');
|
||||
goog.require('ng.material.core');
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @ngdoc module
|
||||
* @name material.components.bottomSheet
|
||||
* @description
|
||||
* BottomSheet
|
||||
*/
|
||||
angular.module('material.components.bottomSheet', [
|
||||
'material.core',
|
||||
'material.components.backdrop'
|
||||
])
|
||||
.directive('mdBottomSheet', MdBottomSheetDirective)
|
||||
.provider('$mdBottomSheet', MdBottomSheetProvider);
|
||||
|
||||
function MdBottomSheetDirective() {
|
||||
return {
|
||||
restrict: 'E'
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* @ngdoc service
|
||||
* @name $mdBottomSheet
|
||||
* @module material.components.bottomSheet
|
||||
*
|
||||
* @description
|
||||
* `$mdBottomSheet` opens a bottom sheet over the app and provides a simple promise API.
|
||||
*
|
||||
* ## Restrictions
|
||||
*
|
||||
* - The bottom sheet's template must have an outer `<md-bottom-sheet>` element.
|
||||
* - Add the `md-grid` class to the bottom sheet for a grid layout.
|
||||
* - Add the `md-list` class to the bottom sheet for a list layout.
|
||||
*
|
||||
* @usage
|
||||
* <hljs lang="html">
|
||||
* <div ng-controller="MyController">
|
||||
* <md-button ng-click="openBottomSheet()">
|
||||
* Open a Bottom Sheet!
|
||||
* </md-button>
|
||||
* </div>
|
||||
* </hljs>
|
||||
* <hljs lang="js">
|
||||
* var app = angular.module('app', ['ngMaterial']);
|
||||
* app.controller('MyController', function($scope, $mdBottomSheet) {
|
||||
* $scope.openBottomSheet = function() {
|
||||
* $mdBottomSheet.show({
|
||||
* template: '<md-bottom-sheet>Hello!</md-bottom-sheet>'
|
||||
* });
|
||||
* };
|
||||
* });
|
||||
* </hljs>
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $mdBottomSheet#show
|
||||
*
|
||||
* @description
|
||||
* Show a bottom sheet with the specified options.
|
||||
*
|
||||
* @param {object} options An options object, with the following properties:
|
||||
*
|
||||
* - `templateUrl` - `{string=}`: The url of an html template file that will
|
||||
* be used as the content of the bottom sheet. Restrictions: the template must
|
||||
* have an outer `md-bottom-sheet` element.
|
||||
* - `template` - `{string=}`: Same as templateUrl, except this is an actual
|
||||
* template string.
|
||||
* - `scope` - `{object=}`: the scope to link the template / controller to. If none is specified, it will create a new child scope.
|
||||
* This scope will be destroyed when the bottom sheet is removed unless `preserveScope` is set to true.
|
||||
* - `preserveScope` - `{boolean=}`: whether to preserve the scope when the element is removed. Default is false
|
||||
* - `controller` - `{string=}`: The controller to associate with this bottom sheet.
|
||||
* - `locals` - `{string=}`: An object containing key/value pairs. The keys will
|
||||
* be used as names of values to inject into the controller. For example,
|
||||
* `locals: {three: 3}` would inject `three` into the controller with the value
|
||||
* of 3.
|
||||
* - `targetEvent` - `{DOMClickEvent=}`: A click's event object. When passed in as an option,
|
||||
* the location of the click will be used as the starting point for the opening animation
|
||||
* of the the dialog.
|
||||
* - `resolve` - `{object=}`: Similar to locals, except it takes promises as values
|
||||
* and the bottom sheet will not open until the promises resolve.
|
||||
* - `controllerAs` - `{string=}`: An alias to assign the controller to on the scope.
|
||||
* - `parent` - `{element=}`: The element to append the bottom sheet to. Defaults to appending
|
||||
* to the root element of the application.
|
||||
* - `disableParentScroll` - `{boolean=}`: Whether to disable scrolling while the bottom sheet is open.
|
||||
* Default true.
|
||||
*
|
||||
* @returns {promise} A promise that can be resolved with `$mdBottomSheet.hide()` or
|
||||
* rejected with `$mdBottomSheet.cancel()`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $mdBottomSheet#hide
|
||||
*
|
||||
* @description
|
||||
* Hide the existing bottom sheet and resolve the promise returned from
|
||||
* `$mdBottomSheet.show()`.
|
||||
*
|
||||
* @param {*=} response An argument for the resolved promise.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $mdBottomSheet#cancel
|
||||
*
|
||||
* @description
|
||||
* Hide the existing bottom sheet and reject the promise returned from
|
||||
* `$mdBottomSheet.show()`.
|
||||
*
|
||||
* @param {*=} response An argument for the rejected promise.
|
||||
*
|
||||
*/
|
||||
|
||||
function MdBottomSheetProvider($$interimElementProvider) {
|
||||
// how fast we need to flick down to close the sheet, pixels/ms
|
||||
var CLOSING_VELOCITY = 0.5;
|
||||
var PADDING = 80; // same as css
|
||||
|
||||
bottomSheetDefaults.$inject = ["$animate", "$mdConstant", "$timeout", "$$rAF", "$compile", "$mdTheming", "$mdBottomSheet", "$rootElement", "$rootScope", "$mdGesture"];
|
||||
return $$interimElementProvider('$mdBottomSheet')
|
||||
.setDefaults({
|
||||
methods: ['disableParentScroll', 'escapeToClose', 'targetEvent'],
|
||||
options: bottomSheetDefaults
|
||||
});
|
||||
|
||||
/* @ngInject */
|
||||
function bottomSheetDefaults($animate, $mdConstant, $timeout, $$rAF, $compile, $mdTheming, $mdBottomSheet, $rootElement, $rootScope, $mdGesture) {
|
||||
var backdrop;
|
||||
|
||||
return {
|
||||
themable: true,
|
||||
targetEvent: null,
|
||||
onShow: onShow,
|
||||
onRemove: onRemove,
|
||||
escapeToClose: true,
|
||||
disableParentScroll: true
|
||||
};
|
||||
|
||||
function onShow(scope, element, options) {
|
||||
// Add a backdrop that will close on click
|
||||
backdrop = $compile('<md-backdrop class="md-opaque md-bottom-sheet-backdrop">')(scope);
|
||||
backdrop.on('click', function() {
|
||||
$timeout($mdBottomSheet.cancel);
|
||||
});
|
||||
|
||||
$mdTheming.inherit(backdrop, options.parent);
|
||||
|
||||
$animate.enter(backdrop, options.parent, null);
|
||||
|
||||
var bottomSheet = new BottomSheet(element, options.parent);
|
||||
options.bottomSheet = bottomSheet;
|
||||
|
||||
// Give up focus on calling item
|
||||
options.targetEvent && angular.element(options.targetEvent.target).blur();
|
||||
$mdTheming.inherit(bottomSheet.element, options.parent);
|
||||
|
||||
if (options.disableParentScroll) {
|
||||
options.lastOverflow = options.parent.css('overflow');
|
||||
options.parent.css('overflow', 'hidden');
|
||||
}
|
||||
|
||||
return $animate.enter(bottomSheet.element, options.parent)
|
||||
.then(function() {
|
||||
var focusable = angular.element(
|
||||
element[0].querySelector('button') ||
|
||||
element[0].querySelector('a') ||
|
||||
element[0].querySelector('[ng-click]')
|
||||
);
|
||||
focusable.focus();
|
||||
|
||||
if (options.escapeToClose) {
|
||||
options.rootElementKeyupCallback = function(e) {
|
||||
if (e.keyCode === $mdConstant.KEY_CODE.ESCAPE) {
|
||||
$timeout($mdBottomSheet.cancel);
|
||||
}
|
||||
};
|
||||
$rootElement.on('keyup', options.rootElementKeyupCallback);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function onRemove(scope, element, options) {
|
||||
var bottomSheet = options.bottomSheet;
|
||||
|
||||
|
||||
$animate.leave(backdrop);
|
||||
return $animate.leave(bottomSheet.element).then(function() {
|
||||
if (options.disableParentScroll) {
|
||||
options.parent.css('overflow', options.lastOverflow);
|
||||
delete options.lastOverflow;
|
||||
}
|
||||
|
||||
bottomSheet.cleanup();
|
||||
|
||||
// Restore focus
|
||||
options.targetEvent && angular.element(options.targetEvent.target).focus();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* BottomSheet class to apply bottom-sheet behavior to an element
|
||||
*/
|
||||
function BottomSheet(element, parent) {
|
||||
var deregister = $mdGesture.register(parent, 'drag', { horizontal: false });
|
||||
parent.on('$md.dragstart', onDragStart)
|
||||
.on('$md.drag', onDrag)
|
||||
.on('$md.dragend', onDragEnd);
|
||||
|
||||
return {
|
||||
element: element,
|
||||
cleanup: function cleanup() {
|
||||
deregister();
|
||||
parent.off('$md.dragstart', onDragStart)
|
||||
.off('$md.drag', onDrag)
|
||||
.off('$md.dragend', onDragEnd);
|
||||
}
|
||||
};
|
||||
|
||||
function onDragStart(ev) {
|
||||
// Disable transitions on transform so that it feels fast
|
||||
element.css($mdConstant.CSS.TRANSITION_DURATION, '0ms');
|
||||
}
|
||||
|
||||
function onDrag(ev) {
|
||||
var transform = ev.pointer.distanceY;
|
||||
if (transform < 5) {
|
||||
// Slow down drag when trying to drag up, and stop after PADDING
|
||||
transform = Math.max(-PADDING, transform / 2);
|
||||
}
|
||||
element.css($mdConstant.CSS.TRANSFORM, 'translate3d(0,' + (PADDING + transform) + 'px,0)');
|
||||
}
|
||||
|
||||
function onDragEnd(ev) {
|
||||
if (ev.pointer.distanceY > 0 &&
|
||||
(ev.pointer.distanceY > 20 || Math.abs(ev.pointer.velocityY) > CLOSING_VELOCITY)) {
|
||||
var distanceRemaining = element.prop('offsetHeight') - ev.pointer.distanceY;
|
||||
var transitionDuration = Math.min(distanceRemaining / ev.pointer.velocityY * 0.75, 500);
|
||||
element.css($mdConstant.CSS.TRANSITION_DURATION, transitionDuration + 'ms');
|
||||
$timeout($mdBottomSheet.cancel);
|
||||
} else {
|
||||
element.css($mdConstant.CSS.TRANSITION_DURATION, '');
|
||||
element.css($mdConstant.CSS.TRANSFORM, '');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
MdBottomSheetProvider.$inject = ["$$interimElementProvider"];
|
||||
|
||||
})();
|
49
third_party/ui/bower_components/angular-material/modules/closure/button/button-default-theme.css
vendored
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
md-toolbar .md-button.md-THEME_NAME-theme.md-fab {
|
||||
background-color: white; }
|
||||
|
||||
.md-button.md-THEME_NAME-theme {
|
||||
border-radius: 3px; }
|
||||
.md-button.md-THEME_NAME-theme:not([disabled]):hover, .md-button.md-THEME_NAME-theme:not([disabled]):focus {
|
||||
background-color: '{{background-500-0.2}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-primary {
|
||||
color: '{{primary-color}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-primary.md-raised, .md-button.md-THEME_NAME-theme.md-primary.md-fab {
|
||||
color: '{{primary-contrast}}';
|
||||
background-color: '{{primary-color}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):focus, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):focus {
|
||||
background-color: '{{primary-600}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-fab {
|
||||
border-radius: 50%;
|
||||
background-color: '{{accent-color}}';
|
||||
color: '{{accent-contrast}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):focus {
|
||||
background-color: '{{accent-A700}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-raised {
|
||||
color: '{{background-contrast}}';
|
||||
background-color: '{{background-50}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-raised:not([disabled]):focus {
|
||||
background-color: '{{background-200}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-warn {
|
||||
color: '{{warn-color}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-warn.md-raised, .md-button.md-THEME_NAME-theme.md-warn.md-fab {
|
||||
color: '{{warn-contrast}}';
|
||||
background-color: '{{warn-color}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):focus, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):focus {
|
||||
background-color: '{{warn-700}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-accent {
|
||||
color: '{{accent-color}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-accent.md-raised, .md-button.md-THEME_NAME-theme.md-accent.md-fab {
|
||||
color: '{{accent-contrast}}';
|
||||
background-color: '{{accent-color}}'; }
|
||||
.md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):focus, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):focus {
|
||||
background-color: '{{accent-700}}'; }
|
||||
.md-button.md-THEME_NAME-theme[disabled], .md-button.md-THEME_NAME-theme.md-raised[disabled], .md-button.md-THEME_NAME-theme.md-fab[disabled] {
|
||||
color: '{{foreground-3}}';
|
||||
background-color: transparent;
|
||||
cursor: not-allowed; }
|
134
third_party/ui/bower_components/angular-material/modules/closure/button/button.css
vendored
Normal file
|
@ -0,0 +1,134 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
/**
|
||||
* Position a FAB button.
|
||||
*/
|
||||
.md-button {
|
||||
color: currentColor;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
position: relative;
|
||||
outline: none;
|
||||
border: 0;
|
||||
padding: 6px;
|
||||
margin: 0;
|
||||
background: transparent;
|
||||
white-space: nowrap;
|
||||
text-align: center;
|
||||
text-transform: uppercase;
|
||||
font-weight: 500;
|
||||
font-style: inherit;
|
||||
font-variant: inherit;
|
||||
font-size: inherit;
|
||||
font-family: inherit;
|
||||
line-height: inherit;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
overflow: hidden;
|
||||
transition: box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), -webkit-transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
|
||||
transition: box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
|
||||
.md-button:focus {
|
||||
outline: none; }
|
||||
.md-button:hover {
|
||||
text-decoration: none; }
|
||||
.md-button.ng-hide {
|
||||
transition: none; }
|
||||
.md-button.md-cornered {
|
||||
border-radius: 0; }
|
||||
.md-button.md-icon {
|
||||
padding: 0;
|
||||
background: none; }
|
||||
.md-button.md-raised {
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0); }
|
||||
.md-button.md-fab {
|
||||
z-index: 20;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
-webkit-transform: translate3d(0, 0, 0);
|
||||
transform: translate3d(0, 0, 0);
|
||||
transition: 0.2s linear;
|
||||
transition-property: -webkit-transform, box-shadow;
|
||||
transition-property: transform, box-shadow; }
|
||||
.md-button.md-fab.md-fab-bottom-right {
|
||||
top: auto;
|
||||
right: 20px;
|
||||
bottom: 20px;
|
||||
left: auto;
|
||||
position: absolute; }
|
||||
.md-button.md-fab.md-fab-bottom-left {
|
||||
top: auto;
|
||||
right: auto;
|
||||
bottom: 20px;
|
||||
left: 20px;
|
||||
position: absolute; }
|
||||
.md-button.md-fab.md-fab-top-right {
|
||||
top: 20px;
|
||||
right: 20px;
|
||||
bottom: auto;
|
||||
left: auto;
|
||||
position: absolute; }
|
||||
.md-button.md-fab.md-fab-top-left {
|
||||
top: 20px;
|
||||
right: auto;
|
||||
bottom: auto;
|
||||
left: 20px;
|
||||
position: absolute; }
|
||||
.md-button.md-fab md-icon {
|
||||
margin-top: 0; }
|
||||
.md-button.md-fab.md-mini {
|
||||
width: 40px;
|
||||
height: 40px; }
|
||||
.md-button:not([disabled]).md-raised:focus, .md-button:not([disabled]).md-raised:hover, .md-button:not([disabled]).md-fab:focus, .md-button:not([disabled]).md-fab:hover {
|
||||
-webkit-transform: translate3d(0, -1px, 0);
|
||||
transform: translate3d(0, -1px, 0); }
|
||||
|
||||
.md-toast-open-top .md-button.md-fab-top-left, .md-toast-open-top .md-button.md-fab-top-right {
|
||||
-webkit-transform: translate3d(0, 42px, 0);
|
||||
transform: translate3d(0, 42px, 0); }
|
||||
.md-toast-open-top .md-button.md-fab-top-left:not([disabled]):focus, .md-toast-open-top .md-button.md-fab-top-left:not([disabled]):hover, .md-toast-open-top .md-button.md-fab-top-right:not([disabled]):focus, .md-toast-open-top .md-button.md-fab-top-right:not([disabled]):hover {
|
||||
-webkit-transform: translate3d(0, 41px, 0);
|
||||
transform: translate3d(0, 41px, 0); }
|
||||
|
||||
.md-toast-open-bottom .md-button.md-fab-bottom-left, .md-toast-open-bottom .md-button.md-fab-bottom-right {
|
||||
-webkit-transform: translate3d(0, -42px, 0);
|
||||
transform: translate3d(0, -42px, 0); }
|
||||
.md-toast-open-bottom .md-button.md-fab-bottom-left:not([disabled]):focus, .md-toast-open-bottom .md-button.md-fab-bottom-left:not([disabled]):hover, .md-toast-open-bottom .md-button.md-fab-bottom-right:not([disabled]):focus, .md-toast-open-bottom .md-button.md-fab-bottom-right:not([disabled]):hover {
|
||||
-webkit-transform: translate3d(0, -43px, 0);
|
||||
transform: translate3d(0, -43px, 0); }
|
||||
|
||||
.md-button-group {
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex: 1;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
width: 100%; }
|
||||
|
||||
.md-button-group > .md-button {
|
||||
-webkit-flex: 1;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
width: 0;
|
||||
border-width: 1px 0px 1px 1px;
|
||||
border-radius: 0;
|
||||
text-align: center;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap; }
|
||||
.md-button-group > .md-button:first-child {
|
||||
border-radius: 2px 0px 0px 2px; }
|
||||
.md-button-group > .md-button:last-child {
|
||||
border-right-width: 1px;
|
||||
border-radius: 0px 2px 2px 0px; }
|
101
third_party/ui/bower_components/angular-material/modules/closure/button/button.js
vendored
Normal file
|
@ -0,0 +1,101 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
goog.provide('ng.material.components.button');
|
||||
goog.require('ng.material.core');
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @ngdoc module
|
||||
* @name material.components.button
|
||||
* @description
|
||||
*
|
||||
* Button
|
||||
*/
|
||||
angular.module('material.components.button', [
|
||||
'material.core'
|
||||
])
|
||||
.directive('mdButton', MdButtonDirective);
|
||||
|
||||
/**
|
||||
* @ngdoc directive
|
||||
* @name mdButton
|
||||
* @module material.components.button
|
||||
*
|
||||
* @restrict E
|
||||
*
|
||||
* @description
|
||||
* `<md-button>` is a button directive with optional ink ripples (default enabled).
|
||||
*
|
||||
* If you supply a `href` or `ng-href` attribute, it will become an `<a>` element. Otherwise, it will
|
||||
* become a `<button>` element.
|
||||
*
|
||||
* As per the [material design spec](http://www.google.com/design/spec/style/color.html#color-ui-color-application)
|
||||
* the FAB button is in the accent color by default. The primary color palette may be used with
|
||||
* the `md-primary` class.
|
||||
*
|
||||
* @param {boolean=} md-no-ink If present, disable ripple ink effects.
|
||||
* @param {expression=} ng-disabled En/Disable based on the expression
|
||||
* @param {string=} md-ripple-size Overrides the default ripple size logic. Options: `full`, `partial`, `auto`
|
||||
* @param {string=} aria-label Adds alternative text to button for accessibility, useful for icon buttons.
|
||||
* If no default text is found, a warning will be logged.
|
||||
*
|
||||
* @usage
|
||||
* <hljs lang="html">
|
||||
* <md-button>
|
||||
* Button
|
||||
* </md-button>
|
||||
* <md-button href="http://google.com" class="md-button-colored">
|
||||
* I'm a link
|
||||
* </md-button>
|
||||
* <md-button ng-disabled="true" class="md-colored">
|
||||
* I'm a disabled button
|
||||
* </md-button>
|
||||
* </hljs>
|
||||
*/
|
||||
function MdButtonDirective($mdInkRipple, $mdTheming, $mdAria) {
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
transclude: true,
|
||||
template: getTemplate,
|
||||
link: postLink
|
||||
};
|
||||
|
||||
function isAnchor(attr) {
|
||||
return angular.isDefined(attr.href) || angular.isDefined(attr.ngHref);
|
||||
}
|
||||
|
||||
function getTemplate(element, attr) {
|
||||
return isAnchor(attr) ?
|
||||
'<a class="md-button" ng-transclude></a>' :
|
||||
'<button class="md-button" ng-transclude></button>';
|
||||
}
|
||||
|
||||
function postLink(scope, element, attr) {
|
||||
var node = element[0];
|
||||
$mdTheming(element);
|
||||
$mdInkRipple.attachButtonBehavior(scope, element);
|
||||
|
||||
var elementHasText = node.textContent.trim();
|
||||
if (!elementHasText) {
|
||||
$mdAria.expect(element, 'aria-label');
|
||||
}
|
||||
|
||||
// For anchor elements, we have to set tabindex manually when the
|
||||
// element is disabled
|
||||
if (isAnchor(attr) && angular.isDefined(attr.ngDisabled) ) {
|
||||
scope.$watch(attr.ngDisabled, function(isDisabled) {
|
||||
element.attr('tabindex', isDisabled ? -1 : 0);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
MdButtonDirective.$inject = ["$mdInkRipple", "$mdTheming", "$mdAria"];
|
||||
})();
|
10
third_party/ui/bower_components/angular-material/modules/closure/card/card-default-theme.css
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
md-card.md-THEME_NAME-theme {
|
||||
border-radius: 2px; }
|
||||
md-card.md-THEME_NAME-theme .md-card-image {
|
||||
border-radius: 2px 2px 0 0; }
|
26
third_party/ui/bower_components/angular-material/modules/closure/card/card.css
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
md-card {
|
||||
box-sizing: border-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column;
|
||||
margin: 8px;
|
||||
box-shadow: 0px 2px 5px 0 rgba(0, 0, 0, 0.26); }
|
||||
md-card > img, md-card > :not(md-card-content) img {
|
||||
-webkit-order: 0;
|
||||
-ms-flex-order: 0;
|
||||
order: 0;
|
||||
width: 100%; }
|
||||
md-card md-card-content {
|
||||
-webkit-order: 1;
|
||||
-ms-flex-order: 1;
|
||||
order: 1;
|
||||
padding: 16px; }
|
60
third_party/ui/bower_components/angular-material/modules/closure/card/card.js
vendored
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
goog.provide('ng.material.components.card');
|
||||
goog.require('ng.material.core');
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @ngdoc module
|
||||
* @name material.components.card
|
||||
*
|
||||
* @description
|
||||
* Card components.
|
||||
*/
|
||||
angular.module('material.components.card', [
|
||||
'material.core'
|
||||
])
|
||||
.directive('mdCard', mdCardDirective);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @ngdoc directive
|
||||
* @name mdCard
|
||||
* @module material.components.card
|
||||
*
|
||||
* @restrict E
|
||||
*
|
||||
* @description
|
||||
* The `<md-card>` directive is a container element used within `<md-content>` containers.
|
||||
*
|
||||
* Cards have constant width and variable heights; where the maximum height is limited to what can
|
||||
* fit within a single view on a platform, but it can temporarily expand as needed
|
||||
*
|
||||
* @usage
|
||||
* <hljs lang="html">
|
||||
* <md-card>
|
||||
* <img src="img/washedout.png" class="md-card-image">
|
||||
* <h2>Paracosm</h2>
|
||||
* <p>
|
||||
* The titles of Washed Out's breakthrough song and the first single from Paracosm share the * two most important words in Ernest Greene's musical language: feel it. It's a simple request, as well...
|
||||
* </p>
|
||||
* </md-card>
|
||||
* </hljs>
|
||||
*
|
||||
*/
|
||||
function mdCardDirective($mdTheming) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
link: function($scope, $element, $attr) {
|
||||
$mdTheming($element);
|
||||
}
|
||||
};
|
||||
}
|
||||
mdCardDirective.$inject = ["$mdTheming"];
|
||||
})();
|
|
@ -0,0 +1,38 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
md-checkbox.md-THEME_NAME-theme .md-ripple {
|
||||
color: '{{accent-600}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme.md-checked .md-ripple {
|
||||
color: '{{background-600}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme .md-icon {
|
||||
border-color: '{{foreground-2}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme.md-checked .md-icon {
|
||||
background-color: '{{accent-color-0.87}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme.md-checked .md-icon:after {
|
||||
border-color: '{{background-200}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ripple {
|
||||
color: '{{primary-600}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ripple {
|
||||
color: '{{background-600}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-icon {
|
||||
border-color: '{{foreground-2}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon {
|
||||
background-color: '{{primary-color-0.87}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon:after {
|
||||
border-color: '{{background-200}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ripple {
|
||||
color: '{{warn-600}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-icon {
|
||||
border-color: '{{foreground-2}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon {
|
||||
background-color: '{{warn-color-0.87}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon:after {
|
||||
border-color: '{{background-200}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme[disabled] .md-icon {
|
||||
border-color: '{{foreground-3}}'; }
|
||||
md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon {
|
||||
background-color: '{{foreground-3}}'; }
|
78
third_party/ui/bower_components/angular-material/modules/closure/checkbox/checkbox.css
vendored
Normal file
|
@ -0,0 +1,78 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
md-checkbox {
|
||||
display: block;
|
||||
margin: 15px;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none; }
|
||||
md-checkbox .md-container {
|
||||
position: relative;
|
||||
top: 4px;
|
||||
display: inline-block;
|
||||
width: 18px;
|
||||
height: 18px; }
|
||||
md-checkbox .md-container:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
right: -10px;
|
||||
bottom: -10px;
|
||||
left: -10px; }
|
||||
md-checkbox .md-container .md-ripple-container {
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: auto;
|
||||
height: auto;
|
||||
left: -15px;
|
||||
top: -15px;
|
||||
right: -15px;
|
||||
bottom: -15px; }
|
||||
md-checkbox .md-icon {
|
||||
transition: 240ms;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border: 2px solid;
|
||||
border-radius: 2px; }
|
||||
md-checkbox.md-checked .md-icon {
|
||||
border: none; }
|
||||
md-checkbox[disabled] {
|
||||
cursor: no-drop; }
|
||||
md-checkbox:focus .md-label:not(:empty) {
|
||||
border-color: black; }
|
||||
md-checkbox.md-checked .md-icon:after {
|
||||
-webkit-transform: rotate(45deg);
|
||||
transform: rotate(45deg);
|
||||
position: absolute;
|
||||
left: 6px;
|
||||
top: 2px;
|
||||
display: table;
|
||||
width: 6px;
|
||||
height: 12px;
|
||||
border: 2px solid;
|
||||
border-top: 0;
|
||||
border-left: 0;
|
||||
content: ' '; }
|
||||
md-checkbox .md-label {
|
||||
border: 1px dotted transparent;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
margin-left: 10px;
|
||||
vertical-align: middle;
|
||||
white-space: normal;
|
||||
pointer-events: none;
|
||||
-webkit-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-ms-user-select: text;
|
||||
user-select: text; }
|
142
third_party/ui/bower_components/angular-material/modules/closure/checkbox/checkbox.js
vendored
Normal file
|
@ -0,0 +1,142 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
goog.provide('ng.material.components.checkbox');
|
||||
goog.require('ng.material.core');
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @ngdoc module
|
||||
* @name material.components.checkbox
|
||||
* @description Checkbox module!
|
||||
*/
|
||||
angular.module('material.components.checkbox', [
|
||||
'material.core'
|
||||
])
|
||||
.directive('mdCheckbox', MdCheckboxDirective);
|
||||
|
||||
/**
|
||||
* @ngdoc directive
|
||||
* @name mdCheckbox
|
||||
* @module material.components.checkbox
|
||||
* @restrict E
|
||||
*
|
||||
* @description
|
||||
* The checkbox directive is used like the normal [angular checkbox](https://docs.angularjs.org/api/ng/input/input%5Bcheckbox%5D).
|
||||
*
|
||||
* As per the [material design spec](http://www.google.com/design/spec/style/color.html#color-ui-color-application)
|
||||
* the checkbox is in the accent color by default. The primary color palette may be used with
|
||||
* the `md-primary` class.
|
||||
*
|
||||
* @param {string} ng-model Assignable angular expression to data-bind to.
|
||||
* @param {string=} name Property name of the form under which the control is published.
|
||||
* @param {expression=} ng-true-value The value to which the expression should be set when selected.
|
||||
* @param {expression=} ng-false-value The value to which the expression should be set when not selected.
|
||||
* @param {string=} ng-change Angular expression to be executed when input changes due to user interaction with the input element.
|
||||
* @param {boolean=} md-no-ink Use of attribute indicates use of ripple ink effects
|
||||
* @param {string=} aria-label Adds label to checkbox for accessibility.
|
||||
* Defaults to checkbox's text. If no default text is found, a warning will be logged.
|
||||
*
|
||||
* @usage
|
||||
* <hljs lang="html">
|
||||
* <md-checkbox ng-model="isChecked" aria-label="Finished?">
|
||||
* Finished ?
|
||||
* </md-checkbox>
|
||||
*
|
||||
* <md-checkbox md-no-ink ng-model="hasInk" aria-label="No Ink Effects">
|
||||
* No Ink Effects
|
||||
* </md-checkbox>
|
||||
*
|
||||
* <md-checkbox ng-disabled="true" ng-model="isDisabled" aria-label="Disabled">
|
||||
* Disabled
|
||||
* </md-checkbox>
|
||||
*
|
||||
* </hljs>
|
||||
*
|
||||
*/
|
||||
function MdCheckboxDirective(inputDirective, $mdInkRipple, $mdAria, $mdConstant, $mdTheming, $mdUtil) {
|
||||
inputDirective = inputDirective[0];
|
||||
var CHECKED_CSS = 'md-checked';
|
||||
|
||||
return {
|
||||
restrict: 'E',
|
||||
transclude: true,
|
||||
require: '?ngModel',
|
||||
template:
|
||||
'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox>' +
|
||||
'<div class="md-icon"></div>' +
|
||||
'</div>' +
|
||||
'<div ng-transclude class="md-label"></div>',
|
||||
compile: compile
|
||||
};
|
||||
|
||||
// **********************************************************
|
||||
// Private Methods
|
||||
// **********************************************************
|
||||
|
||||
function compile (tElement, tAttrs) {
|
||||
|
||||
tAttrs.type = 'checkbox';
|
||||
tAttrs.tabIndex = 0;
|
||||
tElement.attr('role', tAttrs.type);
|
||||
|
||||
return function postLink(scope, element, attr, ngModelCtrl) {
|
||||
ngModelCtrl = ngModelCtrl || $mdUtil.fakeNgModel();
|
||||
var checked = false;
|
||||
$mdTheming(element);
|
||||
|
||||
if (attr.ngChecked) {
|
||||
scope.$watch(
|
||||
scope.$eval.bind(scope, attr.ngChecked),
|
||||
ngModelCtrl.$setViewValue.bind(ngModelCtrl)
|
||||
);
|
||||
}
|
||||
|
||||
$mdAria.expectWithText(element, 'aria-label');
|
||||
|
||||
// Reuse the original input[type=checkbox] directive from Angular core.
|
||||
// This is a bit hacky as we need our own event listener and own render
|
||||
// function.
|
||||
inputDirective.link.pre(scope, {
|
||||
on: angular.noop,
|
||||
0: {}
|
||||
}, attr, [ngModelCtrl]);
|
||||
|
||||
element.on('click', listener)
|
||||
.on('keypress', keypressHandler);
|
||||
ngModelCtrl.$render = render;
|
||||
|
||||
function keypressHandler(ev) {
|
||||
if(ev.which === $mdConstant.KEY_CODE.SPACE) {
|
||||
ev.preventDefault();
|
||||
listener(ev);
|
||||
}
|
||||
}
|
||||
function listener(ev) {
|
||||
if (element[0].hasAttribute('disabled')) return;
|
||||
|
||||
scope.$apply(function() {
|
||||
checked = !checked;
|
||||
ngModelCtrl.$setViewValue(checked, ev && ev.type);
|
||||
ngModelCtrl.$render();
|
||||
});
|
||||
}
|
||||
|
||||
function render() {
|
||||
checked = ngModelCtrl.$viewValue;
|
||||
if(checked) {
|
||||
element.addClass(CHECKED_CSS);
|
||||
} else {
|
||||
element.removeClass(CHECKED_CSS);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
MdCheckboxDirective.$inject = ["inputDirective", "$mdInkRipple", "$mdAria", "$mdConstant", "$mdTheming", "$mdUtil"];
|
||||
|
||||
})();
|
|
@ -0,0 +1,8 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
md-content.md-THEME_NAME-theme {
|
||||
background-color: '{{background-hue-3}}'; }
|
24
third_party/ui/bower_components/angular-material/modules/closure/content/content.css
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
md-content {
|
||||
display: block;
|
||||
position: relative;
|
||||
overflow: auto;
|
||||
-webkit-overflow-scrolling: touch; }
|
||||
md-content[md-scroll-y] {
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden; }
|
||||
md-content[md-scroll-x] {
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden; }
|
||||
md-content.md-padding {
|
||||
padding: 8px; }
|
||||
|
||||
@media (min-width: 600px) {
|
||||
md-content.md-padding {
|
||||
padding: 16px; }
|
||||
}
|
87
third_party/ui/bower_components/angular-material/modules/closure/content/content.js
vendored
Normal file
|
@ -0,0 +1,87 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
goog.provide('ng.material.components.content');
|
||||
goog.require('ng.material.core');
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @ngdoc module
|
||||
* @name material.components.content
|
||||
*
|
||||
* @description
|
||||
* Scrollable content
|
||||
*/
|
||||
angular.module('material.components.content', [
|
||||
'material.core'
|
||||
])
|
||||
.directive('mdContent', mdContentDirective);
|
||||
|
||||
/**
|
||||
* @ngdoc directive
|
||||
* @name mdContent
|
||||
* @module material.components.content
|
||||
*
|
||||
* @restrict E
|
||||
*
|
||||
* @description
|
||||
* The `<md-content>` directive is a container element useful for scrollable content
|
||||
*
|
||||
* ### Restrictions
|
||||
*
|
||||
* - Add the `md-padding` class to make the content padded.
|
||||
*
|
||||
* @usage
|
||||
* <hljs lang="html">
|
||||
* <md-content class="md-padding">
|
||||
* Lorem ipsum dolor sit amet, ne quod novum mei.
|
||||
* </md-content>
|
||||
* </hljs>
|
||||
*
|
||||
*/
|
||||
|
||||
function mdContentDirective($mdTheming) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
controller: ['$scope', '$element', ContentController],
|
||||
link: function(scope, element, attr) {
|
||||
var node = element[0];
|
||||
|
||||
$mdTheming(element);
|
||||
scope.$broadcast('$mdContentLoaded', element);
|
||||
|
||||
iosScrollFix(element[0]);
|
||||
}
|
||||
};
|
||||
|
||||
function ContentController($scope, $element) {
|
||||
this.$scope = $scope;
|
||||
this.$element = $element;
|
||||
}
|
||||
}
|
||||
mdContentDirective.$inject = ["$mdTheming"];
|
||||
|
||||
function iosScrollFix(node) {
|
||||
// IOS FIX:
|
||||
// If we scroll where there is no more room for the webview to scroll,
|
||||
// by default the webview itself will scroll up and down, this looks really
|
||||
// bad. So if we are scrolling to the very top or bottom, add/subtract one
|
||||
angular.element(node).on('$md.pressdown', function(ev) {
|
||||
// Only touch events
|
||||
if (ev.pointer.type !== 't') return;
|
||||
// Don't let a child content's touchstart ruin it for us.
|
||||
if (ev.$materialScrollFixed) return;
|
||||
ev.$materialScrollFixed = true;
|
||||
|
||||
if (node.scrollTop === 0) {
|
||||
node.scrollTop = 1;
|
||||
} else if (node.scrollHeight === node.scrollTop + node.offsetHeight) {
|
||||
node.scrollTop -= 1;
|
||||
}
|
||||
});
|
||||
}
|
||||
})();
|
2747
third_party/ui/bower_components/angular-material/modules/closure/core/core.css
vendored
Normal file
3280
third_party/ui/bower_components/angular-material/modules/closure/core/core.js
vendored
Normal file
1
third_party/ui/bower_components/angular-material/modules/closure/core/default-theme.js
vendored
Normal file
11
third_party/ui/bower_components/angular-material/modules/closure/dialog/dialog-default-theme.css
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
md-dialog.md-THEME_NAME-theme {
|
||||
border-radius: 4px;
|
||||
background-color: '{{background-hue-3}}'; }
|
||||
md-dialog.md-THEME_NAME-theme.md-content-overflow .md-actions {
|
||||
border-top-color: '{{foreground-4}}'; }
|
75
third_party/ui/bower_components/angular-material/modules/closure/dialog/dialog.css
vendored
Normal file
|
@ -0,0 +1,75 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
.md-dialog-container {
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 80; }
|
||||
|
||||
md-dialog {
|
||||
opacity: 0;
|
||||
min-width: 240px;
|
||||
max-width: 80%;
|
||||
max-height: 80%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
box-shadow: 0px 27px 24px 0 rgba(0, 0, 0, 0.2);
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-direction: column;
|
||||
-ms-flex-direction: column;
|
||||
flex-direction: column; }
|
||||
md-dialog.transition-in {
|
||||
opacity: 1;
|
||||
transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
|
||||
-webkit-transform: translate3d(0, 0, 0) scale(1);
|
||||
transform: translate3d(0, 0, 0) scale(1); }
|
||||
md-dialog.transition-out {
|
||||
transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
|
||||
-webkit-transform: translate3d(0, 100%, 0) scale(0.2);
|
||||
transform: translate3d(0, 100%, 0) scale(0.2); }
|
||||
md-dialog md-content {
|
||||
-webkit-order: 1;
|
||||
-ms-flex-order: 1;
|
||||
order: 1;
|
||||
padding: 24px;
|
||||
overflow: auto;
|
||||
-webkit-overflow-scrolling: touch; }
|
||||
md-dialog md-content:not([layout=row]) > *:first-child:not(.md-subheader) {
|
||||
margin-top: 0px; }
|
||||
md-dialog .md-actions {
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-order: 2;
|
||||
-ms-flex-order: 2;
|
||||
order: 2;
|
||||
box-sizing: border-box;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-justify-content: flex-end;
|
||||
-ms-flex-pack: end;
|
||||
justify-content: flex-end;
|
||||
padding: 16px 16px;
|
||||
min-height: 40px; }
|
||||
md-dialog .md-actions > * {
|
||||
margin-left: 8px; }
|
||||
md-dialog.md-content-overflow .md-actions {
|
||||
border-top: 1px solid; }
|
579
third_party/ui/bower_components/angular-material/modules/closure/dialog/dialog.js
vendored
Normal file
|
@ -0,0 +1,579 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
goog.provide('ng.material.components.dialog');
|
||||
goog.require('ng.material.components.backdrop');
|
||||
goog.require('ng.material.core');
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @ngdoc module
|
||||
* @name material.components.dialog
|
||||
*/
|
||||
angular.module('material.components.dialog', [
|
||||
'material.core',
|
||||
'material.components.backdrop'
|
||||
])
|
||||
.directive('mdDialog', MdDialogDirective)
|
||||
.provider('$mdDialog', MdDialogProvider);
|
||||
|
||||
function MdDialogDirective($$rAF, $mdTheming) {
|
||||
return {
|
||||
restrict: 'E',
|
||||
link: function(scope, element, attr) {
|
||||
$mdTheming(element);
|
||||
$$rAF(function() {
|
||||
var content = element[0].querySelector('md-content');
|
||||
if (content && content.scrollHeight > content.clientHeight) {
|
||||
element.addClass('md-content-overflow');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}
|
||||
MdDialogDirective.$inject = ["$$rAF", "$mdTheming"];
|
||||
|
||||
/**
|
||||
* @ngdoc service
|
||||
* @name $mdDialog
|
||||
* @module material.components.dialog
|
||||
*
|
||||
* @description
|
||||
* `$mdDialog` opens a dialog over the app to inform users about critical information or require
|
||||
* them to make decisions. There are two approaches for setup: a simple promise API
|
||||
* and regular object syntax.
|
||||
*
|
||||
* ## Restrictions
|
||||
*
|
||||
* - The dialog is always given an isolate scope.
|
||||
* - The dialog's template must have an outer `<md-dialog>` element.
|
||||
* Inside, use an `<md-content>` element for the dialog's content, and use
|
||||
* an element with class `md-actions` for the dialog's actions.
|
||||
*
|
||||
* @usage
|
||||
* ### HTML
|
||||
*
|
||||
* <hljs lang="html">
|
||||
* <div ng-app="demoApp" ng-controller="EmployeeController">
|
||||
* <md-button ng-click="showAlert()" class="md-raised md-warn">
|
||||
* Employee Alert!
|
||||
* </md-button>
|
||||
* <md-button ng-click="showDialog($event)" class="md-raised">
|
||||
* Custom Dialog
|
||||
* </md-button>
|
||||
* <md-button ng-click="closeAlert()" ng-disabled="!hasAlert()" class="md-raised">
|
||||
* Close Alert
|
||||
* </md-button>
|
||||
* <md-button ng-click="showGreeting($event)" class="md-raised md-primary" >
|
||||
* Greet Employee
|
||||
* </md-button>
|
||||
* </div>
|
||||
* </hljs>
|
||||
*
|
||||
* ### JavaScript: object syntax
|
||||
* <hljs lang="js">
|
||||
* (function(angular, undefined){
|
||||
* "use strict";
|
||||
*
|
||||
* angular
|
||||
* .module('demoApp', ['ngMaterial'])
|
||||
* .controller('AppCtrl', AppController);
|
||||
*
|
||||
* function AppController($scope, $mdDialog) {
|
||||
* var alert;
|
||||
* $scope.showAlert = showAlert;
|
||||
* $scope.showDialog = showDialog;
|
||||
* $scope.items = [1, 2, 3];
|
||||
*
|
||||
* // Internal method
|
||||
* function showAlert() {
|
||||
* alert = $mdDialog.alert({
|
||||
* title: 'Attention',
|
||||
* content: 'This is an example of how easy dialogs can be!',
|
||||
* ok: 'Close'
|
||||
* });
|
||||
*
|
||||
* $mdDialog
|
||||
* .show( alert )
|
||||
* .finally(function() {
|
||||
* alert = undefined;
|
||||
* });
|
||||
* }
|
||||
*
|
||||
* function showDialog($event) {
|
||||
* var parentEl = angular.element(document.body);
|
||||
* $mdDialog.show({
|
||||
* parent: parentEl,
|
||||
* targetEvent: $event,
|
||||
* template:
|
||||
* '<md-dialog aria-label="List dialog">' +
|
||||
* ' <md-content>'+
|
||||
* ' <md-list>'+
|
||||
* ' <md-item ng-repeat="item in items">'+
|
||||
* ' <p>Number {{item}}</p>' +
|
||||
* ' </md-item>'+
|
||||
* ' </md-list>'+
|
||||
* ' </md-content>' +
|
||||
* ' <div class="md-actions">' +
|
||||
* ' <md-button ng-click="closeDialog()">' +
|
||||
* ' Close Dialog' +
|
||||
* ' </md-button>' +
|
||||
* ' </div>' +
|
||||
* '</md-dialog>',
|
||||
* locals: {
|
||||
* items: $scope.items
|
||||
* },
|
||||
* controller: DialogController
|
||||
* });
|
||||
* function DialogController(scope, $mdDialog, items) {
|
||||
* scope.items = items;
|
||||
* scope.closeDialog = function() {
|
||||
* $mdDialog.hide();
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* })(angular);
|
||||
* </hljs>
|
||||
*
|
||||
* ### JavaScript: promise API syntax, custom dialog template
|
||||
* <hljs lang="js">
|
||||
* (function(angular, undefined){
|
||||
* "use strict";
|
||||
*
|
||||
* angular
|
||||
* .module('demoApp', ['ngMaterial'])
|
||||
* .controller('EmployeeController', EmployeeEditor)
|
||||
* .controller('GreetingController', GreetingController);
|
||||
*
|
||||
* // Fictitious Employee Editor to show how to use simple and complex dialogs.
|
||||
*
|
||||
* function EmployeeEditor($scope, $mdDialog) {
|
||||
* var alert;
|
||||
*
|
||||
* $scope.showAlert = showAlert;
|
||||
* $scope.closeAlert = closeAlert;
|
||||
* $scope.showGreeting = showCustomGreeting;
|
||||
*
|
||||
* $scope.hasAlert = function() { return !!alert };
|
||||
* $scope.userName = $scope.userName || 'Bobby';
|
||||
*
|
||||
* // Dialog #1 - Show simple alert dialog and cache
|
||||
* // reference to dialog instance
|
||||
*
|
||||
* function showAlert() {
|
||||
* alert = $mdDialog.alert()
|
||||
* .title('Attention, ' + $scope.userName)
|
||||
* .content('This is an example of how easy dialogs can be!')
|
||||
* .ok('Close');
|
||||
*
|
||||
* $mdDialog
|
||||
* .show( alert )
|
||||
* .finally(function() {
|
||||
* alert = undefined;
|
||||
* });
|
||||
* }
|
||||
*
|
||||
* // Close the specified dialog instance and resolve with 'finished' flag
|
||||
* // Normally this is not needed, just use '$mdDialog.hide()' to close
|
||||
* // the most recent dialog popup.
|
||||
*
|
||||
* function closeAlert() {
|
||||
* $mdDialog.hide( alert, "finished" );
|
||||
* alert = undefined;
|
||||
* }
|
||||
*
|
||||
* // Dialog #2 - Demonstrate more complex dialogs construction and popup.
|
||||
*
|
||||
* function showCustomGreeting($event) {
|
||||
* $mdDialog.show({
|
||||
* targetEvent: $event,
|
||||
* template:
|
||||
* '<md-dialog>' +
|
||||
*
|
||||
* ' <md-content>Hello {{ employee }}!</md-content>' +
|
||||
*
|
||||
* ' <div class="md-actions">' +
|
||||
* ' <md-button ng-click="closeDialog()">' +
|
||||
* ' Close Greeting' +
|
||||
*
|
||||
* ' </md-button>' +
|
||||
* ' </div>' +
|
||||
* '</md-dialog>',
|
||||
* controller: 'GreetingController',
|
||||
* onComplete: afterShowAnimation,
|
||||
* locals: { employee: $scope.userName }
|
||||
* });
|
||||
*
|
||||
* // When the 'enter' animation finishes...
|
||||
*
|
||||
* function afterShowAnimation(scope, element, options) {
|
||||
* // post-show code here: DOM element focus, etc.
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
*
|
||||
* // Greeting controller used with the more complex 'showCustomGreeting()' custom dialog
|
||||
*
|
||||
* function GreetingController($scope, $mdDialog, employee) {
|
||||
* // Assigned from construction <code>locals</code> options...
|
||||
* $scope.employee = employee;
|
||||
*
|
||||
* $scope.closeDialog = function() {
|
||||
* // Easily hides most recent dialog shown...
|
||||
* // no specific instance reference is needed.
|
||||
* $mdDialog.hide();
|
||||
* };
|
||||
* }
|
||||
*
|
||||
* })(angular);
|
||||
* </hljs>
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $mdDialog#alert
|
||||
*
|
||||
* @description
|
||||
* Builds a preconfigured dialog with the specified message.
|
||||
*
|
||||
* @returns {obj} an `$mdDialogPreset` with the chainable configuration methods:
|
||||
*
|
||||
* - $mdDialogPreset#title(string) - sets title to string
|
||||
* - $mdDialogPreset#content(string) - sets content / message to string
|
||||
* - $mdDialogPreset#ok(string) - sets okay button text to string
|
||||
* - $mdDialogPreset#theme(string) - sets the theme of the dialog
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $mdDialog#confirm
|
||||
*
|
||||
* @description
|
||||
* Builds a preconfigured dialog with the specified message. You can call show and the promise returned
|
||||
* will be resolved only if the user clicks the confirm action on the dialog.
|
||||
*
|
||||
* @returns {obj} an `$mdDialogPreset` with the chainable configuration methods:
|
||||
*
|
||||
* Additionally, it supports the following methods:
|
||||
*
|
||||
* - $mdDialogPreset#title(string) - sets title to string
|
||||
* - $mdDialogPreset#content(string) - sets content / message to string
|
||||
* - $mdDialogPreset#ok(string) - sets okay button text to string
|
||||
* - $mdDialogPreset#cancel(string) - sets cancel button text to string
|
||||
* - $mdDialogPreset#theme(string) - sets the theme of the dialog
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $mdDialog#show
|
||||
*
|
||||
* @description
|
||||
* Show a dialog with the specified options.
|
||||
*
|
||||
* @param {object} optionsOrPreset Either provide an `$mdDialogPreset` returned from `alert()`, and
|
||||
* `confirm()`, or an options object with the following properties:
|
||||
* - `templateUrl` - `{string=}`: The url of a template that will be used as the content
|
||||
* of the dialog.
|
||||
* - `template` - `{string=}`: Same as templateUrl, except this is an actual template string.
|
||||
* - `targetEvent` - `{DOMClickEvent=}`: A click's event object. When passed in as an option,
|
||||
* the location of the click will be used as the starting point for the opening animation
|
||||
* of the the dialog.
|
||||
* - `scope` - `{object=}`: the scope to link the template / controller to. If none is specified, it will create a new isolate scope.
|
||||
* This scope will be destroyed when the dialog is removed unless `preserveScope` is set to true.
|
||||
* - `preserveScope` - `{boolean=}`: whether to preserve the scope when the element is removed. Default is false
|
||||
* - `disableParentScroll` - `{boolean=}`: Whether to disable scrolling while the dialog is open.
|
||||
* Default true.
|
||||
* - `hasBackdrop` - `{boolean=}`: Whether there should be an opaque backdrop behind the dialog.
|
||||
* Default true.
|
||||
* - `clickOutsideToClose` - `{boolean=}`: Whether the user can click outside the dialog to
|
||||
* close it. Default true.
|
||||
* - `escapeToClose` - `{boolean=}`: Whether the user can press escape to close the dialog.
|
||||
* Default true.
|
||||
* - `controller` - `{string=}`: The controller to associate with the dialog. The controller
|
||||
* will be injected with the local `$mdDialog`, which passes along a scope for the dialog.
|
||||
* - `locals` - `{object=}`: An object containing key/value pairs. The keys will be used as names
|
||||
* of values to inject into the controller. For example, `locals: {three: 3}` would inject
|
||||
* `three` into the controller, with the value 3. If `bindToController` is true, they will be
|
||||
* copied to the controller instead.
|
||||
* - `bindToController` - `bool`: bind the locals to the controller, instead of passing them in. These values will not be available until after initialization.
|
||||
* - `resolve` - `{object=}`: Similar to locals, except it takes promises as values, and the
|
||||
* dialog will not open until all of the promises resolve.
|
||||
* - `controllerAs` - `{string=}`: An alias to assign the controller to on the scope.
|
||||
* - `parent` - `{element=}`: The element to append the dialog to. Defaults to appending
|
||||
* to the root element of the application.
|
||||
* - `onComplete` `{function=}`: Callback function used to announce when the show() action is
|
||||
* finished.
|
||||
*
|
||||
* @returns {promise} A promise that can be resolved with `$mdDialog.hide()` or
|
||||
* rejected with `$mdDialog.cancel()`.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $mdDialog#hide
|
||||
*
|
||||
* @description
|
||||
* Hide an existing dialog and resolve the promise returned from `$mdDialog.show()`.
|
||||
*
|
||||
* @param {*=} response An argument for the resolved promise.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @ngdoc method
|
||||
* @name $mdDialog#cancel
|
||||
*
|
||||
* @description
|
||||
* Hide an existing dialog and reject the promise returned from `$mdDialog.show()`.
|
||||
*
|
||||
* @param {*=} response An argument for the rejected promise.
|
||||
*/
|
||||
|
||||
function MdDialogProvider($$interimElementProvider) {
|
||||
|
||||
var alertDialogMethods = ['title', 'content', 'ariaLabel', 'ok'];
|
||||
|
||||
advancedDialogOptions.$inject = ["$mdDialog", "$mdTheming"];
|
||||
dialogDefaultOptions.$inject = ["$timeout", "$rootElement", "$compile", "$animate", "$mdAria", "$document", "$mdUtil", "$mdConstant", "$mdTheming", "$$rAF", "$q", "$mdDialog"];
|
||||
return $$interimElementProvider('$mdDialog')
|
||||
.setDefaults({
|
||||
methods: ['disableParentScroll', 'hasBackdrop', 'clickOutsideToClose', 'escapeToClose', 'targetEvent'],
|
||||
options: dialogDefaultOptions
|
||||
})
|
||||
.addPreset('alert', {
|
||||
methods: ['title', 'content', 'ariaLabel', 'ok', 'theme'],
|
||||
options: advancedDialogOptions
|
||||
})
|
||||
.addPreset('confirm', {
|
||||
methods: ['title', 'content', 'ariaLabel', 'ok', 'cancel', 'theme'],
|
||||
options: advancedDialogOptions
|
||||
});
|
||||
|
||||
/* @ngInject */
|
||||
function advancedDialogOptions($mdDialog, $mdTheming) {
|
||||
return {
|
||||
template: [
|
||||
'<md-dialog md-theme="{{ dialog.theme }}" aria-label="{{ dialog.ariaLabel }}">',
|
||||
'<md-content>',
|
||||
'<h2>{{ dialog.title }}</h2>',
|
||||
'<p>{{ dialog.content }}</p>',
|
||||
'</md-content>',
|
||||
'<div class="md-actions">',
|
||||
'<md-button ng-if="dialog.$type == \'confirm\'" ng-click="dialog.abort()">',
|
||||
'{{ dialog.cancel }}',
|
||||
'</md-button>',
|
||||
'<md-button ng-click="dialog.hide()" class="md-primary">',
|
||||
'{{ dialog.ok }}',
|
||||
'</md-button>',
|
||||
'</div>',
|
||||
'</md-dialog>'
|
||||
].join(''),
|
||||
controller: function mdDialogCtrl() {
|
||||
this.hide = function() {
|
||||
$mdDialog.hide(true);
|
||||
};
|
||||
this.abort = function() {
|
||||
$mdDialog.cancel();
|
||||
};
|
||||
},
|
||||
controllerAs: 'dialog',
|
||||
bindToController: true,
|
||||
theme: $mdTheming.defaultTheme()
|
||||
};
|
||||
}
|
||||
|
||||
/* @ngInject */
|
||||
function dialogDefaultOptions($timeout, $rootElement, $compile, $animate, $mdAria, $document,
|
||||
$mdUtil, $mdConstant, $mdTheming, $$rAF, $q, $mdDialog) {
|
||||
return {
|
||||
hasBackdrop: true,
|
||||
isolateScope: true,
|
||||
onShow: onShow,
|
||||
onRemove: onRemove,
|
||||
clickOutsideToClose: true,
|
||||
escapeToClose: true,
|
||||
targetEvent: null,
|
||||
disableParentScroll: true,
|
||||
transformTemplate: function(template) {
|
||||
return '<div class="md-dialog-container">' + template + '</div>';
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// On show method for dialogs
|
||||
function onShow(scope, element, options) {
|
||||
// Incase the user provides a raw dom element, always wrap it in jqLite
|
||||
options.parent = angular.element(options.parent);
|
||||
|
||||
options.popInTarget = angular.element((options.targetEvent || {}).target);
|
||||
var closeButton = findCloseButton();
|
||||
|
||||
configureAria(element.find('md-dialog'));
|
||||
|
||||
if (options.hasBackdrop) {
|
||||
// Fix for IE 10
|
||||
var computeFrom = (options.parent[0] == $document[0].body && $document[0].documentElement
|
||||
&& $document[0].scrollTop) ? angular.element($document[0].documentElement) : options.parent;
|
||||
var parentOffset = computeFrom.prop('scrollTop');
|
||||
options.backdrop = angular.element('<md-backdrop class="md-dialog-backdrop md-opaque">');
|
||||
$mdTheming.inherit(options.backdrop, options.parent);
|
||||
$animate.enter(options.backdrop, options.parent);
|
||||
element.css('top', parentOffset +'px');
|
||||
}
|
||||
|
||||
if (options.disableParentScroll) {
|
||||
options.lastOverflow = options.parent.css('overflow');
|
||||
options.parent.css('overflow', 'hidden');
|
||||
}
|
||||
|
||||
return dialogPopIn(
|
||||
element,
|
||||
options.parent,
|
||||
options.popInTarget && options.popInTarget.length && options.popInTarget
|
||||
)
|
||||
.then(function() {
|
||||
if (options.escapeToClose) {
|
||||
options.rootElementKeyupCallback = function(e) {
|
||||
if (e.keyCode === $mdConstant.KEY_CODE.ESCAPE) {
|
||||
$timeout($mdDialog.cancel);
|
||||
}
|
||||
};
|
||||
$rootElement.on('keyup', options.rootElementKeyupCallback);
|
||||
}
|
||||
|
||||
if (options.clickOutsideToClose) {
|
||||
options.dialogClickOutsideCallback = function(ev) {
|
||||
// Only close if we click the flex container outside the backdrop
|
||||
if (ev.target === element[0]) {
|
||||
$timeout($mdDialog.cancel);
|
||||
}
|
||||
};
|
||||
element.on('click', options.dialogClickOutsideCallback);
|
||||
}
|
||||
closeButton.focus();
|
||||
});
|
||||
|
||||
|
||||
function findCloseButton() {
|
||||
//If no element with class dialog-close, try to find the last
|
||||
//button child in md-actions and assume it is a close button
|
||||
var closeButton = element[0].querySelector('.dialog-close');
|
||||
if (!closeButton) {
|
||||
var actionButtons = element[0].querySelectorAll('.md-actions button');
|
||||
closeButton = actionButtons[ actionButtons.length - 1 ];
|
||||
}
|
||||
return angular.element(closeButton);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// On remove function for all dialogs
|
||||
function onRemove(scope, element, options) {
|
||||
|
||||
if (options.backdrop) {
|
||||
$animate.leave(options.backdrop);
|
||||
}
|
||||
if (options.disableParentScroll) {
|
||||
options.parent.css('overflow', options.lastOverflow);
|
||||
delete options.lastOverflow;
|
||||
}
|
||||
if (options.escapeToClose) {
|
||||
$rootElement.off('keyup', options.rootElementKeyupCallback);
|
||||
}
|
||||
if (options.clickOutsideToClose) {
|
||||
element.off('click', options.dialogClickOutsideCallback);
|
||||
}
|
||||
return dialogPopOut(
|
||||
element,
|
||||
options.parent,
|
||||
options.popInTarget && options.popInTarget.length && options.popInTarget
|
||||
).then(function() {
|
||||
options.scope.$destroy();
|
||||
element.remove();
|
||||
options.popInTarget && options.popInTarget.focus();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Inject ARIA-specific attributes appropriate for Dialogs
|
||||
*/
|
||||
function configureAria(element) {
|
||||
element.attr({
|
||||
'role': 'dialog'
|
||||
});
|
||||
|
||||
var dialogContent = element.find('md-content');
|
||||
if (dialogContent.length === 0){
|
||||
dialogContent = element;
|
||||
}
|
||||
$mdAria.expectAsync(element, 'aria-label', function() {
|
||||
var words = dialogContent.text().split(/\s+/);
|
||||
if (words.length > 3) words = words.slice(0,3).concat('...');
|
||||
return words.join(' ');
|
||||
});
|
||||
}
|
||||
|
||||
function dialogPopIn(container, parentElement, clickElement) {
|
||||
var dialogEl = container.find('md-dialog');
|
||||
|
||||
parentElement.append(container);
|
||||
transformToClickElement(dialogEl, clickElement);
|
||||
|
||||
$$rAF(function() {
|
||||
dialogEl.addClass('transition-in')
|
||||
.css($mdConstant.CSS.TRANSFORM, '');
|
||||
});
|
||||
|
||||
return $mdUtil.transitionEndPromise(dialogEl);
|
||||
}
|
||||
|
||||
function dialogPopOut(container, parentElement, clickElement) {
|
||||
var dialogEl = container.find('md-dialog');
|
||||
|
||||
dialogEl.addClass('transition-out').removeClass('transition-in');
|
||||
transformToClickElement(dialogEl, clickElement);
|
||||
|
||||
return $mdUtil.transitionEndPromise(dialogEl);
|
||||
}
|
||||
|
||||
function transformToClickElement(dialogEl, clickElement) {
|
||||
if (clickElement) {
|
||||
var clickRect = clickElement[0].getBoundingClientRect();
|
||||
var dialogRect = dialogEl[0].getBoundingClientRect();
|
||||
|
||||
var scaleX = Math.min(0.5, clickRect.width / dialogRect.width);
|
||||
var scaleY = Math.min(0.5, clickRect.height / dialogRect.height);
|
||||
|
||||
dialogEl.css($mdConstant.CSS.TRANSFORM, 'translate3d(' +
|
||||
(-dialogRect.left + clickRect.left + clickRect.width/2 - dialogRect.width/2) + 'px,' +
|
||||
(-dialogRect.top + clickRect.top + clickRect.height/2 - dialogRect.height/2) + 'px,' +
|
||||
'0) scale(' + scaleX + ',' + scaleY + ')'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
function dialogTransitionEnd(dialogEl) {
|
||||
var deferred = $q.defer();
|
||||
dialogEl.on($mdConstant.CSS.TRANSITIONEND, finished);
|
||||
function finished(ev) {
|
||||
//Make sure this transitionend didn't bubble up from a child
|
||||
if (ev.target === dialogEl[0]) {
|
||||
dialogEl.off($mdConstant.CSS.TRANSITIONEND, finished);
|
||||
deferred.resolve();
|
||||
}
|
||||
}
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
MdDialogProvider.$inject = ["$$interimElementProvider"];
|
||||
|
||||
})();
|
|
@ -0,0 +1,8 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
md-divider.md-THEME_NAME-theme {
|
||||
border-top-color: '{{foreground-4}}'; }
|
12
third_party/ui/bower_components/angular-material/modules/closure/divider/divider.css
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
/*!
|
||||
* Angular Material Design
|
||||
* https://github.com/angular/material
|
||||
* @license MIT
|
||||
* v0.8.1
|
||||
*/
|
||||
md-divider {
|
||||
display: block;
|
||||
border-top: 1px solid;
|
||||
margin: 0; }
|
||||
md-divider[md-inset] {
|
||||
margin-left: 80px; }
|