@angular/material 17.0.0-next.1 → 17.0.0-next.3
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 +1 -2
- package/autocomplete/_autocomplete-theme.scss +12 -18
- package/autocomplete/index.d.ts +19 -26
- 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-toggle/_button-toggle-theme.scss +17 -28
- package/button-toggle/index.d.ts +15 -18
- package/checkbox/index.d.ts +21 -27
- package/chips/_chips-theme.scss +18 -56
- 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/style/_form-common.scss +7 -7
- package/core/style/_private.scss +2 -4
- package/core/testing/index.d.ts +2 -1
- package/core/theming/_all-theme.scss +41 -41
- package/core/theming/_inspection.scss +47 -0
- package/core/theming/_m2-inspection.scss +57 -0
- package/core/theming/_theming.scss +0 -14
- 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/_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/_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/_select.scss +15 -29
- package/core/tokens/m2/mat/_sidenav.scss +12 -14
- 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/_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/_icon-button.scss +2 -2
- package/core/tokens/m2/mdc/_plain-tooltip.scss +9 -22
- package/core/tokens/m2/mdc/_snack-bar.scss +10 -23
- 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/_typography.scss +32 -155
- package/core/typography/_versioning.scss +7 -2
- package/datepicker/_datepicker-theme.scss +20 -34
- package/dialog/_dialog-theme.scss +14 -25
- 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 +13 -19
- package/esm2022/autocomplete/autocomplete.mjs +23 -50
- package/esm2022/badge/badge.mjs +11 -29
- 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/dialog/dialog-container.mjs +16 -3
- package/esm2022/menu/menu-item.mjs +15 -11
- package/esm2022/menu/menu.mjs +9 -22
- package/esm2022/slide-toggle/slide-toggle.mjs +33 -37
- package/esm2022/tabs/tab-group.mjs +3 -3
- package/expansion/_expansion-theme.scss +16 -24
- package/fesm2022/autocomplete.mjs +33 -65
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +11 -28
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +25 -32
- package/fesm2022/button-toggle.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/dialog.mjs +15 -2
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/menu.mjs +23 -31
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +33 -36
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/tabs.mjs +2 -2
- package/fesm2022/tabs.mjs.map +1 -1
- package/form-field/_form-field-sizing.scss +1 -1
- package/grid-list/_grid-list-theme.scss +12 -19
- package/icon/_icon-theme.scss +17 -25
- package/list/_list-theme.scss +1 -1
- package/menu/_menu-theme.scss +13 -22
- package/menu/index.d.ts +12 -18
- package/package.json +2 -2
- 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-spinner/_progress-spinner-theme.scss +16 -22
- 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.map +1 -1
- package/select/_select-theme.scss +17 -31
- package/sidenav/_sidenav-theme.scss +12 -18
- package/slide-toggle/index.d.ts +20 -23
- package/snack-bar/_snack-bar-theme.scss +15 -24
- 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/core/typography/_typography-deprecated.scss +0 -39
|
@@ -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,
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
@use 'sass:color';
|
|
1
2
|
@use 'sass:map';
|
|
3
|
+
@use 'sass:meta';
|
|
2
4
|
@use '../../token-utils';
|
|
3
5
|
@use '../../../mdc-helpers/mdc-helpers';
|
|
4
6
|
@use '../../../style/sass-utils';
|
|
5
7
|
@use '../../../theming/theming';
|
|
6
|
-
@use '../../../
|
|
8
|
+
@use '../../../theming/inspection';
|
|
9
|
+
@use '../../../theming/palette';
|
|
7
10
|
|
|
8
11
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
9
12
|
$prefix: (mdc, chip);
|
|
@@ -228,14 +231,34 @@ $prefix: (mdc, chip);
|
|
|
228
231
|
}
|
|
229
232
|
|
|
230
233
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
231
|
-
@function get-color-tokens($
|
|
232
|
-
$
|
|
234
|
+
@function get-color-tokens($theme, $palette-name: null) {
|
|
235
|
+
$foreground: null;
|
|
236
|
+
$background: null;
|
|
237
|
+
$state-layer-color: inspection.get-theme-color($theme, foreground, base);
|
|
238
|
+
$state-layer-opacity: 0.12; // 0.12 is a common value in Material Design for opacity.
|
|
233
239
|
|
|
234
|
-
|
|
235
|
-
|
|
240
|
+
@if $palette-name == null {
|
|
241
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
242
|
+
$grey-50: map.get(palette.$grey-palette, 50);
|
|
243
|
+
$grey-900: map.get(palette.$grey-palette, 900);
|
|
244
|
+
$foreground: if($is-dark, $grey-50, $grey-900);
|
|
236
245
|
|
|
237
|
-
|
|
238
|
-
|
|
246
|
+
$surface: inspection.get-theme-color($theme, background, card);
|
|
247
|
+
$on-surface: if(
|
|
248
|
+
mdc-helpers.variable-safe-contrast-tone($surface, $is-dark) == 'dark',
|
|
249
|
+
#000,
|
|
250
|
+
#fff
|
|
251
|
+
);
|
|
252
|
+
$background: if(
|
|
253
|
+
meta.type-of($on-surface) == color and meta.type-of($surface) == color,
|
|
254
|
+
color.mix($on-surface, $surface, 12%),
|
|
255
|
+
$on-surface
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
@else {
|
|
259
|
+
$background: inspection.get-theme-color($theme, $palette-name);
|
|
260
|
+
$foreground: inspection.get-theme-color($theme, $palette-name, default-contrast);
|
|
261
|
+
}
|
|
239
262
|
|
|
240
263
|
@return (
|
|
241
264
|
// The text color of a disabled chip.
|
|
@@ -264,33 +287,24 @@ $prefix: (mdc, chip);
|
|
|
264
287
|
}
|
|
265
288
|
|
|
266
289
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
267
|
-
@function get-typography-tokens($
|
|
268
|
-
// TODO(wagnermaciel): The earlier implementation of the chip used MDC's APIs to create the
|
|
269
|
-
// typography tokens. As a result, we unintentionally allowed `null` typography configs to be
|
|
270
|
-
// passed in. Since there a lot of apps that now depend on this pattern, we need this temporary
|
|
271
|
-
// fallback.
|
|
272
|
-
@if ($config == null) {
|
|
273
|
-
$config: mdc-helpers.private-fallback-typography-from-mdc();
|
|
274
|
-
}
|
|
275
|
-
|
|
290
|
+
@function get-typography-tokens($theme) {
|
|
276
291
|
@return (
|
|
277
292
|
// The font family of the chip text.
|
|
278
|
-
label-text-font:
|
|
279
|
-
typography-utils.font-family($config),
|
|
293
|
+
label-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
280
294
|
// The line height of the chip text.
|
|
281
|
-
label-text-line-height:
|
|
295
|
+
label-text-line-height: inspection.get-theme-typography($theme, body-2, line-height),
|
|
282
296
|
// The font size of the chip text.
|
|
283
|
-
label-text-size:
|
|
297
|
+
label-text-size: inspection.get-theme-typography($theme, body-2, font-size),
|
|
284
298
|
// The letter spacing of the chip label.
|
|
285
|
-
label-text-tracking:
|
|
299
|
+
label-text-tracking: inspection.get-theme-typography($theme, body-2, letter-spacing),
|
|
286
300
|
// The font weight of the chip text.
|
|
287
|
-
label-text-weight:
|
|
301
|
+
label-text-weight: inspection.get-theme-typography($theme, body-2, font-weight)
|
|
288
302
|
);
|
|
289
303
|
}
|
|
290
304
|
|
|
291
305
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
292
|
-
@function get-density-tokens($
|
|
293
|
-
$scale: theming.clamp-density($
|
|
306
|
+
@function get-density-tokens($theme) {
|
|
307
|
+
$scale: theming.clamp-density(inspection.get-theme-density($theme), -2);
|
|
294
308
|
@return (
|
|
295
309
|
// The height of the chip.
|
|
296
310
|
container-height:
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
@use '../../../theming/theming';
|
|
1
|
+
@use '../../../theming/inspection';
|
|
3
2
|
@use '../../../style/sass-utils';
|
|
4
3
|
@use '../../token-utils';
|
|
5
4
|
|
|
@@ -33,20 +32,20 @@ $prefix: (mdc, circular-progress);
|
|
|
33
32
|
}
|
|
34
33
|
|
|
35
34
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
36
|
-
@function get-color-tokens($
|
|
35
|
+
@function get-color-tokens($theme) {
|
|
37
36
|
@return (
|
|
38
37
|
// The color of the progress spinner's active indicator.
|
|
39
|
-
active-indicator-color:
|
|
38
|
+
active-indicator-color: inspection.get-theme-color($theme, primary)
|
|
40
39
|
);
|
|
41
40
|
}
|
|
42
41
|
|
|
43
42
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
44
|
-
@function get-typography-tokens($
|
|
43
|
+
@function get-typography-tokens($theme) {
|
|
45
44
|
@return ();
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
49
|
-
@function get-density-tokens($
|
|
48
|
+
@function get-density-tokens($theme) {
|
|
50
49
|
@return ();
|
|
51
50
|
}
|
|
52
51
|
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
@use '../../../theming/theming';
|
|
3
|
-
@use '../../../typography/typography-utils';
|
|
4
|
-
@use '../../../mdc-helpers/mdc-helpers';
|
|
1
|
+
@use '../../../theming/inspection';
|
|
5
2
|
@use '../../../style/sass-utils';
|
|
6
3
|
@use '../../token-utils';
|
|
7
4
|
|
|
@@ -56,14 +53,13 @@ $prefix: (mdc, dialog);
|
|
|
56
53
|
}
|
|
57
54
|
|
|
58
55
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
59
|
-
@function get-color-tokens($
|
|
60
|
-
$is-dark:
|
|
61
|
-
$background: map.get($config, background);
|
|
56
|
+
@function get-color-tokens($theme) {
|
|
57
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
62
58
|
$on-surface: if($is-dark, #fff, #000);
|
|
63
59
|
|
|
64
60
|
@return (
|
|
65
61
|
// Background color of the container.
|
|
66
|
-
container-color:
|
|
62
|
+
container-color: inspection.get-theme-color($theme, background, dialog),
|
|
67
63
|
// Color of the dialog header.
|
|
68
64
|
subhead-color: rgba($on-surface, 0.87),
|
|
69
65
|
// Color of the dialog body text.
|
|
@@ -72,35 +68,25 @@ $prefix: (mdc, dialog);
|
|
|
72
68
|
}
|
|
73
69
|
|
|
74
70
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
75
|
-
@function get-typography-tokens($
|
|
76
|
-
// TODO(crisbeto): The earlier implementation of the dialog used MDC's APIs to create the
|
|
77
|
-
// typography tokens. As a result, we unintentionally allowed `null` typography configs to be
|
|
78
|
-
// passed in. Since there a lot of apps that now depend on this pattern, we need this temporary
|
|
79
|
-
// fallback.
|
|
80
|
-
@if ($config == null) {
|
|
81
|
-
$config: mdc-helpers.private-fallback-typography-from-mdc();
|
|
82
|
-
}
|
|
83
|
-
|
|
71
|
+
@function get-typography-tokens($theme) {
|
|
84
72
|
@return (
|
|
85
73
|
// Typography of the dialog header.
|
|
86
|
-
subhead-font:
|
|
87
|
-
|
|
88
|
-
subhead-
|
|
89
|
-
subhead-
|
|
90
|
-
subhead-
|
|
91
|
-
subhead-tracking: typography-utils.letter-spacing($config, headline-6),
|
|
74
|
+
subhead-font: inspection.get-theme-typography($theme, headline-6, font-family),
|
|
75
|
+
subhead-line-height: inspection.get-theme-typography($theme, headline-6, line-height),
|
|
76
|
+
subhead-size: inspection.get-theme-typography($theme, headline-6, font-size),
|
|
77
|
+
subhead-weight: inspection.get-theme-typography($theme, headline-6, font-weight),
|
|
78
|
+
subhead-tracking: inspection.get-theme-typography($theme, headline-6, letter-spacing),
|
|
92
79
|
// Typography of the dialog body text.
|
|
93
|
-
supporting-text-font:
|
|
94
|
-
|
|
95
|
-
supporting-text-
|
|
96
|
-
supporting-text-
|
|
97
|
-
supporting-text-
|
|
98
|
-
supporting-text-tracking: typography-utils.letter-spacing($config, body-1),
|
|
80
|
+
supporting-text-font: inspection.get-theme-typography($theme, body-1, font-family),
|
|
81
|
+
supporting-text-line-height: inspection.get-theme-typography($theme, body-1, line-height),
|
|
82
|
+
supporting-text-size: inspection.get-theme-typography($theme, body-1, font-size),
|
|
83
|
+
supporting-text-weight: inspection.get-theme-typography($theme, body-1, font-weight),
|
|
84
|
+
supporting-text-tracking: inspection.get-theme-typography($theme, body-1, letter-spacing),
|
|
99
85
|
);
|
|
100
86
|
}
|
|
101
87
|
|
|
102
88
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
103
|
-
@function get-density-tokens($
|
|
89
|
+
@function get-density-tokens($theme) {
|
|
104
90
|
@return ();
|
|
105
91
|
}
|
|
106
92
|
|
|
@@ -50,12 +50,12 @@ $prefix: (mdc, icon-button);
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
53
|
-
@function get-typography-tokens($
|
|
53
|
+
@function get-typography-tokens($theme) {
|
|
54
54
|
@return ();
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
58
|
-
@function get-density-tokens($
|
|
58
|
+
@function get-density-tokens($theme) {
|
|
59
59
|
@return ();
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
@use '../../../theming/theming';
|
|
3
|
-
@use '../../../typography/typography-utils';
|
|
4
|
-
@use '../../../mdc-helpers/mdc-helpers';
|
|
1
|
+
@use '../../../theming/inspection';
|
|
5
2
|
@use '../../../style/sass-utils';
|
|
6
3
|
@use '../../token-utils';
|
|
7
4
|
|
|
@@ -26,42 +23,32 @@ $prefix: (mdc, plain-tooltip);
|
|
|
26
23
|
}
|
|
27
24
|
|
|
28
25
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
29
|
-
@function get-color-tokens($
|
|
30
|
-
$background: map.get($config, background);
|
|
26
|
+
@function get-color-tokens($theme) {
|
|
31
27
|
|
|
32
28
|
@return (
|
|
33
29
|
// Color of the tooltip container.
|
|
34
|
-
container-color:
|
|
30
|
+
container-color: inspection.get-theme-color($theme, background, tooltip),
|
|
35
31
|
// Color of the tooltip text.
|
|
36
32
|
supporting-text-color: #fff,
|
|
37
33
|
);
|
|
38
34
|
}
|
|
39
35
|
|
|
40
36
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
41
|
-
@function get-typography-tokens($
|
|
42
|
-
// TODO(amysorto): The earlier implementation of the tooltip used MDC's APIs to create the
|
|
43
|
-
// typography tokens. As a result, we unintentionally allowed `null` typography configs to be
|
|
44
|
-
// passed in. Since there a lot of apps that now depend on this pattern, we need this temporary
|
|
45
|
-
// fallback.
|
|
46
|
-
@if ($config == null) {
|
|
47
|
-
$config: mdc-helpers.private-fallback-typography-from-mdc();
|
|
48
|
-
}
|
|
49
|
-
|
|
37
|
+
@function get-typography-tokens($theme) {
|
|
50
38
|
@return (
|
|
51
39
|
// Font for the tooltip text.
|
|
52
|
-
supporting-text-font:
|
|
53
|
-
or typography-utils.font-family($config),
|
|
40
|
+
supporting-text-font: inspection.get-theme-typography($theme, caption, font-family),
|
|
54
41
|
// Font size for the tooltip text.
|
|
55
|
-
supporting-text-size:
|
|
42
|
+
supporting-text-size: inspection.get-theme-typography($theme, caption, font-size),
|
|
56
43
|
// Font weight of the tooltip text.
|
|
57
|
-
supporting-text-weight:
|
|
44
|
+
supporting-text-weight: inspection.get-theme-typography($theme, caption, font-weight),
|
|
58
45
|
// Tracking (space between letters) of the tooltip text.
|
|
59
|
-
supporting-text-tracking:
|
|
46
|
+
supporting-text-tracking: inspection.get-theme-typography($theme, caption, letter-spacing),
|
|
60
47
|
);
|
|
61
48
|
}
|
|
62
49
|
|
|
63
50
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
64
|
-
@function get-density-tokens($
|
|
51
|
+
@function get-density-tokens($theme) {
|
|
65
52
|
@return ();
|
|
66
53
|
}
|
|
67
54
|
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use 'sass:meta';
|
|
3
2
|
@use 'sass:color';
|
|
4
|
-
@use '../../../theming/
|
|
3
|
+
@use '../../../theming/inspection';
|
|
5
4
|
@use '../../token-utils';
|
|
6
|
-
@use '../../../typography/typography-utils';
|
|
7
|
-
@use '../../../mdc-helpers/mdc-helpers';
|
|
8
5
|
@use '../../../style/sass-utils';
|
|
9
6
|
|
|
10
7
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -58,10 +55,9 @@ $prefix: (mdc, snackbar);
|
|
|
58
55
|
}
|
|
59
56
|
|
|
60
57
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
61
|
-
@function get-color-tokens($
|
|
62
|
-
$
|
|
63
|
-
$
|
|
64
|
-
$surface: theming.get-color-from-palette($background-palette, card);
|
|
58
|
+
@function get-color-tokens($theme) {
|
|
59
|
+
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
60
|
+
$surface: inspection.get-theme-color($theme, background, card);
|
|
65
61
|
|
|
66
62
|
@return (
|
|
67
63
|
container-color: if(meta.type-of($surface) == color,
|
|
@@ -71,26 +67,17 @@ $prefix: (mdc, snackbar);
|
|
|
71
67
|
}
|
|
72
68
|
|
|
73
69
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
74
|
-
@function get-typography-tokens($
|
|
75
|
-
// TODO(crisbeto): The earlier implementation of the snack bar used MDC's APIs to create the
|
|
76
|
-
// typography tokens. As a result, we unintentionally allowed `null` typography configs to be
|
|
77
|
-
// passed in. Since there a lot of apps that now depend on this pattern, we need this temporary
|
|
78
|
-
// fallback.
|
|
79
|
-
@if ($config == null) {
|
|
80
|
-
$config: mdc-helpers.private-fallback-typography-from-mdc();
|
|
81
|
-
}
|
|
82
|
-
|
|
70
|
+
@function get-typography-tokens($theme) {
|
|
83
71
|
@return (
|
|
84
|
-
supporting-text-font:
|
|
85
|
-
|
|
86
|
-
supporting-text-
|
|
87
|
-
supporting-text-
|
|
88
|
-
supporting-text-weight: typography-utils.font-weight($config, body-2),
|
|
72
|
+
supporting-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
73
|
+
supporting-text-line-height: inspection.get-theme-typography($theme, body-2, line-height),
|
|
74
|
+
supporting-text-size: inspection.get-theme-typography($theme, body-2, font-size),
|
|
75
|
+
supporting-text-weight: inspection.get-theme-typography($theme, body-2, font-weight),
|
|
89
76
|
);
|
|
90
77
|
}
|
|
91
78
|
|
|
92
79
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
93
|
-
@function get-density-tokens($
|
|
80
|
+
@function get-density-tokens($theme) {
|
|
94
81
|
@return ();
|
|
95
82
|
}
|
|
96
83
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
@use '../../../theming/theming';
|
|
1
|
+
@use '../../../theming/inspection';
|
|
3
2
|
@use '../../../style/sass-utils';
|
|
4
3
|
@use '../../token-utils';
|
|
5
4
|
|
|
@@ -21,21 +20,19 @@ $prefix: (mdc, tab-indicator);
|
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
24
|
-
@function get-color-tokens($
|
|
25
|
-
$primary: map.get($config, primary);
|
|
26
|
-
|
|
23
|
+
@function get-color-tokens($theme, $palette-name: primary) {
|
|
27
24
|
@return (
|
|
28
|
-
active-indicator-color:
|
|
25
|
+
active-indicator-color: inspection.get-theme-color($theme, $palette-name, default),
|
|
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($
|
|
30
|
+
@function get-typography-tokens($theme) {
|
|
34
31
|
@return ();
|
|
35
32
|
}
|
|
36
33
|
|
|
37
34
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
38
|
-
@function get-density-tokens($
|
|
35
|
+
@function get-density-tokens($theme) {
|
|
39
36
|
@return ();
|
|
40
37
|
}
|
|
41
38
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../../../theming/theming';
|
|
3
|
+
@use '../../../theming/inspection';
|
|
3
4
|
@use '../../../style/sass-utils';
|
|
4
5
|
@use '../../token-utils';
|
|
5
6
|
|
|
@@ -50,18 +51,18 @@ $prefix: (mdc, tab);
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
53
|
-
@function get-color-tokens($
|
|
54
|
+
@function get-color-tokens($theme, $palette-name: primary) {
|
|
54
55
|
@return ();
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
// Tokens that can be configured through Angular Material's typography theming API.
|
|
58
|
-
@function get-typography-tokens($
|
|
59
|
+
@function get-typography-tokens($theme) {
|
|
59
60
|
@return ();
|
|
60
61
|
}
|
|
61
62
|
|
|
62
63
|
// Tokens that can be configured through Angular Material's density theming API.
|
|
63
|
-
@function get-density-tokens($
|
|
64
|
-
$scale: theming.clamp-density($
|
|
64
|
+
@function get-density-tokens($theme) {
|
|
65
|
+
$scale: theming.clamp-density(inspection.get-theme-density($theme), -4);
|
|
65
66
|
|
|
66
67
|
@return (
|
|
67
68
|
container-height: map.get((
|