@angular/material 19.0.0-rc.0 → 19.0.0-rc.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/badge/index.d.ts +1 -2
- package/button-toggle/index.d.ts +2 -1
- package/core/m2/_theming.scss +2 -1
- package/core/theming/_theming.scss +2 -1
- package/core/tokens/_m3-tokens.scss +3 -3
- package/core/tokens/_token-definition.scss +4 -3
- package/core/tokens/m2/mat/_badge.scss +1 -1
- package/core/tokens/m2/mat/_datepicker.scss +1 -1
- package/core/tokens/m2/mat/_menu.scss +5 -3
- package/core/tokens/m2/mat/_sort.scss +1 -1
- package/core/tokens/m3/mat/_menu.scss +6 -3
- package/core/tokens/m3/mdc/_filled-text-field.scss +9 -11
- package/datepicker/index.d.ts +4 -4
- package/dialog/index.d.ts +1 -0
- package/fesm2022/autocomplete.mjs +15 -20
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge.mjs +13 -15
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs +10 -10
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs +14 -15
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +34 -34
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card.mjs +46 -46
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +16 -17
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips.mjs +43 -46
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +68 -75
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/datepicker.mjs +95 -97
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog.mjs +29 -31
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider.mjs +7 -7
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/expansion.mjs +27 -29
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field.mjs +42 -43
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/grid-list.mjs +22 -22
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs +7 -7
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon.mjs +10 -10
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input.mjs +9 -9
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/list.mjs +49 -49
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/menu.mjs +22 -65
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator.mjs +13 -13
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs +7 -7
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs +7 -7
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/radio.mjs +13 -15
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/select.mjs +14 -14
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +22 -22
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +16 -18
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider.mjs +16 -16
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs +24 -25
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort.mjs +13 -13
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper.mjs +31 -31
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/table.mjs +55 -55
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs.mjs +49 -53
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +16 -18
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar.mjs +10 -10
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip.mjs +10 -10
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree.mjs +25 -25
- package/fesm2022/tree.mjs.map +1 -1
- package/form-field/index.d.ts +1 -0
- package/menu/index.d.ts +7 -8
- package/package.json +2 -2
- package/prebuilt-themes/azure-blue.css +1 -1
- package/prebuilt-themes/cyan-orange.css +1 -1
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/magenta-violet.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/prebuilt-themes/rose-red.css +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/select/index.d.ts +1 -0
package/badge/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export declare class MatBadge implements OnInit, OnDestroy {
|
|
|
21
21
|
private _ariaDescriber;
|
|
22
22
|
private _renderer;
|
|
23
23
|
private _animationMode;
|
|
24
|
+
private _idGenerator;
|
|
24
25
|
/**
|
|
25
26
|
* Theme color of the badge. This API is supported in M2 themes only, it
|
|
26
27
|
* has no effect in M3 themes.
|
|
@@ -52,8 +53,6 @@ export declare class MatBadge implements OnInit, OnDestroy {
|
|
|
52
53
|
size: MatBadgeSize;
|
|
53
54
|
/** Whether the badge is hidden. */
|
|
54
55
|
hidden: boolean;
|
|
55
|
-
/** Unique id for the badge */
|
|
56
|
-
_id: number;
|
|
57
56
|
/** Visible badge element. */
|
|
58
57
|
private _badgeElement;
|
|
59
58
|
/** Inline badge description. Used when the badge is applied to non-interactive host elements. */
|
package/button-toggle/index.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ export declare class MatButtonToggle implements OnInit, AfterViewInit, OnDestroy
|
|
|
53
53
|
private _changeDetectorRef;
|
|
54
54
|
private _elementRef;
|
|
55
55
|
private _focusMonitor;
|
|
56
|
+
private _idGenerator;
|
|
56
57
|
private _checked;
|
|
57
58
|
/**
|
|
58
59
|
* Attached to the aria-label attribute of the host element. In most cases, aria-labelledby will
|
|
@@ -150,7 +151,7 @@ export declare interface MatButtonToggleDefaultOptions {
|
|
|
150
151
|
* setting an appearance on a button toggle or group.
|
|
151
152
|
*/
|
|
152
153
|
appearance?: MatButtonToggleAppearance;
|
|
153
|
-
/**
|
|
154
|
+
/** Whether icon indicators should be hidden for single-selection button toggle groups. */
|
|
154
155
|
hideSingleSelectionIndicator?: boolean;
|
|
155
156
|
/** Whether icon indicators should be hidden for multiple-selection button toggle groups. */
|
|
156
157
|
hideMultipleSelectionIndicator?: boolean;
|
package/core/m2/_theming.scss
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use 'sass:list';
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
@use 'sass:meta';
|
|
4
|
+
@use 'sass:color';
|
|
4
5
|
@use '../theming/theming';
|
|
5
6
|
@use './palette';
|
|
6
7
|
|
|
@@ -82,7 +83,7 @@
|
|
|
82
83
|
@return $color;
|
|
83
84
|
}
|
|
84
85
|
|
|
85
|
-
@return rgba($color, if($opacity == null, opacity($color), $opacity));
|
|
86
|
+
@return rgba($color, if($opacity == null, color.opacity($color), $opacity));
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
// Validates the specified theme by ensuring that the optional color config defines
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
@use 'sass:math';
|
|
4
4
|
@use 'sass:meta';
|
|
5
|
+
@use 'sass:color';
|
|
5
6
|
|
|
6
7
|
// Whether to enable compatibility with legacy methods for accessing theme information.
|
|
7
8
|
$theme-legacy-inspection-api-compatibility: true !default;
|
|
@@ -332,7 +333,7 @@ $private-internal-name: _mat-theming-internals-do-not-access;
|
|
|
332
333
|
// We convert the rgba color into a solid one by taking the opacity from the rgba
|
|
333
334
|
// value and using it to determine the percentage of the background to put
|
|
334
335
|
// into foreground when mixing the colors together.
|
|
335
|
-
@return mix($background-color, rgba($color, 1), (1 - opacity($color)) * 100%);
|
|
336
|
+
@return color.mix($background-color, rgba($color, 1), (1 - color.opacity($color)) * 100%);
|
|
336
337
|
}
|
|
337
338
|
|
|
338
339
|
// Clamps the density scale to a number between the given min and max.
|
|
@@ -130,7 +130,7 @@ $_cached-token-slots: null;
|
|
|
130
130
|
@function create-map($keys, $prefix) {
|
|
131
131
|
$result: ();
|
|
132
132
|
@each $key in $keys {
|
|
133
|
-
$result: map
|
|
133
|
+
$result: map.merge($result, ($key: var(--#{$prefix}-#{$key})));
|
|
134
134
|
}
|
|
135
135
|
@return $result;
|
|
136
136
|
}
|
|
@@ -191,8 +191,8 @@ $_cached-token-slots: null;
|
|
|
191
191
|
'tertiary-fixed',
|
|
192
192
|
'tertiary-fixed-dim'
|
|
193
193
|
);
|
|
194
|
-
@return map
|
|
195
|
-
|
|
194
|
+
@return map.merge(create-map($keys, $prefix), (
|
|
195
|
+
shadow: map.get($mdc-sys-color, shadow)
|
|
196
196
|
));
|
|
197
197
|
}
|
|
198
198
|
|
|
@@ -124,11 +124,12 @@ $_system-fallbacks: null;
|
|
|
124
124
|
/// Maps the values in a map to new values using the given mapping function
|
|
125
125
|
/// @param {Map} $map The maps whose values will be mapped to new values.
|
|
126
126
|
/// @param {Function} $fn The value mapping function.
|
|
127
|
-
/// @param {
|
|
128
|
-
@
|
|
127
|
+
/// @param {ArgList} $args Additional arguments to pass to the mapping function.
|
|
128
|
+
/// @return {Map} A new map with its values updated using the mapping function.
|
|
129
|
+
@function map-values($map, $fn, $args...) {
|
|
129
130
|
$result: ();
|
|
130
131
|
@each $key, $value in $map {
|
|
131
|
-
$result: map.set($result, $key, meta.call($fn, $value));
|
|
132
|
+
$result: map.set($result, $key, meta.call($fn, $value, $args...));
|
|
132
133
|
}
|
|
133
134
|
@return $result;
|
|
134
135
|
}
|
|
@@ -56,7 +56,7 @@ $prefix: (mat, badge);
|
|
|
56
56
|
// the value to determine the percentage of the background to put into foreground when
|
|
57
57
|
// mixing the colors together.
|
|
58
58
|
@if (meta.type-of($disabled-background) == color and meta.type-of($app-background) == color) {
|
|
59
|
-
$badge-opacity: opacity($disabled-background);
|
|
59
|
+
$badge-opacity: color.opacity($disabled-background);
|
|
60
60
|
$disabled-background: color.mix($app-background,
|
|
61
61
|
rgba($disabled-background, 1), (1 - $badge-opacity) * 100%);
|
|
62
62
|
}
|
|
@@ -60,7 +60,7 @@ $private-default-overlap-color: #a8dab5;
|
|
|
60
60
|
// for a solid border, but because we're using a dashed border for the
|
|
61
61
|
// preview range, we need to bump its opacity to ensure that it's visible.
|
|
62
62
|
@if meta.type-of($preview-outline-color) == color {
|
|
63
|
-
$preview-outline-opacity: math.min(opacity($preview-outline-color) * 2, 1);
|
|
63
|
+
$preview-outline-opacity: math.min(color.opacity($preview-outline-color) * 2, 1);
|
|
64
64
|
$preview-outline-color: rgba($preview-outline-color, $preview-outline-opacity);
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use '../../token-definition';
|
|
2
2
|
@use '../../../theming/inspection';
|
|
3
3
|
@use '../../../style/sass-utils';
|
|
4
|
+
@use '../../../style/elevation';
|
|
4
5
|
|
|
5
6
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
7
|
$prefix: (mat, menu);
|
|
@@ -18,9 +19,10 @@ $prefix: (mat, menu);
|
|
|
18
19
|
item-trailing-spacing: 16px,
|
|
19
20
|
item-with-icon-leading-spacing: 16px,
|
|
20
21
|
item-with-icon-trailing-spacing: 16px,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
container-elevation-shadow: elevation.get-box-shadow(8),
|
|
23
|
+
|
|
24
|
+
// Unused
|
|
25
|
+
base-elevation-level: null,
|
|
24
26
|
);
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -26,7 +26,7 @@ $prefix: (mat, sort);
|
|
|
26
26
|
// when mixing the colors together. Otherwise, if it resolves to something different
|
|
27
27
|
// (e.g. it resolves to a CSS variable), we use the color directly.
|
|
28
28
|
@if (meta.type-of($table-background) == color and meta.type-of($text-color) == color) {
|
|
29
|
-
$text-opacity: opacity($text-color);
|
|
29
|
+
$text-opacity: color.opacity($text-color);
|
|
30
30
|
$arrow-color: color.mix($table-background, rgba($text-color, 1), (1 - $text-opacity) * 100%);
|
|
31
31
|
}
|
|
32
32
|
@else {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../../../style/sass-utils';
|
|
3
3
|
@use '../../token-definition';
|
|
4
|
+
@use '../../../style/elevation';
|
|
4
5
|
|
|
5
6
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
6
7
|
$prefix: (mat, menu);
|
|
@@ -35,9 +36,11 @@ $prefix: (mat, menu);
|
|
|
35
36
|
item-with-icon-leading-spacing: token-definition.hardcode(12px, $exclude-hardcoded),
|
|
36
37
|
item-with-icon-trailing-spacing: token-definition.hardcode(12px, $exclude-hardcoded),
|
|
37
38
|
container-color: map.get($systems, md-sys-color, surface-container),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
container-elevation-shadow: token-definition.hardcode(
|
|
40
|
+
elevation.get-box-shadow(2), $exclude-hardcoded),
|
|
41
|
+
|
|
42
|
+
// Unused
|
|
43
|
+
base-elevation-level: null,
|
|
41
44
|
)
|
|
42
45
|
);
|
|
43
46
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use 'sass:meta';
|
|
3
|
-
@use 'sass:list';
|
|
4
3
|
@use '../../token-definition';
|
|
5
4
|
|
|
6
5
|
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
@@ -34,8 +33,8 @@ $prefix: (mdc, filled-text-field);
|
|
|
34
33
|
);
|
|
35
34
|
|
|
36
35
|
@return token-definition.namespace-tokens($prefix, (
|
|
37
|
-
_fix-tokens($mdc-tokens),
|
|
38
|
-
token-definition.map-values($variant-tokens, meta.get-function(_fix-tokens))
|
|
36
|
+
_fix-tokens($mdc-tokens, $systems),
|
|
37
|
+
token-definition.map-values($variant-tokens, meta.get-function(_fix-tokens), $systems)
|
|
39
38
|
), $token-slots);
|
|
40
39
|
}
|
|
41
40
|
|
|
@@ -43,8 +42,9 @@ $prefix: (mdc, filled-text-field);
|
|
|
43
42
|
/// Fixes inconsistent values in the filled text field tokens so that they can produce valid
|
|
44
43
|
/// styles.
|
|
45
44
|
/// @param {Map} $initial-tokens Map of filled text field tokens currently being generated.
|
|
45
|
+
/// @param {Map} $systems The MDC system tokens
|
|
46
46
|
/// @return {Map} The given tokens, with the invalid values replaced with valid ones.
|
|
47
|
-
@function _fix-tokens($initial-tokens) {
|
|
47
|
+
@function _fix-tokens($initial-tokens, $systems) {
|
|
48
48
|
// Need to get the hardcoded values, because they include opacities that are used for the disabled
|
|
49
49
|
// state.
|
|
50
50
|
$hardcoded-tokens: token-definition.get-mdc-tokens('filled-text-field', (), false);
|
|
@@ -80,13 +80,11 @@ $prefix: (mdc, filled-text-field);
|
|
|
80
80
|
)
|
|
81
81
|
));
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
//
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
@if meta.type-of($container-shape) == 'list' {
|
|
89
|
-
$tokens: map.set($tokens, container-shape, list.nth($container-shape, 1));
|
|
83
|
+
// The system tokens have this set as `corner-extra-small-top` which assumes that the value will
|
|
84
|
+
// be set as a `border-radius`, however we set it as `border-top-left-radius` and
|
|
85
|
+
// `border-top-right-radius`. Changing it at this point will be breaking so instead we remap it.
|
|
86
|
+
@if (map.get($tokens, container-shape)) {
|
|
87
|
+
$tokens: map.set($tokens, container-shape, map.get($systems, md-sys-shape, corner-extra-small));
|
|
90
88
|
}
|
|
91
89
|
|
|
92
90
|
@return $tokens;
|
package/datepicker/index.d.ts
CHANGED
|
@@ -454,6 +454,10 @@ export declare class MatCalendarBody<D = any> implements OnChanges, OnDestroy, A
|
|
|
454
454
|
_cellPadding: string;
|
|
455
455
|
/** Width of an individual cell. */
|
|
456
456
|
_cellWidth: string;
|
|
457
|
+
/** ID for the start date label. */
|
|
458
|
+
_startDateLabelId: string;
|
|
459
|
+
/** ID for the end date label. */
|
|
460
|
+
_endDateLabelId: string;
|
|
457
461
|
private _didDragSinceMouseDown;
|
|
458
462
|
private _injector;
|
|
459
463
|
/**
|
|
@@ -554,9 +558,6 @@ export declare class MatCalendarBody<D = any> implements OnChanges, OnDestroy, A
|
|
|
554
558
|
private _touchendHandler;
|
|
555
559
|
/** Finds the MatCalendarCell that corresponds to a DOM node. */
|
|
556
560
|
private _getCellFromElement;
|
|
557
|
-
private _id;
|
|
558
|
-
_startDateLabelId: string;
|
|
559
|
-
_endDateLabelId: string;
|
|
560
561
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatCalendarBody<any>, never>;
|
|
561
562
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatCalendarBody<any>, "[mat-calendar-body]", ["matCalendarBody"], { "label": { "alias": "label"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "todayValue": { "alias": "todayValue"; "required": false; }; "startValue": { "alias": "startValue"; "required": false; }; "endValue": { "alias": "endValue"; "required": false; }; "labelMinRequiredCells": { "alias": "labelMinRequiredCells"; "required": false; }; "numCols": { "alias": "numCols"; "required": false; }; "activeCell": { "alias": "activeCell"; "required": false; }; "isRange": { "alias": "isRange"; "required": false; }; "cellAspectRatio": { "alias": "cellAspectRatio"; "required": false; }; "comparisonStart": { "alias": "comparisonStart"; "required": false; }; "comparisonEnd": { "alias": "comparisonEnd"; "required": false; }; "previewStart": { "alias": "previewStart"; "required": false; }; "previewEnd": { "alias": "previewEnd"; "required": false; }; "startDateAccessibleName": { "alias": "startDateAccessibleName"; "required": false; }; "endDateAccessibleName": { "alias": "endDateAccessibleName"; "required": false; }; }, { "selectedValueChange": "selectedValueChange"; "previewChange": "previewChange"; "activeDateChange": "activeDateChange"; "dragStarted": "dragStarted"; "dragEnded": "dragEnded"; }, never, never, true, never>;
|
|
562
563
|
}
|
|
@@ -620,7 +621,6 @@ export declare class MatCalendarHeader<D> {
|
|
|
620
621
|
* for the minimum year, and the second string is the formatted label for the maximum year.
|
|
621
622
|
*/
|
|
622
623
|
private _formatMinAndMaxYearLabels;
|
|
623
|
-
private _id;
|
|
624
624
|
_periodButtonLabelId: string;
|
|
625
625
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatCalendarHeader<any>, never>;
|
|
626
626
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatCalendarHeader<any>, "mat-calendar-header", ["matCalendarHeader"], {}, {}, never, ["*"], true, never>;
|
package/dialog/index.d.ts
CHANGED
|
@@ -125,6 +125,7 @@ export declare class MatDialog implements OnDestroy {
|
|
|
125
125
|
private _defaultOptions;
|
|
126
126
|
private _scrollStrategy;
|
|
127
127
|
private _parentDialog;
|
|
128
|
+
private _idGenerator;
|
|
128
129
|
protected _dialog: Dialog;
|
|
129
130
|
private readonly _openDialogsAtThisLevel;
|
|
130
131
|
private readonly _afterAllClosedAtThisLevel;
|
|
@@ -4,7 +4,7 @@ import { MAT_OPTION_PARENT_COMPONENT, MatOption, MAT_OPTGROUP, MatOptionSelectio
|
|
|
4
4
|
export { MatOptgroup, MatOption } from '@angular/material/core';
|
|
5
5
|
import { ViewportRuler, CdkScrollableModule } from '@angular/cdk/scrolling';
|
|
6
6
|
import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
7
|
-
import { ActiveDescendantKeyManager, removeAriaReferencedId, addAriaReferencedId } from '@angular/cdk/a11y';
|
|
7
|
+
import { _IdGenerator, ActiveDescendantKeyManager, removeAriaReferencedId, addAriaReferencedId } from '@angular/cdk/a11y';
|
|
8
8
|
import { Platform, _getEventTarget } from '@angular/cdk/platform';
|
|
9
9
|
import { trigger, state, style, transition, group, animate } from '@angular/animations';
|
|
10
10
|
import { Subscription, Subject, merge, of, defer, fromEvent, Observable } from 'rxjs';
|
|
@@ -33,11 +33,6 @@ const panelAnimation = trigger('panelAnimation', [
|
|
|
33
33
|
transition(':leave, visible => hidden', [animate('0.075s linear', style({ opacity: 0 }))]),
|
|
34
34
|
]);
|
|
35
35
|
|
|
36
|
-
/**
|
|
37
|
-
* Autocomplete IDs need to be unique across components, so this counter exists outside of
|
|
38
|
-
* the component definition.
|
|
39
|
-
*/
|
|
40
|
-
let _uniqueAutocompleteIdCounter = 0;
|
|
41
36
|
/** Event object that is emitted when an autocomplete option is selected. */
|
|
42
37
|
class MatAutocompleteSelectedEvent {
|
|
43
38
|
source;
|
|
@@ -164,7 +159,7 @@ class MatAutocomplete {
|
|
|
164
159
|
}
|
|
165
160
|
}
|
|
166
161
|
/** Unique ID to be used by autocomplete trigger's "aria-owns" property. */
|
|
167
|
-
id =
|
|
162
|
+
id = inject(_IdGenerator).getId('mat-autocomplete-');
|
|
168
163
|
/**
|
|
169
164
|
* Tells any descendant `mat-optgroup` to use the inert a11y pattern.
|
|
170
165
|
* @docs-private
|
|
@@ -247,10 +242,10 @@ class MatAutocomplete {
|
|
|
247
242
|
_skipPredicate() {
|
|
248
243
|
return false;
|
|
249
244
|
}
|
|
250
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-
|
|
251
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.0.0-
|
|
245
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocomplete, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
246
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.0.0-rc.0", type: MatAutocomplete, isStandalone: true, selector: "mat-autocomplete", inputs: { ariaLabel: ["aria-label", "ariaLabel"], ariaLabelledby: ["aria-labelledby", "ariaLabelledby"], displayWith: "displayWith", autoActiveFirstOption: ["autoActiveFirstOption", "autoActiveFirstOption", booleanAttribute], autoSelectActiveOption: ["autoSelectActiveOption", "autoSelectActiveOption", booleanAttribute], requireSelection: ["requireSelection", "requireSelection", booleanAttribute], panelWidth: "panelWidth", disableRipple: ["disableRipple", "disableRipple", booleanAttribute], classList: ["class", "classList"], hideSingleSelectionIndicator: ["hideSingleSelectionIndicator", "hideSingleSelectionIndicator", booleanAttribute] }, outputs: { optionSelected: "optionSelected", opened: "opened", closed: "closed", optionActivated: "optionActivated" }, host: { classAttribute: "mat-mdc-autocomplete" }, providers: [{ provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatAutocomplete }], queries: [{ propertyName: "options", predicate: MatOption, descendants: true }, { propertyName: "optionGroups", predicate: MAT_OPTGROUP, descendants: true }], viewQueries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, static: true }, { propertyName: "panel", first: true, predicate: ["panel"], descendants: true }], exportAs: ["matAutocomplete"], ngImport: i0, template: "<ng-template let-formFieldId=\"id\">\n <div\n class=\"mat-mdc-autocomplete-panel mdc-menu-surface mdc-menu-surface--open\"\n role=\"listbox\"\n [id]=\"id\"\n [class]=\"_classList\"\n [class.mat-mdc-autocomplete-visible]=\"showPanel\"\n [class.mat-mdc-autocomplete-hidden]=\"!showPanel\"\n [class.mat-primary]=\"_color === 'primary'\"\n [class.mat-accent]=\"_color === 'accent'\"\n [class.mat-warn]=\"_color === 'warn'\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby(formFieldId)\"\n [@panelAnimation]=\"isOpen ? 'visible' : 'hidden'\"\n (@panelAnimation.done)=\"_animationDone.next($event)\"\n #panel>\n <ng-content></ng-content>\n </div>\n</ng-template>\n", styles: ["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"], animations: [panelAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
252
247
|
}
|
|
253
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
248
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocomplete, decorators: [{
|
|
254
249
|
type: Component,
|
|
255
250
|
args: [{ selector: 'mat-autocomplete', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'matAutocomplete', host: {
|
|
256
251
|
'class': 'mat-mdc-autocomplete',
|
|
@@ -312,10 +307,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
312
307
|
class MatAutocompleteOrigin {
|
|
313
308
|
elementRef = inject(ElementRef);
|
|
314
309
|
constructor() { }
|
|
315
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-
|
|
316
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-
|
|
310
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteOrigin, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
311
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0-rc.0", type: MatAutocompleteOrigin, isStandalone: true, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"], ngImport: i0 });
|
|
317
312
|
}
|
|
318
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
313
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteOrigin, decorators: [{
|
|
319
314
|
type: Directive,
|
|
320
315
|
args: [{
|
|
321
316
|
selector: '[matAutocompleteOrigin]',
|
|
@@ -1162,10 +1157,10 @@ class MatAutocompleteTrigger {
|
|
|
1162
1157
|
this._trackedModal = null;
|
|
1163
1158
|
}
|
|
1164
1159
|
}
|
|
1165
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-
|
|
1166
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.0-
|
|
1160
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
1161
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.0.0-rc.0", type: MatAutocompleteTrigger, isStandalone: true, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: { autocomplete: ["matAutocomplete", "autocomplete"], position: ["matAutocompletePosition", "position"], connectedTo: ["matAutocompleteConnectedTo", "connectedTo"], autocompleteAttribute: ["autocomplete", "autocompleteAttribute"], autocompleteDisabled: ["matAutocompleteDisabled", "autocompleteDisabled", booleanAttribute] }, host: { listeners: { "focusin": "_handleFocus()", "blur": "_onTouched()", "input": "_handleInput($event)", "keydown": "_handleKeydown($event)", "click": "_handleClick()" }, properties: { "attr.autocomplete": "autocompleteAttribute", "attr.role": "autocompleteDisabled ? null : \"combobox\"", "attr.aria-autocomplete": "autocompleteDisabled ? null : \"list\"", "attr.aria-activedescendant": "(panelOpen && activeOption) ? activeOption.id : null", "attr.aria-expanded": "autocompleteDisabled ? null : panelOpen.toString()", "attr.aria-controls": "(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id", "attr.aria-haspopup": "autocompleteDisabled ? null : \"listbox\"" }, classAttribute: "mat-mdc-autocomplete-trigger" }, providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR], exportAs: ["matAutocompleteTrigger"], usesOnChanges: true, ngImport: i0 });
|
|
1167
1162
|
}
|
|
1168
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
1163
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteTrigger, decorators: [{
|
|
1169
1164
|
type: Directive,
|
|
1170
1165
|
args: [{
|
|
1171
1166
|
selector: `input[matAutocomplete], textarea[matAutocomplete]`,
|
|
@@ -1207,8 +1202,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-next.10",
|
|
|
1207
1202
|
}] } });
|
|
1208
1203
|
|
|
1209
1204
|
class MatAutocompleteModule {
|
|
1210
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-
|
|
1211
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-
|
|
1205
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1206
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteModule, imports: [OverlayModule,
|
|
1212
1207
|
MatOptionModule,
|
|
1213
1208
|
MatCommonModule,
|
|
1214
1209
|
MatAutocomplete,
|
|
@@ -1219,13 +1214,13 @@ class MatAutocompleteModule {
|
|
|
1219
1214
|
MatCommonModule,
|
|
1220
1215
|
MatAutocompleteTrigger,
|
|
1221
1216
|
MatAutocompleteOrigin] });
|
|
1222
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-
|
|
1217
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteModule, providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [OverlayModule,
|
|
1223
1218
|
MatOptionModule,
|
|
1224
1219
|
MatCommonModule, CdkScrollableModule,
|
|
1225
1220
|
MatOptionModule,
|
|
1226
1221
|
MatCommonModule] });
|
|
1227
1222
|
}
|
|
1228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-
|
|
1223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0-rc.0", ngImport: i0, type: MatAutocompleteModule, decorators: [{
|
|
1229
1224
|
type: NgModule,
|
|
1230
1225
|
args: [{
|
|
1231
1226
|
imports: [
|