@dontdrinkandroot/ngx-material-extensions 0.2.2 → 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 -241
- 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,241 +1,4 @@
|
|
|
1
|
-
@
|
|
2
|
-
|
|
3
|
-
@
|
|
4
|
-
|
|
5
|
-
$dark-primary-text: rgba(black, 0.87) !default; // Copied
|
|
6
|
-
$light-primary-text: white !default; // Copied
|
|
7
|
-
|
|
8
|
-
$ddr-primary-palette: (
|
|
9
|
-
50: #e2f1fd,
|
|
10
|
-
100: #b9dcfb,
|
|
11
|
-
200: #8cc7f8,
|
|
12
|
-
300: #5db1f5,
|
|
13
|
-
400: #37a0f4,
|
|
14
|
-
500: #0090f2,
|
|
15
|
-
600: #0282e4,
|
|
16
|
-
700: #0171d1,
|
|
17
|
-
800: #0060bf,
|
|
18
|
-
900: #0041a0,
|
|
19
|
-
A100: #ff80ab,
|
|
20
|
-
A200: #ff4081,
|
|
21
|
-
A400: #f50057,
|
|
22
|
-
A700: #c51162,
|
|
23
|
-
contrast: (
|
|
24
|
-
50: $dark-primary-text,
|
|
25
|
-
100: $dark-primary-text,
|
|
26
|
-
200: $dark-primary-text,
|
|
27
|
-
300: $dark-primary-text,
|
|
28
|
-
400: $dark-primary-text,
|
|
29
|
-
500: $light-primary-text,
|
|
30
|
-
600: $light-primary-text,
|
|
31
|
-
700: $light-primary-text,
|
|
32
|
-
800: $light-primary-text,
|
|
33
|
-
900: $light-primary-text,
|
|
34
|
-
A100: $dark-primary-text,
|
|
35
|
-
A200: $light-primary-text,
|
|
36
|
-
A400: $light-primary-text,
|
|
37
|
-
A700: $light-primary-text,
|
|
38
|
-
)
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
$ddr-complementary-palette: (
|
|
43
|
-
50: #f9f3e1,
|
|
44
|
-
100: #f1e0b5,
|
|
45
|
-
200: #e8cc84,
|
|
46
|
-
300: #e1b854,
|
|
47
|
-
400: #dca933,
|
|
48
|
-
500: #d89b1b,
|
|
49
|
-
600: #d59014,
|
|
50
|
-
700: #cf820d,
|
|
51
|
-
800: #c97506,
|
|
52
|
-
900: #bf6000,
|
|
53
|
-
A100: #ff80ab,
|
|
54
|
-
A200: #ff4081,
|
|
55
|
-
A400: #f50057,
|
|
56
|
-
A700: #c51162,
|
|
57
|
-
contrast: (
|
|
58
|
-
50: $dark-primary-text,
|
|
59
|
-
100: $dark-primary-text,
|
|
60
|
-
200: $dark-primary-text,
|
|
61
|
-
300: $dark-primary-text,
|
|
62
|
-
400: $dark-primary-text,
|
|
63
|
-
500: $light-primary-text,
|
|
64
|
-
600: $light-primary-text,
|
|
65
|
-
700: $light-primary-text,
|
|
66
|
-
800: $light-primary-text,
|
|
67
|
-
900: $light-primary-text,
|
|
68
|
-
A100: $dark-primary-text,
|
|
69
|
-
A200: $light-primary-text,
|
|
70
|
-
A400: $light-primary-text,
|
|
71
|
-
A700: $light-primary-text,
|
|
72
|
-
)
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
$ddr-mat-primary: mat.define-palette($ddr-primary-palette, 800, 700, 900) !default;
|
|
76
|
-
$ddr-mat-accent: mat.define-palette($ddr-complementary-palette) !default;
|
|
77
|
-
$ddr-mat-warn: mat.define-palette(mat.$red-palette) !default;
|
|
78
|
-
|
|
79
|
-
$ddr-mat-light-theme: mat.define-light-theme($ddr-mat-primary, $ddr-mat-accent, $ddr-mat-warn) !default;
|
|
80
|
-
$ddr-mat-dark-theme: mat.define-dark-theme($ddr-mat-primary, $ddr-mat-accent, $ddr-mat-warn) !default;
|
|
81
|
-
|
|
82
|
-
@include mat.all-component-themes($ddr-mat-light-theme);
|
|
83
|
-
|
|
84
|
-
@media (prefers-color-scheme: dark) {
|
|
85
|
-
@include mat.all-component-themes($ddr-mat-dark-theme);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
//
|
|
89
|
-
// Theme vars
|
|
90
|
-
//
|
|
91
|
-
$ddr-mat-fab-height: 88px !default;
|
|
92
|
-
$ddr-mat-sidenav-width: 300px !default;
|
|
93
|
-
$ddr-mat-toolbar-height: 56px !default;
|
|
94
|
-
$ddr-mat-toolbar-height-sm-up: 64px !default;
|
|
95
|
-
// Breakpoints
|
|
96
|
-
$ddr-breakpoint-sm: 600px;
|
|
97
|
-
$ddr-breakpoint-md: 960px;
|
|
98
|
-
$ddr-breakpoint-lg: 1280px;
|
|
99
|
-
$ddr-breakpoint-xl: 1920px;
|
|
100
|
-
|
|
101
|
-
html, body {
|
|
102
|
-
height: 100%;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
body {
|
|
106
|
-
margin: 0;
|
|
107
|
-
font-family: Roboto, "Helvetica Neue", sans-serif;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
//
|
|
111
|
-
// Utilities
|
|
112
|
-
//
|
|
113
|
-
|
|
114
|
-
.d-flex {
|
|
115
|
-
display: flex !important;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.flex-row {
|
|
119
|
-
flex-direction: row !important;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.flex-column {
|
|
123
|
-
flex-direction: column !important;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.d-grid {
|
|
127
|
-
display: grid !important;
|
|
128
|
-
grid-gap: 1rem;
|
|
129
|
-
|
|
130
|
-
&.equal-columns {
|
|
131
|
-
grid-auto-columns: minmax(0, 1fr);
|
|
132
|
-
grid-auto-flow: column;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.p-3 {
|
|
137
|
-
padding: 1rem;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.mb-0 {
|
|
141
|
-
margin-bottom: 0;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.mb-3 {
|
|
145
|
-
margin-bottom: 1rem;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.me-2 {
|
|
149
|
-
margin-right: .5rem;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.me-3 {
|
|
153
|
-
margin-right: 1rem;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.text-center {
|
|
157
|
-
text-align: center;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
//
|
|
161
|
-
// Extensions
|
|
162
|
-
//
|
|
163
|
-
|
|
164
|
-
.mat-raised-button {
|
|
165
|
-
text-transform: uppercase;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.mat-sidenav-container {
|
|
169
|
-
|
|
170
|
-
ddr-mat-sidenav-toggle {
|
|
171
|
-
margin-right: .5rem;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
&.side {
|
|
175
|
-
ddr-mat-sidenav-toggle {
|
|
176
|
-
display: none;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.mat-sidenav-content {
|
|
180
|
-
.mat-toolbar {
|
|
181
|
-
transition-duration: 400ms;
|
|
182
|
-
transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
183
|
-
transition-property: left, width;
|
|
184
|
-
left: $ddr-mat-sidenav-width;
|
|
185
|
-
width: calc(100vw - #{$ddr-mat-sidenav-width});
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.mat-sidenav {
|
|
191
|
-
min-width: $ddr-mat-sidenav-width;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
.mat-sidenav-content {
|
|
195
|
-
|
|
196
|
-
padding-top: $ddr-mat-toolbar-height;
|
|
197
|
-
min-height: calc(100vh - #{$ddr-mat-toolbar-height});
|
|
198
|
-
|
|
199
|
-
.mat-toolbar {
|
|
200
|
-
position: fixed;
|
|
201
|
-
left: 0;
|
|
202
|
-
top: 0;
|
|
203
|
-
z-index: 1;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
@media (min-width: $ddr-breakpoint-sm) {
|
|
207
|
-
padding-top: $ddr-mat-toolbar-height-sm-up;
|
|
208
|
-
min-height: calc(100vh - #{$ddr-mat-toolbar-height-sm-up});
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
.ddr-mat-fab-container {
|
|
214
|
-
|
|
215
|
-
height: $ddr-mat-fab-height;
|
|
216
|
-
|
|
217
|
-
.mat-fab {
|
|
218
|
-
position: fixed !important;
|
|
219
|
-
right: 0;
|
|
220
|
-
bottom: 0;
|
|
221
|
-
margin-right: 1rem !important;
|
|
222
|
-
margin-bottom: 1rem !important;
|
|
223
|
-
z-index: 2;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.mat-toolbar {
|
|
228
|
-
|
|
229
|
-
@extend .mat-elevation-z1;
|
|
230
|
-
|
|
231
|
-
.spacer {
|
|
232
|
-
flex: 1 1 auto;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.mat-card {
|
|
237
|
-
.mat-list-item-content {
|
|
238
|
-
padding-left: 0 !important;
|
|
239
|
-
padding-right: 0 !important;
|
|
240
|
-
}
|
|
241
|
-
}
|
|
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;
|