1 | (function (global, factory) {
|
2 | typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) :
|
3 | typeof define === 'function' && define.amd ? define(['exports', '@angular/core'], factory) :
|
4 | (factory((global.md = global.md || {}, global.md.toolbar = global.md.toolbar || {}),global.ng.core));
|
5 | }(this, (function (exports,_angular_core) { 'use strict';
|
6 |
|
7 | var __decorate = (window && window.__decorate) || function (decorators, target, key, desc) {
|
8 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
9 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
10 | 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;
|
11 | return c > 3 && r && Object.defineProperty(target, key, r), r;
|
12 | };
|
13 | var __metadata = (window && window.__metadata) || function (k, v) {
|
14 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
15 | };
|
16 | var MdToolbarRow = (function () {
|
17 | function MdToolbarRow() {
|
18 | }
|
19 | MdToolbarRow = __decorate([
|
20 | _angular_core.Directive({
|
21 | selector: 'md-toolbar-row'
|
22 | }),
|
23 | __metadata('design:paramtypes', [])
|
24 | ], MdToolbarRow);
|
25 | return MdToolbarRow;
|
26 | }());
|
27 | var MdToolbar = (function () {
|
28 | function MdToolbar(elementRef, renderer) {
|
29 | this.elementRef = elementRef;
|
30 | this.renderer = renderer;
|
31 | }
|
32 | Object.defineProperty(MdToolbar.prototype, "color", {
|
33 | get: function () {
|
34 | return this._color;
|
35 | },
|
36 | set: function (value) {
|
37 | this._updateColor(value);
|
38 | },
|
39 | enumerable: true,
|
40 | configurable: true
|
41 | });
|
42 | MdToolbar.prototype._updateColor = function (newColor) {
|
43 | this._setElementColor(this._color, false);
|
44 | this._setElementColor(newColor, true);
|
45 | this._color = newColor;
|
46 | };
|
47 | MdToolbar.prototype._setElementColor = function (color, isAdd) {
|
48 | if (color != null && color != '') {
|
49 | this.renderer.setElementClass(this.elementRef.nativeElement, "md-" + color, isAdd);
|
50 | }
|
51 | };
|
52 | __decorate([
|
53 | _angular_core.Input(),
|
54 | __metadata('design:type', String)
|
55 | ], MdToolbar.prototype, "color", null);
|
56 | MdToolbar = __decorate([
|
57 | _angular_core.Component({selector: 'md-toolbar',
|
58 | template: "<div class=\"md-toolbar-layout\"> <md-toolbar-row> <ng-content></ng-content> </md-toolbar-row> <ng-content select=\"md-toolbar-row\"></ng-content> </div>",
|
59 | styles: ["/** * Mixin that creates a new stacking context. * see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context */ /** * This mixin hides an element visually. * That means it's still accessible for screen-readers but not visible in view. */ /** * Forces an element to grow to fit floated contents; used as as an alternative to * `overflow: hidden;` because it doesn't cut off contents. */ /** * A mixin, which generates temporary ink ripple on a given component. * When $bindToParent is set to true, it will check for the focused class on the same selector as you included * that mixin. * It is also possible to specify the color palette of the temporary ripple. By default it uses the * accent palette for its background. */ md-toolbar { display: flex; box-sizing: border-box; width: 100%; min-height: 64px; font-size: 20px; font-weight: 400; font-family: Roboto, \"Helvetica Neue\", sans-serif; padding: 0 16px; flex-direction: column; background: whitesmoke; color: rgba(0, 0, 0, 0.87); } md-toolbar.md-primary { background: #009688; color: white; } md-toolbar.md-accent { background: #9c27b0; color: rgba(255, 255, 255, 0.870588); } md-toolbar.md-warn { background: #f44336; color: white; } md-toolbar md-toolbar-row { display: flex; box-sizing: border-box; width: 100%; height: 64px; flex-direction: row; align-items: center; } /*# sourceMappingURL=toolbar.css.map */ "],
|
60 | changeDetection: _angular_core.ChangeDetectionStrategy.OnPush,
|
61 | encapsulation: _angular_core.ViewEncapsulation.None
|
62 | }),
|
63 | __metadata('design:paramtypes', [_angular_core.ElementRef, _angular_core.Renderer])
|
64 | ], MdToolbar);
|
65 | return MdToolbar;
|
66 | }());
|
67 | var MdToolbarModule = (function () {
|
68 | function MdToolbarModule() {
|
69 | }
|
70 | MdToolbarModule.forRoot = function () {
|
71 | return {
|
72 | ngModule: MdToolbarModule,
|
73 | providers: []
|
74 | };
|
75 | };
|
76 | MdToolbarModule = __decorate([
|
77 | _angular_core.NgModule({
|
78 | exports: [MdToolbar, MdToolbarRow],
|
79 | declarations: [MdToolbar, MdToolbarRow],
|
80 | }),
|
81 | __metadata('design:paramtypes', [])
|
82 | ], MdToolbarModule);
|
83 | return MdToolbarModule;
|
84 | }());
|
85 |
|
86 | exports.MdToolbarRow = MdToolbarRow;
|
87 | exports.MdToolbar = MdToolbar;
|
88 | exports.MdToolbarModule = MdToolbarModule;
|
89 |
|
90 | Object.defineProperty(exports, '__esModule', { value: true });
|
91 |
|
92 | }))); |
\ | No newline at end of file |