@angular/material 21.2.0-next.0 → 21.2.0-next.1
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/button/_m2-button.scss +5 -1
- package/button/_m2-fab.scss +7 -2
- package/button/_m2-icon-button.scss +6 -1
- package/checkbox/_m2-checkbox.scss +6 -1
- package/core/m2/_theming.scss +26 -11
- package/core/m2/_typography-utils.scss +5 -1
- package/core/style/_elevation.scss +5 -1
- package/core/style/_validation.scss +12 -3
- package/core/theming/_color-api-backwards-compatibility.scss +5 -1
- package/core/theming/_inspection.scss +14 -6
- package/core/theming/_m2-inspection.scss +8 -2
- package/core/theming/_theming.scss +4 -1
- package/core/tokens/_m3-tokens.scss +7 -3
- package/core/tokens/_system.scss +8 -4
- package/core/tokens/_token-utils.scss +6 -1
- package/core/typography/_versioning.scss +2 -3
- package/fesm2022/_tooltip-chunk.mjs +32 -45
- package/fesm2022/_tooltip-chunk.mjs.map +1 -1
- package/fesm2022/chips.mjs +10 -4
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +12 -10
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/sort.mjs +35 -35
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/table.mjs +3 -6
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +0 -1
- package/fesm2022/tooltip.mjs.map +1 -1
- package/form-field/_m2-form-field.scss +29 -15
- package/package.json +2 -2
- package/paginator/_m2-paginator.scss +12 -2
- package/progress-bar/_m2-progress-bar.scss +6 -5
- package/radio/_m2-radio.scss +6 -1
- package/schematics/ng-add/index.js +1 -1
- package/sidenav/_m2-sidenav.scss +13 -8
- package/slide-toggle/_m2-slide-toggle.scss +6 -1
- package/types/_tooltip-chunk.d.ts +6 -6
- package/types/chips.d.ts +4 -1
- package/types/sort.d.ts +17 -22
|
@@ -7,6 +7,16 @@
|
|
|
7
7
|
@function get-tokens($theme) {
|
|
8
8
|
$system: m2-utils.get-system($theme);
|
|
9
9
|
$density-scale: theming.clamp-density(map.get($system, density-scale), -5);
|
|
10
|
+
$touch-target-display: block;
|
|
11
|
+
$form-field-density-scale: $density-scale;
|
|
12
|
+
|
|
13
|
+
@if ($form-field-density-scale > -4) {
|
|
14
|
+
$form-field-density-scale: -4;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@if ($density-scale < -2) {
|
|
18
|
+
$touch-target-display: none;
|
|
19
|
+
}
|
|
10
20
|
|
|
11
21
|
$form-field-height: map.get((
|
|
12
22
|
0: 56px,
|
|
@@ -15,7 +25,7 @@
|
|
|
15
25
|
-3: 44px,
|
|
16
26
|
-4: 40px,
|
|
17
27
|
-5: 36px,
|
|
18
|
-
),
|
|
28
|
+
), $form-field-density-scale);
|
|
19
29
|
|
|
20
30
|
@return (
|
|
21
31
|
base: (
|
|
@@ -53,7 +63,7 @@
|
|
|
53
63
|
// padding that is provided by the Material Design specification.
|
|
54
64
|
paginator-form-field-container-vertical-padding:
|
|
55
65
|
16px - math.div(56px - $form-field-height, 2),
|
|
56
|
-
paginator-touch-target-display:
|
|
66
|
+
paginator-touch-target-display: $touch-target-display,
|
|
57
67
|
),
|
|
58
68
|
);
|
|
59
69
|
}
|
|
@@ -23,13 +23,14 @@
|
|
|
23
23
|
@function private-get-color-palette-color-tokens($theme, $color-variant) {
|
|
24
24
|
$system: m2-utils.get-system($theme);
|
|
25
25
|
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
26
|
+
$track-color: map.get($system, primary);
|
|
27
|
+
|
|
28
|
+
@if (meta.type-of($track-color) == color) {
|
|
29
|
+
$track-color: color.adjust($track-color, $alpha: -0.75);
|
|
30
|
+
}
|
|
26
31
|
|
|
27
32
|
@return (
|
|
28
33
|
progress-bar-active-indicator-color: map.get($system, primary),
|
|
29
|
-
progress-bar-track-color:
|
|
30
|
-
meta.type-of(map.get($system, primary)) == color,
|
|
31
|
-
color.adjust(map.get($system, primary), $alpha: -0.75),
|
|
32
|
-
map.get($system, primary)
|
|
33
|
-
)
|
|
34
|
+
progress-bar-track-color: $track-color,
|
|
34
35
|
);
|
|
35
36
|
}
|
package/radio/_m2-radio.scss
CHANGED
|
@@ -6,6 +6,11 @@
|
|
|
6
6
|
@function get-tokens($theme) {
|
|
7
7
|
$system: m2-utils.get-system($theme);
|
|
8
8
|
$density-scale: theming.clamp-density(map.get($system, density-scale), -3);
|
|
9
|
+
$touch-target-display: block;
|
|
10
|
+
|
|
11
|
+
@if ($density-scale < -1) {
|
|
12
|
+
$touch-target-display: none;
|
|
13
|
+
}
|
|
9
14
|
|
|
10
15
|
@return (
|
|
11
16
|
base: (
|
|
@@ -32,7 +37,7 @@
|
|
|
32
37
|
-2: 32px,
|
|
33
38
|
-3: 28px,
|
|
34
39
|
), $density-scale),
|
|
35
|
-
radio-touch-target-display:
|
|
40
|
+
radio-touch-target-display: $touch-target-display,
|
|
36
41
|
),
|
|
37
42
|
);
|
|
38
43
|
}
|
|
@@ -19,7 +19,7 @@ const package_config_1 = require("./package-config");
|
|
|
19
19
|
* Note that the fallback version range does not use caret, but tilde because that is
|
|
20
20
|
* the default for Angular framework dependencies in CLI projects.
|
|
21
21
|
*/
|
|
22
|
-
const fallbackMaterialVersionRange = `~21.2.0-next.
|
|
22
|
+
const fallbackMaterialVersionRange = `~21.2.0-next.1`;
|
|
23
23
|
/**
|
|
24
24
|
* Schematic factory entry-point for the `ng-add` schematic. The ng-add schematic will be
|
|
25
25
|
* automatically executed if developers run `ng add @angular/material`.
|
package/sidenav/_m2-sidenav.scss
CHANGED
|
@@ -15,7 +15,18 @@
|
|
|
15
15
|
}
|
|
16
16
|
$scrim-opacity: 0.6;
|
|
17
17
|
$scrim-color: m3-utils.color-with-opacity(map.get($system, surface), 60%);
|
|
18
|
-
|
|
18
|
+
|
|
19
|
+
@if (meta.type-of($scrim-color) == color) {
|
|
20
|
+
// We use invert() here to have the darken the background color expected to be used.
|
|
21
|
+
// If the background is light, we use a dark backdrop. If the background is dark, we
|
|
22
|
+
// use a light backdrop. If the value isn't a color, Sass will throw an error so we
|
|
23
|
+
// fall back to something generic.
|
|
24
|
+
$scrim-color: color.invert($scrim-color);
|
|
25
|
+
} @else if ($is-dark) {
|
|
26
|
+
$scrim-color: rgba(#fff, $scrim-opacity);
|
|
27
|
+
} @else {
|
|
28
|
+
$scrim-color: rgba(#000, $scrim-opacity);
|
|
29
|
+
}
|
|
19
30
|
|
|
20
31
|
@return (
|
|
21
32
|
base: (
|
|
@@ -29,13 +40,7 @@
|
|
|
29
40
|
sidenav-container-text-color: map.get($system, on-surface),
|
|
30
41
|
sidenav-content-background-color: map.get($system, background),
|
|
31
42
|
sidenav-content-text-color: map.get($system, on-surface),
|
|
32
|
-
|
|
33
|
-
// We use invert() here to have the darken the background color expected to be used.
|
|
34
|
-
// If the background is light, we use a dark backdrop. If the background is dark, we
|
|
35
|
-
// use a light backdrop. If the value isn't a color, Sass will throw an error so we
|
|
36
|
-
// fall back to something generic.
|
|
37
|
-
sidenav-scrim-color: if(meta.type-of($scrim-color) == color,
|
|
38
|
-
color.invert($scrim-color), $fallback-scrim-color),
|
|
43
|
+
sidenav-scrim-color: $scrim-color,
|
|
39
44
|
),
|
|
40
45
|
typography: (),
|
|
41
46
|
density: (),
|
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
@function get-tokens($theme) {
|
|
8
8
|
$system: m2-utils.get-system($theme);
|
|
9
9
|
$density-scale: theming.clamp-density(map.get($system, density-scale), -3);
|
|
10
|
+
$touch-target-display: block;
|
|
11
|
+
|
|
12
|
+
@if ($density-scale < -1) {
|
|
13
|
+
$touch-target-display: none;
|
|
14
|
+
}
|
|
10
15
|
|
|
11
16
|
@return (
|
|
12
17
|
base: (
|
|
@@ -101,7 +106,7 @@
|
|
|
101
106
|
-2: 32px,
|
|
102
107
|
-3: 28px,
|
|
103
108
|
), $density-scale),
|
|
104
|
-
slide-toggle-touch-target-display:
|
|
109
|
+
slide-toggle-touch-target-display: $touch-target-display
|
|
105
110
|
),
|
|
106
111
|
);
|
|
107
112
|
}
|
|
@@ -89,6 +89,8 @@ declare class MatTooltip implements OnDestroy, AfterViewInit {
|
|
|
89
89
|
private _injector;
|
|
90
90
|
private _viewContainerRef;
|
|
91
91
|
private _mediaMatcher;
|
|
92
|
+
private _document;
|
|
93
|
+
private _renderer;
|
|
92
94
|
private _animationsDisabled;
|
|
93
95
|
private _defaultOptions;
|
|
94
96
|
_overlayRef: OverlayRef | null;
|
|
@@ -154,7 +156,7 @@ declare class MatTooltip implements OnDestroy, AfterViewInit {
|
|
|
154
156
|
[key: string]: unknown;
|
|
155
157
|
});
|
|
156
158
|
/** Manually-bound passive event listeners. */
|
|
157
|
-
private readonly
|
|
159
|
+
private readonly _eventCleanups;
|
|
158
160
|
/** Timer started at the last `touchstart` event. */
|
|
159
161
|
private _touchstartTimeout;
|
|
160
162
|
/** Emits when the component is destroyed. */
|
|
@@ -213,10 +215,8 @@ declare class MatTooltip implements OnDestroy, AfterViewInit {
|
|
|
213
215
|
/** Binds the pointer events to the tooltip trigger. */
|
|
214
216
|
private _setupPointerEnterEventsIfNeeded;
|
|
215
217
|
private _setupPointerExitEventsIfNeeded;
|
|
216
|
-
private
|
|
218
|
+
private _addListener;
|
|
217
219
|
private _isTouchPlatform;
|
|
218
|
-
/** Listener for the `wheel` event on the element. */
|
|
219
|
-
private _wheelListener;
|
|
220
220
|
/** Disables the native browser gestures, based on how the tooltip has been configured. */
|
|
221
221
|
private _disableNativeGesturesIfNecessary;
|
|
222
222
|
/** Updates the tooltip's ARIA description based on it current state. */
|
|
@@ -234,8 +234,8 @@ declare class TooltipComponent implements OnDestroy {
|
|
|
234
234
|
_isMultiline: boolean;
|
|
235
235
|
/** Message to display in the tooltip */
|
|
236
236
|
message: string;
|
|
237
|
-
/** Classes to be added to the tooltip.
|
|
238
|
-
tooltipClass: string | string[] |
|
|
237
|
+
/** Classes to be added to the tooltip. */
|
|
238
|
+
tooltipClass: string | string[] | {
|
|
239
239
|
[key: string]: unknown;
|
|
240
240
|
};
|
|
241
241
|
/** The timeout ID of any current timer set to show the tooltip */
|
package/types/chips.d.ts
CHANGED
|
@@ -375,8 +375,10 @@ interface MatChipEditedEvent extends MatChipEvent {
|
|
|
375
375
|
* An extension of the MatChip component used with MatChipGrid and
|
|
376
376
|
* the matChipInputFor directive.
|
|
377
377
|
*/
|
|
378
|
-
declare class MatChipRow extends MatChip implements AfterViewInit {
|
|
378
|
+
declare class MatChipRow extends MatChip implements AfterViewInit, OnDestroy {
|
|
379
379
|
protected basicChipAttrName: string;
|
|
380
|
+
private _renderer;
|
|
381
|
+
private _cleanupMousedown;
|
|
380
382
|
/**
|
|
381
383
|
* The editing action has to be triggered in a timeout. While we're waiting on it, a blur
|
|
382
384
|
* event might occur which will interrupt the editing. This flag is used to avoid interruptions
|
|
@@ -401,6 +403,7 @@ declare class MatChipRow extends MatChip implements AfterViewInit {
|
|
|
401
403
|
_isEditing: boolean;
|
|
402
404
|
constructor(...args: unknown[]);
|
|
403
405
|
ngAfterViewInit(): void;
|
|
406
|
+
ngOnDestroy(): void;
|
|
404
407
|
protected _hasLeadingActionIcon(): boolean;
|
|
405
408
|
_hasTrailingIcon(): boolean;
|
|
406
409
|
/** Sends focus to the first gridcell when the user clicks anywhere inside the chip. */
|
package/types/sort.d.ts
CHANGED
|
@@ -3,22 +3,8 @@ import { OnDestroy, OnInit, AfterViewInit } from '@angular/core';
|
|
|
3
3
|
import { MatSortable, MatSort, SortHeaderArrowPosition } from './_sort-chunk.js';
|
|
4
4
|
export { MAT_SORT_DEFAULT_OPTIONS, MatSortDefaultOptions, Sort } from './_sort-chunk.js';
|
|
5
5
|
import { SortDirection } from './_sort-direction-chunk.js';
|
|
6
|
-
import { Subject } from 'rxjs';
|
|
7
6
|
import * as i2 from '@angular/cdk/bidi';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* To modify the labels and text displayed, create a new instance of MatSortHeaderIntl and
|
|
11
|
-
* include it in a custom provider.
|
|
12
|
-
*/
|
|
13
|
-
declare class MatSortHeaderIntl {
|
|
14
|
-
/**
|
|
15
|
-
* Stream that emits whenever the labels here are changed. Use this to notify
|
|
16
|
-
* components if the labels have changed after initialization.
|
|
17
|
-
*/
|
|
18
|
-
readonly changes: Subject<void>;
|
|
19
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MatSortHeaderIntl, never>;
|
|
20
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<MatSortHeaderIntl>;
|
|
21
|
-
}
|
|
7
|
+
import { Subject } from 'rxjs';
|
|
22
8
|
|
|
23
9
|
/**
|
|
24
10
|
* Valid positions for the arrow to be in for its opacity and translation. If the state is a
|
|
@@ -42,10 +28,6 @@ interface ArrowViewStateTransition {
|
|
|
42
28
|
fromState?: ArrowViewState;
|
|
43
29
|
toState?: ArrowViewState;
|
|
44
30
|
}
|
|
45
|
-
/** Column definition associated with a `MatSortHeader`. */
|
|
46
|
-
interface MatSortHeaderColumnDef {
|
|
47
|
-
name: string;
|
|
48
|
-
}
|
|
49
31
|
/**
|
|
50
32
|
* Applies sorting behavior (click to change sort) and styles to an element, including an
|
|
51
33
|
* arrow to display the current sort direction.
|
|
@@ -56,9 +38,8 @@ interface MatSortHeaderColumnDef {
|
|
|
56
38
|
* column definition.
|
|
57
39
|
*/
|
|
58
40
|
declare class MatSortHeader implements MatSortable, OnDestroy, OnInit, AfterViewInit {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
_columnDef: MatSortHeaderColumnDef | null;
|
|
41
|
+
protected _sort: MatSort;
|
|
42
|
+
private _columnDef;
|
|
62
43
|
private _changeDetectorRef;
|
|
63
44
|
private _focusMonitor;
|
|
64
45
|
private _elementRef;
|
|
@@ -127,5 +108,19 @@ declare class MatSortModule {
|
|
|
127
108
|
static ɵinj: i0.ɵɵInjectorDeclaration<MatSortModule>;
|
|
128
109
|
}
|
|
129
110
|
|
|
111
|
+
/**
|
|
112
|
+
* To modify the labels and text displayed, create a new instance of MatSortHeaderIntl and
|
|
113
|
+
* include it in a custom provider.
|
|
114
|
+
*/
|
|
115
|
+
declare class MatSortHeaderIntl {
|
|
116
|
+
/**
|
|
117
|
+
* Stream that emits whenever the labels here are changed. Use this to notify
|
|
118
|
+
* components if the labels have changed after initialization.
|
|
119
|
+
*/
|
|
120
|
+
readonly changes: Subject<void>;
|
|
121
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatSortHeaderIntl, never>;
|
|
122
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MatSortHeaderIntl>;
|
|
123
|
+
}
|
|
124
|
+
|
|
130
125
|
export { MatSort, MatSortHeader, MatSortHeaderIntl, MatSortModule, MatSortable, SortDirection, SortHeaderArrowPosition };
|
|
131
126
|
export type { ArrowViewState, ArrowViewStateTransition };
|