1 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
2 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
3 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
4 | 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;
|
5 | return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6 | };
|
7 | var __metadata = (this && this.__metadata) || function (k, v) {
|
8 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
9 | };
|
10 | import { NgModule, Component, ViewEncapsulation, ChangeDetectionStrategy, Directive } from '@angular/core';
|
11 |
|
12 |
|
13 |
|
14 | export var MdCardContent = (function () {
|
15 | function MdCardContent() {
|
16 | }
|
17 | MdCardContent = __decorate([
|
18 | Directive({
|
19 | selector: 'md-card-content'
|
20 | }),
|
21 | __metadata('design:paramtypes', [])
|
22 | ], MdCardContent);
|
23 | return MdCardContent;
|
24 | }());
|
25 |
|
26 |
|
27 |
|
28 | export var MdCardTitle = (function () {
|
29 | function MdCardTitle() {
|
30 | }
|
31 | MdCardTitle = __decorate([
|
32 | Directive({
|
33 | selector: 'md-card-title'
|
34 | }),
|
35 | __metadata('design:paramtypes', [])
|
36 | ], MdCardTitle);
|
37 | return MdCardTitle;
|
38 | }());
|
39 |
|
40 |
|
41 |
|
42 | export var MdCardSubtitle = (function () {
|
43 | function MdCardSubtitle() {
|
44 | }
|
45 | MdCardSubtitle = __decorate([
|
46 | Directive({
|
47 | selector: 'md-card-subtitle'
|
48 | }),
|
49 | __metadata('design:paramtypes', [])
|
50 | ], MdCardSubtitle);
|
51 | return MdCardSubtitle;
|
52 | }());
|
53 |
|
54 |
|
55 |
|
56 | export var MdCardActions = (function () {
|
57 | function MdCardActions() {
|
58 | }
|
59 | MdCardActions = __decorate([
|
60 | Directive({
|
61 | selector: 'md-card-actions'
|
62 | }),
|
63 | __metadata('design:paramtypes', [])
|
64 | ], MdCardActions);
|
65 | return MdCardActions;
|
66 | }());
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 | export var MdCard = (function () {
|
86 | function MdCard() {
|
87 | }
|
88 | MdCard = __decorate([
|
89 | Component({selector: 'md-card',
|
90 | template: "<ng-content></ng-content> ",
|
91 | styles: ["/** * A collection of mixins and CSS classes that can be used to apply elevation to a material * element. * See: https://www.google.com/design/spec/what-is-material/elevation-shadows.html * Examples: * * * .md-foo { * @include $md-elevation(2); * * &:active { * @include $md-elevation(8); * } * } * * <div id=\"external-card\" class=\"md-elevation-z2\"><p>Some content</p></div> * * For an explanation of the design behind how elevation is implemented, see the design doc at * https://goo.gl/Kq0k9Z. */ /** * The css property used for elevation. In most cases this should not be changed. It is exposed * as a variable for abstraction / easy use when needing to reference the property directly, for * example in a will-change rule. */ /** The default duration value for elevation transitions. */ /** The default easing value for elevation transitions. */ /** * Applies the correct css rules to an element to give it the elevation specified by $zValue. * The $zValue must be between 0 and 24. */ /** * Returns a string that can be used as the value for a transition property for elevation. * Calling this function directly is useful in situations where a component needs to transition * more than one property. * * .foo { * transition: md-elevation-transition-property-value(), opacity 100ms ease; * will-change: $md-elevation-property, opacity; * } */ /** * Applies the correct css rules needed to have an element transition between elevations. * This mixin should be applied to elements whose elevation values will change depending on their * context (e.g. when active or disabled). */ md-card { box-shadow: 0px 2px 1px -1px rgba(0, 0, 0, 0.2), 0px 1px 1px 0px rgba(0, 0, 0, 0.14), 0px 1px 3px 0px rgba(0, 0, 0, 0.12); transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1); will-change: box-shadow; display: block; position: relative; padding: 24px; border-radius: 2px; font-family: Roboto, \"Helvetica Neue\", sans-serif; background: white; color: black; } md-card:hover { box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); } .md-card-flat { box-shadow: none; } md-card-title, md-card-subtitle, md-card-content, md-card-actions { display: block; margin-bottom: 16px; } md-card-title { font-size: 24px; font-weight: 400; } md-card-subtitle { font-size: 14px; color: rgba(0, 0, 0, 0.54); } md-card-content { font-size: 14px; } md-card-actions { margin-left: -16px; margin-right: -16px; padding: 8px 0; } md-card-actions[align='end'] { display: flex; justify-content: flex-end; } [md-card-image] { width: calc(100% + 48px); margin: 0 -24px 16px -24px; } [md-card-xl-image] { width: 240px; height: 240px; margin: -8px; } md-card-footer { position: absolute; bottom: 0; } md-card-actions [md-button], md-card-actions [md-raised-button] { margin: 0 4px; } /* HEADER STYLES */ md-card-header { display: flex; flex-direction: row; height: 40px; margin: -8px 0 16px 0; } .md-card-header-text { height: 40px; margin: 0 8px; } [md-card-avatar] { height: 40px; width: 40px; border-radius: 50%; } md-card-header md-card-title { font-size: 14px; } /* TITLE-GROUP STYLES */ [md-card-sm-image], [md-card-md-image], [md-card-lg-image] { margin: -8px 0; } md-card-title-group { display: flex; justify-content: space-between; margin: 0 -8px; } [md-card-sm-image] { width: 80px; height: 80px; } [md-card-md-image] { width: 112px; height: 112px; } [md-card-lg-image] { width: 152px; height: 152px; } /* MEDIA QUERIES */ @media (max-width: 600px) { md-card { padding: 24px 16px; } [md-card-image] { width: calc(100% + 32px); margin: 16px -16px; } md-card-title-group { margin: 0; } [md-card-xl-image] { margin-left: 0; margin-right: 0; } md-card-header { margin: -8px 0 0 0; } } /* FIRST/LAST CHILD ADJUSTMENTS */ md-card > :first-child, md-card-content > :first-child { margin-top: 0; } md-card > :last-child, md-card-content > :last-child { margin-bottom: 0; } [md-card-image]:first-child { margin-top: -24px; } md-card > md-card-actions:last-child { margin-bottom: -16px; padding-bottom: 0; } md-card-actions [md-button]:first-child, md-card-actions [md-raised-button]:first-child { margin-left: 0; margin-right: 0; } md-card-title:not(:first-child), md-card-subtitle:not(:first-child) { margin-top: -4px; } md-card-header md-card-subtitle:not(:first-child) { margin-top: -8px; } md-card > [md-card-xl-image]:first-child { margin-top: -8px; } md-card > [md-card-xl-image]:last-child { margin-bottom: -8px; } /*# sourceMappingURL=card.css.map */ "],
|
92 | encapsulation: ViewEncapsulation.None,
|
93 | changeDetection: ChangeDetectionStrategy.OnPush,
|
94 | }),
|
95 | __metadata('design:paramtypes', [])
|
96 | ], MdCard);
|
97 | return MdCard;
|
98 | }());
|
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 | export var MdCardHeader = (function () {
|
113 | function MdCardHeader() {
|
114 | }
|
115 | MdCardHeader = __decorate([
|
116 | Component({selector: 'md-card-header',
|
117 | template: "<ng-content select=\"[md-card-avatar]\"></ng-content> <div class=\"md-card-header-text\"> <ng-content select=\"md-card-title, md-card-subtitle\"></ng-content> </div> <ng-content></ng-content> ",
|
118 | encapsulation: ViewEncapsulation.None,
|
119 | changeDetection: ChangeDetectionStrategy.OnPush,
|
120 | }),
|
121 | __metadata('design:paramtypes', [])
|
122 | ], MdCardHeader);
|
123 | return MdCardHeader;
|
124 | }());
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 | export var MdCardTitleGroup = (function () {
|
136 | function MdCardTitleGroup() {
|
137 | }
|
138 | MdCardTitleGroup = __decorate([
|
139 | Component({selector: 'md-card-title-group',
|
140 | template: "<div> <ng-content select=\"md-card-title, md-card-subtitle\"></ng-content> </div> <ng-content select=\"img\"></ng-content> <ng-content></ng-content> ",
|
141 | encapsulation: ViewEncapsulation.None,
|
142 | changeDetection: ChangeDetectionStrategy.OnPush,
|
143 | }),
|
144 | __metadata('design:paramtypes', [])
|
145 | ], MdCardTitleGroup);
|
146 | return MdCardTitleGroup;
|
147 | }());
|
148 | export var MdCardModule = (function () {
|
149 | function MdCardModule() {
|
150 | }
|
151 | MdCardModule.forRoot = function () {
|
152 | return {
|
153 | ngModule: MdCardModule,
|
154 | providers: []
|
155 | };
|
156 | };
|
157 | MdCardModule = __decorate([
|
158 | NgModule({
|
159 | exports: [
|
160 | MdCard, MdCardHeader, MdCardTitleGroup, MdCardContent, MdCardTitle, MdCardSubtitle,
|
161 | MdCardActions
|
162 | ],
|
163 | declarations: [
|
164 | MdCard, MdCardHeader, MdCardTitleGroup, MdCardContent, MdCardTitle, MdCardSubtitle,
|
165 | MdCardActions
|
166 | ],
|
167 | }),
|
168 | __metadata('design:paramtypes', [])
|
169 | ], MdCardModule);
|
170 | return MdCardModule;
|
171 | }());
|
172 |
|
173 |
|