@angular/material 16.1.5 → 16.1.6
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/bottom-sheet/_bottom-sheet-theme.scss +10 -11
- package/button-toggle/_button-toggle-theme.scss +20 -97
- package/button-toggle/_button-toggle-variables.scss +2 -0
- package/core/tokens/_token-utils.scss +1 -0
- package/core/tokens/m2/mat/_bottom-sheet.scss +56 -0
- package/core/tokens/m2/mat/_divider.scss +45 -0
- package/core/tokens/m2/mat/_legacy-button-toggle.scss +63 -0
- package/core/tokens/m2/mat/_sidenav.scss +65 -0
- package/core/tokens/m2/mat/_standard-button-toggle.scss +87 -0
- package/core/tokens/m2/mat/_toolbar.scss +79 -0
- package/divider/_divider-theme.scss +6 -8
- package/esm2022/bottom-sheet/bottom-sheet-container.mjs +3 -3
- package/esm2022/button-toggle/button-toggle.mjs +2 -2
- package/esm2022/chips/chip-option.mjs +2 -2
- package/esm2022/chips/chip-row.mjs +10 -7
- package/esm2022/chips/chip.mjs +2 -2
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/divider/divider.mjs +2 -2
- package/esm2022/form-field/form-field.mjs +3 -3
- package/esm2022/menu/menu-item.mjs +4 -4
- package/esm2022/menu/menu.mjs +3 -3
- package/esm2022/radio/radio.mjs +13 -1
- package/esm2022/sidenav/drawer.mjs +3 -3
- package/esm2022/sidenav/sidenav.mjs +3 -3
- package/esm2022/slide-toggle/slide-toggle.mjs +2 -2
- package/esm2022/toolbar/toolbar.mjs +2 -2
- package/fesm2022/bottom-sheet.mjs +2 -2
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +2 -2
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/chips.mjs +13 -10
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/divider.mjs +2 -2
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/menu.mjs +5 -5
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/radio.mjs +12 -0
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +4 -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/toolbar.mjs +2 -2
- package/fesm2022/toolbar.mjs.map +1 -1
- package/legacy-prebuilt-themes/legacy-deeppurple-amber.css +1 -1
- package/legacy-prebuilt-themes/legacy-indigo-pink.css +1 -1
- package/legacy-prebuilt-themes/legacy-pink-bluegrey.css +1 -1
- package/legacy-prebuilt-themes/legacy-purple-green.css +1 -1
- 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/radio/index.d.ts +4 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/sidenav/_sidenav-theme.scss +6 -69
- package/toolbar/_toolbar-theme.scss +25 -71
|
@@ -1,77 +1,14 @@
|
|
|
1
|
-
@use 'sass:color';
|
|
2
|
-
@use 'sass:map';
|
|
3
|
-
@use 'sass:meta';
|
|
4
|
-
@use '../core/style/private';
|
|
5
1
|
@use '../core/theming/theming';
|
|
2
|
+
@use '../core/tokens/m2/mat/sidenav' as tokens-mat-sidenav;
|
|
3
|
+
@use '../core/tokens/token-utils';
|
|
4
|
+
@use '../core/style/sass-utils';
|
|
6
5
|
|
|
7
6
|
@mixin color($config-or-theme) {
|
|
8
7
|
$config: theming.get-color-config($config-or-theme);
|
|
9
|
-
$primary: map.get($config, primary);
|
|
10
|
-
$accent: map.get($config, accent);
|
|
11
|
-
$warn: map.get($config, warn);
|
|
12
|
-
$background: map.get($config, background);
|
|
13
|
-
$foreground: map.get($config, foreground);
|
|
14
8
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
$drawer-side-border: solid 1px theming.get-color-from-palette($foreground, divider);
|
|
19
|
-
|
|
20
|
-
.mat-drawer-container {
|
|
21
|
-
background-color: $drawer-container-background-color;
|
|
22
|
-
color: theming.get-color-from-palette($foreground, text);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.mat-drawer {
|
|
26
|
-
background-color: $drawer-background-color;
|
|
27
|
-
color: theming.get-color-from-palette($foreground, text);
|
|
28
|
-
|
|
29
|
-
&.mat-drawer-push {
|
|
30
|
-
background-color: $drawer-push-background-color;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
&:not(.mat-drawer-side) {
|
|
34
|
-
// The elevation of z-16 is noted in the design specifications.
|
|
35
|
-
// See https://material.io/design/components/navigation-drawer.html
|
|
36
|
-
@include private.private-theme-elevation(16, $config);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.mat-drawer-side {
|
|
41
|
-
border-right: $drawer-side-border;
|
|
42
|
-
|
|
43
|
-
&.mat-drawer-end {
|
|
44
|
-
border-left: $drawer-side-border;
|
|
45
|
-
border-right: none;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
[dir='rtl'] .mat-drawer-side {
|
|
50
|
-
border-left: $drawer-side-border;
|
|
51
|
-
border-right: none;
|
|
52
|
-
|
|
53
|
-
&.mat-drawer-end {
|
|
54
|
-
border-left: none;
|
|
55
|
-
border-right: $drawer-side-border;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.mat-drawer-backdrop.mat-drawer-shown {
|
|
60
|
-
$opacity: 0.6;
|
|
61
|
-
$backdrop-color: theming.get-color-from-palette($background, card, $opacity);
|
|
62
|
-
|
|
63
|
-
@if (meta.type-of($backdrop-color) == color) {
|
|
64
|
-
// We use invert() here to have the darken the background color expected to be used. If the
|
|
65
|
-
// background is light, we use a dark backdrop. If the background is dark,
|
|
66
|
-
// we use a light backdrop.
|
|
67
|
-
background-color: color.invert($backdrop-color);
|
|
68
|
-
}
|
|
69
|
-
@else {
|
|
70
|
-
// If we couldn't resolve the backdrop color to a color value, fall back to using
|
|
71
|
-
// `opacity` to make it opaque since its end value could be a solid color.
|
|
72
|
-
background-color: $backdrop-color;
|
|
73
|
-
opacity: $opacity;
|
|
74
|
-
}
|
|
9
|
+
@include sass-utils.current-selector-or-root() {
|
|
10
|
+
@include token-utils.create-token-values(tokens-mat-sidenav.$prefix,
|
|
11
|
+
tokens-mat-sidenav.get-color-tokens($config));
|
|
75
12
|
}
|
|
76
13
|
}
|
|
77
14
|
|
|
@@ -1,105 +1,59 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use '../core/density/private/compatibility';
|
|
3
|
-
@use '../core/style/variables';
|
|
4
2
|
@use '../core/theming/theming';
|
|
5
3
|
@use '../core/typography/typography';
|
|
6
|
-
@use '../core/
|
|
7
|
-
@use '
|
|
8
|
-
|
|
9
|
-
@mixin _height($height) {
|
|
10
|
-
.mat-toolbar-multiple-rows {
|
|
11
|
-
min-height: $height;
|
|
12
|
-
}
|
|
13
|
-
.mat-toolbar-row, .mat-toolbar-single-row {
|
|
14
|
-
height: $height;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
4
|
+
@use '../core/tokens/m2/mat/toolbar' as tokens-mat-toolbar;
|
|
5
|
+
@use '../core/tokens/token-utils';
|
|
6
|
+
@use '../core/style/sass-utils';
|
|
17
7
|
|
|
18
8
|
@mixin _palette-styles($palette) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.mat-focused .mat-form-field-ripple {
|
|
27
|
-
background-color: currentColor;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.mat-form-field-label,
|
|
31
|
-
.mat-focused .mat-form-field-label,
|
|
32
|
-
.mat-select-value,
|
|
33
|
-
.mat-select-arrow,
|
|
34
|
-
.mat-form-field.mat-focused .mat-select-arrow {
|
|
35
|
-
color: inherit;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.mat-input-element {
|
|
39
|
-
caret-color: currentColor;
|
|
40
|
-
}
|
|
9
|
+
@include token-utils.create-token-values(
|
|
10
|
+
tokens-mat-toolbar.$prefix,
|
|
11
|
+
tokens-mat-toolbar.private-get-color-palette-color-tokens(
|
|
12
|
+
$background-color: theming.get-color-from-palette($palette),
|
|
13
|
+
$text-color: theming.get-color-from-palette($palette, default-contrast)
|
|
14
|
+
)
|
|
15
|
+
);
|
|
41
16
|
}
|
|
42
17
|
|
|
43
18
|
@mixin color($config-or-theme) {
|
|
44
19
|
$config: theming.get-color-config($config-or-theme);
|
|
45
|
-
$primary: map.get($config, primary);
|
|
46
|
-
$accent: map.get($config, accent);
|
|
47
|
-
$warn: map.get($config, warn);
|
|
48
|
-
$background: map.get($config, background);
|
|
49
|
-
$foreground: map.get($config, foreground);
|
|
50
20
|
|
|
51
|
-
.
|
|
52
|
-
|
|
53
|
-
|
|
21
|
+
@include sass-utils.current-selector-or-root() {
|
|
22
|
+
@include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
|
|
23
|
+
tokens-mat-toolbar.get-color-tokens($config));
|
|
24
|
+
}
|
|
54
25
|
|
|
26
|
+
.mat-toolbar {
|
|
55
27
|
&.mat-primary {
|
|
56
|
-
@include _palette-styles($primary);
|
|
28
|
+
@include _palette-styles(map.get($config, primary));
|
|
57
29
|
}
|
|
58
30
|
|
|
59
31
|
&.mat-accent {
|
|
60
|
-
@include _palette-styles($accent);
|
|
32
|
+
@include _palette-styles(map.get($config, accent));
|
|
61
33
|
}
|
|
62
34
|
|
|
63
35
|
&.mat-warn {
|
|
64
|
-
@include _palette-styles($warn);
|
|
36
|
+
@include _palette-styles(map.get($config, warn));
|
|
65
37
|
}
|
|
66
|
-
|
|
67
|
-
@include _form-field-overrides;
|
|
68
38
|
}
|
|
69
39
|
}
|
|
70
40
|
|
|
71
41
|
@mixin typography($config-or-theme) {
|
|
72
42
|
$config: typography.private-typography-to-2014-config(
|
|
73
43
|
theming.get-typography-config($config-or-theme));
|
|
74
|
-
|
|
75
|
-
.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
.mat-toolbar h4,
|
|
79
|
-
.mat-toolbar h5,
|
|
80
|
-
.mat-toolbar h6 {
|
|
81
|
-
@include typography-utils.typography-level($config, title);
|
|
82
|
-
margin: 0;
|
|
44
|
+
|
|
45
|
+
@include sass-utils.current-selector-or-root() {
|
|
46
|
+
@include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
|
|
47
|
+
tokens-mat-toolbar.get-typography-tokens($config));
|
|
83
48
|
}
|
|
84
49
|
}
|
|
85
50
|
|
|
86
51
|
@mixin density($config-or-theme) {
|
|
87
52
|
$density-scale: theming.get-density-config($config-or-theme);
|
|
88
|
-
$height-desktop: compatibility.private-density-prop-value(
|
|
89
|
-
toolbar-variables.$desktop-density-config, $density-scale, height);
|
|
90
|
-
$height-mobile: compatibility.private-density-prop-value(
|
|
91
|
-
toolbar-variables.$mobile-density-config, $density-scale, height);
|
|
92
53
|
|
|
93
|
-
@include
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
// As per specs, toolbars should have a different height in mobile devices. This has been
|
|
98
|
-
// specified in the old guidelines and is still observable in the new specifications by
|
|
99
|
-
// looking at the spec images. See: https://material.io/design/components/app-bars-top.html#anatomy
|
|
100
|
-
@media (variables.$xsmall) {
|
|
101
|
-
@include _height($height-mobile);
|
|
102
|
-
}
|
|
54
|
+
@include sass-utils.current-selector-or-root() {
|
|
55
|
+
@include token-utils.create-token-values(tokens-mat-toolbar.$prefix,
|
|
56
|
+
tokens-mat-toolbar.get-density-tokens($density-scale));
|
|
103
57
|
}
|
|
104
58
|
}
|
|
105
59
|
|