@angular-mdc/web
Version:
8 lines • 1.38 kB
JavaScript
/**
* @license
* Copyright (c) Dominic Carretto
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://github.com/trimox/angular-mdc-web/blob/master/LICENSE
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define("@angular-mdc/web/elevation",["exports","@angular/core"],t):t(((e=e||self).ng=e.ng||{},e.ng.web=e.ng.web||{},e.ng.web.elevation={}),e.ng.core)}(this,(function(e,t){"use strict";var n=function(){function e(e){this.elementRef=e,this.mdcElevation=0}return e.prototype.ngOnChanges=function(e){var t=e.mdcElevation;if(t.currentValue<0||t.currentValue>24)throw new Error("Valid mdc-elevation values are 0 through 24");t.isFirstChange()||this.elementRef.nativeElement.classList.remove("mdc-elevation--z"+t.previousValue),this.elementRef.nativeElement.classList.add("mdc-elevation--z"+t.currentValue)},e.decorators=[{type:t.Directive,args:[{selector:"[mdcElevation]",exportAs:"mdcElevation"}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e.propDecorators={mdcElevation:[{type:t.Input}]},e}(),o=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{exports:[n],declarations:[n]}]}],e}();e.MdcElevation=n,e.MdcElevationModule=o,Object.defineProperty(e,"__esModule",{value:!0})}));