@angular/material 21.1.0 → 21.1.2
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 +13 -11
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/table.mjs +3 -0
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +20 -1
- package/fesm2022/timepicker.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/timepicker.d.ts +3 -1
|
@@ -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.1.
|
|
22
|
+
const fallbackMaterialVersionRange = `~21.1.2`;
|
|
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/timepicker.d.ts
CHANGED
|
@@ -113,6 +113,8 @@ declare class MatTimepicker<D> implements OnDestroy, MatOptionParentComponent {
|
|
|
113
113
|
readonly ariaLabelledby: InputSignal<string | null>;
|
|
114
114
|
/** Whether the timepicker is currently disabled. */
|
|
115
115
|
readonly disabled: Signal<boolean>;
|
|
116
|
+
/** Classes to be passed to the timepicker panel. */
|
|
117
|
+
readonly panelClass: InputSignal<string | string[] | undefined>;
|
|
116
118
|
constructor();
|
|
117
119
|
/** Opens the timepicker. */
|
|
118
120
|
open(): void;
|
|
@@ -148,7 +150,7 @@ declare class MatTimepicker<D> implements OnDestroy, MatOptionParentComponent {
|
|
|
148
150
|
*/
|
|
149
151
|
private _handleInputStateChanges;
|
|
150
152
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatTimepicker<any>, never>;
|
|
151
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatTimepicker<any>, "mat-timepicker", ["matTimepicker"], { "interval": { "alias": "interval"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "disableRipple": { "alias": "disableRipple"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; }, { "selected": "selected"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
153
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatTimepicker<any>, "mat-timepicker", ["matTimepicker"], { "interval": { "alias": "interval"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "disableRipple": { "alias": "disableRipple"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; }, { "selected": "selected"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
152
154
|
}
|
|
153
155
|
|
|
154
156
|
/**
|