@angular/material 20.0.4 → 20.1.0-next.1
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/_index.scss +0 -1
- package/autocomplete/_m2-autocomplete.scss +5 -15
- package/badge/_badge-theme.scss +2 -2
- package/badge/_m2-badge.scss +13 -34
- package/bottom-sheet/_m2-bottom-sheet.scss +6 -15
- package/button/_button-theme.scss +2 -2
- package/button/_fab-theme.scss +2 -2
- package/button/_icon-button-theme.scss +2 -2
- package/button/_m2-button.scss +83 -127
- package/button/_m2-fab.scss +40 -68
- package/button/_m2-icon-button.scss +18 -30
- package/button/testing/index.d.ts +0 -1
- package/button-toggle/_button-toggle-theme.scss +2 -1
- package/button-toggle/_m2-button-toggle.scss +24 -49
- package/card/_m2-card.scss +9 -18
- package/checkbox/_checkbox-theme.scss +4 -3
- package/checkbox/_m2-checkbox.scss +33 -62
- package/chips/_chips-theme.scss +7 -4
- package/chips/_m2-chip.scss +22 -47
- package/chips/index.d.ts +56 -4
- package/chips/testing/index.d.ts +23 -2
- package/core/_m2-app.scss +6 -19
- package/core/m2/_theming.scss +89 -79
- package/core/option/_m2-optgroup.scss +3 -13
- package/core/option/_m2-option.scss +14 -21
- package/core/option/_option-theme.scss +3 -3
- package/core/ripple/_m2-ripple.scss +5 -22
- package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +11 -22
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +3 -3
- package/core/style/_private.scss +6 -9
- package/core/style/_sass-utils.scss +0 -29
- package/core/tokens/_m2-utils.scss +10 -42
- package/{date-range-input-harness.d-CaEyN8dT.d.ts → date-range-input-harness.d-CJ4r85Uf.d.ts} +7 -4
- package/datepicker/_datepicker-theme.scss +16 -50
- package/datepicker/_m2-datepicker.scss +45 -137
- package/datepicker/testing/index.d.ts +3 -3
- package/dialog/_m2-dialog.scss +6 -25
- package/divider/_m2-divider.scss +3 -14
- package/expansion/_m2-expansion.scss +15 -25
- package/fesm2022/animation-DfMFjxHu.mjs.map +1 -1
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs +1 -1
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs +4 -7
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +2 -2
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs +26 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +132 -14
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/common-module-cKSwHniA.mjs.map +1 -1
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/date-formats-K6TQue-Y.mjs.map +1 -1
- package/fesm2022/{date-range-input-harness-Bp1T4oUe.mjs → date-range-input-harness-DEyfkeOs.mjs} +32 -4
- package/fesm2022/date-range-input-harness-DEyfkeOs.mjs.map +1 -0
- package/fesm2022/datepicker/testing.mjs +3 -3
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +1 -1
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/error-options-DCNQlTOA.mjs.map +1 -1
- package/fesm2022/error-state-Dtb1IHM-.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing/control.mjs +26 -1
- package/fesm2022/form-field/testing/control.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs +4 -4
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/{form-field-CFbrnFED.mjs → form-field-C9DZXojn.mjs} +3 -3
- package/fesm2022/form-field-C9DZXojn.mjs.map +1 -0
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon-button-DxiIc1ex.mjs.map +1 -1
- package/fesm2022/icon-registry-CwOTJ7YM.mjs.map +1 -1
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/index-BFRo2fUq.mjs.map +1 -1
- package/fesm2022/index-DwiL-HGk.mjs.map +1 -1
- package/fesm2022/input/testing.mjs +7 -4
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/{input-harness-oQzj5EsQ.mjs → input-harness-C5Msdc4-.mjs} +6 -3
- package/fesm2022/input-harness-C5Msdc4-.mjs.map +1 -0
- package/fesm2022/input-value-accessor-D1GvPuqO.mjs.map +1 -1
- package/fesm2022/input.mjs +27 -3
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/internal-form-field-D5iFxU6d.mjs.map +1 -1
- package/fesm2022/line-Bz5f9Cyx.mjs.map +1 -1
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +11 -2
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/{module-B0CLRw5e.mjs → module-BDiw_nWS.mjs} +3 -3
- package/fesm2022/module-BDiw_nWS.mjs.map +1 -0
- package/fesm2022/module-CWxMD37a.mjs.map +1 -1
- package/fesm2022/module-Ce6F7TNm.mjs.map +1 -1
- package/fesm2022/{module-B62K-792.mjs → module-DzZHEh7B.mjs} +2 -2
- package/fesm2022/module-DzZHEh7B.mjs.map +1 -0
- package/fesm2022/option-BzhYL_xC.mjs.map +1 -1
- package/fesm2022/option-harness-BFcc-M_4.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs +2 -3
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +3 -3
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox-DDmgx3P4.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox-module-4F8Up4PL.mjs.map +1 -1
- package/fesm2022/public-api-BoO5eSq-.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/ripple-BYgV4oZC.mjs.map +1 -1
- package/fesm2022/ripple-loader-BnMiRtmT.mjs.map +1 -1
- package/fesm2022/select/testing.mjs +8 -5
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select.mjs +3 -3
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +2 -2
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/structural-styles-CObeNzjn.mjs.map +1 -1
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +1 -1
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +2 -2
- package/form-field/_m2-form-field.scss +59 -93
- package/form-field/testing/control/index.d.ts +8 -5
- package/form-field/testing/index.d.ts +5 -5
- package/form-field-control-harness.d-BLvFBy6v.d.ts +18 -0
- package/grid-list/_m2-grid-list.scss +0 -13
- package/icon/_m2-icon.scss +0 -13
- package/input/index.d.ts +11 -0
- package/input/testing/index.d.ts +5 -4
- package/{input-harness.d-8fkAAbu2.d.ts → input-harness.d-DVI6ttzl.d.ts} +4 -4
- package/list/_list-theme.scss +10 -5
- package/list/_m2-list.scss +19 -37
- package/menu/_m2-menu.scss +12 -23
- package/menu/index.d.ts +2 -0
- package/package.json +6 -6
- package/paginator/_m2-paginator.scss +7 -18
- package/paginator/testing/index.d.ts +2 -3
- 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/progress-bar/_m2-progress-bar.scss +11 -20
- package/progress-bar/_progress-bar-theme.scss +2 -2
- package/progress-spinner/_m2-progress-spinner.scss +7 -15
- package/progress-spinner/_progress-spinner-theme.scss +2 -2
- package/radio/_m2-radio.scss +21 -32
- package/radio/_radio-theme.scss +6 -3
- package/schematics/ng-add/index.js +2 -2
- package/select/_m2-select.scss +14 -36
- package/select/_select-theme.scss +6 -3
- package/select/testing/index.d.ts +5 -6
- package/sidenav/_m2-sidenav.scss +10 -20
- package/slide-toggle/_m2-slide-toggle.scss +13 -20
- package/slide-toggle/_slide-toggle-theme.scss +3 -2
- package/slider/_m2-slider.scss +27 -39
- package/slider/_slider-theme.scss +2 -2
- package/snack-bar/_m2-snack-bar.scss +5 -22
- package/sort/_m2-sort.scss +3 -33
- package/stepper/_m2-stepper.scss +23 -34
- package/stepper/_m3-stepper.scss +2 -2
- package/stepper/_stepper-theme.scss +2 -2
- package/table/_m2-table.scss +6 -17
- package/tabs/_m2-tabs.scss +19 -36
- package/tabs/_tabs-theme.scss +4 -4
- package/timepicker/_m2-timepicker.scss +5 -15
- package/toolbar/_m2-toolbar.scss +4 -15
- package/tooltip/_m2-tooltip.scss +4 -14
- package/tree/_m2-tree.scss +4 -16
- package/core/tokens/_m2-tokens.scss +0 -131
- package/fesm2022/date-range-input-harness-Bp1T4oUe.mjs.map +0 -1
- package/fesm2022/form-field-CFbrnFED.mjs.map +0 -1
- package/fesm2022/input-harness-oQzj5EsQ.mjs.map +0 -1
- package/fesm2022/module-B0CLRw5e.mjs.map +0 -1
- package/fesm2022/module-B62K-792.mjs.map +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
@use '../../tokens/m2-utils';
|
|
2
1
|
@use '../../theming/inspection';
|
|
3
|
-
@use '
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use '../../tokens/m2-utils';
|
|
4
|
+
@use '../../tokens/m3-utils';
|
|
4
5
|
|
|
5
6
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
6
7
|
// but may be in a future version of the theming API.
|
|
@@ -9,21 +10,20 @@
|
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
12
|
-
@function get-color-tokens($theme, $
|
|
13
|
+
@function get-color-tokens($theme, $color-variant) {
|
|
13
14
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
14
15
|
$disabled-color: if($is-dark, #686868, #b0b0b0);
|
|
15
|
-
$
|
|
16
|
+
$system: m2-utils.get-system($theme);
|
|
17
|
+
$system: m3-utils.replace-colors-with-variant($system, secondary, $color-variant);
|
|
16
18
|
|
|
17
19
|
@return (
|
|
18
|
-
pseudo-checkbox-full-selected-icon-color:
|
|
19
|
-
pseudo-checkbox-full-selected-checkmark-color: $
|
|
20
|
-
pseudo-checkbox-full-unselected-icon-color:
|
|
21
|
-
|
|
22
|
-
pseudo-checkbox-full-disabled-selected-checkmark-color: $checkmark-color,
|
|
20
|
+
pseudo-checkbox-full-selected-icon-color: map.get($system, secondary),
|
|
21
|
+
pseudo-checkbox-full-selected-checkmark-color: map.get($system, background),
|
|
22
|
+
pseudo-checkbox-full-unselected-icon-color: map.get($system, on-surface-variant),
|
|
23
|
+
pseudo-checkbox-full-disabled-selected-checkmark-color: map.get($system, background),
|
|
23
24
|
pseudo-checkbox-full-disabled-unselected-icon-color: $disabled-color,
|
|
24
25
|
pseudo-checkbox-full-disabled-selected-icon-color: $disabled-color,
|
|
25
|
-
pseudo-checkbox-minimal-selected-checkmark-color:
|
|
26
|
-
inspection.get-theme-color($theme, $palette-name),
|
|
26
|
+
pseudo-checkbox-minimal-selected-checkmark-color: map.get($system, secondary),
|
|
27
27
|
pseudo-checkbox-minimal-disabled-selected-checkmark-color: if($is-dark, #686868, #b0b0b0),
|
|
28
28
|
);
|
|
29
29
|
}
|
|
@@ -37,14 +37,3 @@
|
|
|
37
37
|
@function get-density-tokens($theme) {
|
|
38
38
|
@return ();
|
|
39
39
|
}
|
|
40
|
-
|
|
41
|
-
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
42
|
-
// This is used to create token slots.
|
|
43
|
-
@function get-token-slots() {
|
|
44
|
-
@return sass-utils.deep-merge-all(
|
|
45
|
-
get-unthemable-tokens(),
|
|
46
|
-
get-color-tokens(m2-utils.$placeholder-color-config),
|
|
47
|
-
get-typography-tokens(m2-utils.$placeholder-typography-config),
|
|
48
|
-
get-density-tokens(m2-utils.$placeholder-density-config)
|
|
49
|
-
);
|
|
50
|
-
}
|
|
@@ -48,18 +48,18 @@
|
|
|
48
48
|
// don't attach to the `mat-*` classes. Also note that this needs to be below `.mat-primary`
|
|
49
49
|
// in order to allow for the color to be overwritten if the checkbox is inside a parent that
|
|
50
50
|
// has `mat-accent` and is placed inside another parent that has `mat-primary`.
|
|
51
|
-
@include _palette-styles($theme,
|
|
51
|
+
@include _palette-styles($theme, secondary);
|
|
52
52
|
|
|
53
53
|
.mat-primary {
|
|
54
54
|
@include _palette-styles($theme, primary);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
.mat-accent {
|
|
58
|
-
@include _palette-styles($theme,
|
|
58
|
+
@include _palette-styles($theme, secondary);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.mat-warn {
|
|
62
|
-
@include _palette-styles($theme,
|
|
62
|
+
@include _palette-styles($theme, error);
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
package/core/style/_private.scss
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
@use './elevation';
|
|
2
|
-
@use '../
|
|
2
|
+
@use '../tokens/m2-utils';
|
|
3
|
+
@use 'sass:map';
|
|
3
4
|
|
|
4
5
|
@mixin private-theme-elevation($zValue, $theme) {
|
|
5
|
-
$
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@include elevation.elevation($zValue, $elevation-color-or-default);
|
|
6
|
+
$system: m2-utils.get-system($theme);
|
|
7
|
+
@include elevation.elevation($zValue, map.get($system, shadow));
|
|
9
8
|
}
|
|
10
9
|
|
|
11
10
|
@mixin private-theme-overridable-elevation($zValue, $theme) {
|
|
12
|
-
$
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@include elevation.overridable-elevation($zValue, $elevation-color-or-default);
|
|
11
|
+
$system: m2-utils.get-system($theme);
|
|
12
|
+
@include elevation.overridable-elevation($zValue, map.get($system, shadow));
|
|
16
13
|
}
|
|
17
14
|
|
|
18
15
|
// If the mat-animation-noop class is present on the components root element,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use 'sass:color';
|
|
2
1
|
@use 'sass:string';
|
|
3
2
|
@use 'sass:map';
|
|
4
3
|
@use 'sass:meta';
|
|
@@ -51,34 +50,6 @@ $use-system-typography-variables: false;
|
|
|
51
50
|
@return $result;
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
/// A version of the Sass `color.change` function that is safe ot use with CSS variables.
|
|
55
|
-
@function safe-color-change($color, $args...) {
|
|
56
|
-
$args: meta.keywords($args);
|
|
57
|
-
$use-color-mix: $use-system-color-variables or
|
|
58
|
-
(is-css-var-name($color) and string.index($color, '--mat') == 1);
|
|
59
|
-
@if (meta.type-of($color) == 'color') {
|
|
60
|
-
@return color.change($color, $args...);
|
|
61
|
-
}
|
|
62
|
-
@else if ($color != null and
|
|
63
|
-
map.get($args, alpha) != null and $use-color-mix) {
|
|
64
|
-
$opacity: map.get($args, alpha);
|
|
65
|
-
@if meta.type-of($opacity) == number {
|
|
66
|
-
$opacity: ($opacity * 100) + '%';
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@if (is-css-var-name($opacity)) {
|
|
70
|
-
$opacity: calc(var($opacity) * 100%);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
@if (is-css-var-name($color)) {
|
|
74
|
-
$color: var($color);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
@return #{color-mix(in srgb, #{$color} #{$opacity}, transparent)};
|
|
78
|
-
}
|
|
79
|
-
@return $color;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
53
|
// Returns whether the $value is a CSS variable name based on whether it's a string prefixed
|
|
83
54
|
// by "--".
|
|
84
55
|
@function is-css-var-name($value) {
|
|
@@ -1,52 +1,20 @@
|
|
|
1
|
-
@use '../m2/palette';
|
|
2
|
-
@use '../m2/theming';
|
|
3
|
-
@use '../m2/typography';
|
|
4
1
|
@use 'sass:color';
|
|
5
2
|
@use 'sass:math';
|
|
6
3
|
@use 'sass:meta';
|
|
7
|
-
|
|
8
|
-
$_placeholder-color-palette: theming.define-palette(palette.$red-palette);
|
|
4
|
+
@use 'sass:map';
|
|
9
5
|
|
|
10
6
|
// Indicates whether we're building internally. Used for backwards compatibility.
|
|
11
7
|
$private-is-internal-build: false;
|
|
12
8
|
|
|
13
|
-
//
|
|
14
|
-
|
|
15
|
-
$
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
$_placeholder-typography-level-config: typography.typography-config-level-from-mdc(body1);
|
|
25
|
-
|
|
26
|
-
// Placeholder typography config that can be passed to token getter functions when generating token
|
|
27
|
-
// slots.
|
|
28
|
-
$placeholder-typography-config: (
|
|
29
|
-
font-family: 'Roboto, sans-serif',
|
|
30
|
-
headline-1: $_placeholder-typography-level-config,
|
|
31
|
-
headline-2: $_placeholder-typography-level-config,
|
|
32
|
-
headline-3: $_placeholder-typography-level-config,
|
|
33
|
-
headline-4: $_placeholder-typography-level-config,
|
|
34
|
-
headline-5: $_placeholder-typography-level-config,
|
|
35
|
-
headline-6: $_placeholder-typography-level-config,
|
|
36
|
-
subtitle-1: $_placeholder-typography-level-config,
|
|
37
|
-
subtitle-2: $_placeholder-typography-level-config,
|
|
38
|
-
body-1: $_placeholder-typography-level-config,
|
|
39
|
-
body-2: $_placeholder-typography-level-config,
|
|
40
|
-
caption: $_placeholder-typography-level-config,
|
|
41
|
-
button: $_placeholder-typography-level-config,
|
|
42
|
-
overline: $_placeholder-typography-level-config,
|
|
43
|
-
subheading-1: $_placeholder-typography-level-config,
|
|
44
|
-
title: $_placeholder-typography-level-config,
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
// Placeholder density config that can be passed to token getter functions when generating token
|
|
48
|
-
// slots.
|
|
49
|
-
$placeholder-density-config: 0;
|
|
9
|
+
// Gets the theme's system values as a flat map.
|
|
10
|
+
@function get-system($theme) {
|
|
11
|
+
$system: map.get($theme, _mat-system);
|
|
12
|
+
@if $system {
|
|
13
|
+
@return $system;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@return ();
|
|
17
|
+
}
|
|
50
18
|
|
|
51
19
|
/// Inherited function from MDC that computes which contrast tone to use on top of a color.
|
|
52
20
|
/// This is used only in a narrow set of use cases when generating M2 button tokens to maintain
|
package/{date-range-input-harness.d-CaEyN8dT.d.ts → date-range-input-harness.d-CJ4r85Uf.d.ts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BaseHarnessFilters, ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
-
import {
|
|
2
|
+
import { MatFormFieldControlHarnessFilters, MatFormFieldControlHarnessBase } from '@angular/material/form-field/testing/control';
|
|
3
3
|
|
|
4
4
|
/** A set of criteria that can be used to filter a list of datepicker input instances. */
|
|
5
|
-
interface DatepickerInputHarnessFilters extends
|
|
5
|
+
interface DatepickerInputHarnessFilters extends MatFormFieldControlHarnessFilters {
|
|
6
6
|
/** Filters based on the value of the input. */
|
|
7
7
|
value?: string | RegExp;
|
|
8
8
|
/** Filters based on the placeholder text of the input. */
|
|
@@ -34,13 +34,13 @@ interface CalendarCellHarnessFilters extends BaseHarnessFilters {
|
|
|
34
34
|
inPreviewRange?: boolean;
|
|
35
35
|
}
|
|
36
36
|
/** A set of criteria that can be used to filter a list of date range input instances. */
|
|
37
|
-
interface DateRangeInputHarnessFilters extends
|
|
37
|
+
interface DateRangeInputHarnessFilters extends MatFormFieldControlHarnessFilters {
|
|
38
38
|
/** Filters based on the value of the input. */
|
|
39
39
|
value?: string | RegExp;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
/** Base class for datepicker input harnesses. */
|
|
43
|
-
declare abstract class MatDatepickerInputHarnessBase extends
|
|
43
|
+
declare abstract class MatDatepickerInputHarnessBase extends MatFormFieldControlHarnessBase {
|
|
44
44
|
/** Whether the input is disabled. */
|
|
45
45
|
isDisabled(): Promise<boolean>;
|
|
46
46
|
/** Whether the input is required. */
|
|
@@ -251,6 +251,7 @@ declare class MatEndDateHarness extends MatDatepickerInputHarnessBase {
|
|
|
251
251
|
/** Harness for interacting with a standard Material date range input in tests. */
|
|
252
252
|
declare class MatDateRangeInputHarness extends DatepickerTriggerHarnessBase {
|
|
253
253
|
static hostSelector: string;
|
|
254
|
+
private readonly _floatingLabelSelector;
|
|
254
255
|
/**
|
|
255
256
|
* Gets a `HarnessPredicate` that can be used to search for a `MatDateRangeInputHarness`
|
|
256
257
|
* that meets certain criteria.
|
|
@@ -264,6 +265,8 @@ declare class MatDateRangeInputHarness extends DatepickerTriggerHarnessBase {
|
|
|
264
265
|
getStartInput(): Promise<MatStartDateHarness>;
|
|
265
266
|
/** Gets the inner start date input inside the range input. */
|
|
266
267
|
getEndInput(): Promise<MatEndDateHarness>;
|
|
268
|
+
/** Gets the floating label text for the range input, if it exists. */
|
|
269
|
+
getLabel(): Promise<string | null>;
|
|
267
270
|
/** Gets the separator text between the values of the two inputs. */
|
|
268
271
|
getSeparator(): Promise<string>;
|
|
269
272
|
/** Gets whether the range input is disabled. */
|
|
@@ -9,26 +9,6 @@
|
|
|
9
9
|
@use '../core/typography/typography';
|
|
10
10
|
@use '../button/icon-button-theme';
|
|
11
11
|
|
|
12
|
-
// TODO(crisbeto): these variables aren't used anymore and should be removed.
|
|
13
|
-
$selected-today-box-shadow-width: 1px;
|
|
14
|
-
$selected-fade-amount: 0.6;
|
|
15
|
-
$range-fade-amount: 0.2;
|
|
16
|
-
$today-fade-amount: 0.2;
|
|
17
|
-
$calendar-body-font-size: 13px !default;
|
|
18
|
-
$calendar-weekday-table-font-size: 11px !default;
|
|
19
|
-
|
|
20
|
-
@mixin _calendar-color($theme, $palette-name) {
|
|
21
|
-
$palette-color: inspection.get-theme-color($theme, $palette-name);
|
|
22
|
-
$range-color: m2-datepicker.private-get-range-background-color($palette-color);
|
|
23
|
-
$range-tokens: m2-datepicker.get-range-color-tokens($range-color);
|
|
24
|
-
$calendar-tokens: m2-datepicker.private-get-calendar-color-palette-color-tokens(
|
|
25
|
-
$theme,
|
|
26
|
-
$palette-name
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
@include token-utils.create-token-values-mixed(map.merge($calendar-tokens, $range-tokens));
|
|
30
|
-
}
|
|
31
|
-
|
|
32
12
|
/// Outputs base theme styles (styles not dependent on the color, typography, or density settings)
|
|
33
13
|
/// for the mat-datepicker.
|
|
34
14
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
@@ -51,28 +31,19 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
51
31
|
map.get(m3-datepicker.get-tokens($theme, $color-variant), color));
|
|
52
32
|
} @else {
|
|
53
33
|
@include sass-utils.current-selector-or-root() {
|
|
54
|
-
@include token-utils.create-token-values-mixed(
|
|
34
|
+
@include token-utils.create-token-values-mixed(
|
|
35
|
+
m2-datepicker.get-color-tokens($theme, primary));
|
|
55
36
|
}
|
|
56
37
|
|
|
57
|
-
.mat-datepicker-content {
|
|
38
|
+
.mat-datepicker-content, .mat-datepicker-toggle-active {
|
|
58
39
|
&.mat-accent {
|
|
59
|
-
@include
|
|
40
|
+
@include token-utils.create-token-values-mixed(
|
|
41
|
+
m2-datepicker.get-color-tokens($theme, secondary));
|
|
60
42
|
}
|
|
61
43
|
|
|
62
44
|
&.mat-warn {
|
|
63
|
-
@include
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.mat-datepicker-toggle-active {
|
|
68
|
-
&.mat-accent {
|
|
69
|
-
$accent-tokens: m2-datepicker.private-get-toggle-color-palette-color-tokens($theme, accent);
|
|
70
|
-
@include token-utils.create-token-values-mixed($accent-tokens);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&.mat-warn {
|
|
74
|
-
$warn-tokens: m2-datepicker.private-get-toggle-color-palette-color-tokens($theme, warn);
|
|
75
|
-
@include token-utils.create-token-values-mixed($warn-tokens);
|
|
45
|
+
@include token-utils.create-token-values-mixed(
|
|
46
|
+
m2-datepicker.get-color-tokens($theme, error));
|
|
76
47
|
}
|
|
77
48
|
}
|
|
78
49
|
}
|
|
@@ -92,21 +63,16 @@ $calendar-weekday-table-font-size: 11px !default;
|
|
|
92
63
|
|
|
93
64
|
@mixin date-range-colors(
|
|
94
65
|
$range-color,
|
|
95
|
-
$comparison-color:
|
|
96
|
-
$overlap-color:
|
|
97
|
-
$overlap-selected-color:
|
|
98
|
-
m2-datepicker.private-get-default-overlap-selected-color($overlap-color)
|
|
66
|
+
$comparison-color: rgba(#f9ab00, 0.2),
|
|
67
|
+
$overlap-color: #a8dab5,
|
|
68
|
+
$overlap-selected-color: color.adjust($overlap-color, $lightness: -30%)
|
|
99
69
|
) {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
);
|
|
106
|
-
|
|
107
|
-
@include sass-utils.current-selector-or-root() {
|
|
108
|
-
@include token-utils.create-token-values-mixed($tokens);
|
|
109
|
-
}
|
|
70
|
+
@include overrides((
|
|
71
|
+
calendar-date-in-range-state-background-color: $range-color,
|
|
72
|
+
calendar-date-in-comparison-range-state-background-color: $comparison-color,
|
|
73
|
+
calendar-date-in-overlap-range-state-background-color: $overlap-color,
|
|
74
|
+
calendar-date-in-overlap-range-selected-state-background-color: $overlap-selected-color,
|
|
75
|
+
));
|
|
110
76
|
}
|
|
111
77
|
|
|
112
78
|
/// Outputs density theme styles for the mat-datepicker.
|
|
@@ -1,29 +1,9 @@
|
|
|
1
1
|
@use 'sass:color';
|
|
2
|
-
@use 'sass:meta';
|
|
3
|
-
@use 'sass:math';
|
|
4
|
-
@use '../core/tokens/m2-utils';
|
|
5
2
|
@use '../core/theming/inspection';
|
|
6
3
|
@use '../core/style/elevation';
|
|
7
|
-
@use '../core/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
$_today-fade-amount: 0.2;
|
|
11
|
-
|
|
12
|
-
// Utility that produces a range background color from a specific color.
|
|
13
|
-
@function private-get-range-background-color($color) {
|
|
14
|
-
@return rgba($color, 0.2);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
// Utility that produces the overlap selected color from an overlap color.
|
|
18
|
-
@function private-get-default-overlap-selected-color($overlap-color) {
|
|
19
|
-
@return color.adjust($overlap-color, $lightness: -30%);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
// Default range comparison color.
|
|
23
|
-
$private-default-comparison-color: private-get-range-background-color(#f9ab00);
|
|
24
|
-
|
|
25
|
-
// Default range overlap color.
|
|
26
|
-
$private-default-overlap-color: #a8dab5;
|
|
4
|
+
@use '../core/tokens/m3-utils';
|
|
5
|
+
@use '../core/tokens/m2-utils';
|
|
6
|
+
@use 'sass:map';
|
|
27
7
|
|
|
28
8
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
29
9
|
// but may be in a future version of the theming API.
|
|
@@ -37,64 +17,50 @@ $private-default-overlap-color: #a8dab5;
|
|
|
37
17
|
}
|
|
38
18
|
|
|
39
19
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
40
|
-
@function get-color-tokens($theme) {
|
|
41
|
-
$
|
|
42
|
-
$
|
|
43
|
-
$
|
|
44
|
-
$disabled-text-color: inspection.get-theme-color($theme, foreground, disabled-text);
|
|
45
|
-
$divider-color: inspection.get-theme-color($theme, foreground, divider);
|
|
46
|
-
$hint-text-color: inspection.get-theme-color($theme, foreground, hint-text);
|
|
47
|
-
$preview-outline-color: $divider-color;
|
|
48
|
-
$today-disabled-outline-color: null;
|
|
49
|
-
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
50
|
-
|
|
51
|
-
$primary-color: inspection.get-theme-color($theme, primary);
|
|
52
|
-
$range-tokens: get-range-color-tokens(private-get-range-background-color($primary-color));
|
|
53
|
-
$calendar-tokens: private-get-calendar-color-palette-color-tokens($theme, primary);
|
|
54
|
-
$toggle-tokens: private-get-toggle-color-palette-color-tokens($theme, primary);
|
|
20
|
+
@function get-color-tokens($theme, $color-variant) {
|
|
21
|
+
$system: m2-utils.get-system($theme);
|
|
22
|
+
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
23
|
+
$disabled: m3-utils.color-with-opacity(map.get($system, on-surface), 38%);
|
|
55
24
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
datepicker-
|
|
75
|
-
|
|
76
|
-
datepicker-calendar-
|
|
77
|
-
datepicker-calendar-
|
|
78
|
-
datepicker-calendar-
|
|
79
|
-
datepicker-calendar-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
datepicker-calendar-date-today-outline-color: $
|
|
84
|
-
datepicker-calendar-date-today-disabled-state-outline-color: $
|
|
85
|
-
datepicker-calendar-date-text-color: $
|
|
25
|
+
@return (
|
|
26
|
+
datepicker-calendar-date-in-range-state-background-color:
|
|
27
|
+
m3-utils.color-with-opacity(map.get($system, primary), 20%),
|
|
28
|
+
datepicker-calendar-date-in-comparison-range-state-background-color:
|
|
29
|
+
m3-utils.color-with-opacity(map.get($system, secondary), 20%),
|
|
30
|
+
datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5,
|
|
31
|
+
datepicker-calendar-date-in-overlap-range-selected-state-background-color:
|
|
32
|
+
color.adjust(#a8dab5, $lightness: -30%),
|
|
33
|
+
datepicker-calendar-date-selected-state-text-color: map.get($system, on-primary),
|
|
34
|
+
datepicker-calendar-date-selected-state-background-color: map.get($system, primary),
|
|
35
|
+
datepicker-calendar-date-selected-disabled-state-background-color:
|
|
36
|
+
m3-utils.color-with-opacity(map.get($system, primary), 38%),
|
|
37
|
+
datepicker-calendar-date-today-selected-state-outline-color: map.get($system, on-primary),
|
|
38
|
+
datepicker-calendar-date-focus-state-background-color: m3-utils.color-with-opacity(
|
|
39
|
+
map.get($system, primary), map.get($system, focus-state-layer-opacity)),
|
|
40
|
+
datepicker-calendar-date-hover-state-background-color: m3-utils.color-with-opacity(
|
|
41
|
+
map.get($system, primary), map.get($system, hover-state-layer-opacity)),
|
|
42
|
+
|
|
43
|
+
datepicker-toggle-active-state-icon-color: map.get($system, primary),
|
|
44
|
+
datepicker-toggle-icon-color: map.get($system, on-surface-variant),
|
|
45
|
+
datepicker-calendar-body-label-text-color: map.get($system, on-surface-variant),
|
|
46
|
+
datepicker-calendar-period-button-text-color: map.get($system, on-surface),
|
|
47
|
+
datepicker-calendar-period-button-icon-color: map.get($system, on-surface-variant),
|
|
48
|
+
datepicker-calendar-navigation-button-icon-color: map.get($system, on-surface-variant),
|
|
49
|
+
datepicker-calendar-header-divider-color: map.get($system, outline),
|
|
50
|
+
datepicker-calendar-header-text-color: map.get($system, on-surface-variant),
|
|
51
|
+
|
|
52
|
+
datepicker-calendar-date-today-outline-color: map.get($system, on-surface-variant),
|
|
53
|
+
datepicker-calendar-date-today-disabled-state-outline-color: $disabled,
|
|
54
|
+
datepicker-calendar-date-text-color: map.get($system, on-surface),
|
|
86
55
|
datepicker-calendar-date-outline-color: transparent,
|
|
87
|
-
datepicker-calendar-date-disabled-state-text-color: $disabled
|
|
88
|
-
datepicker-calendar-date-preview-state-outline-color: $
|
|
89
|
-
|
|
90
|
-
datepicker-range-input-separator-color: $
|
|
91
|
-
datepicker-range-input-disabled-state-
|
|
92
|
-
datepicker-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
inspection.get-theme-color($theme, background, card),
|
|
96
|
-
datepicker-calendar-container-text-color: $text-color,
|
|
97
|
-
));
|
|
56
|
+
datepicker-calendar-date-disabled-state-text-color: $disabled,
|
|
57
|
+
datepicker-calendar-date-preview-state-outline-color: map.get($system, on-surface-variant),
|
|
58
|
+
datepicker-range-input-separator-color: map.get($system, on-surface),
|
|
59
|
+
datepicker-range-input-disabled-state-separator-color: $disabled,
|
|
60
|
+
datepicker-range-input-disabled-state-text-color: $disabled,
|
|
61
|
+
datepicker-calendar-container-background-color: map.get($system, surface),
|
|
62
|
+
datepicker-calendar-container-text-color: map.get($system, on-surface),
|
|
63
|
+
);
|
|
98
64
|
}
|
|
99
65
|
|
|
100
66
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
@@ -123,65 +89,7 @@ $private-default-overlap-color: #a8dab5;
|
|
|
123
89
|
);
|
|
124
90
|
}
|
|
125
91
|
|
|
126
|
-
// Gets the tokens map that can be used to override the range colors.
|
|
127
|
-
@function get-range-color-tokens(
|
|
128
|
-
$range-color,
|
|
129
|
-
$comparison-color: $private-default-comparison-color,
|
|
130
|
-
$overlap-color: $private-default-overlap-color,
|
|
131
|
-
$overlap-selected-color: private-get-default-overlap-selected-color($overlap-color)) {
|
|
132
|
-
|
|
133
|
-
@return (
|
|
134
|
-
datepicker-calendar-date-in-range-state-background-color: $range-color,
|
|
135
|
-
datepicker-calendar-date-in-comparison-range-state-background-color: $comparison-color,
|
|
136
|
-
datepicker-calendar-date-in-overlap-range-state-background-color: $overlap-color,
|
|
137
|
-
datepicker-calendar-date-in-overlap-range-selected-state-background-color:
|
|
138
|
-
$overlap-selected-color,
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
@function private-get-calendar-color-palette-color-tokens($theme, $palette-name) {
|
|
143
|
-
$palette-color: inspection.get-theme-color($theme, $palette-name);
|
|
144
|
-
$default-contrast: inspection.get-theme-color($theme, $palette-name, default-contrast);
|
|
145
|
-
$active-background-color: sass-utils.safe-color-change($palette-color, $alpha: 0.3);
|
|
146
|
-
$active-disabled-color: null;
|
|
147
|
-
|
|
148
|
-
@if (meta.type-of($palette-color) == color) {
|
|
149
|
-
$active-disabled-color: color.adjust($palette-color, $alpha: -$_selected-fade-amount);
|
|
150
|
-
}
|
|
151
|
-
@else {
|
|
152
|
-
$active-disabled-color: inspection.get-theme-color($theme, foreground, disabled-button);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
@return (
|
|
156
|
-
datepicker-calendar-date-selected-state-text-color: $default-contrast,
|
|
157
|
-
datepicker-calendar-date-selected-state-background-color: $palette-color,
|
|
158
|
-
datepicker-calendar-date-selected-disabled-state-background-color: $active-disabled-color,
|
|
159
|
-
datepicker-calendar-date-today-selected-state-outline-color: $default-contrast,
|
|
160
|
-
datepicker-calendar-date-focus-state-background-color: $active-background-color,
|
|
161
|
-
datepicker-calendar-date-hover-state-background-color: $active-background-color,
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
@function private-get-toggle-color-palette-color-tokens($theme, $palette-name) {
|
|
166
|
-
@return (
|
|
167
|
-
datepicker-toggle-active-state-icon-color:
|
|
168
|
-
inspection.get-theme-color($theme, $palette-name, text),
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
92
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
174
93
|
@function get-density-tokens($theme) {
|
|
175
94
|
@return ();
|
|
176
95
|
}
|
|
177
|
-
|
|
178
|
-
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
179
|
-
// This is used to create token slots.
|
|
180
|
-
@function get-token-slots() {
|
|
181
|
-
@return sass-utils.deep-merge-all(
|
|
182
|
-
get-unthemable-tokens(),
|
|
183
|
-
get-color-tokens(m2-utils.$placeholder-color-config),
|
|
184
|
-
get-typography-tokens(m2-utils.$placeholder-typography-config),
|
|
185
|
-
get-density-tokens(m2-utils.$placeholder-density-config)
|
|
186
|
-
);
|
|
187
|
-
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { D as DatepickerTriggerHarnessBase, a as DatepickerToggleHarnessFilters } from '../../date-range-input-harness.d-
|
|
2
|
-
export { c as CalendarCellHarnessFilters, C as CalendarHarnessFilters, h as CalendarView, d as DateRangeInputHarnessFilters, b as DatepickerInputHarnessFilters, j as MatCalendarCellHarness, i as MatCalendarHarness, g as MatDateRangeInputHarness, M as MatDatepickerInputHarness, f as MatEndDateHarness, e as MatStartDateHarness } from '../../date-range-input-harness.d-
|
|
1
|
+
import { D as DatepickerTriggerHarnessBase, a as DatepickerToggleHarnessFilters } from '../../date-range-input-harness.d-CJ4r85Uf.js';
|
|
2
|
+
export { c as CalendarCellHarnessFilters, C as CalendarHarnessFilters, h as CalendarView, d as DateRangeInputHarnessFilters, b as DatepickerInputHarnessFilters, j as MatCalendarCellHarness, i as MatCalendarHarness, g as MatDateRangeInputHarness, M as MatDatepickerInputHarness, f as MatEndDateHarness, e as MatStartDateHarness } from '../../date-range-input-harness.d-CJ4r85Uf.js';
|
|
3
3
|
import { HarnessPredicate } from '@angular/cdk/testing';
|
|
4
|
-
import '
|
|
4
|
+
import '@angular/material/form-field/testing/control';
|
|
5
5
|
|
|
6
6
|
/** Harness for interacting with a standard Material datepicker toggle in tests. */
|
|
7
7
|
declare class MatDatepickerToggleHarness extends DatepickerTriggerHarnessBase {
|
package/dialog/_m2-dialog.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@use '../core/tokens/m2-utils';
|
|
2
1
|
@use '../core/style/elevation';
|
|
3
|
-
@use '../core/style/sass-utils';
|
|
4
2
|
@use '../core/theming/inspection';
|
|
3
|
+
@use '../core/tokens/m2-utils';
|
|
4
|
+
@use 'sass:map';
|
|
5
5
|
|
|
6
6
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
7
7
|
// but may be in a future version of the theming API.
|
|
@@ -25,19 +25,11 @@
|
|
|
25
25
|
|
|
26
26
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
27
27
|
@function get-color-tokens($theme) {
|
|
28
|
-
$
|
|
29
|
-
|
|
30
|
-
// Ideally we would derive all values directly from the theme, but it causes a lot of regressions
|
|
31
|
-
// internally. For now we fall back to the old hardcoded behavior only for internal apps.
|
|
32
|
-
$text-base: if(m2-utils.$private-is-internal-build,
|
|
33
|
-
if($is-dark, #fff, #000),
|
|
34
|
-
inspection.get-theme-color($theme, foreground, text, 1)
|
|
35
|
-
);
|
|
36
|
-
|
|
28
|
+
$system: m2-utils.get-system($theme);
|
|
37
29
|
@return (
|
|
38
|
-
dialog-container-color:
|
|
39
|
-
dialog-subhead-color:
|
|
40
|
-
dialog-supporting-text-color:
|
|
30
|
+
dialog-container-color: map.get($system, surface),
|
|
31
|
+
dialog-subhead-color: map.get($system, on-surface),
|
|
32
|
+
dialog-supporting-text-color: map.get($system, on-surface-variant),
|
|
41
33
|
);
|
|
42
34
|
}
|
|
43
35
|
|
|
@@ -63,14 +55,3 @@
|
|
|
63
55
|
@function get-density-tokens($theme) {
|
|
64
56
|
@return ();
|
|
65
57
|
}
|
|
66
|
-
|
|
67
|
-
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
68
|
-
// This is used to create token slots.
|
|
69
|
-
@function get-token-slots() {
|
|
70
|
-
@return sass-utils.deep-merge-all(
|
|
71
|
-
get-unthemable-tokens(),
|
|
72
|
-
get-color-tokens(m2-utils.$placeholder-color-config),
|
|
73
|
-
get-typography-tokens(m2-utils.$placeholder-typography-config),
|
|
74
|
-
get-density-tokens(m2-utils.$placeholder-density-config)
|
|
75
|
-
);
|
|
76
|
-
}
|
package/divider/_m2-divider.scss
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@use '../core/tokens/m2-utils';
|
|
2
|
-
@use '
|
|
3
|
-
@use '../core/style/sass-utils';
|
|
2
|
+
@use 'sass:map';
|
|
4
3
|
|
|
5
4
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
6
5
|
// but may be in a future version of the theming API.
|
|
@@ -12,8 +11,9 @@
|
|
|
12
11
|
|
|
13
12
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
14
13
|
@function get-color-tokens($theme) {
|
|
14
|
+
$system: m2-utils.get-system($theme);
|
|
15
15
|
@return (
|
|
16
|
-
divider-color:
|
|
16
|
+
divider-color: map.get($system, outline)
|
|
17
17
|
);
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -26,14 +26,3 @@
|
|
|
26
26
|
@function get-density-tokens($theme) {
|
|
27
27
|
@return ();
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
31
|
-
// This is used to create token slots.
|
|
32
|
-
@function get-token-slots() {
|
|
33
|
-
@return sass-utils.deep-merge-all(
|
|
34
|
-
get-unthemable-tokens(),
|
|
35
|
-
get-color-tokens(m2-utils.$placeholder-color-config),
|
|
36
|
-
get-typography-tokens(m2-utils.$placeholder-typography-config),
|
|
37
|
-
get-density-tokens(m2-utils.$placeholder-density-config)
|
|
38
|
-
);
|
|
39
|
-
}
|