Skip to content

Commit a0444d2

Browse files
committed
Updates for V15 MDC controls. Fixed up all contrast colors for controls used in demo. More components may need to be tested.
1 parent 8fb745c commit a0444d2

File tree

11 files changed

+13695
-2189
lines changed

11 files changed

+13695
-2189
lines changed

package-lock.json

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

package.json

Lines changed: 20 additions & 19 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.4",
34-
"@angular/cdk": "^15.0.4",
35-
"@angular/common": "^15.0.4",
36-
"@angular/compiler": "^15.0.4",
37-
"@angular/core": "^15.0.4",
38-
"@angular/forms": "^15.0.4",
39-
"@angular/material": "^15.0.4",
40-
"@angular/platform-browser": "^15.0.4",
41-
"@angular/platform-browser-dynamic": "^15.0.4",
42-
"@angular/router": "^15.0.4",
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",
4344
"@ctrl/tinycolor": "^3.5.0",
4445
"ngx-color-picker": "^13.0.0",
4546
"rxjs": "~7.8.0",
46-
"tslib": "^2.4.1",
47+
"tslib": "^2.5.0",
4748
"zone.js": "~0.12.0"
4849
},
4950
"devDependencies": {
50-
"@angular-devkit/build-angular": "^15.0.5",
51-
"@angular/cli": "^15.0.5",
52-
"@angular/compiler-cli": "^15.0.4",
53-
"@angular/language-service": "^15.0.4",
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",
5455
"@types/jasmine": "^4.3.1",
5556
"@types/jasminewd2": "^2.0.10",
5657
"@types/node": "^18.11.18",
5758
"codelyzer": "^6.0.2",
5859
"copyfiles": "^2.4.1",
59-
"gh-pages": "^4.0.0",
60+
"gh-pages": "^5.0.0",
6061
"jasmine-core": "^4.5.0",
6162
"jasmine-spec-reporter": "^7.0.0",
6263
"karma": "^6.4.1",
6364
"karma-chrome-launcher": "~3.1.1",
6465
"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.3",
68+
"ng-packagr": "^15.1.1",
6869
"npm-run-all": "^4.1.5",
6970
"protractor": "~7.0.0",
7071
"ts-node": "^10.9.1",
7172
"tslint": "~6.1.3",
72-
"typescript": "~4.8.4"
73+
"typescript": "~4.9.4"
7374
}
7475
}

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,23 @@
3434
@return $string;
3535
}
3636

37-
@function _mat-css-hex-to-rgb($color) {
37+
@function _mat-css-hex-to-rgb($color, $rgb-wrap: true) {
3838
@if ($color == null) {
3939
@return null;
4040
}
41+
@if ($rgb-wrap) {
42+
@return rgb(red($color), green($color), blue($color));
43+
}
4144
@return red($color), green($color), blue($color);
4245
}
4346

44-
@function _mat-css-hex-to-rgba($color) {
47+
@function _mat-css-hex-to-rgba($color, $rgb-wrap: true) {
4548
@if ($color == null) {
4649
@return null;
4750
}
51+
@if ($rgb-wrap) {
52+
@return rgba(red($color), green($color), blue($color), alpha($color));
53+
}
4854
@return red($color), green($color), blue($color), alpha($color);
4955
}
5056

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

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@use '@angular/material'as mat;
1+
@use '@angular/material' as mat;
22
@import '@angular/material/theming';
33
@import 'variables';
44
@import 'internal-helper';
@@ -16,33 +16,35 @@
1616
@mixin init-mat-theme($dark-theme-selector, $typography-config: mat.define-typography-config()) {
1717
@include mat.core();
1818

19-
$primary: mat.define-palette($mat-css-palette-primary);
20-
$accent: mat.define-palette($mat-css-palette-accent);
21-
$warn: mat.define-palette($mat-css-palette-warn);
19+
$palette-primary: mat.define-palette($mat-css-palette-primary);
20+
$palette-accent: mat.define-palette($mat-css-palette-accent);
21+
$palette-warn: mat.define-palette($mat-css-palette-warn);
2222

23-
$theme: mat.define-light-theme((
23+
$theme: (
2424
color: (
25-
primary: $primary,
26-
accent: $accent,
27-
warn: $warn,
25+
primary: $palette-primary,
26+
accent: $palette-accent,
27+
warn: $palette-warn,
28+
is-dark: false,
2829
foreground: $mat-css-palette-foreground,
29-
background: $mat-css-palette-background
30+
background: $mat-css-palette-background,
3031
),
3132
typography: $typography-config,
32-
density: 0
33-
));
33+
density: 0,
34+
);
3435

35-
$dark-theme: mat.define-dark-theme((
36+
$dark-theme: (
3637
color: (
37-
primary: $primary,
38-
accent: $accent,
39-
warn: $warn,
38+
primary: $palette-primary,
39+
accent: $palette-accent,
40+
warn: $palette-warn,
41+
is-dark: true,
4042
foreground: $mat-css-palette-foreground-dark,
41-
background: $mat-css-palette-background-dark
43+
background: $mat-css-palette-background-dark,
4244
),
4345
typography: $typography-config,
44-
density: 0
45-
));
46+
density: 0,
47+
);
4648

4749
// set global variable so passed-in content can use the theme
4850
$mat-css-theme: $theme !global;

0 commit comments

Comments
 (0)