UNPKG

ng-semantic

Version:

Angular2 building blocks based on Semantic UI

73 lines (72 loc) 3.48 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = require("@angular/core"); var SMAccordionDirective = (function () { function SMAccordionDirective(element) { this.element = element; } SMAccordionDirective.prototype.ngOnInit = function () { jQuery(this.element.nativeElement).accordion(this.smDirAccordion || {}); }; __decorate([ core_1.Input(), __metadata('design:type', String) ], SMAccordionDirective.prototype, "smDirAccordion", void 0); SMAccordionDirective = __decorate([ core_1.Directive({ selector: "[smDirAccordion]" }), __metadata('design:paramtypes', [core_1.ElementRef]) ], SMAccordionDirective); return SMAccordionDirective; }()); exports.SMAccordionDirective = SMAccordionDirective; var SemanticAccordionComponent = (function () { function SemanticAccordionComponent() { } __decorate([ core_1.Input(), __metadata('design:type', String) ], SemanticAccordionComponent.prototype, "class", void 0); __decorate([ core_1.Input(), __metadata('design:type', String) ], SemanticAccordionComponent.prototype, "options", void 0); SemanticAccordionComponent = __decorate([ core_1.Component({ changeDetection: core_1.ChangeDetectionStrategy.OnPush, selector: "sm-accordion", styles: ["sm-accordion sm-accordion-item:first-child .title { border-top: none !important; }"], template: "\n<div class=\"ui accordion {{class}}\" [smDirAccordion]=\"options\">\n <ng-content></ng-content>\n</div>\n" }), __metadata('design:paramtypes', []) ], SemanticAccordionComponent); return SemanticAccordionComponent; }()); exports.SemanticAccordionComponent = SemanticAccordionComponent; var SemanticAccordionItemComponent = (function () { function SemanticAccordionItemComponent() { } __decorate([ core_1.Input(), __metadata('design:type', String) ], SemanticAccordionItemComponent.prototype, "class", void 0); SemanticAccordionItemComponent = __decorate([ core_1.Component({ changeDetection: core_1.ChangeDetectionStrategy.OnPush, selector: "sm-accordion-item", template: "\n<div class=\"{{class}} title\">\n <i class=\"dropdown icon\"></i>\n <ng-content select=\"accordion-title\"></ng-content>\n</div>\n<div class=\"{{class}} content\">\n <ng-content select=\"accordion-content\"></ng-content>\n</div>\n" }), __metadata('design:paramtypes', []) ], SemanticAccordionItemComponent); return SemanticAccordionItemComponent; }()); exports.SemanticAccordionItemComponent = SemanticAccordionItemComponent;