Skip to content

Commit 3401629

Browse files
committed
main - 663585a feat(material/card): support filled variant (#29868)
1 parent 41b8aa6 commit 3401629

18 files changed

+32
-16
lines changed

card/_m2-card.scss

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ $prefix: (mat, card);
1212
@return (
1313
elevated-container-shape: 4px,
1414
outlined-container-shape: 4px,
15+
filled-container-shape: 4px,
1516
outlined-outline-width: 1px,
1617
);
1718
}
@@ -25,6 +26,8 @@ $prefix: (mat, card);
2526
outlined-container-elevation: elevation.get-box-shadow(0),
2627
outlined-outline-color: rgba(inspection.get-theme-color($theme, foreground, base), 0.12),
2728
subtitle-text-color: inspection.get-theme-color($theme, foreground, secondary-text),
29+
filled-container-color: inspection.get-theme-color($theme, background, card),
30+
filled-container-elevation: elevation.get-box-shadow(0)
2831
);
2932
}
3033

card/_m3-card.scss

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ $prefix: (mat, card);
2525
outlined-container-shape: map.get($systems, md-sys-shape, corner-medium),
2626
outlined-outline-color: map.get($systems, md-sys-color, outline-variant),
2727
outlined-outline-width: if($exclude-hardcoded, null, 1px),
28+
filled-container-color: map.get($systems, md-sys-color, surface-container-highest),
29+
filled-container-elevation: map.get($systems, md-sys-elevation, level0),
30+
filled-container-shape: map.get($systems, md-sys-shape, corner-medium),
2831
),
2932
);
3033

card/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { InjectionToken } from '@angular/core';
33
import { M as MatCommonModule } from '../common-module.d-C8xzHJDr.js';
44
import '@angular/cdk/bidi';
55

6-
type MatCardAppearance = 'outlined' | 'raised';
6+
type MatCardAppearance = 'outlined' | 'raised' | 'filled';
77
/** Object that can be used to configure the default options for the card module. */
88
interface MatCardConfig {
99
/** Default appearance for cards. */

fesm2022/card.mjs

+4-2
Large diffs are not rendered by default.

fesm2022/card.mjs.map

+1-1
Large diffs are not rendered by default.

npm_package/card/_m2-card.scss

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ $prefix: (mat, card);
1212
@return (
1313
elevated-container-shape: 4px,
1414
outlined-container-shape: 4px,
15+
filled-container-shape: 4px,
1516
outlined-outline-width: 1px,
1617
);
1718
}
@@ -25,6 +26,8 @@ $prefix: (mat, card);
2526
outlined-container-elevation: elevation.get-box-shadow(0),
2627
outlined-outline-color: rgba(inspection.get-theme-color($theme, foreground, base), 0.12),
2728
subtitle-text-color: inspection.get-theme-color($theme, foreground, secondary-text),
29+
filled-container-color: inspection.get-theme-color($theme, background, card),
30+
filled-container-elevation: elevation.get-box-shadow(0)
2831
);
2932
}
3033

npm_package/card/_m3-card.scss

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ $prefix: (mat, card);
2525
outlined-container-shape: map.get($systems, md-sys-shape, corner-medium),
2626
outlined-outline-color: map.get($systems, md-sys-color, outline-variant),
2727
outlined-outline-width: if($exclude-hardcoded, null, 1px),
28+
filled-container-color: map.get($systems, md-sys-color, surface-container-highest),
29+
filled-container-elevation: map.get($systems, md-sys-elevation, level0),
30+
filled-container-shape: map.get($systems, md-sys-shape, corner-medium),
2831
),
2932
);
3033

npm_package/card/index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { InjectionToken } from '@angular/core';
33
import { M as MatCommonModule } from '../common-module.d-C8xzHJDr.js';
44
import '@angular/cdk/bidi';
55

6-
type MatCardAppearance = 'outlined' | 'raised';
6+
type MatCardAppearance = 'outlined' | 'raised' | 'filled';
77
/** Object that can be used to configure the default options for the card module. */
88
interface MatCardConfig {
99
/** Default appearance for cards. */

npm_package/fesm2022/card.mjs

+4-2
Large diffs are not rendered by default.

npm_package/fesm2022/card.mjs.map

+1-1
Large diffs are not rendered by default.

npm_package/prebuilt-themes/deeppurple-amber.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm_package/prebuilt-themes/indigo-pink.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm_package/prebuilt-themes/pink-bluegrey.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm_package/prebuilt-themes/purple-green.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

prebuilt-themes/deeppurple-amber.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

prebuilt-themes/indigo-pink.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

prebuilt-themes/pink-bluegrey.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

prebuilt-themes/purple-green.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)