File tree Expand file tree Collapse file tree 5 files changed +31
-11
lines changed Expand file tree Collapse file tree 5 files changed +31
-11
lines changed Original file line number Diff line number Diff line change 1- @use ' @angular/material' as mat ;
2-
3- mat .$theme-ignore-duplication-warnings : true;
1+ @use " @angular/material" as mat ;
2+ @use " ../../ng-mat-components" as fs-components ;
43
54body {
65 margin : 0 ;
1615}
1716
1817@include mat .core ();
19- @import " ../../ng-mat-components/src/fs-mat-components-theme.scss " ;
18+ @import " ../../ng-mat-components" ;
2019
2120// Define a light theme
2221$light-primary : mat .define-palette (mat .$indigo-palette );
@@ -44,13 +43,13 @@ $dark-theme: mat.define-dark-theme(
4443
4544// Apply the dark theme by default
4645@include mat .all-component-themes ($dark-theme );
47- @include fs-mat- components-theme ($dark-theme );
46+ @include fs-components . all-component-themes ($dark-theme );
4847
4948// Apply the light theme only when the `.my-light-theme` CSS class is applied
5049// to an ancestor element of the components (such as `body`).
5150.my-light-theme {
52- @include mat .all-component-themes ($light-theme );
53- @include fs-mat- components-theme ($light-theme );
51+ @include mat .all-component-colors ($light-theme );
52+ @include fs-components . all-component-themes ($light-theme );
5453}
5554
5655.mat-form-field :not (.mat-form-field-has-label ) .mat-form-field-infix {
@@ -66,4 +65,3 @@ $dark-theme: mat.define-dark-theme(
6665.mat-form-field-label-wrapper {
6766 padding-top : 0px ;
6867}
69-
Original file line number Diff line number Diff line change 1+ @use " sass:color" ;
2+ @use " sass:map" ;
3+
4+ @use ' ./theming' ;
5+
6+ @forward " ./_theming.scss" show all-component-themes ;
7+
8+ @mixin all-component-themes ($theme-or-color-config ) {
9+ @include theming .theme ($theme-or-color-config );
10+ }
Original file line number Diff line number Diff line change 22@import " ~@angular/material/theming" ;
33
44// Define a mixin that accepts a theme and outputs the color styles for the component.
5- @mixin fs-mat-components- theme ($theme ) {
5+ @mixin theme ($theme ) {
66 // Extract whichever individual palettes you need from the theme.
77 $primary : map-get ($theme , primary );
88 $accent : map-get ($theme , accent );
Original file line number Diff line number Diff line change 55 "entryFile" : " src/public-api.ts"
66 },
77 "assets" : [
8- " ./fs-mat-components-theme.scss"
8+ " ./_index.scss" ,
9+ " ./_theming.scss"
910 ]
1011}
Original file line number Diff line number Diff line change 66 "@angular/common" : " ^13.0.0" ,
77 "@angular/core" : " ^13.0.0" ,
88 "moment" : " ^2.29.0" ,
9- "@angular/material" : " >= 13.0.0"
9+ "@angular/material" : " ^ 13.0.0"
1010 },
1111 "dependencies" : {
1212 "tslib" : " ^2.3.0"
2424 },
2525 "bugs" : {
2626 "url" : " https://github.com/fullstack-devops/ng-mat-components/issues"
27+ },
28+ "exports" : {
29+ "." : {
30+ "sass" : " ./_index.scss"
31+ },
32+ "./theming" : {
33+ "sass" : " ./_theming.scss"
34+ },
35+ "./_theming" : {
36+ "sass" : " ./_theming.scss"
37+ }
2738 }
2839}
You can’t perform that action at this time.
0 commit comments