@angular/material 16.2.0-next.5 → 16.2.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/bottom-sheet/index.d.ts +6 -0
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-common.scss +1 -1
- package/core/tokens/m2/mat/_form-field.scss +72 -0
- package/core/tokens/m2/mat/_grid-list.scss +46 -0
- package/core/tokens/m2/mat/_icon.scss +45 -0
- package/core/tokens/m2/mat/_slide-toggle.scss +1 -1
- package/core/tokens/m2/mat/_tab-header.scss +1 -1
- package/core/tokens/m2/mdc/_circular-progress.scss +1 -1
- package/core/tokens/m2/mdc/_filled-text-field.scss +175 -0
- package/core/tokens/m2/mdc/_outlined-text-field.scss +158 -0
- package/core/tokens/m2/mdc/_plain-tooltip.scss +2 -2
- package/dialog/index.d.ts +6 -0
- package/esm2022/autocomplete/autocomplete-trigger.mjs +7 -2
- package/esm2022/bottom-sheet/bottom-sheet-ref.mjs +8 -1
- package/esm2022/chips/chip-option.mjs +9 -3
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/dialog/dialog-ref.mjs +1 -1
- package/esm2022/dialog/dialog.mjs +2 -1
- package/esm2022/form-field/form-field.mjs +3 -3
- package/esm2022/grid-list/grid-list.mjs +2 -2
- package/esm2022/grid-list/grid-tile.mjs +2 -2
- package/esm2022/icon/icon.mjs +2 -2
- package/esm2022/slide-toggle/slide-toggle.mjs +2 -2
- package/esm2022/slider/slider-input.mjs +21 -5
- package/esm2022/slider/slider-interface.mjs +1 -1
- package/esm2022/slider/slider-thumb.mjs +2 -10
- package/esm2022/slider/slider.mjs +20 -12
- package/esm2022/tabs/ink-bar.mjs +1 -1
- package/esm2022/tabs/tab-group.mjs +2 -2
- package/esm2022/tabs/tab-nav-bar/tab-nav-bar.mjs +2 -2
- package/fesm2022/autocomplete.mjs +6 -1
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +7 -0
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/chips.mjs +8 -2
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/dialog.mjs +1 -0
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/form-field.mjs +2 -2
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +4 -4
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon.mjs +2 -2
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +2 -2
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +40 -24
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/tabs.mjs +4 -4
- package/fesm2022/tabs.mjs.map +1 -1
- package/form-field/_form-field-subscript.scss +11 -9
- package/form-field/_form-field-theme.scss +34 -70
- package/form-field/_mdc-text-field-structure-overrides.scss +18 -0
- package/grid-list/_grid-list-theme.scss +7 -6
- package/icon/_icon-theme.scss +18 -8
- 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 +54 -54
- 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/schematics/ng-add/index.js +2 -2
- package/schematics/ng-add/index.mjs +2 -2
- package/slider/index.d.ts +8 -5
- package/tabs/_tabs-common.scss +1 -1
- package/tabs/index.d.ts +1 -1
package/bottom-sheet/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { AnimationTriggerMetadata } from '@angular/animations';
|
|
|
3
3
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
|
4
4
|
import { CdkDialogContainer } from '@angular/cdk/dialog';
|
|
5
5
|
import { ChangeDetectorRef } from '@angular/core';
|
|
6
|
+
import { ComponentRef } from '@angular/core';
|
|
6
7
|
import { ComponentType } from '@angular/cdk/portal';
|
|
7
8
|
import { DialogConfig } from '@angular/cdk/dialog';
|
|
8
9
|
import { DialogRef } from '@angular/cdk/dialog';
|
|
@@ -167,6 +168,11 @@ export declare class MatBottomSheetRef<T = any, R = any> {
|
|
|
167
168
|
private _ref;
|
|
168
169
|
/** Instance of the component making up the content of the bottom sheet. */
|
|
169
170
|
get instance(): T;
|
|
171
|
+
/**
|
|
172
|
+
* `ComponentRef` of the component opened into the bottom sheet. Will be
|
|
173
|
+
* null when the bottom sheet is opened using a `TemplateRef`.
|
|
174
|
+
*/
|
|
175
|
+
get componentRef(): ComponentRef<T> | null;
|
|
170
176
|
/**
|
|
171
177
|
* Instance of the component into which the bottom sheet content is projected.
|
|
172
178
|
* @docs-private
|
|
@@ -42,7 +42,7 @@ $padding: checkbox-common.$border-width * 2;
|
|
|
42
42
|
// `$box-size`: size of the checkbox.
|
|
43
43
|
// `$border-size`: size of the checkbox's border.
|
|
44
44
|
@mixin _checkbox-indeterminate-styles-with-size($box-size, $border-size) {
|
|
45
|
-
// Center the line in the
|
|
45
|
+
// Center the line in the checkbox. `$checkbox-common.$border-width` is the width of the line.
|
|
46
46
|
top: math.div($box-size - checkbox-common.$border-width, 2) - $border-size;
|
|
47
47
|
width: $box-size - checkbox-common.$border-width - (2 * $border-size);
|
|
48
48
|
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../token-utils';
|
|
3
|
+
@use '../../../style/sass-utils';
|
|
4
|
+
@use '../../../typography/typography-utils';
|
|
5
|
+
|
|
6
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
7
|
+
$prefix: (mat, form-field);
|
|
8
|
+
|
|
9
|
+
// Tokens that can't be configured through Angular Material's current theming API,
|
|
10
|
+
// but may be in a future version of the theming API.
|
|
11
|
+
@function get-unthemable-tokens() {
|
|
12
|
+
@return ();
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// Tokens that can be configured through Angular Material's color theming API.
|
|
16
|
+
@function get-color-tokens($config) {
|
|
17
|
+
$is-dark: map.get($config, is-dark);
|
|
18
|
+
$on-surface: if($is-dark, #fff, #000);
|
|
19
|
+
|
|
20
|
+
@return (
|
|
21
|
+
// MDC has a token for the enabled placeholder, but not for the disabled one.
|
|
22
|
+
disabled-input-text-placeholder-color: rgba($on-surface, 0.38),
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Tokens that can be configured through Angular Material's typography theming API.
|
|
27
|
+
@function get-typography-tokens($config) {
|
|
28
|
+
$fallback-font-family: typography-utils.font-family($config);
|
|
29
|
+
|
|
30
|
+
@return (
|
|
31
|
+
// MDC uses `subtitle1` for the input value, placeholder and floating label. The spec
|
|
32
|
+
// shows `body1` for text fields though, so we manually override the typography.
|
|
33
|
+
// Note: Form controls inherit the typography from the parent form field.
|
|
34
|
+
container-text-font: typography-utils.font-family($config, body-1) or $fallback-font-family,
|
|
35
|
+
container-text-line-height: typography-utils.line-height($config, body-1),
|
|
36
|
+
container-text-size: typography-utils.font-size($config, body-1),
|
|
37
|
+
container-text-tracking: typography-utils.letter-spacing($config, body-1),
|
|
38
|
+
container-text-weight: typography-utils.font-weight($config, body-1),
|
|
39
|
+
|
|
40
|
+
// In the container styles, we updated the floating label to use the `body-1` typography level.
|
|
41
|
+
// The MDC notched outline overrides this accidentally (only when the label floats) to a
|
|
42
|
+
// `rem`-based value. This results in different label widths when floated/docked and ultimately
|
|
43
|
+
// breaks the notch width as it has been measured in the docked state (where `body-1` is
|
|
44
|
+
// applied). We try to unset these styles set by the `mdc-notched-outline`:
|
|
45
|
+
// https://github.com/material-components/material-components-web/blob/master/packages/mdc-notched-outline/_mixins.scss#L272-L292.
|
|
46
|
+
// This is why we can't use their `label-text-populated-size` token and we have to declare
|
|
47
|
+
// our own version of it.
|
|
48
|
+
outlined-label-text-populated-size: typography-utils.font-size($config, body-1),
|
|
49
|
+
|
|
50
|
+
subscript-text-font: typography-utils.font-family($config, caption) or $fallback-font-family,
|
|
51
|
+
subscript-text-line-height: typography-utils.line-height($config, caption),
|
|
52
|
+
subscript-text-size: typography-utils.font-size($config, caption),
|
|
53
|
+
subscript-text-tracking: typography-utils.letter-spacing($config, caption),
|
|
54
|
+
subscript-text-weight: typography-utils.font-weight($config, caption),
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Tokens that can be configured through Angular Material's density theming API.
|
|
59
|
+
@function get-density-tokens($config) {
|
|
60
|
+
@return ();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
64
|
+
// This is used to create token slots.
|
|
65
|
+
@function get-token-slots() {
|
|
66
|
+
@return sass-utils.deep-merge-all(
|
|
67
|
+
get-unthemable-tokens(),
|
|
68
|
+
get-color-tokens(token-utils.$placeholder-color-config),
|
|
69
|
+
get-typography-tokens(token-utils.$placeholder-typography-config),
|
|
70
|
+
get-density-tokens(token-utils.$placeholder-density-config)
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
@use '../../token-utils';
|
|
2
|
+
@use '../../../typography/typography-utils';
|
|
3
|
+
@use '../../../style/sass-utils';
|
|
4
|
+
|
|
5
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
|
+
$prefix: (mat, grid-list);
|
|
7
|
+
|
|
8
|
+
// Tokens that can't be configured through Angular Material's current theming API,
|
|
9
|
+
// but may be in a future version of the theming API.
|
|
10
|
+
@function get-unthemable-tokens() {
|
|
11
|
+
@return ();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Tokens that can be configured through Angular Material's color theming API.
|
|
15
|
+
@function get-color-tokens($config) {
|
|
16
|
+
@return ();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Tokens that can be configured through Angular Material's typography theming API.
|
|
20
|
+
@function get-typography-tokens($config) {
|
|
21
|
+
@return (
|
|
22
|
+
// TODO(crisbeto): other components have tokens for all typography dimensions.
|
|
23
|
+
// Here we only set the font size to maintain the same appearance as the pre-tokens
|
|
24
|
+
// theming API. Consider adding more tokens for letter spacing, font weight etc.
|
|
25
|
+
tile-header-primary-text-size: typography-utils.font-size($config, body-1),
|
|
26
|
+
tile-header-secondary-text-size: typography-utils.font-size($config, caption),
|
|
27
|
+
tile-footer-primary-text-size: typography-utils.font-size($config, body-1),
|
|
28
|
+
tile-footer-secondary-text-size: typography-utils.font-size($config, caption),
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Tokens that can be configured through Angular Material's density theming API.
|
|
33
|
+
@function get-density-tokens($config) {
|
|
34
|
+
@return ();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
38
|
+
// This is used to create token slots.
|
|
39
|
+
@function get-token-slots() {
|
|
40
|
+
@return sass-utils.deep-merge-all(
|
|
41
|
+
get-unthemable-tokens(),
|
|
42
|
+
get-color-tokens(token-utils.$placeholder-color-config),
|
|
43
|
+
get-typography-tokens(token-utils.$placeholder-typography-config),
|
|
44
|
+
get-density-tokens(token-utils.$placeholder-density-config)
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@use '../../token-utils';
|
|
2
|
+
@use '../../../style/sass-utils';
|
|
3
|
+
|
|
4
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
5
|
+
$prefix: (mat, icon);
|
|
6
|
+
|
|
7
|
+
// Tokens that can't be configured through Angular Material's current theming API,
|
|
8
|
+
// but may be in a future version of the theming API.
|
|
9
|
+
@function get-unthemable-tokens() {
|
|
10
|
+
@return ();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// Tokens that can be configured through Angular Material's color theming API.
|
|
14
|
+
@function get-color-tokens($config) {
|
|
15
|
+
// Default the icon to `inherit` so it matches the text around it.
|
|
16
|
+
@return private-get-icon-color-tokens(inherit);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Tokens that can be configured through Angular Material's typography theming API.
|
|
20
|
+
@function get-typography-tokens($config) {
|
|
21
|
+
@return ();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Tokens that can be configured through Angular Material's density theming API.
|
|
25
|
+
@function get-density-tokens($config) {
|
|
26
|
+
@return ();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Mixin used to set a specific color on an icon.
|
|
30
|
+
@function private-get-icon-color-tokens($color) {
|
|
31
|
+
@return (
|
|
32
|
+
color: $color,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
37
|
+
// This is used to create token slots.
|
|
38
|
+
@function get-token-slots() {
|
|
39
|
+
@return sass-utils.deep-merge-all(
|
|
40
|
+
get-unthemable-tokens(),
|
|
41
|
+
get-color-tokens(token-utils.$placeholder-color-config),
|
|
42
|
+
get-typography-tokens(token-utils.$placeholder-typography-config),
|
|
43
|
+
get-density-tokens(token-utils.$placeholder-density-config)
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -29,7 +29,7 @@ $prefix: (mat, slide-toggle);
|
|
|
29
29
|
@return (
|
|
30
30
|
label-text-font: typography-utils.font-family($config),
|
|
31
31
|
label-text-size: typography-utils.font-size($config, body-2),
|
|
32
|
-
label-text-
|
|
32
|
+
label-text-tracking: typography-utils.letter-spacing($config, body-2),
|
|
33
33
|
label-text-line-height: typography-utils.line-height($config, body-2),
|
|
34
34
|
label-text-weight: typography-utils.font-weight($config, body-2),
|
|
35
35
|
);
|
|
@@ -49,7 +49,7 @@ $prefix: (mat, tab-header);
|
|
|
49
49
|
label-text-font:
|
|
50
50
|
typography-utils.font-family($config, button) or typography-utils.font-family($config),
|
|
51
51
|
label-text-size: typography-utils.font-size($config, button),
|
|
52
|
-
label-text-
|
|
52
|
+
label-text-tracking: typography-utils.letter-spacing($config, button),
|
|
53
53
|
label-text-line-height: typography-utils.line-height($config, button),
|
|
54
54
|
label-text-weight: typography-utils.font-weight($config, button),
|
|
55
55
|
);
|
|
@@ -16,7 +16,7 @@ $prefix: (mdc, circular-progress);
|
|
|
16
16
|
@return (
|
|
17
17
|
// The thickness of the progress spinner's active indicator.
|
|
18
18
|
active-indicator-width: 4px,
|
|
19
|
-
// The
|
|
19
|
+
// The diameter of the spinner
|
|
20
20
|
size: 48px,
|
|
21
21
|
// =============================================================================================
|
|
22
22
|
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
@use 'sass:color';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use 'sass:meta';
|
|
4
|
+
@use '../../../theming/theming';
|
|
5
|
+
@use '../../../style/sass-utils';
|
|
6
|
+
@use '../../../typography/typography-utils';
|
|
7
|
+
@use '../../token-utils';
|
|
8
|
+
|
|
9
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
10
|
+
$prefix: (mdc, filled-text-field);
|
|
11
|
+
|
|
12
|
+
// Tokens that can't be configured through Angular Material's current theming API,
|
|
13
|
+
// but may be in a future version of the theming API.
|
|
14
|
+
//
|
|
15
|
+
// Tokens that are available in MDC, but not used in Angular Material should be mapped to `null`.
|
|
16
|
+
// `null` indicates that we are intentionally choosing not to emit a slot or value for the token in
|
|
17
|
+
// our CSS.
|
|
18
|
+
@function get-unthemable-tokens() {
|
|
19
|
+
@return (
|
|
20
|
+
active-indicator-height: 1px,
|
|
21
|
+
focus-active-indicator-height: 2px,
|
|
22
|
+
container-shape: 4px,
|
|
23
|
+
|
|
24
|
+
// =============================================================================================
|
|
25
|
+
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
26
|
+
// =============================================================================================
|
|
27
|
+
disabled-active-indicator-height: null,
|
|
28
|
+
hover-active-indicator-height: null,
|
|
29
|
+
disabled-active-indicator-opacity: null,
|
|
30
|
+
error-focus-caret-color: null,
|
|
31
|
+
error-hover-caret-color: null,
|
|
32
|
+
focus-caret-color: null,
|
|
33
|
+
hover-caret-color: null,
|
|
34
|
+
label-text-populated-line-height: null,
|
|
35
|
+
label-text-populated-size: null,
|
|
36
|
+
label-text-type: null,
|
|
37
|
+
disabled-label-text-opacity: null,
|
|
38
|
+
hover-label-text-color: null,
|
|
39
|
+
error-hover-label-text-color: null,
|
|
40
|
+
supporting-text-color: null,
|
|
41
|
+
supporting-text-font: null,
|
|
42
|
+
supporting-text-line-height: null,
|
|
43
|
+
supporting-text-size: null,
|
|
44
|
+
supporting-text-tracking: null,
|
|
45
|
+
supporting-text-weight: null,
|
|
46
|
+
disabled-supporting-text-color: null,
|
|
47
|
+
disabled-supporting-text-opacity: null,
|
|
48
|
+
error-focus-supporting-text-color: null,
|
|
49
|
+
error-hover-supporting-text-color: null,
|
|
50
|
+
error-supporting-text-color: null,
|
|
51
|
+
focus-supporting-text-color: null,
|
|
52
|
+
hover-supporting-text-color: null,
|
|
53
|
+
input-text-prefix-color: null,
|
|
54
|
+
container-height: null,
|
|
55
|
+
disabled-trailing-icon-color: null,
|
|
56
|
+
disabled-trailing-icon-opacity: null,
|
|
57
|
+
error-focus-trailing-icon-color: null,
|
|
58
|
+
error-hover-trailing-icon-color: null,
|
|
59
|
+
error-trailing-icon-color: null,
|
|
60
|
+
focus-trailing-icon-color: null,
|
|
61
|
+
hover-trailing-icon-color: null,
|
|
62
|
+
trailing-icon-color: null,
|
|
63
|
+
trailing-icon-size: null,
|
|
64
|
+
disabled-leading-icon-color: null,
|
|
65
|
+
disabled-leading-icon-opacity: null,
|
|
66
|
+
error-focus-leading-icon-color: null,
|
|
67
|
+
error-hover-leading-icon-color: null,
|
|
68
|
+
error-leading-icon-color: null,
|
|
69
|
+
focus-leading-icon-color: null,
|
|
70
|
+
hover-leading-icon-color: null,
|
|
71
|
+
leading-icon-color: null,
|
|
72
|
+
leading-icon-size: null,
|
|
73
|
+
input-text-type: null,
|
|
74
|
+
input-text-suffix-color: null,
|
|
75
|
+
input-text-font: null,
|
|
76
|
+
input-text-line-height: null,
|
|
77
|
+
input-text-size: null,
|
|
78
|
+
input-text-tracking: null,
|
|
79
|
+
input-text-weight: null,
|
|
80
|
+
error-input-text-color: null,
|
|
81
|
+
focus-input-text-color: null,
|
|
82
|
+
hover-input-text-color: null,
|
|
83
|
+
disabled-input-text-opacity: null,
|
|
84
|
+
error-focus-input-text-color: null,
|
|
85
|
+
error-hover-input-text-color: null,
|
|
86
|
+
disabled-container-opacity: null,
|
|
87
|
+
error-hover-state-layer-color: null,
|
|
88
|
+
error-hover-state-layer-opacity: null,
|
|
89
|
+
hover-state-layer-color: null,
|
|
90
|
+
hover-state-layer-opacity: null,
|
|
91
|
+
label-text-line-height: null, // We override the line height to `normal` so don't emit a slot.
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Tokens that can be configured through Angular Material's color theming API.
|
|
96
|
+
@function get-color-tokens($config) {
|
|
97
|
+
$foreground: map.get($config, foreground);
|
|
98
|
+
$background: map.get($config, background);
|
|
99
|
+
$warn: map.get($config, warn);
|
|
100
|
+
$is-dark: map.get($config, is-dark);
|
|
101
|
+
$surface: theming.get-color-from-palette($background, card);
|
|
102
|
+
$on-surface: if($is-dark, #fff, #000);
|
|
103
|
+
$warn-color: theming.get-color-from-palette($warn);
|
|
104
|
+
$color-tokens: private-get-color-palette-color-tokens($config, primary);
|
|
105
|
+
|
|
106
|
+
@return map.merge($color-tokens, (
|
|
107
|
+
container-color: _variable-safe-mix($on-surface, $surface, 4%),
|
|
108
|
+
disabled-container-color: _variable-safe-mix($on-surface, $surface, 2%),
|
|
109
|
+
|
|
110
|
+
label-text-color: rgba($on-surface, 0.6),
|
|
111
|
+
disabled-label-text-color: rgba($on-surface, 0.38),
|
|
112
|
+
|
|
113
|
+
input-text-color: rgba($on-surface, 0.87),
|
|
114
|
+
disabled-input-text-color: rgba($on-surface, 0.38),
|
|
115
|
+
input-text-placeholder-color: rgba($on-surface, 0.6),
|
|
116
|
+
|
|
117
|
+
error-focus-label-text-color: $warn-color,
|
|
118
|
+
error-label-text-color: $warn-color,
|
|
119
|
+
error-caret-color: $warn-color,
|
|
120
|
+
|
|
121
|
+
active-indicator-color: rgba($on-surface, 0.42),
|
|
122
|
+
disabled-active-indicator-color: rgba($on-surface, 0.06),
|
|
123
|
+
hover-active-indicator-color: rgba($on-surface, 0.87),
|
|
124
|
+
error-active-indicator-color: $warn-color,
|
|
125
|
+
error-focus-active-indicator-color: $warn-color,
|
|
126
|
+
error-hover-active-indicator-color: $warn-color,
|
|
127
|
+
));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@function _variable-safe-mix($first-color, $second-color, $amount) {
|
|
131
|
+
@if (meta.type-of($first-color) == color and meta.type-of($second-color) == color) {
|
|
132
|
+
@return color.mix($first-color, $second-color, $amount);
|
|
133
|
+
}
|
|
134
|
+
@return $first-color;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Generates the mapping for the properties that change based on the slide toggle color.
|
|
138
|
+
@function private-get-color-palette-color-tokens($config, $palette-name) {
|
|
139
|
+
$palette: map.get($config, $palette-name);
|
|
140
|
+
$palette-color: theming.get-color-from-palette($palette);
|
|
141
|
+
|
|
142
|
+
@return (
|
|
143
|
+
caret-color: $palette-color,
|
|
144
|
+
focus-active-indicator-color: $palette-color,
|
|
145
|
+
focus-label-text-color: theming.get-color-from-palette($palette, default, 0.87),
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Tokens that can be configured through Angular Material's typography theming API.
|
|
150
|
+
@function get-typography-tokens($config) {
|
|
151
|
+
$fallback-font-family: typography-utils.font-family($config);
|
|
152
|
+
|
|
153
|
+
@return (
|
|
154
|
+
label-text-font: typography-utils.font-family($config, body-1) or $fallback-font-family,
|
|
155
|
+
label-text-size: typography-utils.font-size($config, body-1),
|
|
156
|
+
label-text-tracking: typography-utils.letter-spacing($config, body-1),
|
|
157
|
+
label-text-weight: typography-utils.font-weight($config, body-1),
|
|
158
|
+
);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Tokens that can be configured through Angular Material's density theming API.
|
|
162
|
+
@function get-density-tokens($config) {
|
|
163
|
+
@return ();
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
167
|
+
// This is used to create token slots.
|
|
168
|
+
@function get-token-slots() {
|
|
169
|
+
@return sass-utils.deep-merge-all(
|
|
170
|
+
get-unthemable-tokens(),
|
|
171
|
+
get-color-tokens(token-utils.$placeholder-color-config),
|
|
172
|
+
get-typography-tokens(token-utils.$placeholder-typography-config),
|
|
173
|
+
get-density-tokens(token-utils.$placeholder-density-config)
|
|
174
|
+
);
|
|
175
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../theming/theming';
|
|
3
|
+
@use '../../../style/sass-utils';
|
|
4
|
+
@use '../../../typography/typography-utils';
|
|
5
|
+
@use '../../token-utils';
|
|
6
|
+
|
|
7
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
8
|
+
$prefix: (mdc, outlined-text-field);
|
|
9
|
+
|
|
10
|
+
// Tokens that can't be configured through Angular Material's current theming API,
|
|
11
|
+
// but may be in a future version of the theming API.
|
|
12
|
+
//
|
|
13
|
+
// Tokens that are available in MDC, but not used in Angular Material should be mapped to `null`.
|
|
14
|
+
// `null` indicates that we are intentionally choosing not to emit a slot or value for the token in
|
|
15
|
+
// our CSS.
|
|
16
|
+
@function get-unthemable-tokens() {
|
|
17
|
+
@return (
|
|
18
|
+
outline-width: 1px,
|
|
19
|
+
focus-outline-width: 2px,
|
|
20
|
+
container-shape: 4px,
|
|
21
|
+
|
|
22
|
+
// =============================================================================================
|
|
23
|
+
// = TOKENS NOT USED IN ANGULAR MATERIAL =
|
|
24
|
+
// =============================================================================================
|
|
25
|
+
error-focus-caret-color: null,
|
|
26
|
+
error-hover-caret-color: null,
|
|
27
|
+
focus-caret-color: null,
|
|
28
|
+
hover-caret-color: null,
|
|
29
|
+
disabled-outline-opacity: null,
|
|
30
|
+
hover-outline-width: null,
|
|
31
|
+
disabled-outline-width: null,
|
|
32
|
+
label-text-type: null,
|
|
33
|
+
label-text-populated-line-height: null,
|
|
34
|
+
label-text-populated-size: null,
|
|
35
|
+
hover-label-text-color: null,
|
|
36
|
+
error-hover-label-text-color: null,
|
|
37
|
+
disabled-label-text-opacity: null,
|
|
38
|
+
disabled-supporting-text-color: null,
|
|
39
|
+
disabled-supporting-text-opacity: null,
|
|
40
|
+
error-focus-supporting-text-color: null,
|
|
41
|
+
error-hover-supporting-text-color: null,
|
|
42
|
+
error-supporting-text-color: null,
|
|
43
|
+
focus-supporting-text-color: null,
|
|
44
|
+
hover-supporting-text-color: null,
|
|
45
|
+
supporting-text-color: null,
|
|
46
|
+
supporting-text-font: null,
|
|
47
|
+
supporting-text-line-height: null,
|
|
48
|
+
supporting-text-size: null,
|
|
49
|
+
supporting-text-tracking: null,
|
|
50
|
+
supporting-text-type: null,
|
|
51
|
+
supporting-text-weight: null,
|
|
52
|
+
disabled-leading-icon-color: null,
|
|
53
|
+
disabled-leading-icon-opacity: null,
|
|
54
|
+
error-focus-leading-icon-color: null,
|
|
55
|
+
error-hover-leading-icon-color: null,
|
|
56
|
+
error-leading-icon-color: null,
|
|
57
|
+
focus-leading-icon-color: null,
|
|
58
|
+
hover-leading-icon-color: null,
|
|
59
|
+
leading-icon-color: null,
|
|
60
|
+
leading-icon-size: null,
|
|
61
|
+
disabled-trailing-icon-color: null,
|
|
62
|
+
disabled-trailing-icon-opacity: null,
|
|
63
|
+
error-focus-trailing-icon-color: null,
|
|
64
|
+
error-hover-trailing-icon-color: null,
|
|
65
|
+
error-trailing-icon-color: null,
|
|
66
|
+
focus-trailing-icon-color: null,
|
|
67
|
+
hover-trailing-icon-color: null,
|
|
68
|
+
trailing-icon-color: null,
|
|
69
|
+
trailing-icon-size: null,
|
|
70
|
+
input-text-prefix-color: null,
|
|
71
|
+
input-text-type: null,
|
|
72
|
+
container-height: null,
|
|
73
|
+
input-text-suffix-color: null,
|
|
74
|
+
input-text-font: null,
|
|
75
|
+
input-text-line-height: null,
|
|
76
|
+
input-text-size: null,
|
|
77
|
+
input-text-tracking: null,
|
|
78
|
+
input-text-weight: null,
|
|
79
|
+
disabled-input-text-opacity: null,
|
|
80
|
+
error-focus-input-text-color: null,
|
|
81
|
+
error-hover-input-text-color: null,
|
|
82
|
+
error-input-text-color: null,
|
|
83
|
+
focus-input-text-color: null,
|
|
84
|
+
hover-input-text-color: null,
|
|
85
|
+
label-text-line-height: null, // We override the line height to `normal` so don't emit a slot.
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Tokens that can be configured through Angular Material's color theming API.
|
|
90
|
+
@function get-color-tokens($config) {
|
|
91
|
+
$foreground: map.get($config, foreground);
|
|
92
|
+
$warn: map.get($config, warn);
|
|
93
|
+
$is-dark: map.get($config, is-dark);
|
|
94
|
+
$on-surface: if($is-dark, #fff, #000);
|
|
95
|
+
$warn-color: theming.get-color-from-palette($warn);
|
|
96
|
+
$color-tokens: private-get-color-palette-color-tokens($config, primary);
|
|
97
|
+
|
|
98
|
+
@return map.merge($color-tokens, (
|
|
99
|
+
label-text-color: rgba($on-surface, 0.6),
|
|
100
|
+
disabled-label-text-color: rgba($on-surface, 0.38),
|
|
101
|
+
|
|
102
|
+
input-text-color: rgba($on-surface, 0.87),
|
|
103
|
+
disabled-input-text-color: rgba($on-surface, 0.38),
|
|
104
|
+
input-text-placeholder-color: rgba($on-surface, 0.6),
|
|
105
|
+
|
|
106
|
+
error-caret-color: $warn-color,
|
|
107
|
+
error-focus-label-text-color: $warn-color,
|
|
108
|
+
error-label-text-color: $warn-color,
|
|
109
|
+
|
|
110
|
+
// Outline tokens
|
|
111
|
+
outline-color: rgba($on-surface, 0.38),
|
|
112
|
+
disabled-outline-color: rgba($on-surface, 0.06),
|
|
113
|
+
hover-outline-color: rgba($on-surface, 0.87),
|
|
114
|
+
error-focus-outline-color: $warn-color,
|
|
115
|
+
error-hover-outline-color: $warn-color,
|
|
116
|
+
error-outline-color: $warn-color,
|
|
117
|
+
));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// Generates the mapping for the properties that change based on the slide toggle color.
|
|
121
|
+
@function private-get-color-palette-color-tokens($config, $palette-name) {
|
|
122
|
+
$palette: map.get($config, $palette-name);
|
|
123
|
+
$palette-color: theming.get-color-from-palette($palette);
|
|
124
|
+
|
|
125
|
+
@return (
|
|
126
|
+
caret-color: $palette-color,
|
|
127
|
+
focus-outline-color: $palette-color,
|
|
128
|
+
focus-label-text-color: theming.get-color-from-palette($palette, default, 0.87),
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Tokens that can be configured through Angular Material's typography theming API.
|
|
133
|
+
@function get-typography-tokens($config) {
|
|
134
|
+
$fallback-font-family: typography-utils.font-family($config);
|
|
135
|
+
|
|
136
|
+
@return (
|
|
137
|
+
label-text-font: typography-utils.font-family($config, body-1) or $fallback-font-family,
|
|
138
|
+
label-text-size: typography-utils.font-size($config, body-1),
|
|
139
|
+
label-text-tracking: typography-utils.letter-spacing($config, body-1),
|
|
140
|
+
label-text-weight: typography-utils.font-weight($config, body-1),
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Tokens that can be configured through Angular Material's density theming API.
|
|
145
|
+
@function get-density-tokens($config) {
|
|
146
|
+
@return ();
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
150
|
+
// This is used to create token slots.
|
|
151
|
+
@function get-token-slots() {
|
|
152
|
+
@return sass-utils.deep-merge-all(
|
|
153
|
+
get-unthemable-tokens(),
|
|
154
|
+
get-color-tokens(token-utils.$placeholder-color-config),
|
|
155
|
+
get-typography-tokens(token-utils.$placeholder-typography-config),
|
|
156
|
+
get-density-tokens(token-utils.$placeholder-density-config)
|
|
157
|
+
);
|
|
158
|
+
}
|
|
@@ -51,9 +51,9 @@ $prefix: (mdc, plain-tooltip);
|
|
|
51
51
|
// Font for the tooltip text.
|
|
52
52
|
supporting-text-font: typography-utils.font-family($config, caption)
|
|
53
53
|
or typography-utils.font-family($config),
|
|
54
|
-
// Font size for the
|
|
54
|
+
// Font size for the tooltip text.
|
|
55
55
|
supporting-text-size: typography-utils.font-size($config, caption),
|
|
56
|
-
// Font weight of the
|
|
56
|
+
// Font weight of the tooltip text.
|
|
57
57
|
supporting-text-weight: typography-utils.font-weight($config, caption),
|
|
58
58
|
// Tracking (space between letters) of the tooltip text.
|
|
59
59
|
supporting-text-tracking: typography-utils.letter-spacing($config, caption),
|
package/dialog/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AnimationTriggerMetadata } from '@angular/animations';
|
|
2
2
|
import { CdkDialogContainer } from '@angular/cdk/dialog';
|
|
3
3
|
import { ComponentFactoryResolver } from '@angular/core';
|
|
4
|
+
import { ComponentRef } from '@angular/core';
|
|
4
5
|
import { ComponentType } from '@angular/cdk/overlay';
|
|
5
6
|
import { DialogRef } from '@angular/cdk/dialog';
|
|
6
7
|
import { Direction } from '@angular/cdk/bidi';
|
|
@@ -432,6 +433,11 @@ export declare class MatDialogRef<T, R = any> {
|
|
|
432
433
|
_containerInstance: _MatDialogContainerBase;
|
|
433
434
|
/** The instance of component opened into the dialog. */
|
|
434
435
|
componentInstance: T;
|
|
436
|
+
/**
|
|
437
|
+
* `ComponentRef` of the component opened into the dialog. Will be
|
|
438
|
+
* null when the dialog is opened using a `TemplateRef`.
|
|
439
|
+
*/
|
|
440
|
+
readonly componentRef: ComponentRef<T> | null;
|
|
435
441
|
/** Whether the user is allowed to close the dialog. */
|
|
436
442
|
disableClose: boolean | undefined;
|
|
437
443
|
/** Unique ID for the dialog. */
|