@angular/material 17.2.0 → 17.2.2
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/autocomplete/index.d.ts +5 -0
- package/core/index.d.ts +57 -13
- package/core/theming/_inspection.scss +2 -2
- package/core/tokens/_token-utils.scss +3 -0
- package/core/tokens/m2/mat/_datepicker.scss +1 -2
- package/core/tokens/m2/mat/_expansion.scss +2 -0
- package/core/tokens/m2/mat/_fab-small.scss +30 -13
- package/core/tokens/m2/mat/_fab.scss +30 -13
- package/core/tokens/m2/mat/_filled-button.scss +22 -10
- package/core/tokens/m2/mat/_form-field.scss +5 -5
- package/core/tokens/m2/mat/_icon-button.scss +3 -4
- package/core/tokens/m2/mat/_menu.scss +2 -2
- package/core/tokens/m2/mat/_option.scss +2 -2
- package/core/tokens/m2/mat/_outlined-button.scss +3 -4
- package/core/tokens/m2/mat/_protected-button.scss +22 -10
- package/core/tokens/m2/mat/_radio.scss +1 -3
- package/core/tokens/m2/mat/_select.scss +17 -7
- package/core/tokens/m2/mat/_switch.scss +1 -0
- package/core/tokens/m2/mat/_tab-header.scss +2 -2
- package/core/tokens/m2/mat/_text-button.scss +3 -4
- package/core/tokens/m2/mdc/_checkbox.scss +14 -12
- package/core/tokens/m2/mdc/_chip.scss +3 -9
- package/core/tokens/m2/mdc/_dialog.scss +9 -3
- package/core/tokens/m2/mdc/_filled-button.scss +19 -9
- package/core/tokens/m2/mdc/_filled-text-field.scss +22 -10
- package/core/tokens/m2/mdc/_outlined-button.scss +12 -8
- package/core/tokens/m2/mdc/_outlined-text-field.scss +21 -10
- package/core/tokens/m2/mdc/_protected-button.scss +18 -7
- package/core/tokens/m2/mdc/_radio.scss +4 -5
- package/core/tokens/m2/mdc/_text-button.scss +3 -3
- package/datepicker/index.d.ts +1 -0
- package/esm2022/autocomplete/autocomplete-trigger.mjs +34 -19
- package/esm2022/autocomplete/autocomplete.mjs +3 -3
- package/esm2022/badge/badge.mjs +1 -1
- package/esm2022/bottom-sheet/bottom-sheet-container.mjs +1 -1
- package/esm2022/button/fab.mjs +1 -1
- package/esm2022/button-toggle/button-toggle.mjs +1 -1
- package/esm2022/card/card.mjs +1 -1
- package/esm2022/checkbox/checkbox.mjs +1 -1
- package/esm2022/chips/chip-grid.mjs +1 -1
- package/esm2022/chips/chip-listbox.mjs +1 -1
- package/esm2022/chips/chip-option.mjs +1 -1
- package/esm2022/chips/chip-row.mjs +1 -1
- package/esm2022/chips/chip-set.mjs +1 -1
- package/esm2022/chips/chip.mjs +1 -1
- package/esm2022/core/common-behaviors/color.mjs +1 -1
- package/esm2022/core/common-behaviors/disable-ripple.mjs +1 -1
- package/esm2022/core/common-behaviors/disabled.mjs +1 -1
- package/esm2022/core/common-behaviors/error-state.mjs +1 -1
- package/esm2022/core/common-behaviors/initialized.mjs +6 -2
- package/esm2022/core/common-behaviors/tabindex.mjs +1 -1
- package/esm2022/core/internal-form-field/internal-form-field.mjs +1 -1
- package/esm2022/core/option/optgroup.mjs +1 -1
- package/esm2022/core/option/option.mjs +1 -1
- package/esm2022/core/selection/pseudo-checkbox/pseudo-checkbox.mjs +1 -1
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar-body.mjs +1 -1
- package/esm2022/datepicker/calendar.mjs +5 -5
- package/esm2022/datepicker/date-range-input-parts.mjs +11 -6
- package/esm2022/datepicker/date-range-input.mjs +1 -1
- package/esm2022/datepicker/datepicker-actions.mjs +1 -1
- package/esm2022/datepicker/datepicker-base.mjs +1 -1
- package/esm2022/datepicker/datepicker-toggle.mjs +1 -1
- package/esm2022/dialog/dialog-container.mjs +1 -1
- package/esm2022/divider/divider.mjs +1 -1
- package/esm2022/expansion/expansion-panel-header.mjs +3 -3
- package/esm2022/expansion/expansion-panel.mjs +35 -25
- package/esm2022/form-field/form-field.mjs +3 -3
- package/esm2022/grid-list/grid-list.mjs +1 -1
- package/esm2022/grid-list/grid-tile.mjs +1 -1
- package/esm2022/icon/icon.mjs +1 -1
- package/esm2022/list/action-list.mjs +1 -1
- package/esm2022/list/list-option.mjs +3 -3
- package/esm2022/list/list.mjs +1 -1
- package/esm2022/list/nav-list.mjs +1 -1
- package/esm2022/list/selection-list.mjs +1 -1
- package/esm2022/menu/menu.mjs +1 -1
- package/esm2022/paginator/paginator.mjs +14 -13
- package/esm2022/progress-bar/progress-bar.mjs +1 -1
- package/esm2022/progress-spinner/progress-spinner.mjs +1 -1
- package/esm2022/radio/radio.mjs +1 -1
- package/esm2022/select/select.mjs +15 -8
- package/esm2022/sidenav/drawer.mjs +1 -1
- package/esm2022/sidenav/sidenav.mjs +1 -1
- package/esm2022/slide-toggle/slide-toggle.mjs +3 -3
- package/esm2022/slider/slider-thumb.mjs +1 -1
- package/esm2022/slider/slider.mjs +1 -1
- package/esm2022/snack-bar/simple-snack-bar.mjs +1 -1
- package/esm2022/snack-bar/snack-bar-container.mjs +1 -1
- package/esm2022/sort/sort-header.mjs +1 -1
- package/esm2022/sort/sort.mjs +9 -11
- package/esm2022/stepper/step-header.mjs +1 -1
- package/esm2022/stepper/stepper.mjs +1 -1
- package/esm2022/table/cell.mjs +2 -3
- package/esm2022/table/row.mjs +16 -7
- package/esm2022/table/table.mjs +1 -1
- package/esm2022/table/text-column.mjs +2 -2
- package/esm2022/tabs/ink-bar.mjs +87 -88
- package/esm2022/tabs/tab-body.mjs +1 -1
- package/esm2022/tabs/tab-group.mjs +2 -2
- package/esm2022/tabs/tab-header.mjs +1 -1
- package/esm2022/tabs/tab-label-wrapper.mjs +4 -9
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +3 -6
- package/esm2022/toolbar/toolbar.mjs +1 -1
- package/esm2022/tooltip/tooltip.mjs +1 -1
- package/esm2022/tree/node.mjs +2 -2
- package/esm2022/tree/toggle.mjs +2 -2
- package/esm2022/tree/tree.mjs +1 -1
- package/expansion/index.d.ts +5 -2
- package/fesm2022/autocomplete.mjs +36 -21
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +6 -2
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +14 -9
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion.mjs +36 -26
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/list.mjs +2 -2
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator.mjs +12 -12
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select.mjs +11 -4
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +2 -2
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort.mjs +9 -10
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +17 -9
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs.mjs +90 -100
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree.mjs +2 -2
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_mdc-text-field-structure-overrides.scss +16 -0
- package/package.json +2 -2
- package/paginator/index.d.ts +6 -8
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-add/setup-project.js +21 -6
- package/schematics/ng-add/setup-project.mjs +21 -6
- package/schematics/ng-add/theming/create-custom-theme.js +4 -2
- package/schematics/ng-add/theming/create-custom-theme.mjs +4 -2
- package/select/index.d.ts +7 -2
- package/sort/index.d.ts +5 -7
- package/table/index.d.ts +3 -1
- package/tabs/index.d.ts +31 -16
|
@@ -19,13 +19,13 @@ $prefix: (mat, tab-header);
|
|
|
19
19
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
20
20
|
@function get-color-tokens($theme, $palette-name: primary) {
|
|
21
21
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
22
|
-
$inactive-label-text-color:
|
|
22
|
+
$inactive-label-text-color: inspection.get-theme-color($theme, foreground, text, 0.6);
|
|
23
23
|
$active-label-text-color: inspection.get-theme-color($theme, $palette-name, default);
|
|
24
24
|
$ripple-color: inspection.get-theme-color($theme, $palette-name, default);
|
|
25
25
|
|
|
26
26
|
@return (
|
|
27
27
|
disabled-ripple-color: inspection.get-theme-color($theme, foreground, disabled),
|
|
28
|
-
pagination-icon-color:
|
|
28
|
+
pagination-icon-color: inspection.get-theme-color($theme, foreground, icon, 1),
|
|
29
29
|
|
|
30
30
|
// Note: MDC has equivalents of these tokens, but they lead to much higher selector specificity.
|
|
31
31
|
inactive-label-text-color: $inactive-label-text-color,
|
|
@@ -31,7 +31,6 @@ $prefix: (mat, text-button);
|
|
|
31
31
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
32
32
|
@function get-color-tokens($theme) {
|
|
33
33
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
34
|
-
$on-surface: if($is-dark, #fff, #000);
|
|
35
34
|
$ripple-opacities: if($is-dark,
|
|
36
35
|
mdc-ripple-theme.$light-ink-opacities,
|
|
37
36
|
mdc-ripple-theme.$dark-ink-opacities
|
|
@@ -39,13 +38,13 @@ $prefix: (mat, text-button);
|
|
|
39
38
|
|
|
40
39
|
@return (
|
|
41
40
|
// Color of the element that shows the hover, focus and pressed states.
|
|
42
|
-
state-layer-color: $
|
|
41
|
+
state-layer-color: inspection.get-theme-color($theme, foreground, base),
|
|
43
42
|
|
|
44
43
|
// Color of the element that shows the hover, focus and pressed states while disabled.
|
|
45
|
-
disabled-state-layer-color: $
|
|
44
|
+
disabled-state-layer-color: inspection.get-theme-color($theme, foreground, base),
|
|
46
45
|
|
|
47
46
|
// Color of the ripple element.
|
|
48
|
-
ripple-color:
|
|
47
|
+
ripple-color: inspection.get-theme-color($theme, foreground, base, 0.1),
|
|
49
48
|
|
|
50
49
|
// Opacity of the ripple when the button is hovered.
|
|
51
50
|
hover-state-layer-opacity: map.get($ripple-opacities, hover),
|
|
@@ -3,22 +3,12 @@
|
|
|
3
3
|
@use '../../../theming/theming';
|
|
4
4
|
@use '../../../theming/inspection';
|
|
5
5
|
@use '../../../style/sass-utils';
|
|
6
|
+
@use '../../../mdc-helpers/mdc-helpers';
|
|
6
7
|
@use '../../token-utils';
|
|
7
|
-
@use '@material/theme/theme-color' as mdc-theme-color;
|
|
8
8
|
|
|
9
9
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
10
10
|
$prefix: (mdc, checkbox);
|
|
11
11
|
|
|
12
|
-
// MDC logs a warning if the `contrast-tone` function is called with a CSS variable.
|
|
13
|
-
// This function falls back to determining the tone based on whether the theme is light or dark.
|
|
14
|
-
@function _contrast-tone($value, $is-dark, $light-color: '#fff', $dark-color: '#000') {
|
|
15
|
-
@if ($value == 'dark' or $value == 'light' or type-of($value) == 'color') {
|
|
16
|
-
@return if(mdc-theme-color.contrast-tone($value) == 'dark', $dark-color, $light-color);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
@return if($is-dark, $light-color, $dark-color);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
12
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
23
13
|
// but may be in a future version of the theming API.
|
|
24
14
|
//
|
|
@@ -62,6 +52,18 @@ $prefix: (mdc, checkbox);
|
|
|
62
52
|
inspection.get-theme-color($theme, foreground, base), $alpha: 0.54);
|
|
63
53
|
$active-border-color:
|
|
64
54
|
theming.get-color-from-palette(palette.$gray-palette, if($is-dark, 200, 900));
|
|
55
|
+
$selected-checkmark-color: null;
|
|
56
|
+
|
|
57
|
+
// Ideally we would derive all values directly from the theme, but it causes a lot of regressions
|
|
58
|
+
// internally. For now we fall back to the old hardcoded behavior only for internal apps.
|
|
59
|
+
@if (token-utils.$private-is-internal-build) {
|
|
60
|
+
$contrast-tone: mdc-helpers.variable-safe-contrast-tone($palette-selected, $is-dark);
|
|
61
|
+
$selected-checkmark-color: if($contrast-tone == 'dark', #000, #fff);
|
|
62
|
+
}
|
|
63
|
+
@else {
|
|
64
|
+
$selected-checkmark-color:
|
|
65
|
+
inspection.get-theme-color($theme, $palette-name, default-contrast, 1);
|
|
66
|
+
}
|
|
65
67
|
|
|
66
68
|
@return (
|
|
67
69
|
// The color of the checkbox fill when the checkbox is selected and disabled.
|
|
@@ -69,7 +71,7 @@ $prefix: (mdc, checkbox);
|
|
|
69
71
|
// The color of the checkbox border when the checkbox is unselected and disabled.
|
|
70
72
|
disabled-unselected-icon-color: $disabled-color,
|
|
71
73
|
// The color of the checkmark when the checkbox is selected.
|
|
72
|
-
selected-checkmark-color:
|
|
74
|
+
selected-checkmark-color: $selected-checkmark-color,
|
|
73
75
|
// The color of the checkbox fill when the checkbox is selected and focused.
|
|
74
76
|
selected-focus-icon-color: $palette-selected,
|
|
75
77
|
// The color of the checkbox fill when the checkbox is selected and hovered.
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
@use 'sass:meta';
|
|
4
4
|
@use '../../token-utils';
|
|
5
|
-
@use '../../../mdc-helpers/mdc-helpers';
|
|
6
5
|
@use '../../../style/sass-utils';
|
|
7
6
|
@use '../../../theming/theming';
|
|
8
7
|
@use '../../../theming/inspection';
|
|
@@ -230,15 +229,10 @@ $prefix: (mdc, chip);
|
|
|
230
229
|
$foreground: if($is-dark, $grey-50, $grey-900);
|
|
231
230
|
|
|
232
231
|
$surface: inspection.get-theme-color($theme, background, card);
|
|
233
|
-
$on-surface: if(
|
|
234
|
-
mdc-helpers.variable-safe-contrast-tone($surface, $is-dark) == 'dark',
|
|
235
|
-
#000,
|
|
236
|
-
#fff
|
|
237
|
-
);
|
|
238
232
|
$background: if(
|
|
239
|
-
meta.type-of($
|
|
240
|
-
color.mix($
|
|
241
|
-
$
|
|
233
|
+
meta.type-of($state-layer-color) == color and meta.type-of($surface) == color,
|
|
234
|
+
color.mix($state-layer-color, $surface, 12%),
|
|
235
|
+
$state-layer-color
|
|
242
236
|
);
|
|
243
237
|
}
|
|
244
238
|
@else {
|
|
@@ -55,15 +55,21 @@ $prefix: (mdc, dialog);
|
|
|
55
55
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
56
56
|
@function get-color-tokens($theme) {
|
|
57
57
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
58
|
-
|
|
58
|
+
|
|
59
|
+
// Ideally we would derive all values directly from the theme, but it causes a lot of regressions
|
|
60
|
+
// internally. For now we fall back to the old hardcoded behavior only for internal apps.
|
|
61
|
+
$text-base: if(token-utils.$private-is-internal-build,
|
|
62
|
+
if($is-dark, #fff, #000),
|
|
63
|
+
inspection.get-theme-color($theme, foreground, text, 1)
|
|
64
|
+
);
|
|
59
65
|
|
|
60
66
|
@return (
|
|
61
67
|
// Background color of the container.
|
|
62
68
|
container-color: inspection.get-theme-color($theme, background, dialog),
|
|
63
69
|
// Color of the dialog header.
|
|
64
|
-
subhead-color:
|
|
70
|
+
subhead-color: sass-utils.safe-color-change($text-base, $alpha: 0.87),
|
|
65
71
|
// Color of the dialog body text.
|
|
66
|
-
supporting-text-color:
|
|
72
|
+
supporting-text-color: sass-utils.safe-color-change($text-base, $alpha: 0.6),
|
|
67
73
|
);
|
|
68
74
|
}
|
|
69
75
|
|
|
@@ -51,26 +51,36 @@ $prefix: (mdc, filled-button);
|
|
|
51
51
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
52
52
|
@function get-color-tokens($theme) {
|
|
53
53
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
54
|
-
$surface: inspection.get-theme-color($theme, background, card);
|
|
55
|
-
$on-surface: if($is-dark, #fff, #000);
|
|
56
54
|
|
|
57
55
|
@return (
|
|
58
|
-
container-color: $
|
|
59
|
-
label-text-color: $
|
|
60
|
-
disabled-container-color:
|
|
61
|
-
|
|
56
|
+
container-color: inspection.get-theme-color($theme, background, card),
|
|
57
|
+
label-text-color: inspection.get-theme-color($theme, foreground, text, 1),
|
|
58
|
+
disabled-container-color: inspection.get-theme-color($theme, foreground, disabled-button,
|
|
59
|
+
0.12),
|
|
60
|
+
disabled-label-text-color: inspection.get-theme-color($theme, foreground, disabled-button,
|
|
61
|
+
if($is-dark, 0.5, 0.38)),
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
// Generates the mapping for the properties that change based on the button palette color.
|
|
66
66
|
@function private-get-color-palette-color-tokens($theme, $palette-name) {
|
|
67
|
-
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
68
67
|
$container-color: inspection.get-theme-color($theme, $palette-name, default);
|
|
69
|
-
$
|
|
68
|
+
$label-text-color: null;
|
|
69
|
+
|
|
70
|
+
// Ideally we would derive all values directly from the theme, but it causes a lot of regressions
|
|
71
|
+
// internally. For now we fall back to the old hardcoded behavior only for internal apps.
|
|
72
|
+
@if (token-utils.$private-is-internal-build) {
|
|
73
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
74
|
+
$contrast-tone: mdc-helpers.variable-safe-contrast-tone($container-color, $is-dark);
|
|
75
|
+
$label-text-color: if($contrast-tone == 'dark', #000, #fff);
|
|
76
|
+
}
|
|
77
|
+
@else {
|
|
78
|
+
$label-text-color: inspection.get-theme-color($theme, $palette-name, default-contrast, 1);
|
|
79
|
+
}
|
|
70
80
|
|
|
71
81
|
@return (
|
|
72
82
|
container-color: $container-color,
|
|
73
|
-
label-text-color:
|
|
83
|
+
label-text-color: $label-text-color,
|
|
74
84
|
);
|
|
75
85
|
}
|
|
76
86
|
|
|
@@ -93,30 +93,42 @@ $prefix: (mdc, filled-text-field);
|
|
|
93
93
|
@function get-color-tokens($theme) {
|
|
94
94
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
95
95
|
$surface: inspection.get-theme-color($theme, background, card);
|
|
96
|
-
$on-surface: if($is-dark, #fff, #000);
|
|
97
96
|
$warn-color: inspection.get-theme-color($theme, warn);
|
|
98
97
|
$color-tokens: private-get-color-palette-color-tokens($theme, primary);
|
|
98
|
+
$on-surface: if($is-dark, #fff, #000);
|
|
99
|
+
|
|
100
|
+
// Ideally we would derive all values directly from the theme, but it causes a lot of regressions
|
|
101
|
+
// internally. For now we fall back to the old hardcoded behavior only for internal apps.
|
|
102
|
+
$text-color-base: if(token-utils.$private-is-internal-build, $on-surface,
|
|
103
|
+
inspection.get-theme-color($theme, foreground, text, 1));
|
|
104
|
+
$disabled-text-color-base: if(token-utils.$private-is-internal-build, $on-surface,
|
|
105
|
+
inspection.get-theme-color($theme, foreground, disabled-text, 1));
|
|
106
|
+
$divider-base: if(token-utils.$private-is-internal-build, $on-surface,
|
|
107
|
+
inspection.get-theme-color($theme, foreground, divider, 1));
|
|
99
108
|
|
|
100
109
|
@return map.merge($color-tokens, (
|
|
101
110
|
container-color: _variable-safe-mix($on-surface, $surface, 4%),
|
|
102
111
|
disabled-container-color: _variable-safe-mix($on-surface, $surface, 2%),
|
|
103
112
|
|
|
104
|
-
label-text-color:
|
|
105
|
-
hover-label-text-color:
|
|
106
|
-
disabled-label-text-color:
|
|
113
|
+
label-text-color: sass-utils.safe-color-change($text-color-base, $alpha: 0.6),
|
|
114
|
+
hover-label-text-color: sass-utils.safe-color-change($text-color-base, $alpha: 0.6),
|
|
115
|
+
disabled-label-text-color:
|
|
116
|
+
sass-utils.safe-color-change($disabled-text-color-base, $alpha: 0.38),
|
|
107
117
|
|
|
108
|
-
input-text-color:
|
|
109
|
-
disabled-input-text-color:
|
|
110
|
-
|
|
118
|
+
input-text-color: sass-utils.safe-color-change($text-color-base, $alpha: 0.87),
|
|
119
|
+
disabled-input-text-color:
|
|
120
|
+
sass-utils.safe-color-change($disabled-text-color-base, $alpha: 0.38),
|
|
121
|
+
input-text-placeholder-color:
|
|
122
|
+
sass-utils.safe-color-change($text-color-base, $alpha: 0.6),
|
|
111
123
|
|
|
112
124
|
error-hover-label-text-color: $warn-color,
|
|
113
125
|
error-focus-label-text-color: $warn-color,
|
|
114
126
|
error-label-text-color: $warn-color,
|
|
115
127
|
error-caret-color: $warn-color,
|
|
116
128
|
|
|
117
|
-
active-indicator-color:
|
|
118
|
-
disabled-active-indicator-color:
|
|
119
|
-
hover-active-indicator-color:
|
|
129
|
+
active-indicator-color: sass-utils.safe-color-change($divider-base, $alpha: 0.42),
|
|
130
|
+
disabled-active-indicator-color: sass-utils.safe-color-change($divider-base, $alpha: 0.06),
|
|
131
|
+
hover-active-indicator-color: sass-utils.safe-color-change($divider-base, $alpha: 0.87),
|
|
120
132
|
error-active-indicator-color: $warn-color,
|
|
121
133
|
error-focus-active-indicator-color: $warn-color,
|
|
122
134
|
error-hover-active-indicator-color: $warn-color,
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
@use '../../../style/sass-utils';
|
|
4
4
|
@use '../../../theming/inspection';
|
|
5
5
|
@use '../../../theming/theming';
|
|
6
|
-
@use '../../../mdc-helpers/mdc-helpers';
|
|
7
6
|
|
|
8
7
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
9
8
|
$prefix: (mdc, outlined-button);
|
|
@@ -55,15 +54,20 @@ $prefix: (mdc, outlined-button);
|
|
|
55
54
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
56
55
|
@function get-color-tokens($theme) {
|
|
57
56
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
|
|
58
|
+
// Ideally we would derive all values directly from the theme, but it causes a lot of regressions
|
|
59
|
+
// internally. For now we fall back to the old hardcoded behavior only for internal apps.
|
|
60
|
+
$outline: if(token-utils.$private-is-internal-build,
|
|
61
|
+
rgba(if($is-dark, #fff, #000), 0.12),
|
|
62
|
+
inspection.get-theme-color($theme, foreground, divider)
|
|
63
|
+
);
|
|
61
64
|
|
|
62
65
|
@return (
|
|
63
|
-
disabled-outline-color:
|
|
64
|
-
disabled-label-text-color:
|
|
65
|
-
|
|
66
|
-
|
|
66
|
+
disabled-outline-color: $outline,
|
|
67
|
+
disabled-label-text-color: inspection.get-theme-color($theme, foreground, disabled-button,
|
|
68
|
+
if($is-dark, 0.5, 0.38)),
|
|
69
|
+
label-text-color: inspection.get-theme-color($theme, foreground, text, 1),
|
|
70
|
+
outline-color: $outline,
|
|
67
71
|
);
|
|
68
72
|
}
|
|
69
73
|
|
|
@@ -86,18 +86,29 @@ $prefix: (mdc, outlined-text-field);
|
|
|
86
86
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
87
87
|
@function get-color-tokens($theme) {
|
|
88
88
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
89
|
-
$on-surface: if($is-dark, #fff, #000);
|
|
90
89
|
$warn-color: inspection.get-theme-color($theme, warn);
|
|
91
90
|
$color-tokens: private-get-color-palette-color-tokens($theme, primary);
|
|
92
91
|
|
|
92
|
+
// Ideally we would derive all values directly from the theme, but it causes a lot of regressions
|
|
93
|
+
// internally. For now we fall back to the old hardcoded behavior only for internal apps.
|
|
94
|
+
$on-surface: if($is-dark, #fff, #000);
|
|
95
|
+
$text-color-base: if(token-utils.$private-is-internal-build, $on-surface,
|
|
96
|
+
inspection.get-theme-color($theme, foreground, text, 1));
|
|
97
|
+
$disabled-text-color-base: if(token-utils.$private-is-internal-build, $on-surface,
|
|
98
|
+
inspection.get-theme-color($theme, foreground, disabled-text, 1));
|
|
99
|
+
$divider-base: if(token-utils.$private-is-internal-build, $on-surface,
|
|
100
|
+
inspection.get-theme-color($theme, foreground, divider, 1));
|
|
101
|
+
|
|
93
102
|
@return map.merge($color-tokens, (
|
|
94
|
-
label-text-color:
|
|
95
|
-
hover-label-text-color:
|
|
96
|
-
disabled-label-text-color:
|
|
103
|
+
label-text-color: sass-utils.safe-color-change($text-color-base, $alpha: 0.6),
|
|
104
|
+
hover-label-text-color: sass-utils.safe-color-change($text-color-base, $alpha: 0.6),
|
|
105
|
+
disabled-label-text-color:
|
|
106
|
+
sass-utils.safe-color-change($disabled-text-color-base, $alpha: 0.38),
|
|
97
107
|
|
|
98
|
-
input-text-color:
|
|
99
|
-
disabled-input-text-color:
|
|
100
|
-
|
|
108
|
+
input-text-color: sass-utils.safe-color-change($text-color-base, $alpha: 0.87),
|
|
109
|
+
disabled-input-text-color:
|
|
110
|
+
sass-utils.safe-color-change($disabled-text-color-base, $alpha: 0.38),
|
|
111
|
+
input-text-placeholder-color: sass-utils.safe-color-change($text-color-base, $alpha: 0.6),
|
|
101
112
|
|
|
102
113
|
error-caret-color: $warn-color,
|
|
103
114
|
error-focus-label-text-color: $warn-color,
|
|
@@ -105,9 +116,9 @@ $prefix: (mdc, outlined-text-field);
|
|
|
105
116
|
error-hover-label-text-color: $warn-color,
|
|
106
117
|
|
|
107
118
|
// Outline tokens
|
|
108
|
-
outline-color:
|
|
109
|
-
disabled-outline-color:
|
|
110
|
-
hover-outline-color:
|
|
119
|
+
outline-color: sass-utils.safe-color-change($divider-base, $alpha: 0.38),
|
|
120
|
+
disabled-outline-color: sass-utils.safe-color-change($divider-base, $alpha: 0.06),
|
|
121
|
+
hover-outline-color: sass-utils.safe-color-change($divider-base, $alpha: 0.87),
|
|
111
122
|
error-focus-outline-color: $warn-color,
|
|
112
123
|
error-hover-outline-color: $warn-color,
|
|
113
124
|
error-outline-color: $warn-color,
|
|
@@ -45,13 +45,14 @@ $prefix: (mdc, protected-button);
|
|
|
45
45
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
46
46
|
@function get-color-tokens($theme) {
|
|
47
47
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
48
|
-
$on-surface: if($is-dark, #fff, #000);
|
|
49
48
|
|
|
50
49
|
@return (
|
|
51
50
|
container-color: inspection.get-theme-color($theme, background, card),
|
|
52
|
-
label-text-color: $
|
|
53
|
-
disabled-container-color:
|
|
54
|
-
|
|
51
|
+
label-text-color: inspection.get-theme-color($theme, foreground, text, 1),
|
|
52
|
+
disabled-container-color: inspection.get-theme-color($theme, foreground, disabled-button,
|
|
53
|
+
0.12),
|
|
54
|
+
disabled-label-text-color: inspection.get-theme-color($theme, foreground, disabled-button,
|
|
55
|
+
if($is-dark, 0.5, 0.38)),
|
|
55
56
|
container-elevation: 2,
|
|
56
57
|
disabled-container-elevation: 0,
|
|
57
58
|
focus-container-elevation: 4,
|
|
@@ -63,13 +64,23 @@ $prefix: (mdc, protected-button);
|
|
|
63
64
|
|
|
64
65
|
// Generates the mapping for the properties that change based on the button palette color.
|
|
65
66
|
@function private-get-color-palette-color-tokens($theme, $palette-name) {
|
|
66
|
-
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
67
67
|
$container-color: inspection.get-theme-color($theme, $palette-name, default);
|
|
68
|
-
$
|
|
68
|
+
$label-text-color: null;
|
|
69
|
+
|
|
70
|
+
// Ideally we would derive all values directly from the theme, but it causes a lot of regressions
|
|
71
|
+
// internally. For now we fall back to the old hardcoded behavior only for internal apps.
|
|
72
|
+
@if (token-utils.$private-is-internal-build) {
|
|
73
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
74
|
+
$contrast-tone: mdc-helpers.variable-safe-contrast-tone($container-color, $is-dark);
|
|
75
|
+
$label-text-color: if($contrast-tone == 'dark', #000, #fff);
|
|
76
|
+
}
|
|
77
|
+
@else {
|
|
78
|
+
$label-text-color: inspection.get-theme-color($theme, $palette-name, default-contrast, 1);
|
|
79
|
+
}
|
|
69
80
|
|
|
70
81
|
@return (
|
|
71
82
|
container-color: $container-color,
|
|
72
|
-
label-text-color:
|
|
83
|
+
label-text-color: $label-text-color,
|
|
73
84
|
);
|
|
74
85
|
}
|
|
75
86
|
|
|
@@ -45,15 +45,14 @@ $prefix: (mdc, radio);
|
|
|
45
45
|
@function get-color-tokens($theme, $palette-name: accent) {
|
|
46
46
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
47
47
|
$palette-color: inspection.get-theme-color($theme, $palette-name, default);
|
|
48
|
-
$on-surface: if($is-dark, #fff, #000);
|
|
49
48
|
$icon-color: theming.get-color-from-palette(palette.$gray-palette, if($is-dark, 200, 900));
|
|
50
49
|
|
|
51
50
|
@return (
|
|
52
|
-
disabled-selected-icon-color: $
|
|
53
|
-
disabled-unselected-icon-color: $
|
|
51
|
+
disabled-selected-icon-color: inspection.get-theme-color($theme, foreground, icon, 1),
|
|
52
|
+
disabled-unselected-icon-color: inspection.get-theme-color($theme, foreground, icon, 1),
|
|
54
53
|
unselected-hover-icon-color: $icon-color,
|
|
55
|
-
unselected-icon-color:
|
|
56
|
-
unselected-pressed-icon-color:
|
|
54
|
+
unselected-icon-color: inspection.get-theme-color($theme, foreground, icon, 0.54),
|
|
55
|
+
unselected-pressed-icon-color: inspection.get-theme-color($theme, foreground, icon, 0.54),
|
|
57
56
|
selected-focus-icon-color: $palette-color,
|
|
58
57
|
selected-hover-icon-color: $palette-color,
|
|
59
58
|
selected-icon-color: $palette-color,
|
|
@@ -44,11 +44,11 @@ $prefix: (mdc, text-button);
|
|
|
44
44
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
45
45
|
@function get-color-tokens($theme) {
|
|
46
46
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
47
|
-
$on-surface: if($is-dark, #fff, #000);
|
|
48
47
|
|
|
49
48
|
@return (
|
|
50
|
-
label-text-color: $
|
|
51
|
-
disabled-label-text-color:
|
|
49
|
+
label-text-color: inspection.get-theme-color($theme, foreground, text, 1),
|
|
50
|
+
disabled-label-text-color: inspection.get-theme-color($theme, foreground, disabled-button,
|
|
51
|
+
if($is-dark, 0.5, 0.38)),
|
|
52
52
|
);
|
|
53
53
|
}
|
|
54
54
|
|
package/datepicker/index.d.ts
CHANGED
|
@@ -1481,6 +1481,7 @@ export declare class MatEndDate<D> extends MatDateRangeInputPartBase<D> {
|
|
|
1481
1481
|
protected _getValueFromModel(modelValue: DateRange<D>): D | null;
|
|
1482
1482
|
protected _shouldHandleChangeEvent(change: DateSelectionModelChange<DateRange<D>>): boolean;
|
|
1483
1483
|
protected _assignValueToModel(value: D | null): void;
|
|
1484
|
+
private _moveCaretToEndOfStartInput;
|
|
1484
1485
|
_onKeydown(event: KeyboardEvent): void;
|
|
1485
1486
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatEndDate<any>, [null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
1486
1487
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MatEndDate<any>, "input[matEndDate]", never, {}, { "dateChange": "dateChange"; "dateInput": "dateInput"; }, never, never, true, never>;
|