Skip to content

Commit 3a9a57c

Browse files
committed
merge MDC changes
2 parents e305e78 + 209beaf commit 3a9a57c

File tree

11 files changed

+840
-306
lines changed

11 files changed

+840
-306
lines changed

package-lock.json

Lines changed: 47 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -27,48 +27,49 @@
2727
"minor-release": "npm run minor-release_",
2828
"major-release_": "run-s lib demo major pub",
2929
"major-release": "npm run major-release_",
30-
"dryBuild": "run-s lib demo"
30+
"dryBuild": "run-s lib demo",
31+
"update": "npx npm-check-updates -u"
3132
},
3233
"dependencies": {
33-
"@angular/animations": "^15.0.0",
34-
"@angular/cdk": "^15.0.0",
35-
"@angular/common": "^15.0.0",
36-
"@angular/compiler": "^15.0.0",
37-
"@angular/core": "^15.0.0",
38-
"@angular/forms": "^15.0.0",
39-
"@angular/material": "^15.0.0",
40-
"@angular/platform-browser": "^15.0.0",
41-
"@angular/platform-browser-dynamic": "^15.0.0",
42-
"@angular/router": "^15.0.0",
43-
"@ctrl/tinycolor": "^3.4.0",
34+
"@angular/animations": "^15.1.2",
35+
"@angular/cdk": "^15.1.2",
36+
"@angular/common": "^15.1.2",
37+
"@angular/compiler": "^15.1.2",
38+
"@angular/core": "^15.1.2",
39+
"@angular/forms": "^15.1.2",
40+
"@angular/material": "^15.1.2",
41+
"@angular/platform-browser": "^15.1.2",
42+
"@angular/platform-browser-dynamic": "^15.1.2",
43+
"@angular/router": "^15.1.2",
44+
"@ctrl/tinycolor": "^3.5.0",
4445
"ngx-color-picker": "^13.0.0",
45-
"rxjs": "~7.5.7",
46-
"tslib": "^2.3.0",
46+
"rxjs": "~7.8.0",
47+
"tslib": "^2.5.0",
4748
"zone.js": "~0.12.0"
4849
},
4950
"devDependencies": {
50-
"@angular-devkit/build-angular": "^15.0.0",
51-
"@angular/cli": "^15.0.0",
52-
"@angular/compiler-cli": "^15.0.0",
53-
"@angular/language-service": "^15.0.0",
54-
"@types/jasmine": "^4.3.0",
51+
"@angular-devkit/build-angular": "^15.1.3",
52+
"@angular/cli": "^15.1.3",
53+
"@angular/compiler-cli": "^15.1.2",
54+
"@angular/language-service": "^15.1.2",
55+
"@types/jasmine": "^4.3.1",
5556
"@types/jasminewd2": "^2.0.10",
56-
"@types/node": "^18.11.9",
57-
"codelyzer": "^6.0.0",
58-
"copyfiles": "^2.1.1",
59-
"gh-pages": "^4.0.0",
57+
"@types/node": "^18.11.18",
58+
"codelyzer": "^6.0.2",
59+
"copyfiles": "^2.4.1",
60+
"gh-pages": "^5.0.0",
6061
"jasmine-core": "^4.5.0",
6162
"jasmine-spec-reporter": "^7.0.0",
62-
"karma": "^6.3.16",
63-
"karma-chrome-launcher": "~3.1.0",
64-
"karma-coverage-istanbul-reporter": "~3.0.2",
63+
"karma": "^6.4.1",
64+
"karma-chrome-launcher": "~3.1.1",
65+
"karma-coverage-istanbul-reporter": "~3.0.3",
6566
"karma-jasmine": "~5.1.0",
6667
"karma-jasmine-html-reporter": "^2.0.0",
67-
"ng-packagr": "^15.0.0",
68+
"ng-packagr": "^15.1.1",
6869
"npm-run-all": "^4.1.5",
6970
"protractor": "~7.0.0",
70-
"ts-node": "^10.1.0",
71-
"tslint": "~6.1.0",
72-
"typescript": "~4.8.0"
71+
"ts-node": "^10.9.1",
72+
"tslint": "~6.1.3",
73+
"typescript": "~4.9.4"
7374
}
7475
}

projects/material-css-vars/src/lib/_internal-helper.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,26 @@
3434
@return $string;
3535
}
3636

37+
@function _mat-css-hex-to-rgb($color, $rgb-wrap: true) {
38+
@if ($color == null) {
39+
@return null;
40+
}
41+
@if ($rgb-wrap) {
42+
@return rgb(red($color), green($color), blue($color));
43+
}
44+
@return red($color), green($color), blue($color);
45+
}
46+
47+
@function _mat-css-hex-to-rgba($color, $rgb-wrap: true) {
48+
@if ($color == null) {
49+
@return null;
50+
}
51+
@if ($rgb-wrap) {
52+
@return rgba(red($color), green($color), blue($color), alpha($color));
53+
}
54+
@return red($color), green($color), blue($color), alpha($color);
55+
}
56+
3757
@mixin root($varMap: null) {
3858
@at-root :root {
3959
@each $varName, $varValue in $varMap {

projects/material-css-vars/src/lib/_main.scss

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
@use '@angular/material'as mat;
1+
@use '@angular/material' as mat;
22
@use 'internal-helper' as helper;
3-
@use '@angular/material/theming' as theming;
43
@use 'variables' as variables;
4+
@use 'internal-helper';
55
@use 'public-util';
66
// contains main overwrite of `mat-color` to make it all work
7-
// needs to come after '~@angular/material/theming'
7+
// needs to come after '@angular/material'
88
@use 'mat-lib-overwrites' as overwrites;
99

1010
@mixin init-css-vars($default-theme, $text, $default-foreground, $default-background) {
@@ -27,25 +27,31 @@
2727
$accent: mat.define-palette(variables.$palette-accent);
2828
$warn: mat.define-palette(variables.$palette-warn);
2929

30-
$theme: mat.define-light-theme((
30+
$theme: (
3131
color: (
3232
primary: $primary,
3333
accent: $accent,
34-
warn: $warn
34+
warn: $warn,
35+
is-dark: false,
36+
foreground: variables.$palette-foreground,
37+
background: variables.$palette-background,
3538
),
3639
typography: $typography-config,
37-
density: 0
38-
));
40+
density: 0,
41+
);
3942

40-
$dark-theme: mat.define-dark-theme((
43+
$dark-theme: (
4144
color: (
4245
primary: $primary,
4346
accent: $accent,
44-
warn: $warn
47+
warn: $warn,
48+
is-dark: true,
49+
foreground: variables.$palette-foreground-dark,
50+
background: variables.$palette-background-dark,
4551
),
4652
typography: $typography-config,
47-
density: 0
48-
));
53+
density: 0,
54+
);
4955

5056
// set global variable so passed-in content can use the theme
5157
$mat-css-theme: $theme !global; // stays for backwards-compatibility

0 commit comments

Comments
 (0)