UNPKG

ng-zorro-antd

Version:

An enterprise-class UI components based on Ant Design and Angular

2 lines 8.2 kB
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/common"),require("ng-zorro-antd/core"),require("@angular/core")):"function"==typeof define&&define.amd?define("ng-zorro-antd/card",["exports","@angular/common","ng-zorro-antd/core","@angular/core"],t):t((n["ng-zorro-antd"]=n["ng-zorro-antd"]||{},n["ng-zorro-antd"].card={}),n.ng.common,n["ng-zorro-antd"].core,n.ng.core)}(this,function(n,t,e,a){"use strict";var i=(d.decorators=[{type:a.Directive,args:[{selector:"[nz-card-grid]",exportAs:"nzCardGrid"}]}],d.ctorParameters=function(){return[{type:a.ElementRef},{type:a.Renderer2}]},d);function d(n,t){t.addClass(n.nativeElement,"ant-card-grid")}function r(n,t,e,a){var i,d=arguments.length,r=d<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(n,t,e,a);else for(var o=n.length-1;0<=o;o--)(i=n[o])&&(r=(d<3?i(r):3<d?i(t,e,r):i(t,e))||r);return 3<d&&r&&Object.defineProperty(t,e,r),r}function o(n,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(n,t)}var l=(c.decorators=[{type:a.Component,args:[{selector:"nz-card-tab",exportAs:"nzCardTab",encapsulation:a.ViewEncapsulation.None,changeDetection:a.ChangeDetectionStrategy.OnPush,template:"<ng-template>\n <ng-content></ng-content>\n</ng-template>"}]}],c.propDecorators={template:[{type:a.ViewChild,args:[a.TemplateRef]}]},c);function c(){}var s=(p.decorators=[{type:a.Component,args:[{selector:"nz-card",exportAs:"nzCard",preserveWhitespaces:!1,changeDetection:a.ChangeDetectionStrategy.OnPush,encapsulation:a.ViewEncapsulation.None,template:'<div class="ant-card-head" *ngIf="nzTitle || nzExtra || tab">\n <div class="ant-card-head-wrapper">\n <div class="ant-card-head-title" *ngIf="nzTitle">\n <ng-container *nzStringTemplateOutlet="nzTitle">{{ nzTitle }}</ng-container>\n </div>\n <div class="ant-card-extra" *ngIf="nzExtra">\n <ng-container *nzStringTemplateOutlet="nzExtra">{{ nzExtra }}</ng-container>\n </div>\n </div>\n <ng-container *ngIf="tab">\n <ng-template [ngTemplateOutlet]="tab.template"></ng-template>\n </ng-container>\n</div>\n<div class="ant-card-cover" *ngIf="nzCover">\n <ng-template [ngTemplateOutlet]="nzCover"></ng-template>\n</div>\n<div class="ant-card-body" [ngStyle]="nzBodyStyle">\n <ng-container *ngIf="!nzLoading">\n <ng-content></ng-content>\n </ng-container>\n <nz-card-loading *ngIf="nzLoading"></nz-card-loading>\n</div>\n<ul class="ant-card-actions" *ngIf="nzActions.length">\n <li *ngFor="let action of nzActions" [style.width.%]="100 / nzActions.length">\n <span><ng-template [ngTemplateOutlet]="action"></ng-template></span>\n </li>\n</ul>',host:{"[class.ant-card-loading]":"nzLoading","[class.ant-card-bordered]":"nzBordered","[class.ant-card-hoverable]":"nzHoverable","[class.ant-card-small]":'nzSize === "small"',"[class.ant-card-contain-grid]":"grids && grids.length","[class.ant-card-type-inner]":'nzType === "inner"',"[class.ant-card-contain-tabs]":"!!tab"},styles:["\n nz-card {\n display: block;\n }\n "]}]}],p.ctorParameters=function(){return[{type:a.Renderer2},{type:a.ElementRef}]},p.propDecorators={nzBordered:[{type:a.Input}],nzLoading:[{type:a.Input}],nzHoverable:[{type:a.Input}],nzBodyStyle:[{type:a.Input}],nzCover:[{type:a.Input}],nzActions:[{type:a.Input}],nzType:[{type:a.Input}],nzSize:[{type:a.Input}],nzTitle:[{type:a.Input}],nzExtra:[{type:a.Input}],tab:[{type:a.ContentChild,args:[l]}],grids:[{type:a.ContentChildren,args:[i]}]},r([e.InputBoolean(),o("design:type",Object)],p.prototype,"nzBordered",void 0),r([e.InputBoolean(),o("design:type",Object)],p.prototype,"nzLoading",void 0),r([e.InputBoolean(),o("design:type",Object)],p.prototype,"nzHoverable",void 0),p);function p(n,t){this.nzBordered=!0,this.nzLoading=!1,this.nzHoverable=!1,this.nzActions=[],this.nzSize="default",n.addClass(t.nativeElement,"ant-card")}var g=(v.decorators=[{type:a.Component,args:[{selector:"nz-card-loading",exportAs:"nzCardLoading",template:'<div class="ant-card-loading-content">\n <div class="ant-row" style="margin-left: -4px; margin-right: -4px;">\n <div class="ant-col-22" style="padding-left: 4px; padding-right: 4px;">\n <div class="ant-card-loading-block"></div>\n </div>\n </div>\n <div class="ant-row" style="margin-left: -4px; margin-right: -4px;">\n <div class="ant-col-8" style="padding-left: 4px; padding-right: 4px;">\n <div class="ant-card-loading-block"></div>\n </div>\n <div class="ant-col-15" style="padding-left: 4px; padding-right: 4px;">\n <div class="ant-card-loading-block"></div>\n </div>\n </div>\n <div class="ant-row" style="margin-left: -4px; margin-right: -4px;">\n <div class="ant-col-6" style="padding-left: 4px; padding-right: 4px;">\n <div class="ant-card-loading-block"></div>\n </div>\n <div class="ant-col-18" style="padding-left: 4px; padding-right: 4px;">\n <div class="ant-card-loading-block"></div>\n </div>\n </div>\n <div class="ant-row" style="margin-left: -4px; margin-right: -4px;">\n <div class="ant-col-13" style="padding-left: 4px; padding-right: 4px;">\n <div class="ant-card-loading-block"></div>\n </div>\n <div class="ant-col-9" style="padding-left: 4px; padding-right: 4px;">\n <div class="ant-card-loading-block"></div>\n </div>\n </div>\n <div class="ant-row" style="margin-left: -4px; margin-right: -4px;">\n <div class="ant-col-4" style="padding-left: 4px; padding-right: 4px;">\n <div class="ant-card-loading-block"></div>\n </div>\n <div class="ant-col-3" style="padding-left: 4px; padding-right: 4px;">\n <div class="ant-card-loading-block"></div>\n </div>\n <div class="ant-col-16" style="padding-left: 4px; padding-right: 4px;">\n <div class="ant-card-loading-block"></div>\n </div>\n </div>\n <div class="ant-row" style="margin-left: -4px; margin-right: -4px;">\n <div class="ant-col-8" style="padding-left: 4px; padding-right: 4px;">\n <div class="ant-card-loading-block"></div>\n </div>\n <div class="ant-col-6" style="padding-left: 4px; padding-right: 4px;">\n <div class="ant-card-loading-block"></div>\n </div>\n <div class="ant-col-8" style="padding-left: 4px; padding-right: 4px;">\n <div class="ant-card-loading-block"></div>\n </div>\n </div>\n</div>',preserveWhitespaces:!1,changeDetection:a.ChangeDetectionStrategy.OnPush,encapsulation:a.ViewEncapsulation.None,styles:["\n nz-card-loading {\n display: block;\n }\n "]}]}],v.ctorParameters=function(){return[{type:a.ElementRef},{type:a.Renderer2}]},v);function v(n,t){t.addClass(n.nativeElement,"ant-card-loading-content")}var z=(y.decorators=[{type:a.Component,args:[{selector:"nz-card-meta",exportAs:"nzCardMeta",preserveWhitespaces:!1,changeDetection:a.ChangeDetectionStrategy.OnPush,encapsulation:a.ViewEncapsulation.None,template:'<div class="ant-card-meta-avatar" *ngIf="nzAvatar">\n <ng-template [ngTemplateOutlet]="nzAvatar"></ng-template>\n</div>\n<div class="ant-card-meta-detail" *ngIf="nzTitle || nzDescription">\n <div class="ant-card-meta-title" *ngIf="nzTitle">\n <ng-container *nzStringTemplateOutlet="nzTitle">{{ nzTitle }}</ng-container>\n </div>\n <div class="ant-card-meta-description" *ngIf="nzDescription">\n <ng-container *nzStringTemplateOutlet="nzDescription">{{ nzDescription }}</ng-container>\n </div>\n</div>',styles:["\n nz-card-meta {\n display: block;\n }\n "]}]}],y.ctorParameters=function(){return[{type:a.ElementRef},{type:a.Renderer2}]},y.propDecorators={nzTitle:[{type:a.Input}],nzDescription:[{type:a.Input}],nzAvatar:[{type:a.Input}]},y);function y(n,t){t.addClass(n.nativeElement,"ant-card-meta")}var m=(u.decorators=[{type:a.NgModule,args:[{imports:[t.CommonModule,e.NzAddOnModule],declarations:[s,i,z,g,l],exports:[s,i,z,g,l]}]}],u);function u(){}n.NzCardGridDirective=i,n.NzCardComponent=s,n.NzCardModule=m,n.NzCardLoadingComponent=g,n.NzCardMetaComponent=z,n.NzCardTabComponent=l,Object.defineProperty(n,"__esModule",{value:!0})}); //# sourceMappingURL=ng-zorro-antd-card.umd.min.js.map