@angular/material 17.0.0-next.0 → 17.0.0-next.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/_index.scss +3 -4
- package/autocomplete/_autocomplete-theme.scss +12 -18
- package/autocomplete/index.d.ts +15 -24
- package/badge/_badge-theme.scss +15 -27
- package/badge/index.d.ts +9 -17
- package/bottom-sheet/_bottom-sheet-theme.scss +13 -22
- package/button/_button-base.scss +3 -3
- package/button/_button-theme-private.scss +3 -2
- package/button/_button-theme.scss +18 -25
- package/button/_fab-theme.scss +31 -49
- package/button/_icon-button-theme.scss +19 -26
- package/button/index.d.ts +22 -31
- package/button-toggle/_button-toggle-theme.scss +17 -28
- package/button-toggle/index.d.ts +15 -18
- package/card/_card-theme.scss +27 -38
- package/checkbox/_checkbox-theme.scss +28 -45
- package/checkbox/index.d.ts +21 -27
- package/chips/_chips-theme.scss +18 -56
- package/core/_core-theme.scss +24 -39
- package/core/color/_all-color.scss +7 -15
- package/core/density/private/_all-density.scss +34 -39
- package/core/focus-indicators/_focus-indicators-theme.scss +6 -8
- package/core/focus-indicators/_private.scss +22 -26
- package/core/index.d.ts +7 -11
- package/core/mdc-helpers/_mdc-helpers.scss +19 -22
- package/core/option/_optgroup-theme.scss +13 -23
- package/core/option/_option-theme.scss +23 -37
- package/core/ripple/_ripple-theme.scss +6 -10
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +17 -24
- package/core/style/_form-common.scss +7 -7
- package/core/style/_private.scss +5 -7
- package/core/style/_sass-utils.scss +7 -0
- package/core/testing/index.d.ts +2 -1
- package/core/theming/_all-theme.scss +41 -41
- package/core/theming/_inspection.scss +133 -59
- package/core/theming/_m2-inspection.scss +268 -0
- package/core/theming/_theming.scss +59 -20
- package/core/tokens/m2/mat/_autocomplete.scss +5 -8
- package/core/tokens/m2/mat/_badge.scss +12 -15
- package/core/tokens/m2/mat/_bottom-sheet.scss +11 -17
- package/core/tokens/m2/mat/_card.scss +15 -21
- package/core/tokens/m2/mat/_datepicker.scss +28 -38
- package/core/tokens/m2/mat/_divider.scss +5 -8
- package/core/tokens/m2/mat/_expansion.scss +24 -28
- package/core/tokens/m2/mat/_form-field.scss +21 -25
- package/core/tokens/m2/mat/_grid-list.scss +8 -8
- package/core/tokens/m2/mat/_icon.scss +3 -3
- package/core/tokens/m2/mat/_legacy-button-toggle.scss +15 -19
- package/core/tokens/m2/mat/_menu.scss +12 -17
- package/core/tokens/m2/mat/_optgroup.scss +12 -17
- package/core/tokens/m2/mat/_option.scss +16 -28
- package/core/tokens/m2/mat/_paginator.scss +16 -18
- package/core/tokens/m2/mat/_radio.scss +7 -10
- package/core/tokens/m2/mat/_select.scss +15 -29
- package/core/tokens/m2/mat/_sidenav.scss +12 -14
- package/core/tokens/m2/mat/_slide-toggle.scss +9 -17
- package/core/tokens/m2/mat/_slider.scss +5 -5
- package/core/tokens/m2/mat/_snack-bar.scss +7 -8
- package/core/tokens/m2/mat/_standard-button-toggle.scss +23 -22
- package/core/tokens/m2/mat/_stepper.scss +30 -33
- package/core/tokens/m2/mat/_tab-header-with-background.scss +6 -8
- package/core/tokens/m2/mat/_tab-header.scss +13 -18
- package/core/tokens/m2/mat/_table.scss +19 -23
- package/core/tokens/m2/mat/_toolbar.scss +12 -16
- package/core/tokens/m2/mdc/_checkbox.scss +21 -20
- package/core/tokens/m2/mdc/_chip.scss +38 -24
- package/core/tokens/m2/mdc/_circular-progress.scss +5 -6
- package/core/tokens/m2/mdc/_dialog.scss +16 -30
- package/core/tokens/m2/mdc/_elevated-card.scss +6 -9
- package/core/tokens/m2/mdc/_extended-fab.scss +8 -17
- package/core/tokens/m2/mdc/_fab.scss +6 -7
- package/core/tokens/m2/mdc/_filled-text-field.scss +16 -22
- package/core/tokens/m2/mdc/_icon-button.scss +3 -3
- package/core/tokens/m2/mdc/_linear-progress.scss +9 -10
- package/core/tokens/m2/mdc/_list.scss +44 -42
- package/core/tokens/m2/mdc/_outlined-card.scss +7 -10
- package/core/tokens/m2/mdc/_outlined-text-field.scss +14 -20
- package/core/tokens/m2/mdc/_plain-tooltip.scss +9 -22
- package/core/tokens/m2/mdc/_radio.scss +11 -11
- package/core/tokens/m2/mdc/_slider.scss +16 -23
- package/core/tokens/m2/mdc/_snack-bar.scss +10 -23
- package/core/tokens/m2/mdc/_switch.scss +16 -19
- package/core/tokens/m2/mdc/_tab-indicator.scss +5 -8
- package/core/tokens/m2/mdc/_tab.scss +5 -4
- package/core/typography/_all-typography.scss +44 -47
- package/core/typography/_definition.scss +258 -0
- package/core/typography/_property-getters.scss +63 -0
- package/core/typography/_typography-utils.scss +9 -69
- package/core/typography/_typography.scss +38 -494
- package/core/typography/_versioning.scss +91 -0
- package/datepicker/_datepicker-theme.scss +20 -34
- package/datepicker/index.d.ts +3 -3
- package/dialog/_dialog-theme.scss +22 -23
- package/dialog/_mdc-dialog-structure-overrides.scss +12 -10
- package/dialog/index.d.ts +2 -0
- package/divider/_divider-theme.scss +12 -18
- package/esm2022/autocomplete/autocomplete-trigger.mjs +5 -17
- package/esm2022/autocomplete/autocomplete.mjs +23 -50
- package/esm2022/badge/badge.mjs +11 -29
- package/esm2022/button/button-base.mjs +32 -27
- package/esm2022/button/button.mjs +6 -6
- package/esm2022/button/fab.mjs +23 -31
- package/esm2022/button/icon-button.mjs +6 -6
- package/esm2022/button/testing/button-harness.mjs +3 -3
- package/esm2022/button-toggle/button-toggle.mjs +25 -33
- package/esm2022/checkbox/checkbox.mjs +32 -39
- package/esm2022/core/option/optgroup.mjs +10 -11
- package/esm2022/core/option/option.mjs +6 -6
- package/esm2022/core/testing/option-harness.mjs +3 -3
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/datepicker/calendar.mjs +1 -1
- package/esm2022/datepicker/datepicker-base.mjs +2 -2
- package/esm2022/datepicker/datepicker-toggle.mjs +1 -1
- package/esm2022/datepicker/month-view.mjs +2 -2
- package/esm2022/datepicker/multi-year-view.mjs +2 -2
- package/esm2022/datepicker/year-view.mjs +2 -2
- package/esm2022/dialog/dialog-container.mjs +16 -3
- package/esm2022/form-field/form-field.mjs +3 -3
- package/esm2022/menu/menu-item.mjs +15 -11
- package/esm2022/menu/menu.mjs +9 -22
- package/esm2022/paginator/paginator.mjs +1 -1
- package/esm2022/select/select.mjs +3 -3
- package/esm2022/slide-toggle/slide-toggle.mjs +33 -37
- package/esm2022/slider/slider-input.mjs +19 -9
- package/esm2022/slider/slider.mjs +2 -2
- package/esm2022/snack-bar/simple-snack-bar.mjs +1 -1
- package/esm2022/tabs/tab-group.mjs +3 -3
- package/expansion/_expansion-theme.scss +16 -24
- package/fesm2022/autocomplete.mjs +25 -63
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +11 -28
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/button/testing.mjs +2 -2
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +25 -32
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +59 -61
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +31 -38
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/core/testing.mjs +2 -2
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +14 -13
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +6 -6
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +15 -2
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/menu.mjs +23 -31
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator.mjs +1 -1
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/select.mjs +2 -2
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +33 -36
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +20 -10
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +1 -1
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/tabs.mjs +2 -2
- package/fesm2022/tabs.mjs.map +1 -1
- package/form-field/_form-field-density.scss +3 -4
- package/form-field/_form-field-focus-overlay.scss +1 -1
- package/form-field/_form-field-sizing.scss +1 -1
- package/form-field/_form-field-theme.scss +24 -34
- package/grid-list/_grid-list-theme.scss +12 -19
- package/icon/_icon-theme.scss +17 -25
- package/input/_input-theme.scss +11 -23
- package/list/_list-theme.scss +27 -42
- package/menu/_menu-theme.scss +13 -22
- package/menu/index.d.ts +12 -18
- package/package.json +2 -2
- package/paginator/_paginator-theme.scss +15 -24
- 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/_progress-bar-theme.scss +17 -24
- package/progress-spinner/_progress-spinner-theme.scss +18 -24
- package/radio/_radio-theme.scss +23 -38
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/schematics/ng-generate/mdc-migration/index_bundled.js +44 -44
- package/schematics/ng-generate/mdc-migration/index_bundled.js.map +1 -1
- package/schematics/ng-update/index_bundled.js +25 -25
- package/select/_select-theme.scss +17 -31
- package/sidenav/_sidenav-theme.scss +12 -18
- package/slide-toggle/_slide-toggle-theme.scss +23 -40
- package/slide-toggle/index.d.ts +20 -23
- package/slider/_slider-theme.scss +25 -42
- package/snack-bar/_snack-bar-theme.scss +17 -26
- package/sort/_sort-theme.scss +13 -22
- package/stepper/_stepper-theme.scss +16 -34
- package/table/_table-theme.scss +14 -25
- package/tabs/_tabs-theme.scss +31 -45
- package/toolbar/_toolbar-theme.scss +22 -31
- package/tooltip/_tooltip-theme.scss +15 -23
- package/tree/_tree-theme.scss +20 -29
- package/button-toggle/_button-toggle-variables.scss +0 -16
- package/core/typography/_typography-deprecated.scss +0 -39
- package/paginator/_paginator-variables.scss +0 -15
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
@use 'sass:color';
|
|
2
|
-
@use 'sass:map';
|
|
3
2
|
@use 'sass:meta';
|
|
4
3
|
@use '../../token-utils';
|
|
5
|
-
@use '../../../theming/
|
|
4
|
+
@use '../../../theming/inspection';
|
|
6
5
|
@use '../../../style/sass-utils';
|
|
7
6
|
|
|
8
7
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -19,20 +18,19 @@ $prefix: (mat, sidenav);
|
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
22
|
-
@function get-color-tokens($
|
|
23
|
-
$is-dark:
|
|
24
|
-
$foreground: map.get($config, foreground);
|
|
25
|
-
$background: map.get($config, background);
|
|
21
|
+
@function get-color-tokens($theme) {
|
|
22
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
26
23
|
$scrim-opacity: 0.6;
|
|
27
|
-
$scrim-color:
|
|
24
|
+
$scrim-color: sass-utils.safe-color-change(
|
|
25
|
+
inspection.get-theme-color($theme, background, card), $alpha: $scrim-opacity);
|
|
28
26
|
$fallback-scrim-color: if($is-dark, rgba(#fff, $scrim-opacity), rgba(#000, $scrim-opacity));
|
|
29
27
|
|
|
30
28
|
@return (
|
|
31
|
-
container-divider-color:
|
|
32
|
-
container-background-color:
|
|
33
|
-
container-text-color:
|
|
34
|
-
content-background-color:
|
|
35
|
-
content-text-color:
|
|
29
|
+
container-divider-color: inspection.get-theme-color($theme, foreground, divider),
|
|
30
|
+
container-background-color: inspection.get-theme-color($theme, background, dialog),
|
|
31
|
+
container-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
32
|
+
content-background-color: inspection.get-theme-color($theme, background, background),
|
|
33
|
+
content-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
36
34
|
|
|
37
35
|
// We use invert() here to have the darken the background color expected to be used.
|
|
38
36
|
// If the background is light, we use a dark backdrop. If the background is dark, we
|
|
@@ -44,12 +42,12 @@ $prefix: (mat, sidenav);
|
|
|
44
42
|
}
|
|
45
43
|
|
|
46
44
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
47
|
-
@function get-typography-tokens($
|
|
45
|
+
@function get-typography-tokens($theme) {
|
|
48
46
|
@return ();
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
52
|
-
@function get-density-tokens($
|
|
50
|
+
@function get-density-tokens($theme) {
|
|
53
51
|
@return ();
|
|
54
52
|
}
|
|
55
53
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use '../../token-utils';
|
|
2
2
|
@use '../../../style/sass-utils';
|
|
3
|
-
@use '../../../
|
|
3
|
+
@use '../../../theming/inspection';
|
|
4
4
|
|
|
5
5
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
6
|
$prefix: (mat, slide-toggle);
|
|
@@ -12,31 +12,23 @@ $prefix: (mat, slide-toggle);
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
15
|
-
@function get-color-tokens($
|
|
15
|
+
@function get-color-tokens($theme) {
|
|
16
16
|
@return ();
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
20
|
-
@function get-typography-tokens($
|
|
21
|
-
// TODO(amysorto): The earlier implementation of the slide-toggle used MDC's APIs to create the
|
|
22
|
-
// typography tokens. As a result, we unintentionally allowed `null` typography configs to be
|
|
23
|
-
// passed in. Since there a lot of apps that now depend on this pattern, we need this temporary
|
|
24
|
-
// fallback.
|
|
25
|
-
@if ($config == null) {
|
|
26
|
-
$config: mdc-helpers.private-fallback-typography-from-mdc();
|
|
27
|
-
}
|
|
28
|
-
|
|
20
|
+
@function get-typography-tokens($theme) {
|
|
29
21
|
@return (
|
|
30
|
-
label-text-font: typography-
|
|
31
|
-
label-text-size:
|
|
32
|
-
label-text-tracking:
|
|
33
|
-
label-text-line-height:
|
|
34
|
-
label-text-weight:
|
|
22
|
+
label-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
23
|
+
label-text-size: inspection.get-theme-typography($theme, body-2, font-size),
|
|
24
|
+
label-text-tracking: inspection.get-theme-typography($theme, body-2, letter-spacing),
|
|
25
|
+
label-text-line-height: inspection.get-theme-typography($theme, body-2, line-height),
|
|
26
|
+
label-text-weight: inspection.get-theme-typography($theme, body-2, font-weight),
|
|
35
27
|
);
|
|
36
28
|
}
|
|
37
29
|
|
|
38
30
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
39
|
-
@function get-density-tokens($
|
|
31
|
+
@function get-density-tokens($theme) {
|
|
40
32
|
@return ();
|
|
41
33
|
}
|
|
42
34
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '../../token-utils';
|
|
3
2
|
@use '../../../style/sass-utils';
|
|
3
|
+
@use '../../../theming/inspection';
|
|
4
4
|
|
|
5
5
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
6
|
$prefix: (mat, slider);
|
|
@@ -12,8 +12,8 @@ $prefix: (mat, slider);
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
15
|
-
@function get-color-tokens($
|
|
16
|
-
$is-dark:
|
|
15
|
+
@function get-color-tokens($theme) {
|
|
16
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
17
17
|
|
|
18
18
|
@return (
|
|
19
19
|
// Opacity of value indicator text container
|
|
@@ -22,12 +22,12 @@ $prefix: (mat, slider);
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
25
|
-
@function get-typography-tokens($
|
|
25
|
+
@function get-typography-tokens($theme) {
|
|
26
26
|
@return ();
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
30
|
-
@function get-density-tokens($
|
|
30
|
+
@function get-density-tokens($theme) {
|
|
31
31
|
@return ();
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '../../token-utils';
|
|
3
|
-
@use '../../../theming/
|
|
2
|
+
@use '../../../theming/inspection';
|
|
4
3
|
@use '../../../style/sass-utils';
|
|
5
4
|
|
|
6
5
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -13,22 +12,22 @@ $prefix: (mat, snack-bar);
|
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
16
|
-
@function get-color-tokens($
|
|
17
|
-
$is-dark:
|
|
18
|
-
$accent: map.get($config, accent);
|
|
15
|
+
@function get-color-tokens($theme) {
|
|
16
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
19
17
|
|
|
20
18
|
@return (
|
|
21
|
-
button-color: if(
|
|
19
|
+
button-color: if(
|
|
20
|
+
$is-dark, rgba(0, 0, 0, 0.87), inspection.get-theme-color($theme, accent, text))
|
|
22
21
|
);
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
26
|
-
@function get-typography-tokens($
|
|
25
|
+
@function get-typography-tokens($theme) {
|
|
27
26
|
@return ();
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
31
|
-
@function get-density-tokens($
|
|
30
|
+
@function get-density-tokens($theme) {
|
|
32
31
|
@return ();
|
|
33
32
|
}
|
|
34
33
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use 'sass:meta';
|
|
3
3
|
@use '../../token-utils';
|
|
4
|
-
@use '../../../typography/typography-utils';
|
|
5
4
|
@use '../../../theming/theming';
|
|
5
|
+
@use '../../../theming/inspection';
|
|
6
6
|
@use '../../../style/sass-utils';
|
|
7
7
|
|
|
8
8
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -19,49 +19,50 @@ $prefix: (mat, standard-button-toggle);
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
22
|
-
@function get-color-tokens($
|
|
23
|
-
$
|
|
24
|
-
$background: map.get($config, background);
|
|
25
|
-
$theme-divider-color: theming.get-color-from-palette($foreground, divider);
|
|
22
|
+
@function get-color-tokens($theme) {
|
|
23
|
+
$theme-divider-color: inspection.get-theme-color($theme, foreground, divider);
|
|
26
24
|
|
|
27
25
|
// By default the theme usually has an rgba color for the dividers, which can
|
|
28
26
|
// stack up with the background of a button toggle. This can cause the border
|
|
29
27
|
// of a selected toggle to look different from an deselected one. We use a solid
|
|
30
28
|
// color to ensure that the border always stays the same.
|
|
31
|
-
$divider-color: if(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
$divider-color: if(
|
|
30
|
+
meta.type-of($theme-divider-color) == color,
|
|
31
|
+
theming.private-rgba-to-hex(
|
|
32
|
+
$theme-divider-color, inspection.get-theme-color($theme, background, card)),
|
|
33
|
+
$theme-divider-color);
|
|
35
34
|
|
|
36
35
|
@return (
|
|
37
|
-
text-color:
|
|
38
|
-
background-color:
|
|
39
|
-
state-layer-color:
|
|
40
|
-
|
|
41
|
-
selected-state-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
disabled-
|
|
36
|
+
text-color: inspection.get-theme-color($theme, foreground, text),
|
|
37
|
+
background-color: inspection.get-theme-color($theme, background, card),
|
|
38
|
+
state-layer-color: sass-utils.safe-color-change(
|
|
39
|
+
inspection.get-theme-color($theme, background, focused-button), $alpha: 1),
|
|
40
|
+
selected-state-background-color: inspection.get-theme-color(
|
|
41
|
+
$theme, background, selected-button),
|
|
42
|
+
selected-state-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
43
|
+
disabled-state-text-color: inspection.get-theme-color($theme, foreground, disabled-button),
|
|
44
|
+
disabled-state-background-color: inspection.get-theme-color($theme, background, card),
|
|
45
|
+
disabled-selected-state-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
45
46
|
disabled-selected-state-background-color:
|
|
46
|
-
|
|
47
|
+
inspection.get-theme-color($theme, background, selected-disabled-button),
|
|
47
48
|
divider-color: $divider-color,
|
|
48
49
|
);
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
52
|
-
@function get-typography-tokens($
|
|
53
|
+
@function get-typography-tokens($theme) {
|
|
53
54
|
@return (
|
|
54
55
|
// TODO(crisbeto): other components have tokens for all typography dimensions (font weight,
|
|
55
56
|
// letter spacing etc). The button toggle only has the font to match what it had in the
|
|
56
57
|
// old theming API and to reduce internal breakages. We should introduce more typography
|
|
57
58
|
// tokens at some point.
|
|
58
|
-
text-font: typography-
|
|
59
|
+
text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
59
60
|
);
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
63
|
-
@function get-density-tokens($
|
|
64
|
-
$density-scale: theming.clamp-density($
|
|
64
|
+
@function get-density-tokens($theme) {
|
|
65
|
+
$density-scale: theming.clamp-density(inspection.get-theme-density($theme), -4);
|
|
65
66
|
$size-scale: (
|
|
66
67
|
0: 48px,
|
|
67
68
|
-1: 44px,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../../token-utils';
|
|
3
3
|
@use '../../../theming/theming';
|
|
4
|
-
@use '../../../
|
|
4
|
+
@use '../../../theming/inspection';
|
|
5
5
|
@use '../../../style/sass-utils';
|
|
6
6
|
|
|
7
7
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -14,62 +14,59 @@ $prefix: (mat, stepper);
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
17
|
-
@function get-color-tokens($
|
|
18
|
-
|
|
19
|
-
$background: map.get($config, background);
|
|
20
|
-
$primary: map.get($config, primary);
|
|
21
|
-
$warn: map.get($config, warn);
|
|
22
|
-
|
|
23
|
-
@return map.merge(private-get-color-palette-color-tokens($primary), (
|
|
17
|
+
@function get-color-tokens($theme) {
|
|
18
|
+
@return map.merge(private-get-color-palette-color-tokens($theme, primary), (
|
|
24
19
|
// Background for stepper container.
|
|
25
|
-
container-color:
|
|
20
|
+
container-color: inspection.get-theme-color($theme, background, card),
|
|
26
21
|
// Color of the line indicator connecting the steps.
|
|
27
|
-
line-color:
|
|
22
|
+
line-color: inspection.get-theme-color($theme, foreground, divider),
|
|
28
23
|
// Background color of the header while hovered.
|
|
29
|
-
header-hover-state-layer-color:
|
|
24
|
+
header-hover-state-layer-color: inspection.get-theme-color($theme, background, hover),
|
|
30
25
|
// Background color of the header while focused.
|
|
31
|
-
header-focus-state-layer-color:
|
|
26
|
+
header-focus-state-layer-color: inspection.get-theme-color($theme, background, hover),
|
|
32
27
|
// Color of the text inside the step header.
|
|
33
|
-
header-label-text-color:
|
|
28
|
+
header-label-text-color: inspection.get-theme-color($theme, foreground, secondary-text),
|
|
34
29
|
// Color for the "optional" label in the step header.
|
|
35
|
-
header-optional-label-text-color:
|
|
30
|
+
header-optional-label-text-color: inspection.get-theme-color(
|
|
31
|
+
$theme, foreground, secondary-text),
|
|
36
32
|
// Color of the header text when a step is selected.
|
|
37
|
-
header-selected-state-label-text-color:
|
|
33
|
+
header-selected-state-label-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
38
34
|
// Color of the header text when a step is in an error state.
|
|
39
|
-
header-error-state-label-text-color:
|
|
35
|
+
header-error-state-label-text-color: inspection.get-theme-color($theme, warn, text),
|
|
40
36
|
// Background color of the header icon.
|
|
41
|
-
header-icon-background-color:
|
|
37
|
+
header-icon-background-color: inspection.get-theme-color($theme, foreground, secondary-text),
|
|
42
38
|
// Foreground color of the header icon in the error state.
|
|
43
|
-
header-error-state-icon-foreground-color:
|
|
39
|
+
header-error-state-icon-foreground-color: inspection.get-theme-color($theme, warn, text),
|
|
44
40
|
// Background color of the header icon in the error state.
|
|
45
41
|
header-error-state-icon-background-color: transparent,
|
|
46
42
|
));
|
|
47
43
|
}
|
|
48
44
|
|
|
49
45
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
50
|
-
@function get-typography-tokens($
|
|
46
|
+
@function get-typography-tokens($theme) {
|
|
51
47
|
@return (
|
|
52
48
|
// Font family of the entire stepper.
|
|
53
|
-
container-text-font: typography-
|
|
49
|
+
container-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
54
50
|
// Font family of the text inside the step header.
|
|
55
|
-
header-label-text-font:
|
|
56
|
-
typography-utils.font-family($config),
|
|
51
|
+
header-label-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
57
52
|
// Size of the text inside the step header.
|
|
58
|
-
header-label-text-size:
|
|
53
|
+
header-label-text-size: inspection.get-theme-typography($theme, body-2, font-size),
|
|
59
54
|
// Weight of the text inside the step header.
|
|
60
|
-
header-label-text-weight:
|
|
55
|
+
header-label-text-weight: inspection.get-theme-typography($theme, body-2, font-weight),
|
|
61
56
|
// Color of the header text when a step is in an error state.
|
|
62
|
-
header-error-state-label-text-size:
|
|
57
|
+
header-error-state-label-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
63
58
|
// Size of the header text in the selected state.
|
|
64
|
-
header-selected-state-label-text-size:
|
|
59
|
+
header-selected-state-label-text-size: inspection.get-theme-typography(
|
|
60
|
+
$theme, body-1, font-size),
|
|
65
61
|
// Weight of the header text in the selected state.
|
|
66
|
-
header-selected-state-label-text-weight:
|
|
62
|
+
header-selected-state-label-text-weight: inspection.get-theme-typography(
|
|
63
|
+
$theme, body-1, font-weight),
|
|
67
64
|
);
|
|
68
65
|
}
|
|
69
66
|
|
|
70
67
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
71
|
-
@function get-density-tokens($
|
|
72
|
-
$scale: theming.clamp-density($
|
|
68
|
+
@function get-density-tokens($theme) {
|
|
69
|
+
$scale: theming.clamp-density(inspection.get-theme-density($theme), -4);
|
|
73
70
|
$height-config: (
|
|
74
71
|
0: 72px,
|
|
75
72
|
-1: 68px,
|
|
@@ -84,13 +81,13 @@ $prefix: (mat, stepper);
|
|
|
84
81
|
}
|
|
85
82
|
|
|
86
83
|
// Generates the tokens used to theme the stepper based on a palette.
|
|
87
|
-
@function private-get-color-palette-color-tokens($palette) {
|
|
88
|
-
$active-state-foreground:
|
|
89
|
-
$active-state-background:
|
|
84
|
+
@function private-get-color-palette-color-tokens($theme, $palette-name) {
|
|
85
|
+
$active-state-foreground: inspection.get-theme-color($theme, $palette-name, default-contrast);
|
|
86
|
+
$active-state-background: inspection.get-theme-color($theme, $palette-name);
|
|
90
87
|
|
|
91
88
|
@return (
|
|
92
89
|
// Foreground color of the header icon.
|
|
93
|
-
header-icon-foreground-color:
|
|
90
|
+
header-icon-foreground-color: $active-state-foreground,
|
|
94
91
|
// Background color of the header icon in the selected state.
|
|
95
92
|
header-selected-state-icon-background-color: $active-state-background,
|
|
96
93
|
// Foreground color of the header icon in the selected state.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '../../token-utils';
|
|
3
|
-
@use '../../../theming/
|
|
2
|
+
@use '../../../theming/inspection';
|
|
4
3
|
@use '../../../style/sass-utils';
|
|
5
4
|
|
|
6
5
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -13,22 +12,21 @@ $prefix: (mat, tab-header-with-background);
|
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
16
|
-
@function get-color-tokens($
|
|
17
|
-
$primary: map.get($config, primary);
|
|
15
|
+
@function get-color-tokens($theme, $palette-name: primary) {
|
|
18
16
|
|
|
19
17
|
@return (
|
|
20
|
-
background-color:
|
|
21
|
-
foreground-color:
|
|
18
|
+
background-color: inspection.get-theme-color($theme, $palette-name, default),
|
|
19
|
+
foreground-color: inspection.get-theme-color($theme, $palette-name, default-contrast),
|
|
22
20
|
);
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
26
|
-
@function get-typography-tokens($
|
|
24
|
+
@function get-typography-tokens($theme) {
|
|
27
25
|
@return ();
|
|
28
26
|
}
|
|
29
27
|
|
|
30
28
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
31
|
-
@function get-density-tokens($
|
|
29
|
+
@function get-density-tokens($theme) {
|
|
32
30
|
@return ();
|
|
33
31
|
}
|
|
34
32
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use '../../token-utils';
|
|
3
|
-
@use '../../../theming/
|
|
4
|
-
@use '../../../typography/typography-utils';
|
|
2
|
+
@use '../../../theming/inspection';
|
|
5
3
|
@use '../../../style/sass-utils';
|
|
6
4
|
|
|
7
5
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -14,16 +12,14 @@ $prefix: (mat, tab-header);
|
|
|
14
12
|
}
|
|
15
13
|
|
|
16
14
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
17
|
-
@function get-color-tokens($
|
|
18
|
-
$is-dark:
|
|
19
|
-
$foreground: map.get($config, foreground);
|
|
20
|
-
$primary: map.get($config, primary);
|
|
15
|
+
@function get-color-tokens($theme, $palette-name: primary) {
|
|
16
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
21
17
|
$inactive-label-text-color: rgba(if($is-dark, #fff, #000), 0.6);
|
|
22
|
-
$active-label-text-color:
|
|
23
|
-
$ripple-color:
|
|
18
|
+
$active-label-text-color: inspection.get-theme-color($theme, $palette-name, default);
|
|
19
|
+
$ripple-color: inspection.get-theme-color($theme, $palette-name, default);
|
|
24
20
|
|
|
25
21
|
@return (
|
|
26
|
-
disabled-ripple-color:
|
|
22
|
+
disabled-ripple-color: inspection.get-theme-color($theme, foreground, disabled),
|
|
27
23
|
pagination-icon-color: if($is-dark, #fff, #000),
|
|
28
24
|
|
|
29
25
|
// Note: MDC has equivalents of these tokens, but they lead to much higher selector specificity.
|
|
@@ -43,20 +39,19 @@ $prefix: (mat, tab-header);
|
|
|
43
39
|
}
|
|
44
40
|
|
|
45
41
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
46
|
-
@function get-typography-tokens($
|
|
42
|
+
@function get-typography-tokens($theme) {
|
|
47
43
|
@return (
|
|
48
44
|
// Note: MDC has equivalents of these tokens, but they lead to much higher selector specificity.
|
|
49
|
-
label-text-font:
|
|
50
|
-
|
|
51
|
-
label-text-
|
|
52
|
-
label-text-
|
|
53
|
-
label-text-
|
|
54
|
-
label-text-weight: typography-utils.font-weight($config, button),
|
|
45
|
+
label-text-font: inspection.get-theme-typography($theme, button, font-family),
|
|
46
|
+
label-text-size: inspection.get-theme-typography($theme, button, font-size),
|
|
47
|
+
label-text-tracking: inspection.get-theme-typography($theme, button, letter-spacing),
|
|
48
|
+
label-text-line-height: inspection.get-theme-typography($theme, button, line-height),
|
|
49
|
+
label-text-weight: inspection.get-theme-typography($theme, button, font-weight),
|
|
55
50
|
);
|
|
56
51
|
}
|
|
57
52
|
|
|
58
53
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
59
|
-
@function get-density-tokens($
|
|
54
|
+
@function get-density-tokens($theme) {
|
|
60
55
|
@return ();
|
|
61
56
|
}
|
|
62
57
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../../../theming/theming';
|
|
3
|
-
@use '../../../
|
|
3
|
+
@use '../../../theming/inspection';
|
|
4
4
|
@use '../../token-utils';
|
|
5
5
|
@use '../../../style/sass-utils';
|
|
6
6
|
|
|
@@ -16,34 +16,30 @@ $prefix: (mat, table);
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
19
|
-
@function get-color-tokens($
|
|
20
|
-
$foreground: map.get($config, foreground);
|
|
21
|
-
$background: map.get($config, background);
|
|
22
|
-
|
|
19
|
+
@function get-color-tokens($theme) {
|
|
23
20
|
@return (
|
|
24
|
-
background-color:
|
|
21
|
+
background-color: inspection.get-theme-color($theme, background, 'card'),
|
|
25
22
|
|
|
26
|
-
header-headline-color:
|
|
27
|
-
row-item-label-text-color:
|
|
28
|
-
row-item-outline-color:
|
|
23
|
+
header-headline-color: inspection.get-theme-color($theme, foreground, text),
|
|
24
|
+
row-item-label-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
25
|
+
row-item-outline-color: inspection.get-theme-color($theme, foreground, divider),
|
|
29
26
|
);
|
|
30
27
|
}
|
|
31
28
|
|
|
32
29
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
33
|
-
@function get-typography-tokens($
|
|
34
|
-
$
|
|
35
|
-
$cell-
|
|
36
|
-
$cell-
|
|
37
|
-
$cell-font-
|
|
38
|
-
$cell-
|
|
39
|
-
$cell-letter-spacing: typography-utils.letter-spacing($config, body-2);
|
|
30
|
+
@function get-typography-tokens($theme) {
|
|
31
|
+
$cell-font-family: inspection.get-theme-typography($theme, body-2, font-family);
|
|
32
|
+
$cell-line-height: inspection.get-theme-typography($theme, body-2, line-height);
|
|
33
|
+
$cell-font-size: inspection.get-theme-typography($theme, body-2, font-size);
|
|
34
|
+
$cell-font-weight: inspection.get-theme-typography($theme, body-2, font-weight);
|
|
35
|
+
$cell-letter-spacing: inspection.get-theme-typography($theme, body-2, letter-spacing);
|
|
40
36
|
|
|
41
37
|
@return (
|
|
42
|
-
header-headline-font:
|
|
43
|
-
header-headline-line-height:
|
|
44
|
-
header-headline-size:
|
|
45
|
-
header-headline-weight:
|
|
46
|
-
header-headline-tracking:
|
|
38
|
+
header-headline-font: inspection.get-theme-typography($theme, subtitle-2, font-family),
|
|
39
|
+
header-headline-line-height: inspection.get-theme-typography($theme, subtitle-2, line-height),
|
|
40
|
+
header-headline-size: inspection.get-theme-typography($theme, subtitle-2, font-size),
|
|
41
|
+
header-headline-weight: inspection.get-theme-typography($theme, subtitle-2, font-weight),
|
|
42
|
+
header-headline-tracking: inspection.get-theme-typography($theme, subtitle-2, letter-spacing),
|
|
47
43
|
|
|
48
44
|
// Plain cells and footer cells have the same typography.
|
|
49
45
|
row-item-label-text-font: $cell-font-family,
|
|
@@ -61,8 +57,8 @@ $prefix: (mat, table);
|
|
|
61
57
|
}
|
|
62
58
|
|
|
63
59
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
64
|
-
@function get-density-tokens($
|
|
65
|
-
$scale: theming.clamp-density($
|
|
60
|
+
@function get-density-tokens($theme) {
|
|
61
|
+
$scale: theming.clamp-density(inspection.get-theme-density($theme), -4);
|
|
66
62
|
$header-scale: (
|
|
67
63
|
0: 56px,
|
|
68
64
|
-1: 52px,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../../token-utils';
|
|
3
|
-
@use '../../../typography/typography-utils';
|
|
4
3
|
@use '../../../theming/theming';
|
|
4
|
+
@use '../../../theming/inspection';
|
|
5
5
|
@use '../../../style/sass-utils';
|
|
6
6
|
|
|
7
7
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -14,31 +14,27 @@ $prefix: (mat, toolbar);
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
17
|
-
@function get-color-tokens($
|
|
18
|
-
$foreground: map.get($config, foreground);
|
|
19
|
-
$background: map.get($config, background);
|
|
20
|
-
|
|
17
|
+
@function get-color-tokens($theme) {
|
|
21
18
|
@return private-get-color-palette-color-tokens(
|
|
22
|
-
$background-color:
|
|
23
|
-
$text-color:
|
|
19
|
+
$background-color: inspection.get-theme-color($theme, background, app-bar),
|
|
20
|
+
$text-color: inspection.get-theme-color($theme, foreground, text),
|
|
24
21
|
);
|
|
25
22
|
}
|
|
26
23
|
|
|
27
24
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
28
|
-
@function get-typography-tokens($
|
|
25
|
+
@function get-typography-tokens($theme) {
|
|
29
26
|
@return (
|
|
30
|
-
title-text-font:
|
|
31
|
-
|
|
32
|
-
title-text-
|
|
33
|
-
title-text-
|
|
34
|
-
title-text-
|
|
35
|
-
title-text-weight: typography-utils.font-weight($config, title),
|
|
27
|
+
title-text-font: inspection.get-theme-typography($theme, headline-6, font-family),
|
|
28
|
+
title-text-line-height: inspection.get-theme-typography($theme, headline-6, line-height),
|
|
29
|
+
title-text-size: inspection.get-theme-typography($theme, headline-6, font-size),
|
|
30
|
+
title-text-tracking: inspection.get-theme-typography($theme, headline-6, letter-spacing),
|
|
31
|
+
title-text-weight: inspection.get-theme-typography($theme, headline-6, font-weight),
|
|
36
32
|
);
|
|
37
33
|
}
|
|
38
34
|
|
|
39
35
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
40
|
-
@function get-density-tokens($
|
|
41
|
-
$density-scale: theming.clamp-density($
|
|
36
|
+
@function get-density-tokens($theme) {
|
|
37
|
+
$density-scale: theming.clamp-density(inspection.get-theme-density($theme), -3);
|
|
42
38
|
$standard-scale: (
|
|
43
39
|
0: 64px,
|
|
44
40
|
-1: 60px,
|