ngx-mat-tui-calendar 0.0.15 → 1.0.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/ngx-mat-tui-calendar.theme.scss +9 -0
- package/package.json +1 -1
- package/src/lib/ngx-mat-tui-calendar-editor-dialog/ngx-mat-tui-calendar-editor-dialog.component.theme.scss +75 -0
- package/src/lib/ngx-mat-tui-calendar-wrapper/ngx-mat-tui-calendar-wrapper.component.theme.scss +38 -0
- package/src/lib/ngx-mat-tui-calendar.component.theme.scss +112 -0
package/package.json
CHANGED
@@ -0,0 +1,75 @@
|
|
1
|
+
@use 'sass:map';
|
2
|
+
@use '~@angular/material' as mat;
|
3
|
+
|
4
|
+
@mixin color($theme) {
|
5
|
+
// Get the color config from the theme.
|
6
|
+
$color-config: mat.get-color-config($theme);
|
7
|
+
|
8
|
+
// Get the primary color palette from the color-config.
|
9
|
+
$primary-palette: map.get($color-config, 'primary');
|
10
|
+
$accent-palette: map.get($color-config, 'accent');
|
11
|
+
$warn-palette: map.get($color-config, 'warn');
|
12
|
+
$darkMode: map.get($color-config, 'is-dark');
|
13
|
+
|
14
|
+
$submit-palette: $primary-palette;
|
15
|
+
@if ($darkMode) {
|
16
|
+
$submit-palette: $accent-palette;
|
17
|
+
}
|
18
|
+
|
19
|
+
|
20
|
+
.highlight {
|
21
|
+
color: mat.get-color-from-palette($primary-palette, '600-contrast');
|
22
|
+
background-color: mat.get-color-from-palette($primary-palette, 600);
|
23
|
+
}
|
24
|
+
|
25
|
+
#editor-submit-button {
|
26
|
+
color: mat.get-color-from-palette($submit-palette, '600-contrast');
|
27
|
+
background-color: mat.get-color-from-palette($submit-palette, 600);
|
28
|
+
}
|
29
|
+
|
30
|
+
|
31
|
+
#editor-submit-button:hover {
|
32
|
+
color: mat.get-color-from-palette($submit-palette, '900-contrast');
|
33
|
+
background-color: mat.get-color-from-palette($submit-palette, 900);
|
34
|
+
}
|
35
|
+
|
36
|
+
#editor-submit-button:active {
|
37
|
+
color: mat.get-color-from-palette($submit-palette, '400-contrast');
|
38
|
+
background-color: mat.get-color-from-palette($submit-palette, 400);
|
39
|
+
}
|
40
|
+
|
41
|
+
#editor-delete-button {
|
42
|
+
color: mat.get-color-from-palette($warn-palette, '600-contrast');
|
43
|
+
background-color: mat.get-color-from-palette($warn-palette, 600);
|
44
|
+
}
|
45
|
+
|
46
|
+
#editor-delete-button:hover {
|
47
|
+
color: mat.get-color-from-palette($warn-palette, '900-contrast');
|
48
|
+
background-color: mat.get-color-from-palette($warn-palette, 900);
|
49
|
+
}
|
50
|
+
|
51
|
+
#editor-delete-button:active {
|
52
|
+
color: mat.get-color-from-palette($warn-palette, '400-contrast');
|
53
|
+
background-color: mat.get-color-from-palette($warn-palette, 400);
|
54
|
+
}
|
55
|
+
|
56
|
+
|
57
|
+
}
|
58
|
+
|
59
|
+
@mixin typography($theme) {
|
60
|
+
// Get the typography config from the theme.
|
61
|
+
$typography-config: mat.get-typography-config($theme);
|
62
|
+
|
63
|
+
}
|
64
|
+
|
65
|
+
@mixin theme($theme) {
|
66
|
+
$color-config: mat.get-color-config($theme);
|
67
|
+
@if $color-config != null {
|
68
|
+
@include color($theme);
|
69
|
+
}
|
70
|
+
|
71
|
+
$typography-config: mat.get-typography-config($theme);
|
72
|
+
@if $typography-config != null {
|
73
|
+
@include typography($theme);
|
74
|
+
}
|
75
|
+
}
|
package/src/lib/ngx-mat-tui-calendar-wrapper/ngx-mat-tui-calendar-wrapper.component.theme.scss
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
@use 'sass:map';
|
2
|
+
@use '~@angular/material' as mat;
|
3
|
+
|
4
|
+
@mixin color($theme) {
|
5
|
+
// Get the color config from the theme.
|
6
|
+
$color-config: mat.get-color-config($theme);
|
7
|
+
|
8
|
+
// Get the primary color palette from the color-config.
|
9
|
+
$primary-palette: map.get($color-config, 'primary');
|
10
|
+
$accent-palette: map.get($color-config, 'accent');
|
11
|
+
$warn-palette: map.get($color-config, 'warn');
|
12
|
+
$darkMode: map.get($color-config, 'is-dark');
|
13
|
+
|
14
|
+
.my-class {
|
15
|
+
background-color: mat.get-color-from-palette($primary-palette, 900);
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
@mixin typography($theme) {
|
20
|
+
// Get the typography config from the theme.
|
21
|
+
$typography-config: mat.get-typography-config($theme);
|
22
|
+
|
23
|
+
.my-class {
|
24
|
+
font-family: mat.font-family($typography-config);
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
@mixin theme($theme) {
|
29
|
+
$color-config: mat.get-color-config($theme);
|
30
|
+
@if $color-config != null {
|
31
|
+
@include color($theme);
|
32
|
+
}
|
33
|
+
|
34
|
+
$typography-config: mat.get-typography-config($theme);
|
35
|
+
@if $typography-config != null {
|
36
|
+
@include typography($theme);
|
37
|
+
}
|
38
|
+
}
|
@@ -0,0 +1,112 @@
|
|
1
|
+
@use 'sass:map';
|
2
|
+
@use '~@angular/material' as mat;
|
3
|
+
@use 'ngx-mat-tui-calendar-editor-dialog/ngx-mat-tui-calendar-editor-dialog.component.theme.scss' as tui-calendar-popup;
|
4
|
+
@use 'ngx-mat-tui-calendar-wrapper/ngx-mat-tui-calendar-wrapper.component.theme.scss' as tui-calendar-wrapper;
|
5
|
+
|
6
|
+
|
7
|
+
|
8
|
+
@function rgba-to-rgb($rgba, $background: #fff) {
|
9
|
+
@return mix(rgb(red($rgba), green($rgba), blue($rgba)), $background, alpha($rgba) * 100%);
|
10
|
+
}
|
11
|
+
|
12
|
+
@mixin color($theme) {
|
13
|
+
// Get the color config from the theme.
|
14
|
+
$color-config: mat.get-color-config($theme);
|
15
|
+
|
16
|
+
// Get the primary color palette from the color-config.
|
17
|
+
$primary-palette: map.get($color-config, 'primary');
|
18
|
+
$accent-palette: map.get($color-config, 'accent');
|
19
|
+
$warn-palette: map.get($color-config, 'warn');
|
20
|
+
$darkMode: map.get($color-config, 'is-dark');
|
21
|
+
$foreground-palette: map.get($color-config, foreground);
|
22
|
+
$background-palette: map.get($color-config, background);
|
23
|
+
$background-color: mat.get-color-from-palette($background-palette, dialog);
|
24
|
+
$divider-color: rgba-to-rgb(mat.get-color-from-palette($foreground-palette, divider), $background-color);
|
25
|
+
|
26
|
+
#theme-primary {
|
27
|
+
color: mat.get-color-from-palette($primary-palette);
|
28
|
+
}
|
29
|
+
#theme-highlight {
|
30
|
+
@if($darkMode) {
|
31
|
+
color: mat.get-color-from-palette($accent-palette);
|
32
|
+
} @else {
|
33
|
+
color: mat.get-color-from-palette($primary-palette);
|
34
|
+
}
|
35
|
+
}
|
36
|
+
#theme-primary-shaded {
|
37
|
+
@if($darkMode) {
|
38
|
+
color: rgba(mat.get-color-from-palette($primary-palette), 0.5);
|
39
|
+
} @else {
|
40
|
+
color: rgba(mat.get-color-from-palette($primary-palette), 0.05);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
#theme-accent {
|
44
|
+
color: mat.get-color-from-palette($accent-palette);
|
45
|
+
}
|
46
|
+
#theme-warn {
|
47
|
+
color: mat.get-color-from-palette($warn-palette);
|
48
|
+
}
|
49
|
+
#theme-foreground {
|
50
|
+
color: mat.get-color-from-palette($foreground-palette, text);
|
51
|
+
}
|
52
|
+
#theme-divider {
|
53
|
+
color: $divider-color;
|
54
|
+
}
|
55
|
+
#theme-background {
|
56
|
+
color: $background-color;
|
57
|
+
}
|
58
|
+
|
59
|
+
.mat-button.navigation-button:hover {
|
60
|
+
background-color: mat.get-color-from-palette($primary-palette, 900);
|
61
|
+
}
|
62
|
+
|
63
|
+
.mat-button.navigation-button:active {
|
64
|
+
color: mat.get-color-from-palette($accent-palette);
|
65
|
+
}
|
66
|
+
|
67
|
+
.mat-button-toggle.view-button {
|
68
|
+
color: mat.get-color-from-palette($primary-palette, '700-contrast');
|
69
|
+
background-color: mat.get-color-from-palette($primary-palette, 700);
|
70
|
+
}
|
71
|
+
|
72
|
+
.mat-button-toggle.view-button:hover {
|
73
|
+
background-color: mat.get-color-from-palette($primary-palette, 900);
|
74
|
+
}
|
75
|
+
|
76
|
+
.mat-button-toggle-checked.view-button {
|
77
|
+
color: mat.get-color-from-palette($accent-palette, '700-contrast');
|
78
|
+
background-color: mat.get-color-from-palette($accent-palette, 700);
|
79
|
+
}
|
80
|
+
|
81
|
+
.mat-button-toggle-checked.view-button:hover {
|
82
|
+
color: mat.get-color-from-palette($accent-palette, '700-contrast');
|
83
|
+
background-color: mat.get-color-from-palette($accent-palette, 900);
|
84
|
+
}
|
85
|
+
|
86
|
+
|
87
|
+
}
|
88
|
+
|
89
|
+
@mixin typography($theme) {
|
90
|
+
// Get the typography config from the theme.
|
91
|
+
$typography-config: mat.get-typography-config($theme);
|
92
|
+
|
93
|
+
.event-calendar-title {
|
94
|
+
font-family: mat.font-family($typography-config);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
@mixin theme($theme) {
|
99
|
+
$color-config: mat.get-color-config($theme);
|
100
|
+
@if $color-config != null {
|
101
|
+
@include color($theme);
|
102
|
+
}
|
103
|
+
|
104
|
+
$typography-config: mat.get-typography-config($theme);
|
105
|
+
@if $typography-config != null {
|
106
|
+
@include typography($theme);
|
107
|
+
}
|
108
|
+
|
109
|
+
@include tui-calendar-popup.theme($theme);
|
110
|
+
@include tui-calendar-wrapper.theme($theme);
|
111
|
+
|
112
|
+
}
|