@dontdrinkandroot/ngx-material-extensions 0.2.1 → 0.2.3
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/_extensions.scss +89 -0
- package/_index.scss +4 -153
- package/_theme.scss +16 -0
- package/_utilities.scss +41 -0
- package/_variables.scss +42 -0
- package/package.json +1 -1
package/_extensions.scss
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
html, body {
|
|
2
|
+
height: 100%;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
body {
|
|
6
|
+
margin: 0;
|
|
7
|
+
font-family: Roboto, "Helvetica Neue", sans-serif;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.mat-raised-button {
|
|
11
|
+
text-transform: uppercase;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.mat-sidenav-container {
|
|
15
|
+
|
|
16
|
+
ddr-mat-sidenav-toggle {
|
|
17
|
+
margin-right: .5rem;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.side {
|
|
21
|
+
ddr-mat-sidenav-toggle {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.mat-sidenav-content {
|
|
26
|
+
.mat-toolbar {
|
|
27
|
+
transition-duration: 400ms;
|
|
28
|
+
transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
29
|
+
transition-property: left, width;
|
|
30
|
+
left: $ddr-mat-sidenav-width;
|
|
31
|
+
width: calc(100vw - #{$ddr-mat-sidenav-width});
|
|
32
|
+
z-index: 99;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.mat-sidenav {
|
|
38
|
+
min-width: $ddr-mat-sidenav-width;
|
|
39
|
+
z-index: 100;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.mat-sidenav-content {
|
|
43
|
+
|
|
44
|
+
padding-top: $ddr-mat-toolbar-height;
|
|
45
|
+
min-height: calc(100vh - #{$ddr-mat-toolbar-height});
|
|
46
|
+
|
|
47
|
+
.mat-toolbar {
|
|
48
|
+
position: fixed;
|
|
49
|
+
left: 0;
|
|
50
|
+
top: 0;
|
|
51
|
+
z-index: 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@media (min-width: $ddr-breakpoint-sm) {
|
|
55
|
+
padding-top: $ddr-mat-toolbar-height-sm-up;
|
|
56
|
+
min-height: calc(100vh - #{$ddr-mat-toolbar-height-sm-up});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.ddr-mat-fab-container {
|
|
62
|
+
|
|
63
|
+
height: $ddr-mat-fab-height;
|
|
64
|
+
|
|
65
|
+
.mat-fab {
|
|
66
|
+
position: fixed !important;
|
|
67
|
+
right: 0;
|
|
68
|
+
bottom: 0;
|
|
69
|
+
margin-right: 1rem !important;
|
|
70
|
+
margin-bottom: 1rem !important;
|
|
71
|
+
z-index: 2;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.mat-toolbar {
|
|
76
|
+
|
|
77
|
+
@extend .mat-elevation-z1;
|
|
78
|
+
|
|
79
|
+
.spacer {
|
|
80
|
+
flex: 1 1 auto;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.mat-card {
|
|
85
|
+
.mat-list-item-content {
|
|
86
|
+
padding-left: 0 !important;
|
|
87
|
+
padding-right: 0 !important;
|
|
88
|
+
}
|
|
89
|
+
}
|
package/_index.scss
CHANGED
|
@@ -1,153 +1,4 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
@
|
|
4
|
-
|
|
5
|
-
$ddr-mat-primary: mat.define-palette(mat.$blue-palette, 700, 300, 900) !default;
|
|
6
|
-
$ddr-mat-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400) !default;
|
|
7
|
-
$ddr-mat-warn: mat.define-palette(mat.$red-palette) !default;
|
|
8
|
-
$ddr-mat-theme: mat.define-light-theme($ddr-mat-primary, $ddr-mat-accent, $ddr-mat-warn) !default;
|
|
9
|
-
|
|
10
|
-
@include mat.all-component-themes($ddr-mat-theme);
|
|
11
|
-
|
|
12
|
-
//
|
|
13
|
-
// Theme vars
|
|
14
|
-
//
|
|
15
|
-
$ddr-mat-fab-height: 88px !default;
|
|
16
|
-
$ddr-mat-sidenav-width: 300px !default;
|
|
17
|
-
$ddr-mat-toolbar-height: 56px !default;
|
|
18
|
-
$ddr-mat-toolbar-height-sm-up: 64px !default;
|
|
19
|
-
$ddr-breakpoint-sm: 600px;
|
|
20
|
-
|
|
21
|
-
html, body {
|
|
22
|
-
height: 100%;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
body {
|
|
26
|
-
margin: 0;
|
|
27
|
-
font-family: Roboto, "Helvetica Neue", sans-serif;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
//
|
|
31
|
-
// Utilities
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
.d-flex {
|
|
35
|
-
display: flex !important;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.flex-row {
|
|
39
|
-
flex-direction: row !important;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.flex-column {
|
|
43
|
-
flex-direction: column !important;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.d-grid {
|
|
47
|
-
display: grid !important;
|
|
48
|
-
grid-gap: 1rem;
|
|
49
|
-
|
|
50
|
-
&.equal-columns {
|
|
51
|
-
grid-auto-columns: minmax(0, 1fr);
|
|
52
|
-
grid-auto-flow: column;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.p-3 {
|
|
57
|
-
padding: 1rem;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.mb-0 {
|
|
61
|
-
margin-bottom: 0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.mb-3 {
|
|
65
|
-
margin-bottom: 1rem;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.text-center {
|
|
69
|
-
text-align: center;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
//
|
|
73
|
-
// Extensions
|
|
74
|
-
//
|
|
75
|
-
|
|
76
|
-
.mat-raised-button {
|
|
77
|
-
text-transform: uppercase;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.mat-sidenav-container {
|
|
81
|
-
|
|
82
|
-
ddr-mat-sidenav-toggle {
|
|
83
|
-
margin-right: 1rem;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
&.side {
|
|
87
|
-
ddr-mat-sidenav-toggle {
|
|
88
|
-
display: none;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.mat-sidenav-content {
|
|
92
|
-
.mat-toolbar {
|
|
93
|
-
transition-duration: 400ms;
|
|
94
|
-
transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
95
|
-
transition-property: left, width;
|
|
96
|
-
left: $ddr-mat-sidenav-width;
|
|
97
|
-
width: calc(100vw - #{$ddr-mat-sidenav-width});
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
.mat-sidenav {
|
|
103
|
-
min-width: $ddr-mat-sidenav-width;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.mat-sidenav-content {
|
|
107
|
-
|
|
108
|
-
padding-top: $ddr-mat-toolbar-height;
|
|
109
|
-
min-height: calc(100vh - #{$ddr-mat-toolbar-height});
|
|
110
|
-
|
|
111
|
-
.mat-toolbar {
|
|
112
|
-
position: fixed;
|
|
113
|
-
left: 0;
|
|
114
|
-
top: 0;
|
|
115
|
-
z-index: 1;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
@media (min-width: $ddr-breakpoint-sm) {
|
|
119
|
-
padding-top: $ddr-mat-toolbar-height-sm-up;
|
|
120
|
-
min-height: calc(100vh - #{$ddr-mat-toolbar-height-sm-up});
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.ddr-mat-fab-container {
|
|
126
|
-
|
|
127
|
-
height: $ddr-mat-fab-height;
|
|
128
|
-
|
|
129
|
-
.mat-fab {
|
|
130
|
-
position: fixed !important;
|
|
131
|
-
right: 0;
|
|
132
|
-
bottom: 0;
|
|
133
|
-
margin-right: 1rem !important;
|
|
134
|
-
margin-bottom: 1rem !important;
|
|
135
|
-
z-index: 2;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.mat-toolbar {
|
|
140
|
-
|
|
141
|
-
@extend .mat-elevation-z1;
|
|
142
|
-
|
|
143
|
-
.spacer {
|
|
144
|
-
flex: 1 1 auto;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.mat-card {
|
|
149
|
-
.mat-list-item-content {
|
|
150
|
-
padding-left: 0 !important;
|
|
151
|
-
padding-right: 0 !important;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
1
|
+
@import "variables";
|
|
2
|
+
@import "theme";
|
|
3
|
+
@import "extensions";
|
|
4
|
+
@import "utilities";
|
package/_theme.scss
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@use '@angular/material' as mat;
|
|
2
|
+
|
|
3
|
+
@include mat.core();
|
|
4
|
+
|
|
5
|
+
$ddr-mat-primary: mat.define-palette(mat.$blue-palette, 700, 600, 800) !default;
|
|
6
|
+
$ddr-mat-accent: mat.define-palette(mat.$pink-palette) !default;
|
|
7
|
+
$ddr-mat-warn: mat.define-palette(mat.$red-palette) !default;
|
|
8
|
+
|
|
9
|
+
$ddr-mat-light-theme: mat.define-light-theme($ddr-mat-primary, $ddr-mat-accent, $ddr-mat-warn) !default;
|
|
10
|
+
$ddr-mat-dark-theme: mat.define-dark-theme($ddr-mat-primary, $ddr-mat-accent, $ddr-mat-warn) !default;
|
|
11
|
+
|
|
12
|
+
@include mat.all-component-themes($ddr-mat-light-theme);
|
|
13
|
+
|
|
14
|
+
@media (prefers-color-scheme: dark) {
|
|
15
|
+
@include mat.all-component-themes($ddr-mat-dark-theme);
|
|
16
|
+
}
|
package/_utilities.scss
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.d-flex {
|
|
2
|
+
display: flex !important;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.flex-row {
|
|
6
|
+
flex-direction: row !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.flex-column {
|
|
10
|
+
flex-direction: column !important;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.d-grid {
|
|
14
|
+
display: grid !important;
|
|
15
|
+
grid-gap: 1rem;
|
|
16
|
+
|
|
17
|
+
&.equal-columns {
|
|
18
|
+
grid-auto-columns: minmax(0, 1fr);
|
|
19
|
+
grid-auto-flow: column;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@each $prefix, $property in $ddr-paddings {
|
|
24
|
+
@each $suffix, $size in $ddr-spacers {
|
|
25
|
+
.#{$prefix}-#{$suffix} {
|
|
26
|
+
#{$property}: #{$size} !important;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@each $prefix, $property in $ddr-margins {
|
|
32
|
+
@each $suffix, $size in $ddr-spacers {
|
|
33
|
+
.#{$prefix}-#{$suffix} {
|
|
34
|
+
#{$property}: #{$size} !important;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.text-center {
|
|
40
|
+
text-align: center !important;
|
|
41
|
+
}
|
package/_variables.scss
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
$ddr-spacer: 1rem !default;
|
|
2
|
+
$ddr-spacers: (
|
|
3
|
+
0: 0,
|
|
4
|
+
1: $ddr-spacer * .25,
|
|
5
|
+
2: $ddr-spacer * .5,
|
|
6
|
+
3: $ddr-spacer,
|
|
7
|
+
4: $ddr-spacer * 1.5,
|
|
8
|
+
5: $ddr-spacer * 3,
|
|
9
|
+
) !default;
|
|
10
|
+
|
|
11
|
+
$ddr-paddings: (
|
|
12
|
+
'p': 'padding',
|
|
13
|
+
'ps': 'padding-left',
|
|
14
|
+
'pe': 'padding-right',
|
|
15
|
+
'pt': 'padding-top',
|
|
16
|
+
'pb': 'padding-bottom'
|
|
17
|
+
) !default;
|
|
18
|
+
|
|
19
|
+
$ddr-margins: (
|
|
20
|
+
'm': 'margin',
|
|
21
|
+
'ms': 'margin-left',
|
|
22
|
+
'me': 'margin-right',
|
|
23
|
+
'mt': 'margin-top',
|
|
24
|
+
'mb': 'margin-bottom'
|
|
25
|
+
) !default;
|
|
26
|
+
|
|
27
|
+
$ddr-mat-fab-height: 88px !default;
|
|
28
|
+
$ddr-mat-sidenav-width: 300px !default;
|
|
29
|
+
$ddr-mat-toolbar-height: 56px !default;
|
|
30
|
+
$ddr-mat-toolbar-height-sm-up: 64px !default;
|
|
31
|
+
|
|
32
|
+
$ddr-breakpoint-sm: 600px;
|
|
33
|
+
$ddr-breakpoint-md: 960px;
|
|
34
|
+
$ddr-breakpoint-lg: 1280px;
|
|
35
|
+
$ddr-breakpoint-xl: 1920px;
|
|
36
|
+
$ddr-breakpoints: (
|
|
37
|
+
xs: 0,
|
|
38
|
+
sm: $ddr-breakpoint-sm,
|
|
39
|
+
md: $ddr-breakpoint-md,
|
|
40
|
+
lg: $ddr-breakpoint-lg,
|
|
41
|
+
xl: $ddr-breakpoint-xl
|
|
42
|
+
) !default;
|