@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
package/checkbox/index.d.ts
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { _AbstractConstructor } from '@angular/material/core';
|
|
2
1
|
import { AfterViewInit } from '@angular/core';
|
|
3
|
-
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
|
-
import { CanColor } from '@angular/material/core';
|
|
5
|
-
import { CanDisable } from '@angular/material/core';
|
|
6
|
-
import { CanDisableRipple } from '@angular/material/core';
|
|
7
2
|
import { ChangeDetectorRef } from '@angular/core';
|
|
8
3
|
import { CheckboxRequiredValidator } from '@angular/forms';
|
|
9
|
-
import { _Constructor } from '@angular/material/core';
|
|
10
4
|
import { ControlValueAccessor } from '@angular/forms';
|
|
11
5
|
import { ElementRef } from '@angular/core';
|
|
12
6
|
import { EventEmitter } from '@angular/core';
|
|
13
7
|
import { FocusableOption } from '@angular/cdk/a11y';
|
|
14
|
-
import { HasTabIndex } from '@angular/material/core';
|
|
15
8
|
import * as i0 from '@angular/core';
|
|
16
9
|
import * as i3 from '@angular/material/core';
|
|
17
10
|
import { InjectionToken } from '@angular/core';
|
|
@@ -46,7 +39,8 @@ export declare function MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY(): MatCheckboxDefau
|
|
|
46
39
|
|
|
47
40
|
export declare const MAT_CHECKBOX_REQUIRED_VALIDATOR: Provider;
|
|
48
41
|
|
|
49
|
-
export declare class MatCheckbox
|
|
42
|
+
export declare class MatCheckbox implements AfterViewInit, ControlValueAccessor, FocusableOption {
|
|
43
|
+
_elementRef: ElementRef<HTMLElement>;
|
|
50
44
|
private _changeDetectorRef;
|
|
51
45
|
private _ngZone;
|
|
52
46
|
_animationMode?: string | undefined;
|
|
@@ -83,9 +77,7 @@ export declare class MatCheckbox extends _MatCheckboxMixinBase implements AfterV
|
|
|
83
77
|
/** Returns the unique id for the visual hidden input. */
|
|
84
78
|
get inputId(): string;
|
|
85
79
|
/** Whether the checkbox is required. */
|
|
86
|
-
|
|
87
|
-
set required(value: BooleanInput);
|
|
88
|
-
private _required;
|
|
80
|
+
required: boolean;
|
|
89
81
|
/** Whether the label should appear after or before the checkbox. Defaults to 'after' */
|
|
90
82
|
labelPosition: 'before' | 'after';
|
|
91
83
|
/** Name value will be applied to the input element if present */
|
|
@@ -96,10 +88,16 @@ export declare class MatCheckbox extends _MatCheckboxMixinBase implements AfterV
|
|
|
96
88
|
readonly indeterminateChange: EventEmitter<boolean>;
|
|
97
89
|
/** The value attribute of the native input element */
|
|
98
90
|
value: string;
|
|
91
|
+
/** Whether the checkbox has a ripple. */
|
|
92
|
+
disableRipple: boolean;
|
|
99
93
|
/** The native `<input type="checkbox">` element */
|
|
100
94
|
_inputElement: ElementRef<HTMLInputElement>;
|
|
101
95
|
/** The native `<label>` element */
|
|
102
96
|
_labelElement: ElementRef<HTMLInputElement>;
|
|
97
|
+
/** Tabindex for the checkbox. */
|
|
98
|
+
tabIndex: number;
|
|
99
|
+
/** Palette color of the checkbox. */
|
|
100
|
+
color: string | undefined;
|
|
103
101
|
/**
|
|
104
102
|
* Reference to the MatRipple instance of the checkbox.
|
|
105
103
|
* @deprecated Considered an implementation detail. To be removed.
|
|
@@ -114,18 +112,15 @@ export declare class MatCheckbox extends _MatCheckboxMixinBase implements AfterV
|
|
|
114
112
|
private _currentAnimationClass;
|
|
115
113
|
private _currentCheckState;
|
|
116
114
|
private _controlValueAccessorChangeFn;
|
|
117
|
-
constructor(
|
|
115
|
+
constructor(_elementRef: ElementRef<HTMLElement>, _changeDetectorRef: ChangeDetectorRef, _ngZone: NgZone, tabIndex: string, _animationMode?: string | undefined, _options?: MatCheckboxDefaultOptions | undefined);
|
|
118
116
|
ngAfterViewInit(): void;
|
|
119
117
|
/** Whether the checkbox is checked. */
|
|
120
118
|
get checked(): boolean;
|
|
121
|
-
set checked(value:
|
|
119
|
+
set checked(value: boolean);
|
|
122
120
|
private _checked;
|
|
123
|
-
/**
|
|
124
|
-
* Whether the checkbox is disabled. This fully overrides the implementation provided by
|
|
125
|
-
* mixinDisabled, but the mixin is still required because mixinTabIndex requires it.
|
|
126
|
-
*/
|
|
121
|
+
/** Whether the checkbox is disabled. */
|
|
127
122
|
get disabled(): boolean;
|
|
128
|
-
set disabled(value:
|
|
123
|
+
set disabled(value: boolean);
|
|
129
124
|
private _disabled;
|
|
130
125
|
/**
|
|
131
126
|
* Whether the checkbox is indeterminate. This is also known as "mixed" mode and can be used to
|
|
@@ -134,7 +129,7 @@ export declare class MatCheckbox extends _MatCheckboxMixinBase implements AfterV
|
|
|
134
129
|
* set to false.
|
|
135
130
|
*/
|
|
136
131
|
get indeterminate(): boolean;
|
|
137
|
-
set indeterminate(value:
|
|
132
|
+
set indeterminate(value: boolean);
|
|
138
133
|
private _indeterminate;
|
|
139
134
|
_isRippleDisabled(): boolean;
|
|
140
135
|
/** Method being called whenever the label text changes. */
|
|
@@ -171,7 +166,13 @@ export declare class MatCheckbox extends _MatCheckboxMixinBase implements AfterV
|
|
|
171
166
|
*/
|
|
172
167
|
_preventBubblingFromLabel(event: MouseEvent): void;
|
|
173
168
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatCheckbox, [null, null, null, { attribute: "tabindex"; }, { optional: true; }, { optional: true; }]>;
|
|
174
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatCheckbox, "mat-checkbox", ["matCheckbox"], { "
|
|
169
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatCheckbox, "mat-checkbox", ["matCheckbox"], { "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; }; "id": { "alias": "id"; "required": false; }; "required": { "alias": "required"; "required": false; }; "labelPosition": { "alias": "labelPosition"; "required": false; }; "name": { "alias": "name"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "color": { "alias": "color"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; }, { "change": "change"; "indeterminateChange": "indeterminateChange"; }, never, ["*"], false, never>;
|
|
170
|
+
static ngAcceptInputType_required: unknown;
|
|
171
|
+
static ngAcceptInputType_disableRipple: unknown;
|
|
172
|
+
static ngAcceptInputType_tabIndex: unknown;
|
|
173
|
+
static ngAcceptInputType_checked: unknown;
|
|
174
|
+
static ngAcceptInputType_disabled: unknown;
|
|
175
|
+
static ngAcceptInputType_indeterminate: unknown;
|
|
175
176
|
}
|
|
176
177
|
|
|
177
178
|
/** Change event object emitted by checkbox. */
|
|
@@ -199,13 +200,6 @@ export declare interface MatCheckboxDefaultOptions {
|
|
|
199
200
|
clickAction?: MatCheckboxClickAction;
|
|
200
201
|
}
|
|
201
202
|
|
|
202
|
-
/** @docs-private */
|
|
203
|
-
declare const _MatCheckboxMixinBase: _Constructor<HasTabIndex> & _AbstractConstructor<HasTabIndex> & _Constructor<CanColor> & _AbstractConstructor<CanColor> & _Constructor<CanDisableRipple> & _AbstractConstructor<CanDisableRipple> & _Constructor<CanDisable> & _AbstractConstructor<CanDisable> & {
|
|
204
|
-
new (_elementRef: ElementRef): {
|
|
205
|
-
_elementRef: ElementRef;
|
|
206
|
-
};
|
|
207
|
-
};
|
|
208
|
-
|
|
209
203
|
export declare class MatCheckboxModule {
|
|
210
204
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatCheckboxModule, never>;
|
|
211
205
|
static ɵmod: i0.ɵɵNgModuleDeclaration<MatCheckboxModule, [typeof i2.MatCheckbox], [typeof i3.MatCommonModule, typeof i3.MatRippleModule, typeof _MatCheckboxRequiredValidatorModule], [typeof i2.MatCheckbox, typeof i3.MatCommonModule, typeof _MatCheckboxRequiredValidatorModule]>;
|
package/chips/_chips-theme.scss
CHANGED
|
@@ -1,99 +1,61 @@
|
|
|
1
1
|
@use 'sass:color';
|
|
2
|
-
@use 'sass:map';
|
|
3
|
-
@use 'sass:meta';
|
|
4
2
|
@use '@material/chips/chip-theme' as mdc-chip-theme;
|
|
5
3
|
@use '../core/tokens/m2/mdc/chip' as tokens-mdc-chip;
|
|
6
|
-
@use '../core/theming/palette';
|
|
7
4
|
@use '../core/theming/theming';
|
|
5
|
+
@use '../core/theming/inspection';
|
|
8
6
|
@use '../core/typography/typography';
|
|
9
|
-
@use '../core/mdc-helpers/mdc-helpers';
|
|
10
|
-
|
|
11
|
-
@function _get-default-palette($config) {
|
|
12
|
-
$is-dark: map.get($config, is-dark);
|
|
13
|
-
$grey-50: map.get(palette.$grey-palette, 50);
|
|
14
|
-
$grey-900: map.get(palette.$grey-palette, 900);
|
|
15
|
-
$default-foreground: if($is-dark, $grey-50, $grey-900);
|
|
16
|
-
|
|
17
|
-
$surface: map.get(map.get($config, background), card);
|
|
18
|
-
$on-surface: if(
|
|
19
|
-
mdc-helpers.variable-safe-contrast-tone($surface, $is-dark) == 'dark',
|
|
20
|
-
#000,
|
|
21
|
-
#fff
|
|
22
|
-
);
|
|
23
|
-
$default-background: if(
|
|
24
|
-
meta.type-of($on-surface) == color and meta.type-of($surface) == color,
|
|
25
|
-
color.mix($on-surface, $surface, 12%),
|
|
26
|
-
$on-surface
|
|
27
|
-
);
|
|
28
|
-
|
|
29
|
-
@return (default: $default-background, default-contrast: $default-foreground);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@mixin color($config-or-theme) {
|
|
33
|
-
$config: theming.get-color-config($config-or-theme);
|
|
34
7
|
|
|
8
|
+
@mixin color($theme) {
|
|
35
9
|
.mat-mdc-standard-chip {
|
|
36
|
-
$default-
|
|
37
|
-
$default-config: map.merge($config, (primary: $default-palette));
|
|
38
|
-
$default-color-tokens: tokens-mdc-chip.get-color-tokens($default-config);
|
|
10
|
+
$default-color-tokens: tokens-mdc-chip.get-color-tokens($theme);
|
|
39
11
|
@include mdc-chip-theme.theme($default-color-tokens);
|
|
40
12
|
|
|
41
13
|
&.mat-mdc-chip-selected,
|
|
42
14
|
&.mat-mdc-chip-highlighted {
|
|
43
15
|
&.mat-primary {
|
|
44
|
-
$primary-color-tokens: tokens-mdc-chip.get-color-tokens($
|
|
16
|
+
$primary-color-tokens: tokens-mdc-chip.get-color-tokens($theme, primary);
|
|
45
17
|
@include mdc-chip-theme.theme($primary-color-tokens);
|
|
46
18
|
}
|
|
47
19
|
|
|
48
20
|
&.mat-accent {
|
|
49
|
-
$accent-
|
|
50
|
-
$accent-color-tokens: tokens-mdc-chip.get-color-tokens($accent-config);
|
|
21
|
+
$accent-color-tokens: tokens-mdc-chip.get-color-tokens($theme, accent);
|
|
51
22
|
@include mdc-chip-theme.theme($accent-color-tokens);
|
|
52
23
|
}
|
|
53
24
|
|
|
54
25
|
&.mat-warn {
|
|
55
|
-
$warn-
|
|
56
|
-
$warn-color-tokens: tokens-mdc-chip.get-color-tokens($warn-config);
|
|
26
|
+
$warn-color-tokens: tokens-mdc-chip.get-color-tokens($theme, warn);
|
|
57
27
|
@include mdc-chip-theme.theme($warn-color-tokens);
|
|
58
28
|
}
|
|
59
29
|
}
|
|
60
30
|
}
|
|
61
31
|
}
|
|
62
32
|
|
|
63
|
-
@mixin typography($
|
|
64
|
-
$
|
|
65
|
-
theming.get-typography-config($config-or-theme)
|
|
66
|
-
);
|
|
67
|
-
$typography-tokens: tokens-mdc-chip.get-typography-tokens($config);
|
|
33
|
+
@mixin typography($theme) {
|
|
34
|
+
$typography-tokens: tokens-mdc-chip.get-typography-tokens($theme);
|
|
68
35
|
|
|
69
36
|
.mat-mdc-standard-chip {
|
|
70
37
|
@include mdc-chip-theme.theme($typography-tokens);
|
|
71
38
|
}
|
|
72
39
|
}
|
|
73
40
|
|
|
74
|
-
@mixin density($
|
|
75
|
-
$density-
|
|
76
|
-
|
|
41
|
+
@mixin density($theme) {
|
|
42
|
+
$density-tokens: tokens-mdc-chip.get-density-tokens($theme);
|
|
43
|
+
|
|
77
44
|
.mat-mdc-chip.mat-mdc-standard-chip {
|
|
78
45
|
@include mdc-chip-theme.theme($density-tokens);
|
|
79
46
|
}
|
|
80
47
|
}
|
|
81
48
|
|
|
82
|
-
@mixin theme($theme
|
|
83
|
-
$theme: theming.private-legacy-get-theme($theme-or-color-config);
|
|
49
|
+
@mixin theme($theme) {
|
|
84
50
|
@include theming.private-check-duplicate-theme-styles($theme, 'mat-chips') {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
$typography: theming.get-typography-config($theme);
|
|
88
|
-
|
|
89
|
-
@if $color != null {
|
|
90
|
-
@include color($color);
|
|
51
|
+
@if inspection.theme-has($theme, color) {
|
|
52
|
+
@include color($theme);
|
|
91
53
|
}
|
|
92
|
-
@if $density
|
|
93
|
-
@include density($
|
|
54
|
+
@if inspection.theme-has($theme, density) {
|
|
55
|
+
@include density($theme);
|
|
94
56
|
}
|
|
95
|
-
@if $typography
|
|
96
|
-
@include typography($
|
|
57
|
+
@if inspection.theme-has($theme, typography) {
|
|
58
|
+
@include typography($theme);
|
|
97
59
|
}
|
|
98
60
|
}
|
|
99
61
|
}
|
|
@@ -1,25 +1,17 @@
|
|
|
1
1
|
@use '../theming/all-theme';
|
|
2
|
-
@use '../theming/
|
|
2
|
+
@use '../theming/inspection';
|
|
3
3
|
|
|
4
4
|
// Includes all of the color styles.
|
|
5
|
-
@mixin all-component-colors($
|
|
6
|
-
|
|
7
|
-
// the color system, extract the color config from the theme object.
|
|
8
|
-
$config: if(theming.private-is-theme-object($config-or-theme),
|
|
9
|
-
theming.get-color-config($config-or-theme), $config-or-theme);
|
|
10
|
-
|
|
11
|
-
@if $config == null {
|
|
5
|
+
@mixin all-component-colors($theme) {
|
|
6
|
+
@if not inspection.theme-has($theme, color) {
|
|
12
7
|
@error 'No color configuration specified.';
|
|
13
8
|
}
|
|
14
9
|
|
|
15
|
-
@include all-theme.all-component-themes(
|
|
16
|
-
|
|
17
|
-
typography: null,
|
|
18
|
-
density: null,
|
|
19
|
-
));
|
|
10
|
+
@include all-theme.all-component-themes(
|
|
11
|
+
inspection.theme-remove($theme, base, typography, density));
|
|
20
12
|
}
|
|
21
13
|
|
|
22
14
|
// @deprecated Use `all-component-colors`.
|
|
23
|
-
@mixin angular-material-color($
|
|
24
|
-
@include all-component-colors($
|
|
15
|
+
@mixin angular-material-color($theme) {
|
|
16
|
+
@include all-component-colors($theme);
|
|
25
17
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use '../../theming/
|
|
1
|
+
@use '../../theming/inspection';
|
|
2
2
|
@use '../../../button/button-theme';
|
|
3
3
|
@use '../../../button/icon-button-theme';
|
|
4
4
|
@use '../../../button/fab-theme';
|
|
@@ -30,13 +30,8 @@
|
|
|
30
30
|
@use '../../../table/table-theme';
|
|
31
31
|
|
|
32
32
|
// Includes all of the density styles.
|
|
33
|
-
@mixin all-component-densities($
|
|
34
|
-
|
|
35
|
-
// the density system, extract the density config from the theme object.
|
|
36
|
-
$config: if(theming.private-is-theme-object($config-or-theme),
|
|
37
|
-
theming.get-density-config($config-or-theme), $config-or-theme);
|
|
38
|
-
|
|
39
|
-
@if $config == null {
|
|
33
|
+
@mixin all-component-densities($theme) {
|
|
34
|
+
@if not inspection.theme-has($theme, density) {
|
|
40
35
|
@error 'No density configuration specified.';
|
|
41
36
|
}
|
|
42
37
|
|
|
@@ -45,39 +40,39 @@
|
|
|
45
40
|
// not possible as it would introduce a circular dependency for density because the `mat-core`
|
|
46
41
|
// mixin that is transitively loaded by the `all-theme` file, imports `all-density` which
|
|
47
42
|
// would then load `all-theme` again. This ultimately results a circular dependency.
|
|
48
|
-
@include form-field-theme.density($
|
|
49
|
-
@include card-theme.density($
|
|
50
|
-
@include progress-bar-theme.density($
|
|
51
|
-
@include progress-spinner-theme.density($
|
|
52
|
-
@include tooltip-theme.density($
|
|
53
|
-
@include input-theme.density($
|
|
54
|
-
@include core-theme.density($
|
|
55
|
-
@include select-theme.density($
|
|
56
|
-
@include checkbox-theme.density($
|
|
57
|
-
@include autocomplete-theme.density($
|
|
58
|
-
@include dialog-theme.density($
|
|
59
|
-
@include chips-theme.density($
|
|
60
|
-
@include slide-toggle-theme.density($
|
|
61
|
-
@include radio-theme.density($
|
|
62
|
-
@include slider-theme.density($
|
|
63
|
-
@include menu-theme.density($
|
|
64
|
-
@include list-theme.density($
|
|
65
|
-
@include paginator-theme.density($
|
|
66
|
-
@include tabs-theme.density($
|
|
67
|
-
@include snack-bar-theme.density($
|
|
68
|
-
@include button-theme.density($
|
|
69
|
-
@include icon-button-theme.density($
|
|
70
|
-
@include fab-theme.density($
|
|
71
|
-
@include table-theme.density($
|
|
72
|
-
@include expansion-theme.density($
|
|
73
|
-
@include stepper-theme.density($
|
|
74
|
-
@include toolbar-theme.density($
|
|
75
|
-
@include tree-theme.density($
|
|
76
|
-
@include button-toggle-theme.density($
|
|
43
|
+
@include form-field-theme.density($theme);
|
|
44
|
+
@include card-theme.density($theme);
|
|
45
|
+
@include progress-bar-theme.density($theme);
|
|
46
|
+
@include progress-spinner-theme.density($theme);
|
|
47
|
+
@include tooltip-theme.density($theme);
|
|
48
|
+
@include input-theme.density($theme);
|
|
49
|
+
@include core-theme.density($theme);
|
|
50
|
+
@include select-theme.density($theme);
|
|
51
|
+
@include checkbox-theme.density($theme);
|
|
52
|
+
@include autocomplete-theme.density($theme);
|
|
53
|
+
@include dialog-theme.density($theme);
|
|
54
|
+
@include chips-theme.density($theme);
|
|
55
|
+
@include slide-toggle-theme.density($theme);
|
|
56
|
+
@include radio-theme.density($theme);
|
|
57
|
+
@include slider-theme.density($theme);
|
|
58
|
+
@include menu-theme.density($theme);
|
|
59
|
+
@include list-theme.density($theme);
|
|
60
|
+
@include paginator-theme.density($theme);
|
|
61
|
+
@include tabs-theme.density($theme);
|
|
62
|
+
@include snack-bar-theme.density($theme);
|
|
63
|
+
@include button-theme.density($theme);
|
|
64
|
+
@include icon-button-theme.density($theme);
|
|
65
|
+
@include fab-theme.density($theme);
|
|
66
|
+
@include table-theme.density($theme);
|
|
67
|
+
@include expansion-theme.density($theme);
|
|
68
|
+
@include stepper-theme.density($theme);
|
|
69
|
+
@include toolbar-theme.density($theme);
|
|
70
|
+
@include tree-theme.density($theme);
|
|
71
|
+
@include button-toggle-theme.density($theme);
|
|
77
72
|
}
|
|
78
73
|
|
|
79
74
|
|
|
80
75
|
// @deprecated Use `all-component-densities`.
|
|
81
|
-
@mixin angular-material-density($
|
|
82
|
-
@include all-component-densities($
|
|
76
|
+
@mixin angular-material-density($theme) {
|
|
77
|
+
@include all-component-densities($theme);
|
|
83
78
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
@use './private';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
@
|
|
5
|
-
@include private.strong-focus-indicators-color($
|
|
6
|
-
@include private.mdc-strong-focus-indicators-color($config-or-theme-or-color);
|
|
3
|
+
@mixin color($theme) {
|
|
4
|
+
@include private.strong-focus-indicators-color($theme);
|
|
5
|
+
@include private.mdc-strong-focus-indicators-color($theme);
|
|
7
6
|
}
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
@
|
|
11
|
-
@include private.strong-focus-indicators-theme($theme
|
|
12
|
-
@include private.mdc-strong-focus-indicators-theme($theme-or-color-config-or-color);
|
|
8
|
+
@mixin theme($theme) {
|
|
9
|
+
@include private.strong-focus-indicators-theme($theme);
|
|
10
|
+
@include private.mdc-strong-focus-indicators-theme($theme);
|
|
13
11
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
@use '@angular/cdk';
|
|
4
4
|
@use '../style/layout-common';
|
|
5
5
|
@use '../theming/theming';
|
|
6
|
+
@use '../theming/inspection';
|
|
6
7
|
|
|
7
8
|
// Private sass variables that will be used as reference throughout component stylesheets.
|
|
8
9
|
$default-border-width: 3px;
|
|
@@ -113,65 +114,60 @@ $default-border-radius: 4px;
|
|
|
113
114
|
@include customize-focus-indicators($config, 'mat-mdc');
|
|
114
115
|
}
|
|
115
116
|
|
|
116
|
-
@mixin strong-focus-indicators-color($
|
|
117
|
-
@if meta.type-of($
|
|
117
|
+
@mixin strong-focus-indicators-color($theme-or-color) {
|
|
118
|
+
@if meta.type-of($theme-or-color) == 'color' {
|
|
118
119
|
@include customize-focus-indicators((
|
|
119
|
-
border-color: $
|
|
120
|
+
border-color: $theme-or-color
|
|
120
121
|
), 'mat');
|
|
121
122
|
}
|
|
122
123
|
@else {
|
|
123
|
-
$
|
|
124
|
-
$border-color: theming.get-color-from-palette(map.get($config, primary));
|
|
124
|
+
$border-color: inspection.get-theme-color($theme-or-color, primary);
|
|
125
125
|
@include customize-focus-indicators((
|
|
126
126
|
border-color: $border-color
|
|
127
127
|
), 'mat');
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
@mixin strong-focus-indicators-theme($theme-or-color
|
|
132
|
-
@if meta.type-of($theme-or-color
|
|
131
|
+
@mixin strong-focus-indicators-theme($theme-or-color) {
|
|
132
|
+
@if meta.type-of($theme-or-color) == 'color' {
|
|
133
133
|
@include customize-focus-indicators((
|
|
134
|
-
border-color: $theme-or-color
|
|
134
|
+
border-color: $theme-or-color
|
|
135
135
|
), 'mat');
|
|
136
136
|
}
|
|
137
137
|
@else {
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
@if $color != null {
|
|
142
|
-
@include strong-focus-indicators-color($color);
|
|
138
|
+
@include theming.private-check-duplicate-theme-styles($theme-or-color, 'mat-focus-indicators') {
|
|
139
|
+
@if inspection.theme-has($theme-or-color, color) {
|
|
140
|
+
@include strong-focus-indicators-color($theme-or-color);
|
|
143
141
|
}
|
|
144
142
|
}
|
|
145
143
|
}
|
|
146
144
|
}
|
|
147
145
|
|
|
148
|
-
@mixin mdc-strong-focus-indicators-color($
|
|
149
|
-
@if meta.type-of($
|
|
146
|
+
@mixin mdc-strong-focus-indicators-color($theme-or-color) {
|
|
147
|
+
@if meta.type-of($theme-or-color) == 'color' {
|
|
150
148
|
@include customize-focus-indicators((
|
|
151
|
-
border-color: $
|
|
149
|
+
border-color: $theme-or-color
|
|
152
150
|
), 'mat-mdc');
|
|
153
151
|
}
|
|
154
152
|
@else {
|
|
155
|
-
$
|
|
156
|
-
$border-color: theming.get-color-from-palette(map.get($config, primary));
|
|
153
|
+
$border-color: inspection.get-theme-color($theme-or-color, primary);
|
|
157
154
|
@include customize-focus-indicators((
|
|
158
155
|
border-color: $border-color
|
|
159
156
|
), 'mat-mdc');
|
|
160
157
|
}
|
|
161
158
|
}
|
|
162
159
|
|
|
163
|
-
@mixin mdc-strong-focus-indicators-theme($theme-or-color
|
|
164
|
-
@if meta.type-of($theme-or-color
|
|
160
|
+
@mixin mdc-strong-focus-indicators-theme($theme-or-color) {
|
|
161
|
+
@if meta.type-of($theme-or-color) == 'color' {
|
|
165
162
|
@include customize-focus-indicators((
|
|
166
|
-
border-color: $theme-or-color
|
|
163
|
+
border-color: $theme-or-color
|
|
167
164
|
), 'mat-mdc');
|
|
168
165
|
}
|
|
169
166
|
@else {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
@include mdc-strong-focus-indicators-color($color);
|
|
167
|
+
@include theming.private-check-duplicate-theme-styles(
|
|
168
|
+
$theme-or-color, 'mat-mdc-focus-indicators') {
|
|
169
|
+
@if inspection.theme-has($theme-or-color, color) {
|
|
170
|
+
@include mdc-strong-focus-indicators-color($theme-or-color);
|
|
175
171
|
}
|
|
176
172
|
}
|
|
177
173
|
}
|
package/core/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { _AbstractConstructor as _AbstractConstructor_2 } from '@angular/material/core';
|
|
2
1
|
import { AbstractControl } from '@angular/forms';
|
|
3
2
|
import { AfterViewChecked } from '@angular/core';
|
|
4
|
-
import { BooleanInput } from '@angular/cdk/coercion';
|
|
5
3
|
import { ChangeDetectorRef } from '@angular/core';
|
|
6
|
-
import { _Constructor as _Constructor_2 } from '@angular/material/core';
|
|
7
4
|
import { ElementRef } from '@angular/core';
|
|
8
5
|
import { EventEmitter } from '@angular/core';
|
|
9
6
|
import { FocusableOption } from '@angular/cdk/a11y';
|
|
@@ -529,23 +526,21 @@ export declare class MatNativeDateModule {
|
|
|
529
526
|
/**
|
|
530
527
|
* Component that is used to group instances of `mat-option`.
|
|
531
528
|
*/
|
|
532
|
-
export declare class MatOptgroup
|
|
529
|
+
export declare class MatOptgroup {
|
|
533
530
|
/** Label for the option group. */
|
|
534
531
|
label: string;
|
|
532
|
+
/** whether the option group is disabled. */
|
|
533
|
+
disabled: boolean;
|
|
535
534
|
/** Unique id for the underlying label. */
|
|
536
535
|
_labelId: string;
|
|
537
536
|
/** Whether the group is in inert a11y mode. */
|
|
538
537
|
_inert: boolean;
|
|
539
538
|
constructor(parent?: MatOptionParentComponent);
|
|
540
539
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatOptgroup, [{ optional: true; }]>;
|
|
541
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatOptgroup, "mat-optgroup", ["matOptgroup"], { "
|
|
540
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatOptgroup, "mat-optgroup", ["matOptgroup"], { "label": { "alias": "label"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["*", "mat-option, ng-container"], false, never>;
|
|
541
|
+
static ngAcceptInputType_disabled: unknown;
|
|
542
542
|
}
|
|
543
543
|
|
|
544
|
-
/** @docs-private */
|
|
545
|
-
declare const _MatOptgroupMixinBase: _Constructor_2<CanDisable> & _AbstractConstructor_2<CanDisable> & {
|
|
546
|
-
new (): {};
|
|
547
|
-
};
|
|
548
|
-
|
|
549
544
|
/**
|
|
550
545
|
* Single option inside of a `<mat-select>` element.
|
|
551
546
|
*/
|
|
@@ -568,7 +563,7 @@ export declare class MatOption<T = any> implements FocusableOption, AfterViewChe
|
|
|
568
563
|
id: string;
|
|
569
564
|
/** Whether the option is disabled. */
|
|
570
565
|
get disabled(): boolean;
|
|
571
|
-
set disabled(value:
|
|
566
|
+
set disabled(value: boolean);
|
|
572
567
|
/** Whether ripples for the option are disabled. */
|
|
573
568
|
get disableRipple(): boolean;
|
|
574
569
|
/** Whether to display checkmark for single-selection. */
|
|
@@ -629,6 +624,7 @@ export declare class MatOption<T = any> implements FocusableOption, AfterViewChe
|
|
|
629
624
|
private _emitSelectionChangeEvent;
|
|
630
625
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatOption<any>, [null, null, { optional: true; }, { optional: true; }]>;
|
|
631
626
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatOption<any>, "mat-option", ["matOption"], { "value": { "alias": "value"; "required": false; }; "id": { "alias": "id"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "onSelectionChange": "onSelectionChange"; }, never, ["mat-icon", "*"], false, never>;
|
|
627
|
+
static ngAcceptInputType_disabled: unknown;
|
|
632
628
|
}
|
|
633
629
|
|
|
634
630
|
export declare class MatOptionModule {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
@use '
|
|
2
|
-
@use '
|
|
1
|
+
@use '../theming/inspection';
|
|
2
|
+
@use './sass-utils';
|
|
3
3
|
|
|
4
4
|
// Renders a gradient for showing the dashed line when the input is disabled.
|
|
5
5
|
// Unlike using a border, a gradient allows us to adjust the spacing of the dotted line
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
// Figures out the color of the placeholder for a form control.
|
|
14
14
|
// Used primarily to prevent the various form controls from
|
|
15
15
|
// becoming out of sync since these colors aren't in a palette.
|
|
16
|
-
@function private-control-placeholder-color($
|
|
17
|
-
$
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
@function private-control-placeholder-color($theme) {
|
|
17
|
+
$is-dark-theme: inspection.get-theme-type($theme) == dark;
|
|
18
|
+
@return sass-utils.safe-color-change(
|
|
19
|
+
inspection.get-theme-color($theme, foreground, secondary-text),
|
|
20
|
+
$alpha: if($is-dark-theme, 0.5, 0.42));
|
|
21
21
|
}
|
package/core/style/_private.scss
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
1
|
@use './elevation';
|
|
3
2
|
@use '../theming/inspection';
|
|
4
3
|
|
|
@@ -9,9 +8,8 @@
|
|
|
9
8
|
@include elevation.elevation($zValue, $elevation-color-or-default);
|
|
10
9
|
}
|
|
11
10
|
|
|
12
|
-
@mixin private-theme-overridable-elevation($zValue, $
|
|
13
|
-
$
|
|
14
|
-
$elevation-color: map.get($foreground, elevation);
|
|
11
|
+
@mixin private-theme-overridable-elevation($zValue, $theme) {
|
|
12
|
+
$elevation-color: inspection.get-theme-color($theme, foreground, elevation);
|
|
15
13
|
$elevation-color-or-default: if($elevation-color == null, elevation.$color, $elevation-color);
|
|
16
14
|
|
|
17
15
|
@include elevation.overridable-elevation($zValue, $elevation-color-or-default);
|
package/core/testing/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseHarnessFilters } from '@angular/cdk/testing';
|
|
2
2
|
import { ComponentHarness } from '@angular/cdk/testing';
|
|
3
3
|
import { ComponentHarnessConstructor } from '@angular/cdk/testing';
|
|
4
|
+
import { ContentContainerComponentHarness } from '@angular/cdk/testing';
|
|
4
5
|
import { HarnessPredicate } from '@angular/cdk/testing';
|
|
5
6
|
|
|
6
7
|
/** Harness for interacting with an MDC-based `mat-optgroup` in tests. */
|
|
@@ -27,7 +28,7 @@ export declare class MatOptgroupHarness extends ComponentHarness {
|
|
|
27
28
|
}
|
|
28
29
|
|
|
29
30
|
/** Harness for interacting with an MDC-based `mat-option` in tests. */
|
|
30
|
-
export declare class MatOptionHarness extends
|
|
31
|
+
export declare class MatOptionHarness extends ContentContainerComponentHarness {
|
|
31
32
|
/** Selector used to locate option instances. */
|
|
32
33
|
static hostSelector: string;
|
|
33
34
|
/** Element containing the option's text. */
|