@angular/material 20.1.0-next.1 → 20.1.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_index.scss +1 -2
- package/autocomplete/_autocomplete-theme.scss +28 -37
- package/autocomplete/_m2-autocomplete.scss +10 -22
- package/badge/_badge-theme.scss +35 -44
- package/badge/_m2-badge.scss +46 -59
- package/bottom-sheet/_bottom-sheet-theme.scss +28 -40
- package/bottom-sheet/_m2-bottom-sheet.scss +16 -33
- package/button/_button-theme.scss +37 -55
- package/button/_fab-theme.scss +42 -56
- package/button/_icon-button-theme.scss +33 -49
- package/button/_m2-button.scss +135 -158
- package/button/_m2-fab.scss +60 -69
- package/button/_m2-icon-button.scss +30 -50
- package/button/_m3-button.scss +1 -2
- package/button/_m3-fab.scss +1 -2
- package/button/_m3-icon-button.scss +1 -2
- package/button/testing/index.d.ts +1 -0
- package/button-toggle/_button-toggle-theme.scss +29 -44
- package/button-toggle/_m2-button-toggle.scss +58 -81
- package/button-toggle/_m3-button-toggle.scss +1 -2
- package/card/_card-theme.scss +28 -36
- package/card/_m2-card.scss +30 -45
- package/checkbox/_checkbox-theme.scss +37 -50
- package/checkbox/_m2-checkbox.scss +30 -40
- package/checkbox/_m3-checkbox.scss +1 -2
- package/chips/_chips-theme.scss +27 -30
- package/chips/_m2-chip.scss +40 -53
- package/chips/_m3-chip.scss +1 -2
- package/core/_core-theme.scss +48 -67
- package/core/_m2-app.scss +11 -23
- package/core/focus-indicators/_private.scss +2 -5
- package/core/m2/_theming.scss +36 -41
- package/core/option/_m2-optgroup.scss +13 -25
- package/core/option/_m2-option.scss +16 -22
- package/core/option/_optgroup-theme.scss +28 -30
- package/core/option/_option-theme.scss +35 -34
- package/core/ripple/_m2-ripple.scss +8 -20
- package/core/ripple/_ripple-theme.scss +28 -33
- package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +14 -21
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +55 -45
- package/core/theming/_all-theme.scss +38 -42
- package/core/theming/_definition.scss +22 -13
- package/core/theming/_inspection.scss +0 -12
- package/core/theming/_m2-inspection.scss +0 -33
- package/core/theming/_theming.scss +4 -172
- package/core/tokens/_m2-utils.scss +16 -68
- package/core/tokens/_m3-utils.scss +2 -14
- package/core/tokens/_token-utils.scss +7 -27
- package/core/tokens/m2/_index.scss +6 -0
- package/core/tokens/m2/_md-sys-color.scss +123 -0
- package/core/tokens/m2/_md-sys-elevation.scss +16 -0
- package/core/tokens/m2/_md-sys-motion.scss +36 -0
- package/core/tokens/m2/_md-sys-shape.scss +22 -0
- package/core/tokens/m2/_md-sys-state.scss +15 -0
- package/core/tokens/m2/_md-sys-typescale.scss +68 -0
- package/core/tokens/m3/_md-sys-color.scss +2 -2
- package/core/tokens/m3/_md-sys-typescale.scss +1 -1
- package/core/tokens/m3/_theme.scss +14 -26
- package/datepicker/_datepicker-theme.scss +38 -40
- package/datepicker/_m2-datepicker.scss +26 -40
- package/dialog/_dialog-theme.scss +28 -34
- package/dialog/_m2-dialog.scss +34 -48
- package/divider/_divider-theme.scss +28 -30
- package/divider/_m2-divider.scss +10 -21
- package/expansion/_expansion-theme.scss +28 -39
- package/expansion/_m2-expansion.scss +52 -67
- package/expansion/_m3-expansion.scss +3 -2
- package/fesm2022/autocomplete.mjs +1 -1
- package/fesm2022/button/testing.mjs +7 -4
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +1 -1
- package/fesm2022/expansion.mjs +2 -2
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/{form-field-C9DZXojn.mjs → form-field-CFbrnFED.mjs} +3 -3
- package/fesm2022/{form-field-C9DZXojn.mjs.map → form-field-CFbrnFED.mjs.map} +1 -1
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/input.mjs +3 -27
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs +97 -13
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +343 -122
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/{module-BDiw_nWS.mjs → module-B0CLRw5e.mjs} +3 -3
- package/fesm2022/{module-BDiw_nWS.mjs.map → module-B0CLRw5e.mjs.map} +1 -1
- package/fesm2022/{module-DzZHEh7B.mjs → module-B62K-792.mjs} +2 -2
- package/fesm2022/{module-DzZHEh7B.mjs.map → module-B62K-792.mjs.map} +1 -1
- package/fesm2022/paginator.mjs +3 -3
- package/fesm2022/select.mjs +3 -3
- package/fesm2022/sidenav.mjs +2 -4
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +2 -2
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +2 -2
- package/fesm2022/timepicker.mjs +1 -1
- package/form-field/_form-field-theme.scss +35 -51
- package/form-field/_m2-form-field.scss +125 -146
- package/form-field/_m3-form-field.scss +1 -2
- package/grid-list/_grid-list-theme.scss +28 -28
- package/grid-list/_m2-grid-list.scss +16 -29
- package/icon/_icon-theme.scss +40 -41
- package/icon/_m2-icon.scss +7 -21
- package/input/_input-theme.scss +1 -4
- package/input/index.d.ts +0 -11
- package/list/_list-theme.scss +57 -53
- package/list/_m2-list.scss +84 -108
- package/list/_m3-list.scss +1 -2
- package/menu/_m2-menu.scss +33 -46
- package/menu/_menu-theme.scss +28 -33
- package/menu/index.d.ts +145 -61
- package/menu/testing/index.d.ts +50 -2
- package/package.json +2 -2
- package/paginator/_m2-paginator.scss +38 -58
- package/paginator/_m3-paginator.scss +1 -2
- package/paginator/_paginator-theme.scss +28 -33
- 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 -24
- package/progress-bar/_progress-bar-theme.scss +35 -43
- package/progress-spinner/_m2-progress-spinner.scss +9 -20
- package/progress-spinner/_progress-spinner-theme.scss +42 -43
- package/radio/_m2-radio.scss +30 -40
- package/radio/_m3-radio.scss +1 -2
- package/radio/_radio-theme.scss +33 -46
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-generate/theme-color/schema.json +1 -1
- package/select/_m2-select.scss +23 -30
- package/select/_m3-select.scss +1 -2
- package/select/_select-theme.scss +38 -51
- package/sidenav/_m2-sidenav.scss +26 -36
- package/sidenav/_sidenav-theme.scss +28 -30
- package/slide-toggle/_m2-slide-toggle.scss +111 -143
- package/slide-toggle/_m3-slide-toggle.scss +1 -0
- package/slide-toggle/_slide-toggle-theme.scss +42 -80
- package/slider/_m2-slider.scss +34 -55
- package/slider/_slider-theme.scss +38 -45
- package/snack-bar/_m2-snack-bar.scss +16 -36
- package/snack-bar/_snack-bar-theme.scss +28 -31
- package/sort/_m2-sort.scss +7 -18
- package/sort/_sort-theme.scss +28 -33
- package/stepper/_m2-stepper.scss +39 -57
- package/stepper/_m3-stepper.scss +1 -2
- package/stepper/_stepper-theme.scss +41 -49
- package/table/_m2-table.scss +54 -72
- package/table/_m3-table.scss +1 -2
- package/table/_table-theme.scss +28 -36
- package/tabs/_m2-tabs.scss +31 -46
- package/tabs/_m3-tabs.scss +1 -2
- package/tabs/_tabs-theme.scss +41 -49
- package/timepicker/_m2-timepicker.scss +10 -22
- package/timepicker/_timepicker-theme.scss +28 -46
- package/toolbar/_m2-toolbar.scss +26 -46
- package/toolbar/_m3-toolbar.scss +1 -2
- package/toolbar/_toolbar-theme.scss +55 -46
- package/tooltip/_m2-tooltip.scss +16 -34
- package/tooltip/_tooltip-theme.scss +28 -37
- package/tree/_m2-tree.scss +21 -38
- package/tree/_m3-tree.scss +1 -2
- package/tree/_tree-theme.scss +28 -38
- package/core/tokens/_format-tokens.scss +0 -5
package/sort/_sort-theme.scss
CHANGED
|
@@ -1,47 +1,44 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use './m2-sort';
|
|
3
3
|
@use './m3-sort';
|
|
4
|
-
@use '../core/style/sass-utils';
|
|
5
4
|
@use '../core/typography/typography';
|
|
6
|
-
@use '../core/theming/theming';
|
|
7
5
|
@use '../core/theming/inspection';
|
|
8
6
|
@use '../core/tokens/token-utils';
|
|
9
7
|
|
|
10
8
|
@mixin base($theme) {
|
|
9
|
+
$tokens: map.get(m2-sort.get-tokens($theme), base);
|
|
11
10
|
@if inspection.get-theme-version($theme) == 1 {
|
|
12
|
-
|
|
13
|
-
} @else {
|
|
11
|
+
$tokens: map.get(m3-sort.get-tokens($theme), base);
|
|
14
12
|
}
|
|
13
|
+
|
|
14
|
+
@include token-utils.values($tokens);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
@mixin color($theme) {
|
|
18
|
+
$tokens: map.get(m2-sort.get-tokens($theme), color);
|
|
18
19
|
@if inspection.get-theme-version($theme) == 1 {
|
|
19
|
-
|
|
20
|
-
} @else {
|
|
21
|
-
@include sass-utils.current-selector-or-root() {
|
|
22
|
-
@include token-utils.create-token-values-mixed(m2-sort.get-color-tokens($theme));
|
|
23
|
-
}
|
|
20
|
+
$tokens: map.get(m3-sort.get-tokens($theme), color);
|
|
24
21
|
}
|
|
22
|
+
|
|
23
|
+
@include token-utils.values($tokens);
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
@mixin typography($theme) {
|
|
27
|
+
$tokens: map.get(m2-sort.get-tokens($theme), typography);
|
|
28
28
|
@if inspection.get-theme-version($theme) == 1 {
|
|
29
|
-
|
|
30
|
-
} @else {
|
|
31
|
-
@include sass-utils.current-selector-or-root() {
|
|
32
|
-
@include token-utils.create-token-values-mixed(m2-sort.get-typography-tokens($theme));
|
|
33
|
-
}
|
|
29
|
+
$tokens: map.get(m3-sort.get-tokens($theme), typography);
|
|
34
30
|
}
|
|
31
|
+
|
|
32
|
+
@include token-utils.values($tokens);
|
|
35
33
|
}
|
|
36
34
|
|
|
37
35
|
@mixin density($theme) {
|
|
36
|
+
$tokens: map.get(m2-sort.get-tokens($theme), density);
|
|
38
37
|
@if inspection.get-theme-version($theme) == 1 {
|
|
39
|
-
|
|
40
|
-
} @else {
|
|
41
|
-
@include sass-utils.current-selector-or-root() {
|
|
42
|
-
@include token-utils.create-token-values-mixed(m2-sort.get-density-tokens($theme));
|
|
43
|
-
}
|
|
38
|
+
$tokens: map.get(m3-sort.get-tokens($theme), density);
|
|
44
39
|
}
|
|
40
|
+
|
|
41
|
+
@include token-utils.values($tokens);
|
|
45
42
|
}
|
|
46
43
|
|
|
47
44
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -59,23 +56,21 @@
|
|
|
59
56
|
}
|
|
60
57
|
|
|
61
58
|
@mixin theme($theme) {
|
|
62
|
-
@
|
|
63
|
-
@
|
|
64
|
-
|
|
59
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
60
|
+
@include base($theme);
|
|
61
|
+
@include color($theme);
|
|
62
|
+
@include density($theme);
|
|
63
|
+
@include typography($theme);
|
|
64
|
+
} @else {
|
|
65
|
+
@include base($theme);
|
|
66
|
+
@if inspection.theme-has($theme, color) {
|
|
65
67
|
@include color($theme);
|
|
68
|
+
}
|
|
69
|
+
@if inspection.theme-has($theme, density) {
|
|
66
70
|
@include density($theme);
|
|
71
|
+
}
|
|
72
|
+
@if inspection.theme-has($theme, typography) {
|
|
67
73
|
@include typography($theme);
|
|
68
|
-
} @else {
|
|
69
|
-
@include base($theme);
|
|
70
|
-
@if inspection.theme-has($theme, color) {
|
|
71
|
-
@include color($theme);
|
|
72
|
-
}
|
|
73
|
-
@if inspection.theme-has($theme, density) {
|
|
74
|
-
@include density($theme);
|
|
75
|
-
}
|
|
76
|
-
@if inspection.theme-has($theme, typography) {
|
|
77
|
-
@include typography($theme);
|
|
78
|
-
}
|
|
79
74
|
}
|
|
80
75
|
}
|
|
81
76
|
}
|
package/stepper/_m2-stepper.scss
CHANGED
|
@@ -1,68 +1,50 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../core/theming/theming';
|
|
3
|
-
@use '../core/theming/inspection';
|
|
4
3
|
@use '../core/tokens/m2-utils';
|
|
5
4
|
@use '../core/tokens/m3-utils';
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
// but may be in a future version of the theming API.
|
|
9
|
-
@function get-unthemable-tokens() {
|
|
10
|
-
@return (
|
|
11
|
-
stepper-header-focus-state-layer-shape: 0,
|
|
12
|
-
stepper-header-hover-state-layer-shape: 0,
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
// Tokens that can be configured through Angular Material's color theming API.
|
|
17
|
-
@function get-color-tokens($theme) {
|
|
6
|
+
@function get-tokens($theme) {
|
|
18
7
|
$system: m2-utils.get-system($theme);
|
|
19
|
-
|
|
20
|
-
stepper-container-color: map.get($system, surface),
|
|
21
|
-
stepper-line-color: map.get($system, outline),
|
|
22
|
-
stepper-header-hover-state-layer-color: m3-utils.color-with-opacity(
|
|
23
|
-
map.get($system, on-surface), map.get($system, hover-state-layer-opacity)),
|
|
24
|
-
stepper-header-focus-state-layer-color: m3-utils.color-with-opacity(
|
|
25
|
-
map.get($system, on-surface), map.get($system, focus-state-layer-opacity)),
|
|
26
|
-
stepper-header-label-text-color: map.get($system, on-surface-variant),
|
|
27
|
-
stepper-header-optional-label-text-color: map.get($system, on-surface-variant),
|
|
28
|
-
stepper-header-selected-state-label-text-color: map.get($system, on-surface),
|
|
29
|
-
stepper-header-error-state-label-text-color: inspection.get-theme-color($theme, warn, text),
|
|
30
|
-
stepper-header-icon-background-color: map.get($system, on-surface-variant),
|
|
31
|
-
stepper-header-error-state-icon-foreground-color:
|
|
32
|
-
inspection.get-theme-color($theme, warn, text),
|
|
33
|
-
stepper-header-error-state-icon-background-color: transparent,
|
|
34
|
-
));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Tokens that can be configured through Angular Material's typography theming API.
|
|
38
|
-
@function get-typography-tokens($theme) {
|
|
39
|
-
@return (
|
|
40
|
-
stepper-container-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
41
|
-
stepper-header-label-text-font: inspection.get-theme-typography($theme, body-2, font-family),
|
|
42
|
-
stepper-header-label-text-size: inspection.get-theme-typography($theme, body-2, font-size),
|
|
43
|
-
stepper-header-label-text-weight: inspection.get-theme-typography($theme, body-2, font-weight),
|
|
44
|
-
stepper-header-error-state-label-text-size:
|
|
45
|
-
inspection.get-theme-typography($theme, body-1, font-size),
|
|
46
|
-
stepper-header-selected-state-label-text-size: inspection.get-theme-typography(
|
|
47
|
-
$theme, body-1, font-size),
|
|
48
|
-
stepper-header-selected-state-label-text-weight: inspection.get-theme-typography(
|
|
49
|
-
$theme, body-1, font-weight),
|
|
50
|
-
);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Tokens that can be configured through Angular Material's density theming API.
|
|
54
|
-
@function get-density-tokens($theme) {
|
|
55
|
-
$scale: theming.clamp-density(inspection.get-theme-density($theme), -4);
|
|
56
|
-
$height-config: (
|
|
57
|
-
0: 72px,
|
|
58
|
-
-1: 68px,
|
|
59
|
-
-2: 64px,
|
|
60
|
-
-3: 60px,
|
|
61
|
-
-4: 42px,
|
|
62
|
-
);
|
|
8
|
+
$density-scale: theming.clamp-density(map.get($system, density-scale), -4);
|
|
63
9
|
|
|
64
10
|
@return (
|
|
65
|
-
|
|
11
|
+
base: (
|
|
12
|
+
stepper-header-focus-state-layer-shape: 0,
|
|
13
|
+
stepper-header-hover-state-layer-shape: 0,
|
|
14
|
+
),
|
|
15
|
+
color: map.merge(private-get-color-palette-color-tokens($theme, primary), (
|
|
16
|
+
stepper-container-color: map.get($system, surface),
|
|
17
|
+
stepper-line-color: map.get($system, outline),
|
|
18
|
+
stepper-header-hover-state-layer-color: m3-utils.color-with-opacity(
|
|
19
|
+
map.get($system, on-surface), map.get($system, hover-state-layer-opacity)),
|
|
20
|
+
stepper-header-focus-state-layer-color: m3-utils.color-with-opacity(
|
|
21
|
+
map.get($system, on-surface), map.get($system, focus-state-layer-opacity)),
|
|
22
|
+
stepper-header-label-text-color: map.get($system, on-surface-variant),
|
|
23
|
+
stepper-header-optional-label-text-color: map.get($system, on-surface-variant),
|
|
24
|
+
stepper-header-selected-state-label-text-color: map.get($system, on-surface),
|
|
25
|
+
stepper-header-error-state-label-text-color: map.get($system, error),
|
|
26
|
+
stepper-header-icon-background-color: map.get($system, on-surface-variant),
|
|
27
|
+
stepper-header-error-state-icon-foreground-color: map.get($system, error),
|
|
28
|
+
stepper-header-error-state-icon-background-color: transparent)
|
|
29
|
+
),
|
|
30
|
+
typography: (
|
|
31
|
+
stepper-container-text-font: map.get($system, body-medium-font),
|
|
32
|
+
stepper-header-label-text-font: map.get($system, body-medium-font),
|
|
33
|
+
stepper-header-label-text-size: map.get($system, body-medium-size),
|
|
34
|
+
stepper-header-label-text-weight: map.get($system, body-medium-weight),
|
|
35
|
+
stepper-header-error-state-label-text-size: map.get($system, body-large-size),
|
|
36
|
+
stepper-header-selected-state-label-text-size: map.get($system, body-large-size),
|
|
37
|
+
stepper-header-selected-state-label-text-weight: map.get($system, body-large-weight),
|
|
38
|
+
),
|
|
39
|
+
density: (
|
|
40
|
+
stepper-header-height: map.get((
|
|
41
|
+
0: 72px,
|
|
42
|
+
-1: 68px,
|
|
43
|
+
-2: 64px,
|
|
44
|
+
-3: 60px,
|
|
45
|
+
-4: 42px,
|
|
46
|
+
), $density-scale),
|
|
47
|
+
),
|
|
66
48
|
);
|
|
67
49
|
}
|
|
68
50
|
|
package/stepper/_m3-stepper.scss
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
@use 'sass:list';
|
|
3
3
|
@use '../core/tokens/m3-utils';
|
|
4
4
|
@use '../core/theming/theming';
|
|
5
|
-
@use '../core/theming/inspection';
|
|
6
5
|
@use '../core/tokens/m3';
|
|
7
6
|
|
|
8
7
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -52,7 +51,7 @@ $prefix: (mat, stepper);
|
|
|
52
51
|
stepper-header-selected-state-label-text-size: map.get($system, title-small-size),
|
|
53
52
|
stepper-header-selected-state-label-text-weight: map.get($system, title-small-weight),
|
|
54
53
|
),
|
|
55
|
-
density: get-density-tokens(map.get($
|
|
54
|
+
density: get-density-tokens(map.get($system, density-scale)),
|
|
56
55
|
);
|
|
57
56
|
}
|
|
58
57
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
@use '../core/theming/theming';
|
|
2
1
|
@use '../core/theming/inspection';
|
|
3
2
|
@use '../core/typography/typography';
|
|
4
|
-
@use '../core/style/sass-utils';
|
|
5
3
|
@use '../core/tokens/token-utils';
|
|
6
4
|
@use './m2-stepper';
|
|
7
5
|
@use './m3-stepper';
|
|
@@ -11,58 +9,54 @@
|
|
|
11
9
|
/// for mat-stepper.
|
|
12
10
|
/// @param {Map} $theme The theme to generate base styles for.
|
|
13
11
|
@mixin base($theme) {
|
|
12
|
+
$tokens: map.get(m2-stepper.get-tokens($theme), base);
|
|
14
13
|
@if inspection.get-theme-version($theme) == 1 {
|
|
15
|
-
|
|
16
|
-
} @else {
|
|
14
|
+
$tokens: map.get(m3-stepper.get-tokens($theme), base);
|
|
17
15
|
}
|
|
16
|
+
|
|
17
|
+
@include token-utils.values($tokens);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/// Outputs color theme styles for mat-stepper.
|
|
21
21
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
22
22
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
23
23
|
@mixin color($theme, $color-variant: null) {
|
|
24
|
+
$tokens: map.get(m2-stepper.get-tokens($theme), color);
|
|
24
25
|
@if inspection.get-theme-version($theme) == 1 {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
} @else {
|
|
28
|
-
@include sass-utils.current-selector-or-root() {
|
|
29
|
-
@include token-utils.create-token-values-mixed(m2-stepper.get-color-tokens($theme));
|
|
26
|
+
$tokens: map.get(m3-stepper.get-tokens($theme, $color-variant), color);
|
|
27
|
+
}
|
|
30
28
|
|
|
31
|
-
|
|
32
|
-
@include token-utils.create-token-values-mixed(
|
|
33
|
-
m2-stepper.private-get-color-palette-color-tokens($theme, secondary));
|
|
34
|
-
}
|
|
29
|
+
@include token-utils.values($tokens);
|
|
35
30
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
31
|
+
@if inspection.get-theme-version($theme) != 1 {
|
|
32
|
+
.mat-step-header.mat-accent {
|
|
33
|
+
$tokens: m2-stepper.private-get-color-palette-color-tokens($theme, secondary);
|
|
34
|
+
@include token-utils.values($tokens);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.mat-step-header.mat-warn {
|
|
38
|
+
$tokens: m2-stepper.private-get-color-palette-color-tokens($theme, error);
|
|
39
|
+
@include token-utils.values($tokens);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
/// Outputs typography theme styles for mat-stepper.
|
|
45
|
-
/// @param {Map} $theme The theme to generate typography styles for.
|
|
46
44
|
@mixin typography($theme) {
|
|
45
|
+
$tokens: map.get(m2-stepper.get-tokens($theme), typography);
|
|
47
46
|
@if inspection.get-theme-version($theme) == 1 {
|
|
48
|
-
|
|
49
|
-
} @else {
|
|
50
|
-
@include sass-utils.current-selector-or-root() {
|
|
51
|
-
@include token-utils.create-token-values-mixed(m2-stepper.get-typography-tokens($theme));
|
|
52
|
-
}
|
|
47
|
+
$tokens: map.get(m3-stepper.get-tokens($theme), typography);
|
|
53
48
|
}
|
|
49
|
+
|
|
50
|
+
@include token-utils.values($tokens);
|
|
54
51
|
}
|
|
55
52
|
|
|
56
|
-
/// Outputs density theme styles for mat-stepper.
|
|
57
|
-
/// @param {Map} $theme The theme to generate density styles for.
|
|
58
53
|
@mixin density($theme) {
|
|
54
|
+
$tokens: map.get(m2-stepper.get-tokens($theme), density);
|
|
59
55
|
@if inspection.get-theme-version($theme) == 1 {
|
|
60
|
-
|
|
61
|
-
} @else {
|
|
62
|
-
@include sass-utils.current-selector-or-root() {
|
|
63
|
-
@include token-utils.create-token-values-mixed(m2-stepper.get-density-tokens($theme));
|
|
64
|
-
}
|
|
56
|
+
$tokens: map.get(m3-stepper.get-tokens($theme), density);
|
|
65
57
|
}
|
|
58
|
+
|
|
59
|
+
@include token-utils.values($tokens);
|
|
66
60
|
}
|
|
67
61
|
|
|
68
62
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -85,26 +79,24 @@
|
|
|
85
79
|
/// @param {Map} $theme The theme to generate color styles for.
|
|
86
80
|
/// @param {String} $color-variant The color variant to use for the component (M3 only)
|
|
87
81
|
@mixin theme($theme, $color-variant: null) {
|
|
88
|
-
@
|
|
89
|
-
@
|
|
90
|
-
|
|
91
|
-
|
|
82
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
83
|
+
@include base($theme);
|
|
84
|
+
@include color($theme, $color-variant);
|
|
85
|
+
@include density($theme);
|
|
86
|
+
@include typography($theme);
|
|
87
|
+
@if inspection.theme-has($theme, density) {
|
|
92
88
|
@include density($theme);
|
|
89
|
+
}
|
|
90
|
+
} @else {
|
|
91
|
+
@include base($theme);
|
|
92
|
+
@if inspection.theme-has($theme, color) {
|
|
93
|
+
@include color($theme);
|
|
94
|
+
}
|
|
95
|
+
@if inspection.theme-has($theme, density) {
|
|
96
|
+
@include density($theme);
|
|
97
|
+
}
|
|
98
|
+
@if inspection.theme-has($theme, typography) {
|
|
93
99
|
@include typography($theme);
|
|
94
|
-
@if inspection.theme-has($theme, density) {
|
|
95
|
-
@include density($theme);
|
|
96
|
-
}
|
|
97
|
-
} @else {
|
|
98
|
-
@include base($theme);
|
|
99
|
-
@if inspection.theme-has($theme, color) {
|
|
100
|
-
@include color($theme);
|
|
101
|
-
}
|
|
102
|
-
@if inspection.theme-has($theme, density) {
|
|
103
|
-
@include density($theme);
|
|
104
|
-
}
|
|
105
|
-
@if inspection.theme-has($theme, typography) {
|
|
106
|
-
@include typography($theme);
|
|
107
|
-
}
|
|
108
100
|
}
|
|
109
101
|
}
|
|
110
102
|
}
|
package/table/_m2-table.scss
CHANGED
|
@@ -1,81 +1,63 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../core/theming/theming';
|
|
3
|
-
@use '../core/theming/inspection';
|
|
4
3
|
@use '../core/tokens/m2-utils';
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
// but may be in a future version of the theming API.
|
|
8
|
-
@function get-unthemable-tokens() {
|
|
9
|
-
@return (
|
|
10
|
-
table-row-item-outline-width: 1px,
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
// Tokens that can be configured through Angular Material's color theming API.
|
|
15
|
-
@function get-color-tokens($theme) {
|
|
5
|
+
@function get-tokens($theme) {
|
|
16
6
|
$system: m2-utils.get-system($theme);
|
|
7
|
+
$density-scale: theming.clamp-density(map.get($system, density-scale), -4);
|
|
17
8
|
|
|
18
9
|
@return (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
-2: 44px,
|
|
72
|
-
-3: 40px,
|
|
73
|
-
-4: 36px
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
@return (
|
|
77
|
-
table-header-container-height: map.get($header-scale, $scale),
|
|
78
|
-
table-footer-container-height: map.get($cell-scale, $scale),
|
|
79
|
-
table-row-item-container-height: map.get($cell-scale, $scale),
|
|
10
|
+
base: (
|
|
11
|
+
table-row-item-outline-width: 1px,
|
|
12
|
+
),
|
|
13
|
+
color: (
|
|
14
|
+
table-background-color: map.get($system, surface),
|
|
15
|
+
table-header-headline-color: map.get($system, on-surface),
|
|
16
|
+
table-row-item-label-text-color: map.get($system, on-surface),
|
|
17
|
+
table-row-item-outline-color: map.get($system, outline),
|
|
18
|
+
),
|
|
19
|
+
typography: (
|
|
20
|
+
table-header-headline-font: map.get($system, label-medium-font),
|
|
21
|
+
table-header-headline-line-height: map.get($system, label-medium-line-height),
|
|
22
|
+
table-header-headline-size: map.get($system, label-medium-size),
|
|
23
|
+
table-header-headline-weight: map.get($system, label-medium-weight),
|
|
24
|
+
table-header-headline-tracking: map.get($system, label-medium-tracking),
|
|
25
|
+
|
|
26
|
+
// Plain cells and footer cells have the same typography.
|
|
27
|
+
table-row-item-label-text-font: map.get($system, body-medium-font),
|
|
28
|
+
table-row-item-label-text-line-height: map.get($system, body-medium-line-height),
|
|
29
|
+
table-row-item-label-text-size: map.get($system, body-medium-size),
|
|
30
|
+
table-row-item-label-text-weight: map.get($system, body-medium-weight),
|
|
31
|
+
table-row-item-label-text-tracking: map.get($system, body-medium-tracking),
|
|
32
|
+
|
|
33
|
+
table-footer-supporting-text-font: map.get($system, body-medium-font),
|
|
34
|
+
table-footer-supporting-text-line-height: map.get($system, body-medium-line-height),
|
|
35
|
+
table-footer-supporting-text-size: map.get($system, body-medium-size),
|
|
36
|
+
table-footer-supporting-text-weight: map.get($system, body-medium-weight),
|
|
37
|
+
table-footer-supporting-text-tracking: map.get($system, body-medium-tracking),
|
|
38
|
+
),
|
|
39
|
+
density: (
|
|
40
|
+
table-header-container-height: map.get((
|
|
41
|
+
0: 56px,
|
|
42
|
+
-1: 52px,
|
|
43
|
+
-2: 48px,
|
|
44
|
+
-3: 44px,
|
|
45
|
+
-4: 40px
|
|
46
|
+
), $density-scale),
|
|
47
|
+
table-footer-container-height: map.get((
|
|
48
|
+
0: 52px,
|
|
49
|
+
-1: 48px,
|
|
50
|
+
-2: 44px,
|
|
51
|
+
-3: 40px,
|
|
52
|
+
-4: 36px
|
|
53
|
+
), $density-scale),
|
|
54
|
+
table-row-item-container-height: map.get((
|
|
55
|
+
0: 52px,
|
|
56
|
+
-1: 48px,
|
|
57
|
+
-2: 44px,
|
|
58
|
+
-3: 40px,
|
|
59
|
+
-4: 36px
|
|
60
|
+
), $density-scale),
|
|
61
|
+
),
|
|
80
62
|
);
|
|
81
63
|
}
|
package/table/_m3-table.scss
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
@use 'sass:list';
|
|
3
3
|
@use '../core/tokens/m3-utils';
|
|
4
4
|
@use '../core/theming/theming';
|
|
5
|
-
@use '../core/theming/inspection';
|
|
6
5
|
@use '../core/tokens/m3';
|
|
7
6
|
|
|
8
7
|
/// Generates custom tokens for the mat-table.
|
|
@@ -36,7 +35,7 @@
|
|
|
36
35
|
table-footer-supporting-text-tracking: map.get($system, body-medium-tracking),
|
|
37
36
|
table-footer-supporting-text-weight: map.get($system, body-medium-weight),
|
|
38
37
|
),
|
|
39
|
-
density: get-density-tokens(map.get($
|
|
38
|
+
density: get-density-tokens(map.get($system, density-scale)),
|
|
40
39
|
);
|
|
41
40
|
}
|
|
42
41
|
|
package/table/_table-theme.scss
CHANGED
|
@@ -1,50 +1,44 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use './m2-table';
|
|
3
3
|
@use './m3-table';
|
|
4
|
-
@use '../core/theming/theming';
|
|
5
4
|
@use '../core/theming/inspection';
|
|
6
5
|
@use '../core/typography/typography';
|
|
7
6
|
@use '../core/tokens/token-utils';
|
|
8
|
-
@use '../core/style/sass-utils';
|
|
9
7
|
|
|
10
8
|
@mixin base($theme) {
|
|
9
|
+
$tokens: map.get(m2-table.get-tokens($theme), base);
|
|
11
10
|
@if inspection.get-theme-version($theme) == 1 {
|
|
12
|
-
|
|
13
|
-
} @else {
|
|
14
|
-
@include sass-utils.current-selector-or-root() {
|
|
15
|
-
@include token-utils.create-token-values-mixed(m2-table.get-unthemable-tokens());
|
|
16
|
-
}
|
|
11
|
+
$tokens: map.get(m3-table.get-tokens($theme), base);
|
|
17
12
|
}
|
|
13
|
+
|
|
14
|
+
@include token-utils.values($tokens);
|
|
18
15
|
}
|
|
19
16
|
|
|
20
17
|
@mixin color($theme) {
|
|
18
|
+
$tokens: map.get(m2-table.get-tokens($theme), color);
|
|
21
19
|
@if inspection.get-theme-version($theme) == 1 {
|
|
22
|
-
|
|
23
|
-
} @else {
|
|
24
|
-
@include sass-utils.current-selector-or-root() {
|
|
25
|
-
@include token-utils.create-token-values-mixed(m2-table.get-color-tokens($theme));
|
|
26
|
-
}
|
|
20
|
+
$tokens: map.get(m3-table.get-tokens($theme), color);
|
|
27
21
|
}
|
|
22
|
+
|
|
23
|
+
@include token-utils.values($tokens);
|
|
28
24
|
}
|
|
29
25
|
|
|
30
26
|
@mixin typography($theme) {
|
|
27
|
+
$tokens: map.get(m2-table.get-tokens($theme), typography);
|
|
31
28
|
@if inspection.get-theme-version($theme) == 1 {
|
|
32
|
-
|
|
33
|
-
} @else {
|
|
34
|
-
@include sass-utils.current-selector-or-root() {
|
|
35
|
-
@include token-utils.create-token-values-mixed(m2-table.get-typography-tokens($theme));
|
|
36
|
-
}
|
|
29
|
+
$tokens: map.get(m3-table.get-tokens($theme), typography);
|
|
37
30
|
}
|
|
31
|
+
|
|
32
|
+
@include token-utils.values($tokens);
|
|
38
33
|
}
|
|
39
34
|
|
|
40
35
|
@mixin density($theme) {
|
|
36
|
+
$tokens: map.get(m2-table.get-tokens($theme), density);
|
|
41
37
|
@if inspection.get-theme-version($theme) == 1 {
|
|
42
|
-
|
|
43
|
-
} @else {
|
|
44
|
-
@include sass-utils.current-selector-or-root() {
|
|
45
|
-
@include token-utils.create-token-values-mixed(m2-table.get-density-tokens($theme));
|
|
46
|
-
}
|
|
38
|
+
$tokens: map.get(m3-table.get-tokens($theme), density);
|
|
47
39
|
}
|
|
40
|
+
|
|
41
|
+
@include token-utils.values($tokens);
|
|
48
42
|
}
|
|
49
43
|
|
|
50
44
|
/// Defines the tokens that will be available in the `overrides` mixin and for docs extraction.
|
|
@@ -62,23 +56,21 @@
|
|
|
62
56
|
}
|
|
63
57
|
|
|
64
58
|
@mixin theme($theme) {
|
|
65
|
-
@
|
|
66
|
-
@
|
|
67
|
-
|
|
59
|
+
@if inspection.get-theme-version($theme) == 1 {
|
|
60
|
+
@include base($theme);
|
|
61
|
+
@include color($theme);
|
|
62
|
+
@include density($theme);
|
|
63
|
+
@include typography($theme);
|
|
64
|
+
} @else {
|
|
65
|
+
@include base($theme);
|
|
66
|
+
@if inspection.theme-has($theme, color) {
|
|
68
67
|
@include color($theme);
|
|
68
|
+
}
|
|
69
|
+
@if inspection.theme-has($theme, density) {
|
|
69
70
|
@include density($theme);
|
|
71
|
+
}
|
|
72
|
+
@if inspection.theme-has($theme, typography) {
|
|
70
73
|
@include typography($theme);
|
|
71
|
-
} @else {
|
|
72
|
-
@include base($theme);
|
|
73
|
-
@if inspection.theme-has($theme, color) {
|
|
74
|
-
@include color($theme);
|
|
75
|
-
}
|
|
76
|
-
@if inspection.theme-has($theme, density) {
|
|
77
|
-
@include density($theme);
|
|
78
|
-
}
|
|
79
|
-
@if inspection.theme-has($theme, typography) {
|
|
80
|
-
@include typography($theme);
|
|
81
|
-
}
|
|
82
74
|
}
|
|
83
75
|
}
|
|
84
76
|
}
|