@craftsjs/card 4.0.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +115 -114
- package/_craftsjs-card.theme.scss +166 -135
- package/esm2020/craftsjs-card.mjs +4 -4
- package/esm2020/lib/card.component.mjs +11 -11
- package/esm2020/lib/card.module.mjs +69 -71
- package/esm2020/lib/components/card-header/card-header.component.mjs +15 -15
- package/esm2020/lib/components/card-header/components/card-header-linear/card-header-linear.component.mjs +13 -13
- package/esm2020/lib/components/card-header/components/card-header-oval/card-header-oval.component.mjs +23 -23
- package/esm2020/lib/directives/card-body.directive.mjs +14 -14
- package/esm2020/lib/directives/card-divider.directive.mjs +16 -16
- package/esm2020/lib/directives/card-footer.directive.mjs +14 -14
- package/esm2020/lib/directives/card-header-mark.directive.mjs +16 -16
- package/esm2020/lib/directives/card-header-subtitle.directive.mjs +16 -16
- package/esm2020/lib/directives/card-title.directive.mjs +14 -14
- package/esm2020/lib/mixins/color.mjs +23 -23
- package/esm2020/public-api.mjs +13 -13
- package/fesm2015/craftsjs-card.mjs +189 -190
- package/fesm2015/craftsjs-card.mjs.map +1 -1
- package/fesm2020/craftsjs-card.mjs +189 -190
- package/fesm2020/craftsjs-card.mjs.map +1 -1
- package/{craftsjs-card.d.ts → index.d.ts} +5 -5
- package/lib/card.component.d.ts +5 -5
- package/lib/card.module.d.ts +17 -17
- package/lib/components/card-header/card-header.component.d.ts +6 -6
- package/lib/components/card-header/components/card-header-linear/card-header-linear.component.d.ts +5 -5
- package/lib/components/card-header/components/card-header-oval/card-header-oval.component.d.ts +12 -12
- package/lib/directives/card-body.directive.d.ts +5 -5
- package/lib/directives/card-divider.directive.d.ts +5 -5
- package/lib/directives/card-footer.directive.d.ts +5 -5
- package/lib/directives/card-header-mark.directive.d.ts +5 -5
- package/lib/directives/card-header-subtitle.directive.d.ts +5 -5
- package/lib/directives/card-title.directive.d.ts +5 -5
- package/lib/mixins/color.d.ts +6 -6
- package/package.json +8 -8
- package/public-api.d.ts +12 -12
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2020 Craftsjs
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Craftsjs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,114 +1,115 @@
|
|
|
1
|
-
# ADDAPPTABLES card
|
|
2
|
-
|
|
3
|
-
Craftsjs card is a library for angular
|
|
4
|
-
|
|
5
|
-
[See demo](http://addapptables.com/admin/components/cards)
|
|
6
|
-
|
|
7
|
-
[Example code](https://stackblitz.com/edit/angular-card-addapptables)
|
|
8
|
-
|
|
9
|
-
## Getting Started
|
|
10
|
-
To get started, let's install the package through npm:
|
|
11
|
-
|
|
12
|
-
Choose the version corresponding to your Angular version:
|
|
13
|
-
|
|
14
|
-
Angular | @craftsjs/card
|
|
15
|
-
----------- | -------------------
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
@
|
|
31
|
-
@angular/
|
|
32
|
-
@angular/
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
@
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
</
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
</
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
@import '~@
|
|
87
|
-
@import '~@
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
$craftsjs-app-
|
|
91
|
-
$craftsjs-app-
|
|
92
|
-
$craftsjs-app-
|
|
93
|
-
$craftsjs-theme
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
color-
|
|
98
|
-
color-
|
|
99
|
-
color-
|
|
100
|
-
color-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
@include
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
1
|
+
# ADDAPPTABLES card
|
|
2
|
+
|
|
3
|
+
Craftsjs card is a library for angular
|
|
4
|
+
|
|
5
|
+
[See demo](http://addapptables.com/admin/components/cards)
|
|
6
|
+
|
|
7
|
+
[Example code](https://stackblitz.com/edit/angular-card-addapptables)
|
|
8
|
+
|
|
9
|
+
## Getting Started
|
|
10
|
+
To get started, let's install the package through npm:
|
|
11
|
+
|
|
12
|
+
Choose the version corresponding to your Angular version:
|
|
13
|
+
|
|
14
|
+
Angular | @craftsjs/card
|
|
15
|
+
----------- | -------------------
|
|
16
|
+
15 | 5.x
|
|
17
|
+
13 | 4.x
|
|
18
|
+
12 | 3.x
|
|
19
|
+
11 | 2.x
|
|
20
|
+
10 | 1.x
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
npm i @craftsjs/card --S
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Install peer dependencies
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
npm i
|
|
30
|
+
@craftsjs/core
|
|
31
|
+
@angular/material
|
|
32
|
+
@angular/animations
|
|
33
|
+
@angular/cdk --S
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## How to use
|
|
37
|
+
|
|
38
|
+
- Import the module CardModule
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import { CardModule } from '@craftsjs/card';
|
|
42
|
+
@NgModule({
|
|
43
|
+
imports: [CardModule]
|
|
44
|
+
})
|
|
45
|
+
export class YourModule { }
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
simple card
|
|
49
|
+
```html
|
|
50
|
+
<craftsjs-card>
|
|
51
|
+
<card-header>
|
|
52
|
+
<card-header-linear>
|
|
53
|
+
<card-title>
|
|
54
|
+
<mat-icon matSuffix>horizontal_split</mat-icon>
|
|
55
|
+
<span>Simple card</span>
|
|
56
|
+
</card-title>
|
|
57
|
+
</card-header-linear>
|
|
58
|
+
</card-header>
|
|
59
|
+
<mat-divider></mat-divider>
|
|
60
|
+
<card-body>
|
|
61
|
+
// custom component
|
|
62
|
+
</card-body>
|
|
63
|
+
</craftsjs-card>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Oval card
|
|
67
|
+
```html
|
|
68
|
+
<craftsjs-card>
|
|
69
|
+
<card-header>
|
|
70
|
+
<card-header-oval>
|
|
71
|
+
<card-title>
|
|
72
|
+
<mat-icon matSuffix>horizontal_split</mat-icon>
|
|
73
|
+
<span>Oval card</span>
|
|
74
|
+
</card-title>
|
|
75
|
+
</card-header-oval>
|
|
76
|
+
</card-header>
|
|
77
|
+
<card-body>
|
|
78
|
+
// custom component
|
|
79
|
+
</card-body>
|
|
80
|
+
</craftsjs-card>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
- Finally, it is important to import the styles to the application
|
|
84
|
+
|
|
85
|
+
```scss
|
|
86
|
+
@import '~@craftsjs/core/craftsjs-grid.theme';
|
|
87
|
+
@import '~@angular/material/theming';
|
|
88
|
+
@import '~@craftsjs/card/craftsjs-card.theme';
|
|
89
|
+
|
|
90
|
+
$craftsjs-app-primary: mat-palette($mat-teal, 800);
|
|
91
|
+
$craftsjs-app-accent: mat-palette($mat-pink, 800, A100, 100);
|
|
92
|
+
$craftsjs-app-warn: mat-palette($mat-red);
|
|
93
|
+
$craftsjs-app-theme: mat-light-theme($craftsjs-app-primary, $craftsjs-app-accent, $craftsjs-app-warn);
|
|
94
|
+
$craftsjs-theme-variables: (
|
|
95
|
+
text: white,
|
|
96
|
+
border-radius: 5px,
|
|
97
|
+
color-blue: #20a9d2,
|
|
98
|
+
color-success: #5cb85c,
|
|
99
|
+
color-info: #5bc0de,
|
|
100
|
+
color-warning: #e09d3d,
|
|
101
|
+
color-danger: #d43934,
|
|
102
|
+
gray-color: #696868
|
|
103
|
+
);
|
|
104
|
+
@include mat-core();
|
|
105
|
+
body.theme-default {
|
|
106
|
+
@include angular-material-theme($craftsjs-app-theme);
|
|
107
|
+
@include card($craftsjs-app-theme, $craftsjs-theme-variables);
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
- Do not forget to put the theme-default class in the html body
|
|
112
|
+
|
|
113
|
+
```html
|
|
114
|
+
<body class="theme-default"></body>
|
|
115
|
+
```
|
|
@@ -1,135 +1,166 @@
|
|
|
1
|
-
@mixin box_shadow_header_color($color) {
|
|
2
|
-
box-shadow: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px $color
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
@mixin addapptable-card-header($variables) {
|
|
6
|
-
p{
|
|
7
|
-
margin: 0;
|
|
8
|
-
}
|
|
9
|
-
.card {
|
|
10
|
-
&-header {
|
|
11
|
-
justify-content: space-between;
|
|
12
|
-
&-subtitle {
|
|
13
|
-
text-align: end;
|
|
14
|
-
margin: 0.5em;
|
|
15
|
-
&-mark{
|
|
16
|
-
color: #999;
|
|
17
|
-
font-size: 1em;
|
|
18
|
-
margin-bottom: 0.5em;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
&-blue{
|
|
22
|
-
background-color: map-get($variables, color-blue);
|
|
23
|
-
@include box_shadow_header_color(map-get($variables, color-blue));
|
|
24
|
-
}
|
|
25
|
-
&-danger{
|
|
26
|
-
background-color: map-get($variables, color-danger);
|
|
27
|
-
@include box_shadow_header_color(map-get($variables, color-danger));
|
|
28
|
-
}
|
|
29
|
-
&-warning{
|
|
30
|
-
background-color: map-get($variables, color-warning);
|
|
31
|
-
@include box_shadow_header_color(map-get($variables, color-warning));
|
|
32
|
-
}
|
|
33
|
-
&-success{
|
|
34
|
-
background-color: map-get($variables, color-success);
|
|
35
|
-
@include box_shadow_header_color(map-get($variables, color-success));
|
|
36
|
-
}
|
|
37
|
-
&-info{
|
|
38
|
-
background-color: map-get($variables, color-info);
|
|
39
|
-
@include box_shadow_header_color(map-get($variables, color-info));
|
|
40
|
-
}
|
|
41
|
-
&-gray{
|
|
42
|
-
background-color: map-get($variables, gray-color);
|
|
43
|
-
@include box_shadow_header_color(map-get($variables, gray-color));
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
@mixin card($theme, $variables) {
|
|
51
|
-
|
|
52
|
-
$accent: map-get($theme, accent);
|
|
53
|
-
$background: map-get($theme, background);
|
|
54
|
-
$foreground: map-get($theme, foreground);
|
|
55
|
-
|
|
56
|
-
//card
|
|
57
|
-
$card-padding: 12px 0;
|
|
58
|
-
$card-box-shadow: 0 1px 4px 0 rgba(0,0,0,0.14);
|
|
59
|
-
|
|
60
|
-
//general
|
|
61
|
-
$card-margin: 5px;
|
|
62
|
-
|
|
63
|
-
//header
|
|
64
|
-
$card-header-margin: -20px 15px 0 16px;
|
|
65
|
-
$card-header-padding: 20px;
|
|
66
|
-
$card-title-font-weight: 500;
|
|
67
|
-
$card-header-box-shadow: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px mat.get-color-from-palette($accent);
|
|
68
|
-
$card-header-icon-margin-right: 10px;
|
|
69
|
-
$background-color-header: mat.get-color-from-palette($accent);
|
|
70
|
-
|
|
71
|
-
// body
|
|
72
|
-
$card-body-padding: 12px 20px 20px;
|
|
73
|
-
|
|
74
|
-
//footer
|
|
75
|
-
$card-footer-margin: 0 20px 10px;
|
|
76
|
-
$card-padding-top: 10px;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
.card {
|
|
80
|
-
display: inline-block;
|
|
81
|
-
position: relative;
|
|
82
|
-
width: 100%;
|
|
83
|
-
margin: $card-padding;
|
|
84
|
-
box-shadow: $card-box-shadow;
|
|
85
|
-
background: mat.get-color-from-palette($background, card);
|
|
86
|
-
margin-top: 32px;
|
|
87
|
-
&-header {
|
|
88
|
-
&-oval {
|
|
89
|
-
background-color: $background-color-header;
|
|
90
|
-
color: map-get($variables, text)
|
|
91
|
-
padding: 20px 15px;
|
|
92
|
-
margin: $card-header-margin;
|
|
93
|
-
border-radius: map-get($variables, border-radius);
|
|
94
|
-
display: inline-block;
|
|
95
|
-
box-shadow: $card-header-box-shadow;
|
|
96
|
-
}
|
|
97
|
-
&-linear {
|
|
98
|
-
display: inline-block;
|
|
99
|
-
padding: 1.3em 0.4em 1.3em 0.4em;
|
|
100
|
-
}
|
|
101
|
-
&-title {
|
|
102
|
-
align-items: center;
|
|
103
|
-
display: flex;
|
|
104
|
-
padding: 0px 18px;
|
|
105
|
-
font-weight: $card-title-font-weight;
|
|
106
|
-
&> * {
|
|
107
|
-
vertical-align: top;
|
|
108
|
-
margin-right: 5px;
|
|
109
|
-
}
|
|
110
|
-
&>:last-child{
|
|
111
|
-
margin: inherit;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
1
|
+
@mixin box_shadow_header_color($color) {
|
|
2
|
+
box-shadow: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px $color
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
@mixin addapptable-card-header($variables) {
|
|
6
|
+
p{
|
|
7
|
+
margin: 0;
|
|
8
|
+
}
|
|
9
|
+
.card {
|
|
10
|
+
&-header {
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
&-subtitle {
|
|
13
|
+
text-align: end;
|
|
14
|
+
margin: 0.5em;
|
|
15
|
+
&-mark{
|
|
16
|
+
color: #999;
|
|
17
|
+
font-size: 1em;
|
|
18
|
+
margin-bottom: 0.5em;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
&-blue{
|
|
22
|
+
background-color: map-get($variables, color-blue);
|
|
23
|
+
@include box_shadow_header_color(map-get($variables, color-blue));
|
|
24
|
+
}
|
|
25
|
+
&-danger{
|
|
26
|
+
background-color: map-get($variables, color-danger);
|
|
27
|
+
@include box_shadow_header_color(map-get($variables, color-danger));
|
|
28
|
+
}
|
|
29
|
+
&-warning{
|
|
30
|
+
background-color: map-get($variables, color-warning);
|
|
31
|
+
@include box_shadow_header_color(map-get($variables, color-warning));
|
|
32
|
+
}
|
|
33
|
+
&-success{
|
|
34
|
+
background-color: map-get($variables, color-success);
|
|
35
|
+
@include box_shadow_header_color(map-get($variables, color-success));
|
|
36
|
+
}
|
|
37
|
+
&-info{
|
|
38
|
+
background-color: map-get($variables, color-info);
|
|
39
|
+
@include box_shadow_header_color(map-get($variables, color-info));
|
|
40
|
+
}
|
|
41
|
+
&-gray{
|
|
42
|
+
background-color: map-get($variables, gray-color);
|
|
43
|
+
@include box_shadow_header_color(map-get($variables, gray-color));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
@mixin card($theme, $variables) {
|
|
51
|
+
|
|
52
|
+
$accent: map-get($theme, accent);
|
|
53
|
+
$background: map-get($theme, background);
|
|
54
|
+
$foreground: map-get($theme, foreground);
|
|
55
|
+
|
|
56
|
+
//card
|
|
57
|
+
$card-padding: 12px 0;
|
|
58
|
+
$card-box-shadow: 0 1px 4px 0 rgba(0,0,0,0.14);
|
|
59
|
+
|
|
60
|
+
//general
|
|
61
|
+
$card-margin: 5px;
|
|
62
|
+
|
|
63
|
+
//header
|
|
64
|
+
$card-header-margin: -20px 15px 0 16px;
|
|
65
|
+
$card-header-padding: 20px;
|
|
66
|
+
$card-title-font-weight: 500;
|
|
67
|
+
$card-header-box-shadow: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px mat.get-color-from-palette($accent);
|
|
68
|
+
$card-header-icon-margin-right: 10px;
|
|
69
|
+
$background-color-header: mat.get-color-from-palette($accent);
|
|
70
|
+
|
|
71
|
+
// body
|
|
72
|
+
$card-body-padding: 12px 20px 20px;
|
|
73
|
+
|
|
74
|
+
//footer
|
|
75
|
+
$card-footer-margin: 0 20px 10px;
|
|
76
|
+
$card-padding-top: 10px;
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
.card {
|
|
80
|
+
display: inline-block;
|
|
81
|
+
position: relative;
|
|
82
|
+
width: 100%;
|
|
83
|
+
margin: $card-padding;
|
|
84
|
+
box-shadow: $card-box-shadow;
|
|
85
|
+
background: mat.get-color-from-palette($background, 'card');
|
|
86
|
+
margin-top: 32px;
|
|
87
|
+
&-header {
|
|
88
|
+
&-oval {
|
|
89
|
+
background-color: $background-color-header;
|
|
90
|
+
color: map-get($variables, text);
|
|
91
|
+
padding: 20px 15px;
|
|
92
|
+
margin: $card-header-margin;
|
|
93
|
+
border-radius: map-get($variables, border-radius);
|
|
94
|
+
display: inline-block;
|
|
95
|
+
box-shadow: $card-header-box-shadow;
|
|
96
|
+
}
|
|
97
|
+
&-linear {
|
|
98
|
+
display: inline-block;
|
|
99
|
+
padding: 1.3em 0.4em 1.3em 0.4em;
|
|
100
|
+
}
|
|
101
|
+
&-title {
|
|
102
|
+
align-items: center;
|
|
103
|
+
display: flex;
|
|
104
|
+
padding: 0px 18px;
|
|
105
|
+
font-weight: $card-title-font-weight;
|
|
106
|
+
&> * {
|
|
107
|
+
vertical-align: top;
|
|
108
|
+
margin-right: 5px;
|
|
109
|
+
}
|
|
110
|
+
&>:last-child{
|
|
111
|
+
margin: inherit;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
&-subtitle {
|
|
115
|
+
display: flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
&-body {
|
|
120
|
+
display: block;
|
|
121
|
+
padding: $card-body-padding;
|
|
122
|
+
position: relative;
|
|
123
|
+
}
|
|
124
|
+
&-footer {
|
|
125
|
+
margin: $card-footer-margin;
|
|
126
|
+
padding-top: $card-padding-top;
|
|
127
|
+
border-top: 1px solid mat.get-color-from-palette($foreground, divider);
|
|
128
|
+
}
|
|
129
|
+
&-divider {
|
|
130
|
+
display: block;
|
|
131
|
+
margin: 0;
|
|
132
|
+
border-top-width: 1px;
|
|
133
|
+
border-top-style: dashed;
|
|
134
|
+
margin-top: 10px;
|
|
135
|
+
color: mat.get-color-from-palette($foreground, 'divider');
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
@include addapptable-card-header($variables);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@mixin card-color($theme) {
|
|
142
|
+
|
|
143
|
+
$accent: map-get($theme, accent);
|
|
144
|
+
$background: map-get($theme, background);
|
|
145
|
+
$foreground: map-get($theme, foreground);
|
|
146
|
+
|
|
147
|
+
$background-color-header: mat.get-color-from-palette($accent);
|
|
148
|
+
$card-header-box-shadow: 0 4px 20px 0 rgba(0,0,0,.14), 0 7px 10px -5px mat.get-color-from-palette($accent);
|
|
149
|
+
|
|
150
|
+
.card {
|
|
151
|
+
background: mat.get-color-from-palette($background, 'card');
|
|
152
|
+
&-header {
|
|
153
|
+
&-oval {
|
|
154
|
+
background-color: $background-color-header;
|
|
155
|
+
color: mat.get-color-from-palette($foreground, 'text');
|
|
156
|
+
box-shadow: $card-header-box-shadow;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
&-divider {
|
|
160
|
+
color: mat.get-color-from-palette($foreground, 'divider');
|
|
161
|
+
}
|
|
162
|
+
&-footer {
|
|
163
|
+
border-top: 1px solid mat.get-color-from-palette($foreground, divider);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './public-api';
|
|
5
5
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JhZnRzanMtY2FyZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2NyYWZ0c2pzL2NhcmQvc3JjL2NyYWZ0c2pzLWNhcmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class CardComponent {
|
|
4
|
-
}
|
|
5
|
-
CardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
6
|
-
CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
7
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
8
|
-
type: Component,
|
|
9
|
-
args: [{ selector: 'craftsjs-card', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'card' }, template: "<ng-content></ng-content>\
|
|
10
|
-
}] });
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export class CardComponent {
|
|
4
|
+
}
|
|
5
|
+
CardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6
|
+
CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: CardComponent, selector: "craftsjs-card", host: { classAttribute: "card" }, ngImport: i0, template: "<ng-content></ng-content>\n<ng-content select=\"card-footer\"></ng-content>", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
7
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: CardComponent, decorators: [{
|
|
8
|
+
type: Component,
|
|
9
|
+
args: [{ selector: 'craftsjs-card', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'card' }, template: "<ng-content></ng-content>\n<ng-content select=\"card-footer\"></ng-content>" }]
|
|
10
|
+
}] });
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FyZC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jcmFmdHNqcy9jYXJkL3NyYy9saWIvY2FyZC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jcmFmdHNqcy9jYXJkL3NyYy9saWIvY2FyZC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLGlCQUFpQixFQUFFLHVCQUF1QixFQUFFLE1BQU0sZUFBZSxDQUFDOztBQVV0RixNQUFNLE9BQU8sYUFBYTs7MEdBQWIsYUFBYTs4RkFBYixhQUFhLHVGQ1YxQiw2RUFDOEM7MkZEU2pDLGFBQWE7a0JBUHpCLFNBQVM7K0JBQ0UsZUFBZSxpQkFFVixpQkFBaUIsQ0FBQyxJQUFJLG1CQUNwQix1QkFBdUIsQ0FBQyxNQUFNLFFBQ3pDLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENvbXBvbmVudCwgVmlld0VuY2Fwc3VsYXRpb24sIENoYW5nZURldGVjdGlvblN0cmF0ZWd5IH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cblxuQENvbXBvbmVudCh7XG4gIHNlbGVjdG9yOiAnY3JhZnRzanMtY2FyZCcsXG4gIHRlbXBsYXRlVXJsOiAnLi9jYXJkLmNvbXBvbmVudC5odG1sJyxcbiAgZW5jYXBzdWxhdGlvbjogVmlld0VuY2Fwc3VsYXRpb24uTm9uZSxcbiAgY2hhbmdlRGV0ZWN0aW9uOiBDaGFuZ2VEZXRlY3Rpb25TdHJhdGVneS5PblB1c2gsXG4gIGhvc3Q6IHsgY2xhc3M6ICdjYXJkJyB9XG59KVxuZXhwb3J0IGNsYXNzIENhcmRDb21wb25lbnQgeyB9XG4iLCI8bmctY29udGVudD48L25nLWNvbnRlbnQ+XG48bmctY29udGVudCBzZWxlY3Q9XCJjYXJkLWZvb3RlclwiPjwvbmctY29udGVudD4iXX0=
|