@angular/material 18.1.0-next.4 → 18.1.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/_button-base.scss +13 -6
- package/button/_button-theme.scss +26 -27
- 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 +13 -10
- 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/m2/mdc/_protected-button.scss +13 -7
- 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/core/tokens/m3/mdc/_protected-button.scss +22 -5
- package/datepicker/index.d.ts +13 -5
- package/esm2022/badge/badge.mjs +6 -3
- package/esm2022/button/button-base.mjs +3 -3
- package/esm2022/button/button.mjs +4 -4
- 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 +26 -8
- 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/internal-form-field/internal-form-field.mjs +2 -2
- 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/datepicker/datepicker-input-base.mjs +1 -1
- package/esm2022/dialog/dialog-container.mjs +3 -3
- package/esm2022/form-field/form-field.mjs +9 -18
- package/esm2022/list/action-list.mjs +2 -2
- package/esm2022/list/list-option.mjs +18 -4
- package/esm2022/list/list.mjs +10 -4
- package/esm2022/list/nav-list.mjs +2 -2
- package/esm2022/list/selection-list.mjs +2 -2
- package/esm2022/slide-toggle/slide-toggle.mjs +3 -3
- package/esm2022/tabs/tabs-animations.mjs +2 -2
- package/fesm2022/badge.mjs +5 -2
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/button.mjs +18 -18
- 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 +35 -17
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +23 -5
- 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/list.mjs +32 -12
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +2 -2
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/tabs.mjs +1 -1
- package/fesm2022/tabs.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-inherited-structure.scss +516 -0
- package/list/_list-item-hcm-indicator.scss +2 -3
- package/list/_list-theme.scss +17 -18
- package/list/index.d.ts +2 -0
- package/package.json +7 -7
- 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 +2 -2
- package/schematics/ng-add/index.mjs +2 -2
- package/schematics/ng-generate/m3-theme/index_bundled.js +2 -2
- package/schematics/ng-update/index_bundled.js +31 -31
- package/list/_list-option-trailing-avatar-compat.scss +0 -58
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
@use 'sass:list';
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
@use 'sass:meta';
|
|
4
|
-
@use '@material/elevation/elevation-theme' as mdc-elevation-theme;
|
|
5
4
|
@use '@material/theme/custom-properties' as mdc-custom-properties;
|
|
6
5
|
@use '@material/theme/theme' as mdc-theme;
|
|
7
6
|
@use '@material/theme/keys' as mdc-keys;
|
|
8
7
|
@use '@material/tokens/v0_161' as mdc-tokens;
|
|
8
|
+
@use '../style/elevation';
|
|
9
9
|
@use '../style/sass-utils';
|
|
10
10
|
@use '../m2/palette' as m2-palette;
|
|
11
11
|
@use '../m2/theming' as m2-theming;
|
|
@@ -161,7 +161,7 @@ $_component-prefix: null;
|
|
|
161
161
|
$elevation: map.get($tokens, $elevation-token);
|
|
162
162
|
$shadow-color: map.get($tokens, $shadow-color-token);
|
|
163
163
|
@return map.merge($tokens, (
|
|
164
|
-
$elevation-token:
|
|
164
|
+
$elevation-token: elevation.get-box-shadow($elevation, $shadow-color),
|
|
165
165
|
$shadow-color-token: null,
|
|
166
166
|
));
|
|
167
167
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use '@material/elevation/elevation-theme' as mdc-elevation;
|
|
2
1
|
@use 'sass:map';
|
|
3
2
|
@use '../../token-utils';
|
|
4
3
|
@use '../../../theming/inspection';
|
|
@@ -23,7 +22,7 @@ $prefix: (mat, app);
|
|
|
23
22
|
|
|
24
23
|
@for $zValue from 0 through 24 {
|
|
25
24
|
$elevation-color: inspection.get-theme-color($theme, foreground, elevation);
|
|
26
|
-
$shadow:
|
|
25
|
+
$shadow: elevation.get-box-shadow($zValue,
|
|
27
26
|
if($elevation-color == null, elevation.$color, $elevation-color));
|
|
28
27
|
$tokens: map.set($tokens, 'elevation-shadow-level-#{$zValue}', $shadow);
|
|
29
28
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@use '@material/elevation/elevation-theme' as mdc-elevation;
|
|
2
1
|
@use '../../token-utils';
|
|
3
2
|
@use '../../../theming/inspection';
|
|
3
|
+
@use '../../../style/elevation';
|
|
4
4
|
@use '../../../style/sass-utils';
|
|
5
5
|
|
|
6
6
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -11,7 +11,7 @@ $prefix: (mat, autocomplete);
|
|
|
11
11
|
@function get-unthemable-tokens() {
|
|
12
12
|
@return (
|
|
13
13
|
container-shape: 4px,
|
|
14
|
-
container-elevation-shadow:
|
|
14
|
+
container-elevation-shadow: elevation.get-box-shadow(8),
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
@use '@material/elevation/elevation-theme' as mdc-elevation;
|
|
2
1
|
@use 'sass:color';
|
|
3
2
|
@use 'sass:meta';
|
|
4
3
|
@use 'sass:math';
|
|
5
4
|
@use '../../token-utils';
|
|
6
5
|
@use '../../../theming/inspection';
|
|
6
|
+
@use '../../../style/elevation';
|
|
7
7
|
@use '../../../style/sass-utils';
|
|
8
8
|
|
|
9
9
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -34,8 +34,8 @@ $private-default-overlap-color: #a8dab5;
|
|
|
34
34
|
@return (
|
|
35
35
|
calendar-container-shape: 4px,
|
|
36
36
|
calendar-container-touch-shape: 4px,
|
|
37
|
-
calendar-container-elevation-shadow:
|
|
38
|
-
calendar-container-touch-elevation-shadow:
|
|
37
|
+
calendar-container-elevation-shadow: elevation.get-box-shadow(4),
|
|
38
|
+
calendar-container-touch-elevation-shadow: elevation.get-box-shadow(24),
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use '@material/elevation/elevation-theme' as mdc-elevation;
|
|
2
1
|
@use '../../token-utils';
|
|
2
|
+
@use '../../../style/elevation';
|
|
3
3
|
@use '../../../style/sass-utils';
|
|
4
4
|
|
|
5
5
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -9,7 +9,7 @@ $prefix: (mat, dialog);
|
|
|
9
9
|
// but may be in a future version of the theming API.
|
|
10
10
|
@function get-unthemable-tokens() {
|
|
11
11
|
@return (
|
|
12
|
-
container-elevation-shadow:
|
|
12
|
+
container-elevation-shadow: elevation.get-box-shadow(24),
|
|
13
13
|
container-max-width: 80vw,
|
|
14
14
|
container-small-max-width: 80vw,
|
|
15
15
|
container-min-width: 0,
|
|
@@ -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';
|
|
@@ -19,10 +17,6 @@ $prefix: (mat, fab-small);
|
|
|
19
17
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
20
18
|
@function get-color-tokens($theme) {
|
|
21
19
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
22
|
-
$ripple-opacities: if($is-dark,
|
|
23
|
-
mdc-ripple-theme.$light-ink-opacities,
|
|
24
|
-
mdc-ripple-theme.$dark-ink-opacities
|
|
25
|
-
);
|
|
26
20
|
|
|
27
21
|
@return (
|
|
28
22
|
// Color of icons and text projected into a FAB.
|
|
@@ -38,13 +32,13 @@ $prefix: (mat, fab-small);
|
|
|
38
32
|
ripple-color: inspection.get-theme-color($theme, foreground, base, 0.1),
|
|
39
33
|
|
|
40
34
|
// Opacity of the ripple when the button is hovered.
|
|
41
|
-
hover-state-layer-opacity:
|
|
35
|
+
hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
|
|
42
36
|
|
|
43
37
|
// Opacity of the ripple when the button is focused.
|
|
44
|
-
focus-state-layer-opacity:
|
|
38
|
+
focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
45
39
|
|
|
46
40
|
// Opacity of the ripple when the button is pressed.
|
|
47
|
-
pressed-state-layer-opacity:
|
|
41
|
+
pressed-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
48
42
|
|
|
49
43
|
// MDC doesn't have tokens for disabled FABs so we need to implemented them ourselves.
|
|
50
44
|
// Background color of the container when the FAB is disabled.
|
|
@@ -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';
|
|
@@ -19,10 +17,6 @@ $prefix: (mat, fab);
|
|
|
19
17
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
20
18
|
@function get-color-tokens($theme) {
|
|
21
19
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
22
|
-
$ripple-opacities: if($is-dark,
|
|
23
|
-
mdc-ripple-theme.$light-ink-opacities,
|
|
24
|
-
mdc-ripple-theme.$dark-ink-opacities
|
|
25
|
-
);
|
|
26
20
|
|
|
27
21
|
@return (
|
|
28
22
|
// Color of icons and text projected into a FAB.
|
|
@@ -38,13 +32,13 @@ $prefix: (mat, fab);
|
|
|
38
32
|
ripple-color: inspection.get-theme-color($theme, foreground, base, 0.1),
|
|
39
33
|
|
|
40
34
|
// Opacity of the ripple when the button is hovered.
|
|
41
|
-
hover-state-layer-opacity:
|
|
35
|
+
hover-state-layer-opacity: if($is-dark, 0.08, 0.04),
|
|
42
36
|
|
|
43
37
|
// Opacity of the ripple when the button is focused.
|
|
44
|
-
focus-state-layer-opacity:
|
|
38
|
+
focus-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
45
39
|
|
|
46
40
|
// Opacity of the ripple when the button is pressed.
|
|
47
|
-
pressed-state-layer-opacity:
|
|
41
|
+
pressed-state-layer-opacity: if($is-dark, 0.24, 0.12),
|
|
48
42
|
|
|
49
43
|
// MDC doesn't have tokens for disabled FABs so we need to implemented them ourselves.
|
|
50
44
|
// Background color of the container when the FAB is disabled.
|
|
@@ -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
|
|
|
@@ -10,6 +10,10 @@ $prefix: (mdc, extended-fab);
|
|
|
10
10
|
@return (
|
|
11
11
|
container-height: 48px,
|
|
12
12
|
container-shape: 24px,
|
|
13
|
+
container-elevation-shadow: elevation.get-box-shadow(6),
|
|
14
|
+
focus-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
15
|
+
hover-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
16
|
+
pressed-container-elevation-shadow: elevation.get-box-shadow(12),
|
|
13
17
|
|
|
14
18
|
// =============================================================================================
|
|
15
19
|
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
@@ -38,19 +42,18 @@ $prefix: (mdc, extended-fab);
|
|
|
38
42
|
pressed-ripple-color: null,
|
|
39
43
|
pressed-ripple-opacity: null,
|
|
40
44
|
pressed-state-layer-color: null,
|
|
41
|
-
pressed-state-layer-opacity: null
|
|
45
|
+
pressed-state-layer-opacity: null,
|
|
46
|
+
container-elevation: null,
|
|
47
|
+
focus-container-elevation: null,
|
|
48
|
+
hover-container-elevation: null,
|
|
49
|
+
pressed-container-elevation: null,
|
|
50
|
+
container-shadow-color: null,
|
|
42
51
|
);
|
|
43
52
|
}
|
|
44
53
|
|
|
45
54
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
46
55
|
@function get-color-tokens($theme) {
|
|
47
|
-
@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
|
-
);
|
|
56
|
+
@return ();
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
@@ -1,25 +1,26 @@
|
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
icon-color: null,
|
|
12
|
+
container-elevation-shadow: elevation.get-box-shadow(6),
|
|
13
|
+
focus-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
14
|
+
hover-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
15
|
+
pressed-container-elevation-shadow: elevation.get-box-shadow(12),
|
|
17
16
|
|
|
18
17
|
// =============================================================================================
|
|
19
18
|
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
20
19
|
// =============================================================================================
|
|
21
20
|
container-height: null,
|
|
22
21
|
container-width: null,
|
|
22
|
+
icon-size: null,
|
|
23
|
+
icon-color: null,
|
|
23
24
|
|
|
24
25
|
focus-icon-color: null,
|
|
25
26
|
focus-outline-color: null,
|
|
@@ -40,7 +41,13 @@ $prefix: (mdc, fab-small);
|
|
|
40
41
|
pressed-ripple-color: null,
|
|
41
42
|
pressed-ripple-opacity: null,
|
|
42
43
|
pressed-state-layer-color: null,
|
|
43
|
-
pressed-state-layer-opacity: null
|
|
44
|
+
pressed-state-layer-opacity: null,
|
|
45
|
+
|
|
46
|
+
container-elevation: null,
|
|
47
|
+
focus-container-elevation: null,
|
|
48
|
+
hover-container-elevation: null,
|
|
49
|
+
pressed-container-elevation: null,
|
|
50
|
+
container-shadow-color: null,
|
|
44
51
|
);
|
|
45
52
|
}
|
|
46
53
|
|
|
@@ -49,11 +56,6 @@ $prefix: (mdc, fab-small);
|
|
|
49
56
|
@return (
|
|
50
57
|
// Background color of the FAB.
|
|
51
58
|
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,
|
|
57
59
|
);
|
|
58
60
|
}
|
|
59
61
|
|