@angular-mdc/web
Version:
22 lines (20 loc) • 3.76 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"),require("@angular-mdc/web/floating-label"),require("@angular-mdc/web/base"),require("@material/notched-outline")):"function"==typeof define&&define.amd?define("@angular-mdc/web/notched-outline",["exports","@angular/core","@angular-mdc/web/floating-label","@angular-mdc/web/base","@material/notched-outline"],t):t(((e=e||self).ng=e.ng||{},e.ng.web=e.ng.web||{},e.ng.web.notchedOutline={}),e.ng.core,e.ng.web.floatingLabel,e.ng.web.base,e.mdc.notchedOutline)}(this,(function(e,t,n,o,a){"use strict";
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var c=function(e,t){return(c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)};var r=function(e){function o(t){var n=e.call(this,t)||this;return n.elementRef=t,n}return function(e,t){function n(){this.constructor=e}c(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(o,e),o.prototype.getDefaultFoundation=function(){var e=this,t={addClass:function(t){return e.elementRef.nativeElement.classList.add(t)},removeClass:function(t){return e.elementRef.nativeElement.classList.remove(t)},setNotchWidthProperty:function(t){return e._notchElement.nativeElement.style.setProperty("width",t+"px")},removeNotchWidthProperty:function(){return e._notchElement.nativeElement.style.removeProperty("width")}};return new a.MDCNotchedOutlineFoundation(t)},o.prototype.notch=function(e){this._foundation.notch(e)},o.prototype.closeNotch=function(){this._foundation.closeNotch()},o.decorators=[{type:t.Component,args:[{selector:"[mdcNotchedOutline], mdc-notched-outline",exportAs:"mdcNotchedOutline",host:{class:"mdc-notched-outline","[class.mdc-notched-outline--upgraded]":"label","[class.mdc-notched-outline--no-label]":"!label"},template:'\n <span class="mdc-notched-outline__leading"></span>\n <span #notch class="mdc-notched-outline__notch">\n <label mdcFloatingLabel [for]="for">{{label}}</label>\n </span>\n <span class="mdc-notched-outline__trailing"></span>\n ',changeDetection:t.ChangeDetectionStrategy.OnPush,encapsulation:t.ViewEncapsulation.None}]}],o.ctorParameters=function(){return[{type:t.ElementRef}]},o.propDecorators={label:[{type:t.Input}],for:[{type:t.Input}],_notchElement:[{type:t.ViewChild,args:["notch",{static:!1}]}],floatingLabel:[{type:t.ViewChild,args:[n.MdcFloatingLabel,{static:!1}]}]},o}(o.MDCComponent),l=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[n.MdcFloatingLabelModule],exports:[r],declarations:[r]}]}],e}();e.MdcNotchedOutline=r,e.MdcNotchedOutlineModule=l,Object.defineProperty(e,"__esModule",{value:!0})}));