@angular/material 18.1.0-next.4 → 18.1.0-rc.0
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/badge/index.d.ts +5 -2
- package/button/_fab-theme.scss +16 -16
- package/button/_icon-button-theme.scss +14 -20
- package/button/index.d.ts +7 -0
- package/card/_card-theme.scss +25 -52
- package/checkbox/index.d.ts +4 -2
- package/chips/_chips-theme.scss +22 -24
- package/core/m2/_typography.scss +5 -2
- package/core/mdc-helpers/_mdc-helpers.scss +2 -2
- package/core/style/_elevation.scss +5 -0
- package/core/tokens/_token-utils.scss +2 -2
- package/core/tokens/m2/mat/_app.scss +1 -2
- package/core/tokens/m2/mat/_autocomplete.scss +2 -2
- package/core/tokens/m2/mat/_datepicker.scss +3 -3
- package/core/tokens/m2/mat/_dialog.scss +2 -2
- package/core/tokens/m2/mat/_fab-small.scss +3 -9
- package/core/tokens/m2/mat/_fab.scss +3 -9
- package/core/tokens/m2/mat/_filled-button.scss +3 -9
- package/core/tokens/m2/mat/_form-field.scss +9 -6
- package/core/tokens/m2/mat/_icon-button.scss +3 -9
- package/core/tokens/m2/mat/_outlined-button.scss +3 -9
- package/core/tokens/m2/mat/_paginator.scss +10 -6
- package/core/tokens/m2/mat/_protected-button.scss +3 -9
- package/core/tokens/m2/mat/_select.scss +2 -2
- package/core/tokens/m2/mat/_sidenav.scss +2 -2
- package/core/tokens/m2/mat/_text-button.scss +3 -9
- package/core/tokens/m2/mdc/_chip.scss +2 -14
- package/core/tokens/m2/mdc/_elevated-card.scss +3 -7
- package/core/tokens/m2/mdc/_extended-fab.scss +12 -8
- package/core/tokens/m2/mdc/_fab-small.scss +15 -13
- package/core/tokens/m2/mdc/_fab.scss +15 -13
- package/core/tokens/m2/mdc/_outlined-card.scss +2 -6
- package/core/tokens/m3/mat/_app.scss +2 -2
- package/core/tokens/m3/mat/_autocomplete.scss +2 -2
- package/core/tokens/m3/mat/_datepicker.scss +3 -3
- package/core/tokens/m3/mat/_select.scss +2 -2
- package/core/tokens/m3/mdc/_chip.scss +1 -4
- package/core/tokens/m3/mdc/_elevated-card.scss +9 -2
- package/core/tokens/m3/mdc/_extended-fab.scss +19 -2
- package/core/tokens/m3/mdc/_fab-small.scss +19 -2
- package/core/tokens/m3/mdc/_fab.scss +19 -2
- package/core/tokens/m3/mdc/_outlined-card.scss +9 -2
- package/datepicker/index.d.ts +8 -4
- package/esm2022/badge/badge.mjs +6 -3
- package/esm2022/button/button-base.mjs +3 -3
- package/esm2022/button/fab.mjs +9 -9
- package/esm2022/button/icon-button.mjs +4 -4
- package/esm2022/card/card.mjs +2 -2
- package/esm2022/checkbox/checkbox-config.mjs +1 -1
- package/esm2022/chips/chip-grid.mjs +2 -2
- package/esm2022/chips/chip-listbox.mjs +2 -2
- package/esm2022/chips/chip-option.mjs +3 -3
- package/esm2022/chips/chip-row.mjs +3 -3
- package/esm2022/chips/chip-set.mjs +2 -2
- package/esm2022/chips/chip.mjs +3 -3
- package/esm2022/core/ripple/ripple-renderer.mjs +21 -3
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/datepicker-base.mjs +6 -4
- package/esm2022/dialog/dialog-container.mjs +3 -3
- package/esm2022/form-field/form-field.mjs +9 -18
- package/esm2022/slide-toggle/slide-toggle.mjs +3 -3
- package/fesm2022/badge.mjs +5 -2
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/button.mjs +14 -14
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card.mjs +2 -2
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips.mjs +12 -12
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +21 -3
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +5 -3
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +2 -2
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/form-field.mjs +8 -17
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +2 -2
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/form-field/_form-field-subscript.scss +2 -2
- package/form-field/_mdc-text-field-structure-overrides.scss +2 -3
- package/form-field/index.d.ts +9 -7
- package/list/_list-option-trailing-avatar-compat.scss +26 -25
- package/package.json +2 -2
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/m3-theme/index_bundled.js +2 -2
- package/schematics/ng-update/index_bundled.js +31 -31
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use 'sass:meta';
|
|
3
|
-
@use '@material/ripple/ripple-theme' as mdc-ripple-theme;
|
|
4
2
|
@use '../../token-utils';
|
|
5
3
|
@use '../../../theming/theming';
|
|
6
4
|
@use '../../../theming/inspection';
|
|
@@ -29,10 +27,6 @@ $prefix: (mat, filled-button);
|
|
|
29
27
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
30
28
|
@function get-color-tokens($theme) {
|
|
31
29
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
32
|
-
$ripple-opacities: if($is-dark,
|
|
33
|
-
mdc-ripple-theme.$light-ink-opacities,
|
|
34
|
-
mdc-ripple-theme.$dark-ink-opacities
|
|
35
|
-
);
|
|
36
30
|
|
|
37
31
|
@return (
|
|
38
32
|
// Color of the element that shows the hover, focus and pressed states.
|
|
@@ -45,13 +39,13 @@ $prefix: (mat, filled-button);
|
|
|
45
39
|
ripple-color: inspection.get-theme-color($theme, foreground, base, 0.1),
|
|
46
40
|
|
|
47
41
|
// Opacity of the ripple when the button is hovered.
|
|
48
|
-
hover-state-layer-opacity:
|
|
42
|
+
hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
|
|
49
43
|
|
|
50
44
|
// Opacity of the ripple when the button is focused.
|
|
51
|
-
focus-state-layer-opacity:
|
|
45
|
+
focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
52
46
|
|
|
53
47
|
// Opacity of the ripple when the button is pressed.
|
|
54
|
-
pressed-state-layer-opacity:
|
|
48
|
+
pressed-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
55
49
|
);
|
|
56
50
|
}
|
|
57
51
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
@use '@material/textfield' as mdc-textfield;
|
|
4
|
-
@use '@material/density' as mdc-density;
|
|
5
4
|
@use '../../token-utils';
|
|
6
5
|
@use '../../../style/sass-utils';
|
|
7
6
|
@use '../../../theming/theming';
|
|
@@ -105,12 +104,16 @@ $prefix: (mat, form-field);
|
|
|
105
104
|
|
|
106
105
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
107
106
|
@function get-density-tokens($theme) {
|
|
108
|
-
$density-scale: theming.clamp-density(inspection.get-theme-density($theme), -
|
|
109
|
-
$
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
$density-scale: theming.clamp-density(inspection.get-theme-density($theme), -5);
|
|
108
|
+
$size-scale: (
|
|
109
|
+
0: 56px,
|
|
110
|
+
-1: 52px,
|
|
111
|
+
-2: 48px,
|
|
112
|
+
-3: 44px,
|
|
113
|
+
-4: 40px,
|
|
114
|
+
-5: 36px,
|
|
113
115
|
);
|
|
116
|
+
$height: map.get($size-scale, $density-scale);
|
|
114
117
|
$hide-label: $height < mdc-textfield.$minimum-height-for-filled-label;
|
|
115
118
|
|
|
116
119
|
// We computed the desired height of the form-field using the density configuration. The
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use 'sass:meta';
|
|
3
|
-
@use '@material/ripple/ripple-theme' as mdc-ripple-theme;
|
|
4
2
|
@use '../../token-utils';
|
|
5
3
|
@use '../../../theming/theming';
|
|
6
4
|
@use '../../../theming/inspection';
|
|
@@ -18,10 +16,6 @@ $prefix: (mat, icon-button);
|
|
|
18
16
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
19
17
|
@function get-color-tokens($theme) {
|
|
20
18
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
21
|
-
$ripple-opacities: if($is-dark,
|
|
22
|
-
mdc-ripple-theme.$light-ink-opacities,
|
|
23
|
-
mdc-ripple-theme.$dark-ink-opacities
|
|
24
|
-
);
|
|
25
19
|
|
|
26
20
|
@return (
|
|
27
21
|
// Color of the element that shows the hover, focus and pressed states.
|
|
@@ -34,13 +28,13 @@ $prefix: (mat, icon-button);
|
|
|
34
28
|
ripple-color: inspection.get-theme-color($theme, foreground, base, 0.1),
|
|
35
29
|
|
|
36
30
|
// Opacity of the ripple when the button is hovered.
|
|
37
|
-
hover-state-layer-opacity:
|
|
31
|
+
hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
|
|
38
32
|
|
|
39
33
|
// Opacity of the ripple when the button is focused.
|
|
40
|
-
focus-state-layer-opacity:
|
|
34
|
+
focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
41
35
|
|
|
42
36
|
// Opacity of the ripple when the button is pressed.
|
|
43
|
-
pressed-state-layer-opacity:
|
|
37
|
+
pressed-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
44
38
|
);
|
|
45
39
|
}
|
|
46
40
|
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use 'sass:meta';
|
|
3
|
-
@use '@material/ripple/ripple-theme' as mdc-ripple-theme;
|
|
4
2
|
@use '../../token-utils';
|
|
5
3
|
@use '../../../theming/theming';
|
|
6
4
|
@use '../../../theming/inspection';
|
|
@@ -28,10 +26,6 @@ $prefix: (mat, outlined-button);
|
|
|
28
26
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
29
27
|
@function get-color-tokens($theme) {
|
|
30
28
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
31
|
-
$ripple-opacities: if($is-dark,
|
|
32
|
-
mdc-ripple-theme.$light-ink-opacities,
|
|
33
|
-
mdc-ripple-theme.$dark-ink-opacities
|
|
34
|
-
);
|
|
35
29
|
|
|
36
30
|
@return (
|
|
37
31
|
// Color of the element that shows the hover, focus and pressed states.
|
|
@@ -44,13 +38,13 @@ $prefix: (mat, outlined-button);
|
|
|
44
38
|
ripple-color: inspection.get-theme-color($theme, foreground, base, 0.1),
|
|
45
39
|
|
|
46
40
|
// Opacity of the ripple when the button is hovered.
|
|
47
|
-
hover-state-layer-opacity:
|
|
41
|
+
hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
|
|
48
42
|
|
|
49
43
|
// Opacity of the ripple when the button is focused.
|
|
50
|
-
focus-state-layer-opacity:
|
|
44
|
+
focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
51
45
|
|
|
52
46
|
// Opacity of the ripple when the button is pressed.
|
|
53
|
-
pressed-state-layer-opacity:
|
|
47
|
+
pressed-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
54
48
|
);
|
|
55
49
|
}
|
|
56
50
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
@use '@material/textfield' as mdc-textfield;
|
|
4
|
-
@use '@material/density' as mdc-density;
|
|
5
4
|
@use '../../token-utils';
|
|
6
5
|
@use '../../../theming/theming';
|
|
7
6
|
@use '../../../theming/inspection';
|
|
@@ -51,12 +50,17 @@ $prefix: (mat, paginator);
|
|
|
51
50
|
-4: 40px,
|
|
52
51
|
-5: 40px,
|
|
53
52
|
);
|
|
54
|
-
$form-field-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
$form-field-size-scale: (
|
|
54
|
+
0: 56px,
|
|
55
|
+
-1: 52px,
|
|
56
|
+
-2: 48px,
|
|
57
|
+
-3: 44px,
|
|
58
|
+
-4: 40px,
|
|
59
|
+
-5: 36px,
|
|
59
60
|
);
|
|
61
|
+
$form-field-density-scale: if($density-scale > -4, -4, $density-scale);
|
|
62
|
+
$form-field-height: map.get($form-field-size-scale, $form-field-density-scale);
|
|
63
|
+
|
|
60
64
|
// We computed the desired height of the form-field using the density configuration. The
|
|
61
65
|
// spec only describes vertical spacing/alignment in non-dense mode. This means that we
|
|
62
66
|
// cannot update the spacing to explicit numbers based on the density scale. Instead, we
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use 'sass:meta';
|
|
3
|
-
@use '@material/ripple/ripple-theme' as mdc-ripple-theme;
|
|
4
2
|
@use '../../token-utils';
|
|
5
3
|
@use '../../../theming/theming';
|
|
6
4
|
@use '../../../theming/inspection';
|
|
@@ -29,10 +27,6 @@ $prefix: (mat, protected-button);
|
|
|
29
27
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
30
28
|
@function get-color-tokens($theme) {
|
|
31
29
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
32
|
-
$ripple-opacities: if($is-dark,
|
|
33
|
-
mdc-ripple-theme.$light-ink-opacities,
|
|
34
|
-
mdc-ripple-theme.$dark-ink-opacities
|
|
35
|
-
);
|
|
36
30
|
|
|
37
31
|
@return (
|
|
38
32
|
// Color of the element that shows the hover, focus and pressed states.
|
|
@@ -45,13 +39,13 @@ $prefix: (mat, protected-button);
|
|
|
45
39
|
ripple-color: inspection.get-theme-color($theme, foreground, base, 0.1),
|
|
46
40
|
|
|
47
41
|
// Opacity of the ripple when the button is hovered.
|
|
48
|
-
hover-state-layer-opacity:
|
|
42
|
+
hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
|
|
49
43
|
|
|
50
44
|
// Opacity of the ripple when the button is focused.
|
|
51
|
-
focus-state-layer-opacity:
|
|
45
|
+
focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
52
46
|
|
|
53
47
|
// Opacity of the ripple when the button is pressed.
|
|
54
|
-
pressed-state-layer-opacity:
|
|
48
|
+
pressed-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
55
49
|
);
|
|
56
50
|
}
|
|
57
51
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
@use '../../token-utils';
|
|
3
3
|
@use '../../../theming/inspection';
|
|
4
4
|
@use '../../../theming/theming';
|
|
5
|
+
@use '../../../style/elevation';
|
|
5
6
|
@use '../../../style/sass-utils';
|
|
6
|
-
@use '@material/elevation/elevation-theme' as mdc-elevation;
|
|
7
7
|
|
|
8
8
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
9
9
|
$prefix: (mat, select);
|
|
@@ -12,7 +12,7 @@ $prefix: (mat, select);
|
|
|
12
12
|
// but may be in a future version of the theming API.
|
|
13
13
|
@function get-unthemable-tokens() {
|
|
14
14
|
@return (
|
|
15
|
-
container-elevation-shadow:
|
|
15
|
+
container-elevation-shadow: elevation.get-box-shadow(8),
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
@use '@material/elevation/elevation-theme' as mdc-elevation;
|
|
2
1
|
@use 'sass:color';
|
|
3
2
|
@use 'sass:meta';
|
|
4
3
|
@use '../../token-utils';
|
|
5
4
|
@use '../../../theming/inspection';
|
|
5
|
+
@use '../../../style/elevation';
|
|
6
6
|
@use '../../../style/sass-utils';
|
|
7
7
|
|
|
8
8
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -15,7 +15,7 @@ $prefix: (mat, sidenav);
|
|
|
15
15
|
// Currently zero, but it appears to be relevant for M3.
|
|
16
16
|
// See: https://m3.material.io/components/navigation-drawer/overview
|
|
17
17
|
container-shape: 0,
|
|
18
|
-
container-elevation-shadow:
|
|
18
|
+
container-elevation-shadow: elevation.get-box-shadow(16),
|
|
19
19
|
container-width: auto,
|
|
20
20
|
);
|
|
21
21
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use 'sass:meta';
|
|
3
|
-
@use '@material/ripple/ripple-theme' as mdc-ripple-theme;
|
|
4
2
|
@use '../../token-utils';
|
|
5
3
|
@use '../../../theming/theming';
|
|
6
4
|
@use '../../../theming/inspection';
|
|
@@ -31,10 +29,6 @@ $prefix: (mat, text-button);
|
|
|
31
29
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
32
30
|
@function get-color-tokens($theme) {
|
|
33
31
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
34
|
-
$ripple-opacities: if($is-dark,
|
|
35
|
-
mdc-ripple-theme.$light-ink-opacities,
|
|
36
|
-
mdc-ripple-theme.$dark-ink-opacities
|
|
37
|
-
);
|
|
38
32
|
|
|
39
33
|
@return (
|
|
40
34
|
// Color of the element that shows the hover, focus and pressed states.
|
|
@@ -47,13 +41,13 @@ $prefix: (mat, text-button);
|
|
|
47
41
|
ripple-color: inspection.get-theme-color($theme, foreground, base, 0.1),
|
|
48
42
|
|
|
49
43
|
// Opacity of the ripple when the button is hovered.
|
|
50
|
-
hover-state-layer-opacity:
|
|
44
|
+
hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
|
|
51
45
|
|
|
52
46
|
// Opacity of the ripple when the button is focused.
|
|
53
|
-
focus-state-layer-opacity:
|
|
47
|
+
focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
54
48
|
|
|
55
49
|
// Opacity of the ripple when the button is pressed.
|
|
56
|
-
pressed-state-layer-opacity:
|
|
50
|
+
pressed-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
57
51
|
);
|
|
58
52
|
}
|
|
59
53
|
|
|
@@ -19,21 +19,9 @@ $prefix: (mdc, chip);
|
|
|
19
19
|
@function get-unthemable-tokens() {
|
|
20
20
|
@return (
|
|
21
21
|
// The shape & radius of the chip.
|
|
22
|
-
container-shape:
|
|
23
|
-
(
|
|
24
|
-
family: 'rounded',
|
|
25
|
-
radius: (
|
|
26
|
-
16px 16px 16px 16px,
|
|
27
|
-
)
|
|
28
|
-
),
|
|
22
|
+
container-shape-radius: 16px,
|
|
29
23
|
// The shape & radius of the avatar.
|
|
30
|
-
with-avatar-avatar-shape:
|
|
31
|
-
(
|
|
32
|
-
family: 'rounded',
|
|
33
|
-
radius: (
|
|
34
|
-
14px 14px 14px 14px,
|
|
35
|
-
)
|
|
36
|
-
),
|
|
24
|
+
with-avatar-avatar-shape-radius: 14px,
|
|
37
25
|
// The width & height of the chip avatar.
|
|
38
26
|
with-avatar-avatar-size: 28px,
|
|
39
27
|
// The width & height of the chip icon.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use '../../../style/elevation';
|
|
2
1
|
@use '../../../theming/inspection';
|
|
2
|
+
@use '../../../style/elevation';
|
|
3
3
|
@use '../../../style/sass-utils';
|
|
4
4
|
@use '../../token-utils';
|
|
5
5
|
|
|
@@ -35,6 +35,7 @@ $prefix: (mdc, elevated-card);
|
|
|
35
35
|
pressed-container-elevation: null,
|
|
36
36
|
pressed-state-layer-color: null,
|
|
37
37
|
pressed-state-layer-opacity: null,
|
|
38
|
+
container-shadow-color: null,
|
|
38
39
|
// Angular Material does not currently support surface tint.
|
|
39
40
|
container-surface-tint-layer-color: null,
|
|
40
41
|
// MDC does not seem to use these tokens.
|
|
@@ -50,12 +51,7 @@ $prefix: (mdc, elevated-card);
|
|
|
50
51
|
@return (
|
|
51
52
|
// The background color of the card.
|
|
52
53
|
container-color: inspection.get-theme-color($theme, background, card),
|
|
53
|
-
|
|
54
|
-
// (Part of the color tokens because it needs to be combined with the shadow color to generate
|
|
55
|
-
// the final box-shadow).
|
|
56
|
-
container-elevation: 1,
|
|
57
|
-
// The color of the card's shadow.
|
|
58
|
-
container-shadow-color: if($elevation != null, $elevation, elevation.$color),
|
|
54
|
+
container-elevation: elevation.get-box-shadow(1),
|
|
59
55
|
);
|
|
60
56
|
}
|
|
61
57
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@use '../../token-utils';
|
|
3
|
+
@use '../../../style/elevation';
|
|
2
4
|
@use '../../../theming/inspection';
|
|
3
5
|
|
|
4
|
-
@use 'sass:map';
|
|
5
|
-
|
|
6
6
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
7
7
|
$prefix: (mdc, extended-fab);
|
|
8
8
|
|
|
@@ -38,18 +38,22 @@ $prefix: (mdc, extended-fab);
|
|
|
38
38
|
pressed-ripple-color: null,
|
|
39
39
|
pressed-ripple-opacity: null,
|
|
40
40
|
pressed-state-layer-color: null,
|
|
41
|
-
pressed-state-layer-opacity: null
|
|
41
|
+
pressed-state-layer-opacity: null,
|
|
42
|
+
container-elevation: null,
|
|
43
|
+
focus-container-elevation: null,
|
|
44
|
+
hover-container-elevation: null,
|
|
45
|
+
pressed-container-elevation: null,
|
|
46
|
+
container-shadow-color: null,
|
|
42
47
|
);
|
|
43
48
|
}
|
|
44
49
|
|
|
45
50
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
46
51
|
@function get-color-tokens($theme) {
|
|
47
52
|
@return (
|
|
48
|
-
container-elevation: 6,
|
|
49
|
-
focus-container-elevation: 8,
|
|
50
|
-
hover-container-elevation: 8,
|
|
51
|
-
pressed-container-elevation: 12,
|
|
52
|
-
container-shadow-color: #000,
|
|
53
|
+
container-elevation-shadow: elevation.get-box-shadow(6),
|
|
54
|
+
focus-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
55
|
+
hover-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
56
|
+
pressed-container-elevation-shadow: elevation.get-box-shadow(12),
|
|
53
57
|
);
|
|
54
58
|
}
|
|
55
59
|
|
|
@@ -1,25 +1,22 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@use '../../../theming/inspection';
|
|
3
|
+
@use '../../../style/elevation';
|
|
2
4
|
@use '../../token-utils';
|
|
3
5
|
|
|
4
|
-
@use 'sass:map';
|
|
5
|
-
|
|
6
6
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
7
7
|
$prefix: (mdc, fab-small);
|
|
8
8
|
|
|
9
9
|
@function get-unthemable-tokens() {
|
|
10
10
|
@return (
|
|
11
11
|
container-shape: 50%,
|
|
12
|
-
icon-size: 24px,
|
|
13
|
-
|
|
14
|
-
// We don't use this token, because it doesn't set the color of any text inside the FAB.
|
|
15
|
-
// We create a custom token for it instead.
|
|
16
|
-
icon-color: null,
|
|
17
12
|
|
|
18
13
|
// =============================================================================================
|
|
19
14
|
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
20
15
|
// =============================================================================================
|
|
21
16
|
container-height: null,
|
|
22
17
|
container-width: null,
|
|
18
|
+
icon-size: null,
|
|
19
|
+
icon-color: null,
|
|
23
20
|
|
|
24
21
|
focus-icon-color: null,
|
|
25
22
|
focus-outline-color: null,
|
|
@@ -40,7 +37,13 @@ $prefix: (mdc, fab-small);
|
|
|
40
37
|
pressed-ripple-color: null,
|
|
41
38
|
pressed-ripple-opacity: null,
|
|
42
39
|
pressed-state-layer-color: null,
|
|
43
|
-
pressed-state-layer-opacity: null
|
|
40
|
+
pressed-state-layer-opacity: null,
|
|
41
|
+
|
|
42
|
+
container-elevation: null,
|
|
43
|
+
focus-container-elevation: null,
|
|
44
|
+
hover-container-elevation: null,
|
|
45
|
+
pressed-container-elevation: null,
|
|
46
|
+
container-shadow-color: null,
|
|
44
47
|
);
|
|
45
48
|
}
|
|
46
49
|
|
|
@@ -49,11 +52,10 @@ $prefix: (mdc, fab-small);
|
|
|
49
52
|
@return (
|
|
50
53
|
// Background color of the FAB.
|
|
51
54
|
container-color: inspection.get-theme-color($theme, background, card),
|
|
52
|
-
container-elevation: 6,
|
|
53
|
-
focus-container-elevation: 8,
|
|
54
|
-
hover-container-elevation: 8,
|
|
55
|
-
pressed-container-elevation: 12,
|
|
56
|
-
container-shadow-color: #000,
|
|
55
|
+
container-elevation-shadow: elevation.get-box-shadow(6),
|
|
56
|
+
focus-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
57
|
+
hover-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
58
|
+
pressed-container-elevation-shadow: elevation.get-box-shadow(12),
|
|
57
59
|
);
|
|
58
60
|
}
|
|
59
61
|
|
|
@@ -1,19 +1,14 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@use '../../../theming/inspection';
|
|
3
|
+
@use '../../../style/elevation';
|
|
2
4
|
@use '../../token-utils';
|
|
3
5
|
|
|
4
|
-
@use 'sass:map';
|
|
5
|
-
|
|
6
6
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
7
7
|
$prefix: (mdc, fab);
|
|
8
8
|
|
|
9
9
|
@function get-unthemable-tokens() {
|
|
10
10
|
@return (
|
|
11
11
|
container-shape: 50%,
|
|
12
|
-
icon-size: 24px,
|
|
13
|
-
|
|
14
|
-
// We don't use this token, because it doesn't set the color of any text inside the FAB.
|
|
15
|
-
// We create a custom token for it instead.
|
|
16
|
-
icon-color: null,
|
|
17
12
|
|
|
18
13
|
// =============================================================================================
|
|
19
14
|
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
@@ -21,6 +16,8 @@ $prefix: (mdc, fab);
|
|
|
21
16
|
container-height: null,
|
|
22
17
|
container-surface-tint-layer-color: null,
|
|
23
18
|
container-width: null,
|
|
19
|
+
icon-size: null,
|
|
20
|
+
icon-color: null,
|
|
24
21
|
|
|
25
22
|
focus-icon-color: null,
|
|
26
23
|
focus-outline-color: null,
|
|
@@ -41,7 +38,13 @@ $prefix: (mdc, fab);
|
|
|
41
38
|
pressed-ripple-color: null,
|
|
42
39
|
pressed-ripple-opacity: null,
|
|
43
40
|
pressed-state-layer-color: null,
|
|
44
|
-
pressed-state-layer-opacity: null
|
|
41
|
+
pressed-state-layer-opacity: null,
|
|
42
|
+
|
|
43
|
+
container-elevation: null,
|
|
44
|
+
focus-container-elevation: null,
|
|
45
|
+
hover-container-elevation: null,
|
|
46
|
+
pressed-container-elevation: null,
|
|
47
|
+
container-shadow-color: null,
|
|
45
48
|
);
|
|
46
49
|
}
|
|
47
50
|
|
|
@@ -50,11 +53,10 @@ $prefix: (mdc, fab);
|
|
|
50
53
|
@return (
|
|
51
54
|
// Background color of the FAB.
|
|
52
55
|
container-color: inspection.get-theme-color($theme, background, card),
|
|
53
|
-
container-elevation: 6,
|
|
54
|
-
focus-container-elevation: 8,
|
|
55
|
-
hover-container-elevation: 8,
|
|
56
|
-
pressed-container-elevation: 12,
|
|
57
|
-
container-shadow-color: #000,
|
|
56
|
+
container-elevation-shadow: elevation.get-box-shadow(6),
|
|
57
|
+
focus-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
58
|
+
hover-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
59
|
+
pressed-container-elevation-shadow: elevation.get-box-shadow(12),
|
|
58
60
|
);
|
|
59
61
|
}
|
|
60
62
|
|
|
@@ -41,6 +41,7 @@ $prefix: (mdc, outlined-card);
|
|
|
41
41
|
pressed-outline-color: null,
|
|
42
42
|
pressed-state-layer-color: null,
|
|
43
43
|
pressed-state-layer-opacity: null,
|
|
44
|
+
container-shadow-color: null,
|
|
44
45
|
// Angular Material does not currently support surface tint.
|
|
45
46
|
container-surface-tint-layer-color: null,
|
|
46
47
|
// MDC does not seem to use these tokens.
|
|
@@ -58,12 +59,7 @@ $prefix: (mdc, outlined-card);
|
|
|
58
59
|
container-color: inspection.get-theme-color($theme, background, card),
|
|
59
60
|
// The border color of the card.
|
|
60
61
|
outline-color: rgba(inspection.get-theme-color($theme, foreground, base), 0.12),
|
|
61
|
-
|
|
62
|
-
// (Part of the color tokens because it needs to be combined with the shadow color to generate
|
|
63
|
-
// the final box-shadow).
|
|
64
|
-
container-elevation: 0,
|
|
65
|
-
// The color of the card's shadow.
|
|
66
|
-
container-shadow-color: if($elevation != null, $elevation, elevation.$color),
|
|
62
|
+
container-elevation: elevation.get-box-shadow(0),
|
|
67
63
|
);
|
|
68
64
|
}
|
|
69
65
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '
|
|
2
|
+
@use '../../../style/elevation';
|
|
3
3
|
@use '../../token-utils';
|
|
4
4
|
|
|
5
5
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -19,7 +19,7 @@ $prefix: (mat, app);
|
|
|
19
19
|
|
|
20
20
|
@if ($shadow-color) {
|
|
21
21
|
@for $zValue from 0 through 24 {
|
|
22
|
-
$shadow:
|
|
22
|
+
$shadow: elevation.get-box-shadow($zValue, $shadow-color);
|
|
23
23
|
$tokens: map.set($tokens, 'elevation-shadow-level-#{$zValue}', $shadow);
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '
|
|
2
|
+
@use '../../../style/elevation';
|
|
3
3
|
@use '../../token-utils';
|
|
4
4
|
|
|
5
5
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -15,7 +15,7 @@ $prefix: (mat, autocomplete);
|
|
|
15
15
|
background-color: map.get($systems, md-sys-color, surface-container),
|
|
16
16
|
container-shape: map.get($systems, md-sys-shape, corner-extra-small),
|
|
17
17
|
container-elevation-shadow:
|
|
18
|
-
token-utils.hardcode(
|
|
18
|
+
token-utils.hardcode(elevation.get-box-shadow(2), $exclude-hardcoded),
|
|
19
19
|
);
|
|
20
20
|
|
|
21
21
|
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
+
@use '../../../style/elevation';
|
|
2
3
|
@use '../../../style/sass-utils';
|
|
3
4
|
@use '../../token-utils';
|
|
4
|
-
@use '@material/elevation' as mdc-elevation;
|
|
5
5
|
|
|
6
6
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
7
7
|
$prefix: (mat, datepicker);
|
|
@@ -67,10 +67,10 @@ $prefix: (mat, datepicker);
|
|
|
67
67
|
),
|
|
68
68
|
calendar-container-background-color: map.get($systems, md-sys-color, surface-container-high),
|
|
69
69
|
calendar-container-text-color: map.get($systems, md-sys-color, on-surface),
|
|
70
|
-
calendar-container-elevation-shadow: token-utils.hardcode(
|
|
70
|
+
calendar-container-elevation-shadow: token-utils.hardcode(elevation.get-box-shadow(0),
|
|
71
71
|
$exclude-hardcoded),
|
|
72
72
|
calendar-container-touch-elevation-shadow:
|
|
73
|
-
token-utils.hardcode(
|
|
73
|
+
token-utils.hardcode(elevation.get-box-shadow(0), $exclude-hardcoded),
|
|
74
74
|
calendar-container-shape: map.get($systems, md-sys-shape, corner-large),
|
|
75
75
|
calendar-container-touch-shape: map.get($systems, md-sys-shape, corner-extra-large),
|
|
76
76
|
calendar-text-font: map.get($systems, md-sys-typescale, body-large-font),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../../style/elevation';
|
|
3
4
|
@use '../../token-utils';
|
|
4
|
-
@use '@material/elevation' as mdc-elevation;
|
|
5
5
|
|
|
6
6
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
7
7
|
$prefix: (mat, select);
|
|
@@ -26,7 +26,7 @@ $prefix: (mat, select);
|
|
|
26
26
|
focused-arrow-color: map.get($systems, md-sys-color, primary),
|
|
27
27
|
invalid-arrow-color: map.get($systems, md-sys-color, error),
|
|
28
28
|
container-elevation-shadow:
|
|
29
|
-
token-utils.hardcode(
|
|
29
|
+
token-utils.hardcode(elevation.get-box-shadow(2), $exclude-hardcoded),
|
|
30
30
|
)
|
|
31
31
|
), (
|
|
32
32
|
// Color variants:
|
|
@@ -16,10 +16,7 @@ $prefix: (mdc, chip);
|
|
|
16
16
|
$tokens: sass-utils.merge-all(
|
|
17
17
|
token-utils.generate-typography-tokens($systems, label-text, label-large),
|
|
18
18
|
(
|
|
19
|
-
container-shape: token-utils.hardcode(
|
|
20
|
-
family: rounded,
|
|
21
|
-
radius: 8px,
|
|
22
|
-
), $exclude-hardcoded),
|
|
19
|
+
container-shape-radius: token-utils.hardcode(8px, $exclude-hardcoded),
|
|
23
20
|
with-avatar-avatar-size: token-utils.hardcode(24px, $exclude-hardcoded),
|
|
24
21
|
label-text-color: map.get($systems, md-sys-color, on-surface-variant),
|
|
25
22
|
disabled-label-text-color: sass-utils.safe-color-change(
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/elevation';
|
|
1
3
|
@use '../../token-utils';
|
|
2
4
|
|
|
3
5
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -9,7 +11,12 @@ $prefix: (mdc, elevated-card);
|
|
|
9
11
|
/// @param {Map} $token-slots Possible token slots
|
|
10
12
|
/// @return {Map} A set of tokens for the MDC elevated-card
|
|
11
13
|
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
12
|
-
$
|
|
14
|
+
$tokens: token-utils.get-mdc-tokens('elevated-card', $systems, $exclude-hardcoded);
|
|
15
|
+
$elevation: map.get($tokens, container-elevation);
|
|
13
16
|
|
|
14
|
-
@
|
|
17
|
+
@if ($elevation != null) {
|
|
18
|
+
$tokens: map.set($tokens, container-elevation, elevation.get-box-shadow($elevation));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@return token-utils.namespace-tokens($prefix, $tokens, $token-slots);
|
|
15
22
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../style/elevation';
|
|
1
3
|
@use '../../token-utils';
|
|
2
4
|
|
|
3
5
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -9,7 +11,22 @@ $prefix: (mdc, extended-fab);
|
|
|
9
11
|
/// @param {Map} $token-slots Possible token slots
|
|
10
12
|
/// @return {Map} A set of tokens for the MDC extended-fab
|
|
11
13
|
@function get-tokens($systems, $exclude-hardcoded, $token-slots) {
|
|
12
|
-
$
|
|
14
|
+
$tokens: token-utils.get-mdc-tokens('extended-fab-primary', $systems, $exclude-hardcoded);
|
|
15
|
+
$elevation-tokens: (
|
|
16
|
+
container-elevation,
|
|
17
|
+
focus-container-elevation,
|
|
18
|
+
hover-container-elevation,
|
|
19
|
+
pressed-container-elevation,
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
@each $token in $elevation-tokens {
|
|
23
|
+
$elevation: map.get($tokens, $token);
|
|
24
|
+
|
|
25
|
+
@if ($elevation != null) {
|
|
26
|
+
$tokens: map.set($tokens, $token + '-shadow', elevation.get-box-shadow($elevation));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
13
30
|
$variant-tokens: (
|
|
14
31
|
// Color variants
|
|
15
32
|
primary: (), // Default, no overrides needed.
|
|
@@ -17,5 +34,5 @@ $prefix: (mdc, extended-fab);
|
|
|
17
34
|
tertiary: token-utils.get-mdc-tokens('extended-fab-tertiary', $systems, $exclude-hardcoded)
|
|
18
35
|
);
|
|
19
36
|
|
|
20
|
-
@return token-utils.namespace-tokens($prefix, ($
|
|
37
|
+
@return token-utils.namespace-tokens($prefix, ($tokens, $variant-tokens), $token-slots);
|
|
21
38
|
}
|