@angular/material-experimental 14.1.0-next.2 → 14.1.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/esm2020/mdc-button/button-base.mjs +1 -3
- package/esm2020/mdc-button/button.mjs +5 -5
- package/esm2020/mdc-button/fab.mjs +9 -9
- package/esm2020/mdc-button/icon-button.mjs +5 -7
- package/esm2020/mdc-card/card.mjs +2 -2
- package/esm2020/mdc-checkbox/checkbox.mjs +2 -2
- package/esm2020/mdc-chips/chip-row.mjs +3 -3
- package/esm2020/mdc-core/option/option.mjs +2 -2
- package/esm2020/mdc-dialog/dialog-content-directives.mjs +1 -1
- package/esm2020/mdc-form-field/directives/notched-outline.mjs +10 -7
- package/esm2020/mdc-form-field/form-field.mjs +6 -11
- package/esm2020/mdc-list/list-option.mjs +2 -2
- package/esm2020/mdc-paginator/paginator.mjs +4 -4
- package/esm2020/mdc-slider/slider.mjs +17 -13
- package/esm2020/mdc-tabs/tab-header.mjs +2 -2
- package/esm2020/mdc-tabs/tab-nav-bar/tab-nav-bar.mjs +2 -2
- package/esm2020/selection/selection-module.mjs +2 -2
- package/esm2020/version.mjs +1 -1
- package/fesm2015/material-experimental.mjs +1 -1
- package/fesm2015/material-experimental.mjs.map +1 -1
- package/fesm2015/mdc-button.mjs +16 -20
- package/fesm2015/mdc-button.mjs.map +1 -1
- package/fesm2015/mdc-card.mjs +1 -1
- package/fesm2015/mdc-card.mjs.map +1 -1
- package/fesm2015/mdc-checkbox.mjs +2 -2
- package/fesm2015/mdc-checkbox.mjs.map +1 -1
- package/fesm2015/mdc-chips.mjs +2 -2
- package/fesm2015/mdc-chips.mjs.map +1 -1
- package/fesm2015/mdc-core.mjs +2 -2
- package/fesm2015/mdc-core.mjs.map +1 -1
- package/fesm2015/mdc-dialog.mjs.map +1 -1
- package/fesm2015/mdc-form-field.mjs +14 -16
- package/fesm2015/mdc-form-field.mjs.map +1 -1
- package/fesm2015/mdc-list.mjs +1 -1
- package/fesm2015/mdc-list.mjs.map +1 -1
- package/fesm2015/mdc-paginator.mjs +3 -3
- package/fesm2015/mdc-paginator.mjs.map +1 -1
- package/fesm2015/mdc-slider.mjs +17 -12
- package/fesm2015/mdc-slider.mjs.map +1 -1
- package/fesm2015/mdc-tabs.mjs +4 -4
- package/fesm2015/mdc-tabs.mjs.map +1 -1
- package/fesm2015/selection.mjs.map +1 -1
- package/fesm2020/material-experimental.mjs +1 -1
- package/fesm2020/material-experimental.mjs.map +1 -1
- package/fesm2020/mdc-button.mjs +16 -20
- package/fesm2020/mdc-button.mjs.map +1 -1
- package/fesm2020/mdc-card.mjs +1 -1
- package/fesm2020/mdc-card.mjs.map +1 -1
- package/fesm2020/mdc-checkbox.mjs +2 -2
- package/fesm2020/mdc-checkbox.mjs.map +1 -1
- package/fesm2020/mdc-chips.mjs +2 -2
- package/fesm2020/mdc-chips.mjs.map +1 -1
- package/fesm2020/mdc-core.mjs +2 -2
- package/fesm2020/mdc-core.mjs.map +1 -1
- package/fesm2020/mdc-dialog.mjs.map +1 -1
- package/fesm2020/mdc-form-field.mjs +14 -16
- package/fesm2020/mdc-form-field.mjs.map +1 -1
- package/fesm2020/mdc-list.mjs +1 -1
- package/fesm2020/mdc-list.mjs.map +1 -1
- package/fesm2020/mdc-paginator.mjs +3 -3
- package/fesm2020/mdc-paginator.mjs.map +1 -1
- package/fesm2020/mdc-slider.mjs +16 -12
- package/fesm2020/mdc-slider.mjs.map +1 -1
- package/fesm2020/mdc-tabs.mjs +4 -4
- package/fesm2020/mdc-tabs.mjs.map +1 -1
- package/fesm2020/selection.mjs.map +1 -1
- package/mdc-button/_button-theme-private.scss +2 -1
- package/mdc-button/index.d.ts +1 -5
- package/mdc-checkbox/_checkbox-theme.scss +7 -1
- package/mdc-core/mdc-helpers/_mdc-helpers.scss +8 -0
- package/mdc-core/theming/prebuilt/deeppurple-amber.css +1 -1
- package/mdc-core/theming/prebuilt/indigo-pink.css +1 -1
- package/mdc-core/theming/prebuilt/pink-bluegrey.css +1 -1
- package/mdc-core/theming/prebuilt/purple-green.css +1 -1
- package/mdc-dialog/index.d.ts +1 -1
- package/mdc-form-field/_form-field-density.scss +2 -1
- package/mdc-form-field/_form-field-theme.scss +25 -1
- package/mdc-form-field/index.d.ts +5 -5
- package/mdc-list/index.d.ts +1 -1
- package/mdc-paginator/_paginator-theme.scss +15 -1
- package/mdc-paginator/index.d.ts +1 -1
- package/mdc-radio/_radio-theme.scss +7 -1
- package/mdc-slide-toggle/_slide-toggle-theme.scss +6 -0
- package/mdc-slider/index.d.ts +4 -0
- package/mdc-tabs/_tabs-common.scss +5 -2
- package/package.json +3 -3
package/mdc-dialog/index.d.ts
CHANGED
|
@@ -118,7 +118,7 @@ export declare class MatDialogClose implements OnInit, OnChanges {
|
|
|
118
118
|
dialogRef: MatDialogRef<any>;
|
|
119
119
|
private _elementRef;
|
|
120
120
|
private _dialog;
|
|
121
|
-
/**
|
|
121
|
+
/** Screen-reader label for the button. */
|
|
122
122
|
ariaLabel: string;
|
|
123
123
|
/** Default to "button" to prevents accidental form submits. */
|
|
124
124
|
type: 'submit' | 'button' | 'reset';
|
|
@@ -88,7 +88,8 @@
|
|
|
88
88
|
.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded
|
|
89
89
|
.mdc-floating-label--float-above {
|
|
90
90
|
--mat-mdc-form-field-label-transform: translateY(
|
|
91
|
-
-#{mdc-textfield.get-outlined-label-position-y($height)})
|
|
91
|
+
-#{mdc-textfield.get-outlined-label-position-y($height)})
|
|
92
|
+
scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));
|
|
92
93
|
transform: var(--mat-mdc-form-field-label-transform);
|
|
93
94
|
}
|
|
94
95
|
|
|
@@ -58,6 +58,29 @@
|
|
|
58
58
|
.mat-mdc-form-field.mat-warn {
|
|
59
59
|
@include _color-styles(error);
|
|
60
60
|
}
|
|
61
|
+
|
|
62
|
+
// This fixes an issue where the notch appears to be thicker than the rest of the outline when
|
|
63
|
+
// zoomed in on Chrome. The border inconsistency seems to be some kind of rendering artifact
|
|
64
|
+
// that arises from a combination of the fact that the notch contains text, while the leading
|
|
65
|
+
// and trailing outline do not, combined with the fact that the border is semi-transparent.
|
|
66
|
+
// Experimentally, I discovered that adding a transparent left border fixes the inconsistency.
|
|
67
|
+
// Note: class name is repeated to achieve sufficient specificity over the various MDC states.
|
|
68
|
+
// (hover, focus, etc.)
|
|
69
|
+
// TODO(mmalerba): port this fix into MDC
|
|
70
|
+
.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field {
|
|
71
|
+
&.mat-mdc-form-field .mdc-notched-outline__notch {
|
|
72
|
+
border-left: 1px solid transparent;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
[dir='rtl'] {
|
|
77
|
+
.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field {
|
|
78
|
+
&.mat-mdc-form-field .mdc-notched-outline__notch {
|
|
79
|
+
border-left: none;
|
|
80
|
+
border-right: 1px solid transparent;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
61
84
|
}
|
|
62
85
|
}
|
|
63
86
|
}
|
|
@@ -90,7 +113,8 @@
|
|
|
90
113
|
// For the non-upgraded notch label (i.e. when rendered on the server), also
|
|
91
114
|
// use the correct `body1` typography level.
|
|
92
115
|
.mdc-floating-label--float-above {
|
|
93
|
-
font-size:
|
|
116
|
+
font-size: calc(#{
|
|
117
|
+
mdc-typography.get-size(body1)} * var(--mat-mdc-form-field-floating-label-scale, 0.75));
|
|
94
118
|
}
|
|
95
119
|
.mdc-notched-outline--upgraded .mdc-floating-label--float-above {
|
|
96
120
|
font-size: mdc-typography.get-size(body1);
|
|
@@ -192,8 +192,8 @@ export declare class MatFormField implements AfterContentInit, AfterContentCheck
|
|
|
192
192
|
readonly _hintLabelId: string;
|
|
193
193
|
/** State of the mat-hint and mat-error animations. */
|
|
194
194
|
_subscriptAnimationState: string;
|
|
195
|
-
/** Width of the
|
|
196
|
-
|
|
195
|
+
/** Width of the label element (at scale=1). */
|
|
196
|
+
_labelWidth: number;
|
|
197
197
|
/** Gets the current form field control */
|
|
198
198
|
get _control(): MatFormFieldControl<any>;
|
|
199
199
|
set _control(value: MatFormFieldControl<any>);
|
|
@@ -380,15 +380,15 @@ export declare class MatFormFieldModule {
|
|
|
380
380
|
declare class MatFormFieldNotchedOutline implements AfterViewInit {
|
|
381
381
|
private _elementRef;
|
|
382
382
|
private _ngZone;
|
|
383
|
-
/** Width of the
|
|
384
|
-
|
|
383
|
+
/** Width of the label (original scale) */
|
|
384
|
+
labelWidth: number;
|
|
385
385
|
/** Whether the notch should be opened. */
|
|
386
386
|
open: boolean;
|
|
387
387
|
constructor(_elementRef: ElementRef<HTMLElement>, _ngZone: NgZone);
|
|
388
388
|
ngAfterViewInit(): void;
|
|
389
389
|
_getNotchWidth(): string | null;
|
|
390
390
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatFormFieldNotchedOutline, never>;
|
|
391
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatFormFieldNotchedOutline, "div[matFormFieldNotchedOutline]", never, { "
|
|
391
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatFormFieldNotchedOutline, "div[matFormFieldNotchedOutline]", never, { "labelWidth": "matFormFieldNotchedOutlineLabelWidth"; "open": "matFormFieldNotchedOutlineOpen"; }, {}, never, ["*"], false>;
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
/** Hint text to be shown underneath the form field control. */
|
package/mdc-list/index.d.ts
CHANGED
|
@@ -364,7 +364,7 @@ export declare class MatListOption extends MatListItemBase implements ListOption
|
|
|
364
364
|
* list changed.
|
|
365
365
|
*/
|
|
366
366
|
_markForCheck(): void;
|
|
367
|
-
/** Toggles the option's value based on a user
|
|
367
|
+
/** Toggles the option's value based on a user interaction. */
|
|
368
368
|
_toggleOnInteraction(): void;
|
|
369
369
|
/** Sets the tabindex of the list option. */
|
|
370
370
|
_setTabindex(value: number): void;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use 'sass:meta';
|
|
1
3
|
@use '@angular/material' as mat;
|
|
2
4
|
@use '@material/density' as mdc-density;
|
|
3
5
|
@use '@material/typography' as mdc-typography;
|
|
4
|
-
@use '
|
|
6
|
+
@use '../mdc-form-field/form-field-theme';
|
|
5
7
|
|
|
6
8
|
@use '../mdc-core/mdc-helpers/mdc-helpers';
|
|
7
9
|
@use './paginator-variables';
|
|
@@ -67,6 +69,18 @@
|
|
|
67
69
|
$height: mdc-density.prop-value(
|
|
68
70
|
paginator-variables.$density-config, $density-scale, height);
|
|
69
71
|
|
|
72
|
+
.mat-mdc-paginator {
|
|
73
|
+
// We need the form field to be narrower in order to fit into the paginator,
|
|
74
|
+
// so we set its density to be -4 or denser.
|
|
75
|
+
@if ((meta.type-of($density-scale) == 'number' and $density-scale >= -4) or
|
|
76
|
+
$density-scale == maximum) {
|
|
77
|
+
@include form-field-theme.density(-4);
|
|
78
|
+
}
|
|
79
|
+
@else {
|
|
80
|
+
@include form-field-theme.density($density-scale);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
70
84
|
.mat-mdc-paginator-container {
|
|
71
85
|
min-height: $height;
|
|
72
86
|
}
|
package/mdc-paginator/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export { MAT_PAGINATOR_INTL_PROVIDER_FACTORY }
|
|
|
36
36
|
export declare class MatPaginator extends _MatPaginatorBase<MatPaginatorDefaultOptions> {
|
|
37
37
|
/** If set, styles the "page size" form field with the designated style. */
|
|
38
38
|
_formFieldAppearance?: MatFormFieldAppearance;
|
|
39
|
-
/** ID for the DOM node containing the
|
|
39
|
+
/** ID for the DOM node containing the paginator's items per page label. */
|
|
40
40
|
readonly _pageSizeLabelId: string;
|
|
41
41
|
constructor(intl: MatPaginatorIntl, changeDetectorRef: ChangeDetectorRef, defaults?: MatPaginatorDefaultOptions);
|
|
42
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatPaginator, [null, null, { optional: true; }]>;
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
$primary: mat.get-color-from-palette(map.get($config, primary));
|
|
23
23
|
$accent: mat.get-color-from-palette(map.get($config, accent));
|
|
24
24
|
$warn: mat.get-color-from-palette(map.get($config, warn));
|
|
25
|
+
$foreground: map.get($config, foreground);
|
|
25
26
|
|
|
26
27
|
@include mdc-helpers.mat-using-mdc-theme($config) {
|
|
27
28
|
$on-surface: rgba(mdc-theme-color.$on-surface, 0.54);
|
|
@@ -47,6 +48,11 @@
|
|
|
47
48
|
|
|
48
49
|
--mat-mdc-radio-ripple-color: #{mdc-theme-color.prop-value(on-surface)};
|
|
49
50
|
|
|
51
|
+
// MDC should set the disabled color on the label, but doesn't, so we do it here instead.
|
|
52
|
+
.mdc-radio--disabled + label {
|
|
53
|
+
color: mat.get-color-from-palette($foreground, disabled-text);
|
|
54
|
+
}
|
|
55
|
+
|
|
50
56
|
&.mat-primary {
|
|
51
57
|
@include _color-palette($primary);
|
|
52
58
|
}
|
|
@@ -77,7 +83,7 @@
|
|
|
77
83
|
@include mdc-radio-theme.density($density-scale, $query: mdc-helpers.$mat-base-styles-query);
|
|
78
84
|
}
|
|
79
85
|
|
|
80
|
-
@
|
|
86
|
+
@include mdc-helpers.if-touch-targets-unsupported($density-scale) {
|
|
81
87
|
.mat-mdc-radio-touch-target {
|
|
82
88
|
display: none;
|
|
83
89
|
}
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
$accent: mat.get-color-from-palette(map.get($config, accent));
|
|
75
75
|
$warn: mat.get-color-from-palette(map.get($config, warn));
|
|
76
76
|
$is-dark: map.get($config, is-dark);
|
|
77
|
+
$foreground: map.get($config, foreground);
|
|
77
78
|
|
|
78
79
|
@include mdc-helpers.mat-using-mdc-theme($config) {
|
|
79
80
|
// MDC's switch doesn't support a `color` property. We add support
|
|
@@ -82,6 +83,11 @@
|
|
|
82
83
|
@include mdc-form-field.core-styles($query: mdc-helpers.$mat-theme-styles-query);
|
|
83
84
|
@include mdc-switch-theme.theme(_get-theme-base-map($is-dark));
|
|
84
85
|
|
|
86
|
+
// MDC should set the disabled color on the label, but doesn't, so we do it here instead.
|
|
87
|
+
.mdc-switch--disabled + label {
|
|
88
|
+
color: mat.get-color-from-palette($foreground, disabled-text);
|
|
89
|
+
}
|
|
90
|
+
|
|
85
91
|
&.mat-primary {
|
|
86
92
|
@include mdc-switch-theme.theme(_get-theme-color-map($primary));
|
|
87
93
|
}
|
package/mdc-slider/index.d.ts
CHANGED
|
@@ -138,6 +138,8 @@ export declare class MatSlider extends _MatSliderMixinBase implements AfterViewI
|
|
|
138
138
|
private _resizeObserver;
|
|
139
139
|
/** Timeout used to debounce resize listeners. */
|
|
140
140
|
private _resizeTimer;
|
|
141
|
+
/** Cached dimensions of the host element. */
|
|
142
|
+
private _cachedHostRect;
|
|
141
143
|
constructor(_ngZone: NgZone, _cdr: ChangeDetectorRef, elementRef: ElementRef<HTMLElement>, _platform: Platform, _globalChangeAndInputListener: GlobalChangeAndInputListener<'input' | 'change'>, document: any, _dir: Directionality, _globalRippleOptions?: RippleGlobalOptions | undefined, animationMode?: string);
|
|
142
144
|
ngAfterViewInit(): void;
|
|
143
145
|
ngOnDestroy(): void;
|
|
@@ -203,6 +205,8 @@ export declare class MatSlider extends _MatSliderMixinBase implements AfterViewI
|
|
|
203
205
|
_getTickMarkClass(tickMark: TickMark): string;
|
|
204
206
|
/** Whether the slider thumb ripples should be disabled. */
|
|
205
207
|
_isRippleDisabled(): boolean;
|
|
208
|
+
/** Gets the dimensions of the host element. */
|
|
209
|
+
_getHostDimensions(): DOMRect;
|
|
206
210
|
/** Starts observing and updating the slider if the host changes its size. */
|
|
207
211
|
private _observeHostResize;
|
|
208
212
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatSlider, [null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }]>;
|
|
@@ -162,8 +162,11 @@ $mat-tab-animation-duration: 500ms !default;
|
|
|
162
162
|
|
|
163
163
|
// The `span` is in the selector in order to increase the specificity, ensuring
|
|
164
164
|
// that it's always higher than the selector that declares the transition.
|
|
165
|
-
._mat-animation-noopable
|
|
166
|
-
|
|
165
|
+
._mat-animation-noopable {
|
|
166
|
+
span.mdc-tab-indicator__content,
|
|
167
|
+
span.mdc-tab__text-label {
|
|
168
|
+
transition: none;
|
|
169
|
+
}
|
|
167
170
|
}
|
|
168
171
|
}
|
|
169
172
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/material-experimental",
|
|
3
|
-
"version": "14.1.0
|
|
3
|
+
"version": "14.1.0",
|
|
4
4
|
"description": "Experimental components for Angular Material",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -426,12 +426,12 @@
|
|
|
426
426
|
},
|
|
427
427
|
"peerDependencies": {
|
|
428
428
|
"@angular/animations": "^14.0.0 || ^15.0.0",
|
|
429
|
-
"@angular/cdk": "14.1.0
|
|
429
|
+
"@angular/cdk": "14.1.0",
|
|
430
430
|
"@angular/core": "^14.0.0 || ^15.0.0",
|
|
431
431
|
"@angular/common": "^14.0.0 || ^15.0.0",
|
|
432
432
|
"@angular/forms": "^14.0.0 || ^15.0.0",
|
|
433
433
|
"@angular/platform-browser": "^14.0.0 || ^15.0.0",
|
|
434
|
-
"@angular/material": "14.1.0
|
|
434
|
+
"@angular/material": "14.1.0"
|
|
435
435
|
},
|
|
436
436
|
"dependencies": {
|
|
437
437
|
"tslib": "^2.3.0",
|