@angular/material 20.2.0-rc.0 → 21.0.0-next.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/_index.scss +1 -0
- package/button/_m2-button.scss +6 -0
- package/button/_m2-fab.scss +3 -0
- package/button/_m2-icon-button.scss +1 -0
- package/button/_m3-button.scss +6 -0
- package/button/_m3-fab.scss +3 -0
- package/button/_m3-icon-button.scss +1 -0
- package/checkbox/_m2-checkbox.scss +1 -0
- package/checkbox/_m3-checkbox.scss +1 -0
- package/core/tokens/_classes.scss +415 -0
- package/divider/_m3-divider.scss +1 -1
- package/fesm2022/animation.mjs.map +1 -1
- package/fesm2022/autocomplete/testing.mjs.map +1 -1
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/badge/testing.mjs.map +1 -1
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/bottom-sheet/testing.mjs.map +1 -1
- package/fesm2022/bottom-sheet.mjs.map +1 -1
- package/fesm2022/button/testing.mjs.map +1 -1
- package/fesm2022/button-toggle/testing.mjs.map +1 -1
- package/fesm2022/button-toggle.mjs.map +1 -1
- package/fesm2022/button.mjs +6 -6
- package/fesm2022/button.mjs.map +1 -1
- package/fesm2022/card/testing.mjs.map +1 -1
- package/fesm2022/card.mjs.map +1 -1
- package/fesm2022/checkbox/testing.mjs.map +1 -1
- package/fesm2022/checkbox.mjs +2 -2
- package/fesm2022/checkbox.mjs.map +1 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/common-module.mjs.map +1 -1
- package/fesm2022/core/testing.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/date-formats.mjs.map +1 -1
- package/fesm2022/date-range-input-harness.mjs.map +1 -1
- package/fesm2022/datepicker/testing.mjs.map +1 -1
- package/fesm2022/datepicker.mjs.map +1 -1
- package/fesm2022/dialog/testing.mjs.map +1 -1
- package/fesm2022/dialog-module.mjs.map +1 -1
- package/fesm2022/dialog.mjs.map +1 -1
- package/fesm2022/divider/testing.mjs.map +1 -1
- package/fesm2022/divider.mjs +2 -2
- package/fesm2022/divider.mjs.map +1 -1
- package/fesm2022/error-options.mjs.map +1 -1
- package/fesm2022/error-state.mjs.map +1 -1
- package/fesm2022/expansion/testing.mjs.map +1 -1
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/form-field/testing/control.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs.map +1 -1
- package/fesm2022/form-field-module.mjs.map +1 -1
- package/fesm2022/form-field.mjs.map +1 -1
- package/fesm2022/form-field2.mjs.map +1 -1
- package/fesm2022/grid-list/testing.mjs.map +1 -1
- package/fesm2022/grid-list.mjs.map +1 -1
- package/fesm2022/icon/testing.mjs.map +1 -1
- package/fesm2022/icon-button.mjs +2 -2
- package/fesm2022/icon-button.mjs.map +1 -1
- package/fesm2022/icon-registry.mjs.map +1 -1
- package/fesm2022/icon.mjs.map +1 -1
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/input-harness.mjs.map +1 -1
- package/fesm2022/input-value-accessor.mjs.map +1 -1
- package/fesm2022/input.mjs.map +1 -1
- package/fesm2022/internal-form-field.mjs.map +1 -1
- package/fesm2022/line.mjs.map +1 -1
- package/fesm2022/list/testing.mjs.map +1 -1
- package/fesm2022/list.mjs.map +1 -1
- package/fesm2022/material.mjs.map +1 -1
- package/fesm2022/menu/testing.mjs.map +1 -1
- package/fesm2022/menu.mjs +7 -1
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/option-harness.mjs.map +1 -1
- package/fesm2022/option-module.mjs.map +1 -1
- package/fesm2022/option.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/paginator.mjs +2 -2
- package/fesm2022/paginator.mjs.map +1 -1
- package/fesm2022/progress-bar/testing.mjs.map +1 -1
- package/fesm2022/progress-bar.mjs.map +1 -1
- package/fesm2022/progress-spinner/testing.mjs.map +1 -1
- package/fesm2022/progress-spinner.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox-module.mjs.map +1 -1
- package/fesm2022/pseudo-checkbox.mjs.map +1 -1
- package/fesm2022/public-api.mjs.map +1 -1
- package/fesm2022/radio/testing.mjs.map +1 -1
- package/fesm2022/radio.mjs +2 -2
- package/fesm2022/radio.mjs.map +1 -1
- package/fesm2022/ripple-loader.mjs.map +1 -1
- package/fesm2022/ripple-module.mjs.map +1 -1
- package/fesm2022/ripple.mjs.map +1 -1
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/select-module.mjs.map +1 -1
- package/fesm2022/select.mjs.map +1 -1
- package/fesm2022/sidenav/testing.mjs.map +1 -1
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/slide-toggle/testing.mjs.map +1 -1
- package/fesm2022/slide-toggle.mjs +2 -2
- package/fesm2022/slide-toggle.mjs.map +1 -1
- package/fesm2022/slider/testing.mjs.map +1 -1
- package/fesm2022/slider.mjs.map +1 -1
- package/fesm2022/snack-bar/testing.mjs.map +1 -1
- package/fesm2022/snack-bar.mjs.map +1 -1
- package/fesm2022/sort/testing.mjs.map +1 -1
- package/fesm2022/sort.mjs.map +1 -1
- package/fesm2022/stepper/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs.map +1 -1
- package/fesm2022/structural-styles.mjs.map +1 -1
- package/fesm2022/table/testing.mjs.map +1 -1
- package/fesm2022/table.mjs.map +1 -1
- package/fesm2022/tabs/testing.mjs.map +1 -1
- package/fesm2022/tabs.mjs.map +1 -1
- package/fesm2022/timepicker/testing.mjs.map +1 -1
- package/fesm2022/timepicker.mjs.map +1 -1
- package/fesm2022/toolbar/testing.mjs.map +1 -1
- package/fesm2022/toolbar.mjs.map +1 -1
- package/fesm2022/tooltip/testing.mjs.map +1 -1
- package/fesm2022/tooltip-module.mjs.map +1 -1
- package/fesm2022/tooltip.mjs.map +1 -1
- package/fesm2022/tree/testing.mjs.map +1 -1
- package/fesm2022/tree.mjs.map +1 -1
- package/package.json +6 -6
- package/paginator/_m2-paginator.scss +4 -1
- package/paginator/_m3-paginator.scss +4 -1
- 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/radio/_m2-radio.scss +1 -0
- package/radio/_m3-radio.scss +1 -0
- package/schematics/migration.json +4 -4
- package/schematics/ng-add/index.js +2 -2
- package/schematics/ng-update/index_bundled.js +4 -6684
- package/schematics/ng-update/index_bundled.js.map +3 -3
- package/slide-toggle/_m2-slide-toggle.scss +1 -0
- package/slide-toggle/_m3-slide-toggle.scss +1 -0
package/_index.scss
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
@forward 'core/tokens/system' show system-level-colors,
|
|
21
21
|
system-level-typography, system-level-elevation, system-level-shape,
|
|
22
22
|
system-level-motion, system-level-state, theme, theme-overrides, m2-theme;
|
|
23
|
+
@forward 'core/tokens/classes' show utility-classes;
|
|
23
24
|
|
|
24
25
|
// Private/Internal
|
|
25
26
|
@forward './core/density/private/all-density' show all-component-densities;
|
package/button/_m2-button.scss
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
-3: 24px,
|
|
18
18
|
), $scale);
|
|
19
19
|
$touch-target-display: if($scale < -1, none, block);
|
|
20
|
+
$touch-target-size: 48px;
|
|
20
21
|
|
|
21
22
|
@return (
|
|
22
23
|
base: (
|
|
@@ -24,12 +25,14 @@
|
|
|
24
25
|
button-filled-horizontal-padding: 16px,
|
|
25
26
|
button-filled-icon-offset: -4px,
|
|
26
27
|
button-filled-icon-spacing: 8px,
|
|
28
|
+
button-filled-touch-target-size: $touch-target-size,
|
|
27
29
|
button-outlined-container-shape: 4px,
|
|
28
30
|
button-outlined-horizontal-padding: 15px, // Normally it's 16px, but -1px for the outline.
|
|
29
31
|
button-outlined-icon-offset: -4px,
|
|
30
32
|
button-outlined-icon-spacing: 8px,
|
|
31
33
|
button-outlined-keep-touch-target: false,
|
|
32
34
|
button-outlined-outline-width: 1px,
|
|
35
|
+
button-outlined-touch-target-size: $touch-target-size,
|
|
33
36
|
button-protected-container-elevation-shadow: elevation.get-box-shadow(2),
|
|
34
37
|
button-protected-container-shape: 4px,
|
|
35
38
|
button-protected-disabled-container-elevation-shadow: elevation.get-box-shadow(0),
|
|
@@ -39,15 +42,18 @@
|
|
|
39
42
|
button-protected-icon-offset: -4px,
|
|
40
43
|
button-protected-icon-spacing: 8px,
|
|
41
44
|
button-protected-pressed-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
45
|
+
button-protected-touch-target-size: $touch-target-size,
|
|
42
46
|
button-text-container-shape: 4px,
|
|
43
47
|
button-text-horizontal-padding: 8px,
|
|
44
48
|
button-text-icon-offset: 0,
|
|
45
49
|
button-text-icon-spacing: 8px,
|
|
46
50
|
button-text-with-icon-horizontal-padding: 8px,
|
|
51
|
+
button-text-touch-target-size: $touch-target-size,
|
|
47
52
|
button-tonal-container-shape: 4px,
|
|
48
53
|
button-tonal-horizontal-padding: 16px,
|
|
49
54
|
button-tonal-icon-offset: -4px,
|
|
50
55
|
button-tonal-icon-spacing: 8px,
|
|
56
|
+
button-tonal-touch-target-size: $touch-target-size,
|
|
51
57
|
),
|
|
52
58
|
color: (
|
|
53
59
|
button-filled-container-color: map.get($system, surface),
|
package/button/_m2-fab.scss
CHANGED
|
@@ -16,11 +16,13 @@
|
|
|
16
16
|
$disabled: m3-utils.color-with-opacity(map.get($system, on-surface), 38%);
|
|
17
17
|
$disabled-container : m3-utils.color-with-opacity(map.get($system, on-surface), 12%);
|
|
18
18
|
$density-scale: theming.clamp-density(map.get($system, density-scale), -3);
|
|
19
|
+
$touch-target-size: 48px;
|
|
19
20
|
|
|
20
21
|
@return (
|
|
21
22
|
base: (
|
|
22
23
|
fab-container-elevation-shadow: elevation.get-box-shadow(6),
|
|
23
24
|
fab-container-shape: 50%,
|
|
25
|
+
fab-touch-target-size: $touch-target-size,
|
|
24
26
|
fab-extended-container-elevation-shadow: elevation.get-box-shadow(6),
|
|
25
27
|
fab-extended-container-height: 48px,
|
|
26
28
|
fab-extended-container-shape: 24px,
|
|
@@ -32,6 +34,7 @@
|
|
|
32
34
|
fab-pressed-container-elevation-shadow: elevation.get-box-shadow(12),
|
|
33
35
|
fab-small-container-elevation-shadow: elevation.get-box-shadow(6),
|
|
34
36
|
fab-small-container-shape: 50%,
|
|
37
|
+
fab-small-touch-target-size: $touch-target-size,
|
|
35
38
|
fab-small-focus-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
36
39
|
fab-small-hover-container-elevation-shadow: elevation.get-box-shadow(8),
|
|
37
40
|
fab-small-pressed-container-elevation-shadow: elevation.get-box-shadow(12),
|
package/button/_m3-button.scss
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
/// Generates custom tokens for the button.
|
|
10
10
|
@function get-tokens($theme: m3.$sys-theme, $color-variant: null) {
|
|
11
11
|
$system: m3-utils.get-system($theme);
|
|
12
|
+
$touch-target-size: 48px;
|
|
12
13
|
@if $color-variant {
|
|
13
14
|
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
14
15
|
$system: m3-utils.replace-colors-with-variant($system, secondary, $color-variant);
|
|
@@ -21,28 +22,33 @@
|
|
|
21
22
|
button-filled-icon-offset: -8px,
|
|
22
23
|
button-filled-icon-spacing: 8px,
|
|
23
24
|
button-filled-label-text-transform: null,
|
|
25
|
+
button-filled-touch-target-size: $touch-target-size,
|
|
24
26
|
button-outlined-container-shape: map.get($system, corner-full),
|
|
25
27
|
button-outlined-horizontal-padding: 24px,
|
|
26
28
|
button-outlined-icon-offset: -8px,
|
|
27
29
|
button-outlined-icon-spacing: 8px,
|
|
28
30
|
button-outlined-outline-width: 1px,
|
|
29
31
|
button-outlined-label-text-transform: null,
|
|
32
|
+
button-outlined-touch-target-size: $touch-target-size,
|
|
30
33
|
button-protected-container-shape: map.get($system, corner-full),
|
|
31
34
|
button-protected-horizontal-padding: 24px,
|
|
32
35
|
button-protected-icon-offset: -8px,
|
|
33
36
|
button-protected-icon-spacing: 8px,
|
|
34
37
|
button-protected-label-text-transform: null,
|
|
38
|
+
button-protected-touch-target-size: $touch-target-size,
|
|
35
39
|
button-text-container-shape: map.get($system, corner-full),
|
|
36
40
|
button-text-horizontal-padding: 12px,
|
|
37
41
|
button-text-icon-offset: -4px,
|
|
38
42
|
button-text-icon-spacing: 8px,
|
|
39
43
|
button-text-with-icon-horizontal-padding: 16px,
|
|
40
44
|
button-text-label-text-transform: null,
|
|
45
|
+
button-text-touch-target-size: $touch-target-size,
|
|
41
46
|
button-tonal-container-shape: map.get($system, corner-full),
|
|
42
47
|
button-tonal-horizontal-padding: 24px,
|
|
43
48
|
button-tonal-icon-offset: -8px,
|
|
44
49
|
button-tonal-icon-spacing: 8px,
|
|
45
50
|
button-tonal-label-text-transform: null,
|
|
51
|
+
button-tonal-touch-target-size: $touch-target-size,
|
|
46
52
|
),
|
|
47
53
|
color: (
|
|
48
54
|
button-filled-container-color: map.get($system, primary),
|
package/button/_m3-fab.scss
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
/// Generates custom tokens for the mat-fab.
|
|
9
9
|
@function get-tokens($theme: m3.$sys-theme, $color-variant: null) {
|
|
10
10
|
$system: m3-utils.get-system($theme);
|
|
11
|
+
$touch-target-size: 48px;
|
|
11
12
|
@if $color-variant {
|
|
12
13
|
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
13
14
|
}
|
|
@@ -19,6 +20,8 @@
|
|
|
19
20
|
fab-extended-container-shape: map.get($system, corner-large),
|
|
20
21
|
fab-small-container-shape: map.get($system, corner-medium),
|
|
21
22
|
fab-touch-target-display: null,
|
|
23
|
+
fab-touch-target-size: $touch-target-size,
|
|
24
|
+
fab-small-touch-target-size: $touch-target-size,
|
|
22
25
|
),
|
|
23
26
|
color: (
|
|
24
27
|
fab-container-color: map.get($system, primary-container),
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
checkbox-unselected-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
18
18
|
checkbox-unselected-pressed-state-layer-opacity:
|
|
19
19
|
map.get($system, pressed-state-layer-opacity),
|
|
20
|
+
checkbox-touch-target-size: 48px,
|
|
20
21
|
),
|
|
21
22
|
color: private-get-color-palette-color-tokens($theme, secondary),
|
|
22
23
|
typography: (
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
checkbox-unselected-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
21
21
|
checkbox-unselected-pressed-state-layer-opacity:
|
|
22
22
|
map.get($system, pressed-state-layer-opacity),
|
|
23
|
+
checkbox-touch-target-size: 48px,
|
|
23
24
|
),
|
|
24
25
|
color: (
|
|
25
26
|
checkbox-disabled-label-color: m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
@@ -0,0 +1,415 @@
|
|
|
1
|
+
// Utility classes that can be used to style elements with the most commonly used tokens in
|
|
2
|
+
// Material Design. Includes color, typography, elevation, and shape.
|
|
3
|
+
// This API is experimental and may not release. Implemented for prototyping and testing.
|
|
4
|
+
// Use caution depending on this.
|
|
5
|
+
@mixin utility-classes() {
|
|
6
|
+
|
|
7
|
+
// ***********************************************************************************************
|
|
8
|
+
// Background
|
|
9
|
+
// ***********************************************************************************************
|
|
10
|
+
|
|
11
|
+
// Styles an element with a primary color background and applies an accessible contrasting
|
|
12
|
+
// color for text and icons. Use for key components across the UI, such as buttons that
|
|
13
|
+
// have greater importance on the page. In Angular Material, this is used for the selected
|
|
14
|
+
// date in a datepicker, the handle of a slider, and the background of a checkbox.
|
|
15
|
+
.mat-bg-primary {
|
|
16
|
+
background-color: var(--mat-sys-primary);
|
|
17
|
+
color: var(--mat-sys-on-primary);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// Styles an element with a primary container color background and applies an accessible
|
|
21
|
+
// contrasting color for text and icons. Use for filling components that should stand out
|
|
22
|
+
// on a surface. In Angular Material, this is used for
|
|
23
|
+
// the container of a floating action button.
|
|
24
|
+
.mat-bg-primary-container {
|
|
25
|
+
background-color: var(--mat-sys-primary-container);
|
|
26
|
+
color: var(--mat-sys-on-primary-container);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Styles an element with a secondary color background and applies an accessible contrasting
|
|
30
|
+
// color for text and icons. Use for less prominent components in the UI that have a different
|
|
31
|
+
// color scheme than the primary.
|
|
32
|
+
.mat-bg-secondary {
|
|
33
|
+
background-color: var(--mat-sys-secondary);
|
|
34
|
+
color: var(--mat-sys-on-secondary);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Styles an element with a secondary container color background and applies an accessible
|
|
38
|
+
// contrasting color for text and icons. Use for components that need less emphasis than
|
|
39
|
+
// secondary, such as filter chips. In Angular Material, this is used for selected items
|
|
40
|
+
// in a list and the container of a tonal button.
|
|
41
|
+
.mat-bg-secondary-container {
|
|
42
|
+
background-color: var(--mat-sys-secondary-container);
|
|
43
|
+
color: var(--mat-sys-on-secondary-container);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Styles an element with an error color background and applies an accessible contrasting
|
|
47
|
+
// color for text and icons. Use for indicating an error state, such as an invalid text field, or
|
|
48
|
+
// for the background of an important notification. In Angular Material, this is used for the
|
|
49
|
+
// background of a badge.
|
|
50
|
+
.mat-bg-error {
|
|
51
|
+
background-color: var(--mat-sys-error);
|
|
52
|
+
color: var(--mat-sys-on-error);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Styles an element with an error container color background and applies an accessible
|
|
56
|
+
// contrasting color for text and icons. Use for components that need less emphasis than
|
|
57
|
+
// error, such as a container for error text.
|
|
58
|
+
.mat-bg-error-container {
|
|
59
|
+
background-color: var(--mat-sys-error-container);
|
|
60
|
+
color: var(--mat-sys-on-error-container);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Styles an element with a surface color background and applies an accessible contrasting
|
|
64
|
+
// color for text and icons. Use for general surfaces of components. In Angular Material, this is
|
|
65
|
+
// used for the background of many components, like tables, dialogs, menus, and toolbars.
|
|
66
|
+
.mat-bg-surface {
|
|
67
|
+
background-color: var(--mat-sys-surface);
|
|
68
|
+
color: var(--mat-sys-on-surface);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Styles an element with a surface variant color background and applies an accessible
|
|
72
|
+
// contrasting color for text and icons. Use for surfaces that need to stand out from the
|
|
73
|
+
// main surface color. In Angular Material, this is used for the background of a filled
|
|
74
|
+
// form field and the track of a progress bar.
|
|
75
|
+
.mat-bg-surface-variant {
|
|
76
|
+
background-color: var(--mat-sys-surface-variant);
|
|
77
|
+
color: var(--mat-sys-on-surface-variant);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Styles an element with the "highest" surface container color background and applies an
|
|
81
|
+
// accessible contrasting color for text and icons. Use for surfaces that need the most
|
|
82
|
+
// emphasis against the main surface color. In Angular Material, this is used for the
|
|
83
|
+
// background of a filled card.
|
|
84
|
+
.mat-bg-surface-container-highest {
|
|
85
|
+
background-color: var(--mat-sys-surface-container-highest);
|
|
86
|
+
color: var(--mat-sys-on-surface);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// Styles an element with a "high" surface container color background and applies an accessible
|
|
90
|
+
// contrasting color for text and icons. Use for surfaces that need more emphasis against
|
|
91
|
+
// the main surface color. In Angular Material, this is used for the background of a datepicker.
|
|
92
|
+
.mat-bg-surface-container-high {
|
|
93
|
+
background-color: var(--mat-sys-surface-container-high);
|
|
94
|
+
color: var(--mat-sys-on-surface);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Styles an element with a surface container color background and applies an accessible
|
|
98
|
+
// contrasting color for text and icons. Use for surfaces that need to stand out from the
|
|
99
|
+
// main surface color. In Angular Material, this is used for the background of a menu.
|
|
100
|
+
.mat-bg-surface-container {
|
|
101
|
+
background-color: var(--mat-sys-surface-container);
|
|
102
|
+
color: var(--mat-sys-on-surface);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Styles an element with a "low" surface container color background and applies an accessible
|
|
106
|
+
// contrasting color for text and icons. Use for surfaces that need less emphasis against
|
|
107
|
+
// the main surface color. In Angular Material, this is used for the background of a bottom sheet.
|
|
108
|
+
.mat-bg-surface-container-low {
|
|
109
|
+
background-color: var(--mat-sys-surface-container-low);
|
|
110
|
+
color: var(--mat-sys-on-surface);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Styles an element with the "lowest" surface container color background and applies an
|
|
114
|
+
// accessible contrasting color for text and icons. Use for surfaces that need the least
|
|
115
|
+
// emphasis against the main surface color.
|
|
116
|
+
.mat-bg-surface-container-lowest {
|
|
117
|
+
background-color: var(--mat-sys-surface-container-lowest);
|
|
118
|
+
color: var(--mat-sys-on-surface);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Styles an element with an inverse surface color background and applies an accessible
|
|
122
|
+
// contrasting color for text and icons. Use for making elements stand out against the
|
|
123
|
+
// default color scheme. Good for temporary notifications. In Angular Material, this is used for
|
|
124
|
+
// the background of a snackbar and a tooltip.
|
|
125
|
+
.mat-bg-inverse-surface {
|
|
126
|
+
background-color: var(--mat-sys-inverse-surface);
|
|
127
|
+
color: var(--mat-sys-inverse-on-surface);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// Styles an element with a disabled color background and applies an accessible contrasting
|
|
131
|
+
// color for text and icons. Use for disabled components. In Angular Material, this is used
|
|
132
|
+
// for components generally filled with the primary color but are currently disabled.
|
|
133
|
+
.mat-bg-disabled {
|
|
134
|
+
color: color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent);
|
|
135
|
+
background-color: color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
// ***********************************************************************************************
|
|
140
|
+
// Text
|
|
141
|
+
// ***********************************************************************************************
|
|
142
|
+
|
|
143
|
+
// Styles the text of an element with the primary color. Use for text that needs to stand out.
|
|
144
|
+
// In Angular Material, this is used for the text of a text button and the selected tab label.
|
|
145
|
+
.mat-text-primary {
|
|
146
|
+
color: var(--mat-sys-primary);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Styles the text of an element with the secondary color. Use for text that needs less emphasis
|
|
150
|
+
// than primary text.
|
|
151
|
+
.mat-text-secondary {
|
|
152
|
+
color: var(--mat-sys-secondary);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Styles the text of an element with the error color. Use for text that indicates an error, such
|
|
156
|
+
// as validation messages. In Angular Material, this is used for the error text in a form field.
|
|
157
|
+
.mat-text-error {
|
|
158
|
+
color: var(--mat-sys-error);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Styles the text of an element with the disabled color. Use for text in disabled components.
|
|
162
|
+
// In Angular Material this is used to show text is disabled, generally on a "surface" background.
|
|
163
|
+
.mat-text-disabled {
|
|
164
|
+
color: color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
// ***********************************************************************************************
|
|
169
|
+
// Font
|
|
170
|
+
// ***********************************************************************************************
|
|
171
|
+
|
|
172
|
+
// Sets the font to the body small typeface. Use for small body text, such as captions. In Angular
|
|
173
|
+
// Material, this is used for the subscript text in a form field and the text in a paginator.
|
|
174
|
+
.mat-font-body-small {
|
|
175
|
+
font: var(--mat-sys-body-small);
|
|
176
|
+
letter-spacing: var(--mat-sys-body-small-tracking);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Sets the font to the body medium typeface. Use for medium body text, this is the default
|
|
180
|
+
// body font. In Angular Material, this is used for the text in a table row and the supporting
|
|
181
|
+
// text in a dialog.
|
|
182
|
+
.mat-font-body-medium {
|
|
183
|
+
font: var(--mat-sys-body-medium);
|
|
184
|
+
letter-spacing: var(--mat-sys-body-medium-tracking);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Sets the font to the body large typeface. Use for large body text, such as an introductory
|
|
188
|
+
// paragraph. In Angular Material, this is used for the text in a list item and the text in a
|
|
189
|
+
// select trigger.
|
|
190
|
+
.mat-font-body-large {
|
|
191
|
+
font: var(--mat-sys-body-large);
|
|
192
|
+
letter-spacing: var(--mat-sys-body-large-tracking);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// Sets the font to the display small typeface. Use for small display text, such as a date.
|
|
196
|
+
.mat-font-display-small {
|
|
197
|
+
font: var(--mat-sys-display-small);
|
|
198
|
+
letter-spacing: var(--mat-sys-display-small-tracking);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// Sets the font to the display medium typeface. Use for medium display text, such as a hero
|
|
202
|
+
// title.
|
|
203
|
+
.mat-font-display-medium {
|
|
204
|
+
font: var(--mat-sys-display-medium);
|
|
205
|
+
letter-spacing: var(--mat-sys-display-medium-tracking);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// Sets the font to the display large typeface. Use for large display text, such as a hero title.
|
|
209
|
+
.mat-font-display-large {
|
|
210
|
+
font: var(--mat-sys-display-large);
|
|
211
|
+
letter-spacing: var(--mat-sys-display-large-tracking);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// Sets the font to the headline small typeface. Use for small headlines, such as a page title. In
|
|
215
|
+
// Angular Material, this is used for the headline in a dialog.
|
|
216
|
+
.mat-font-headline-small {
|
|
217
|
+
font: var(--mat-sys-headline-small);
|
|
218
|
+
letter-spacing: var(--mat-sys-headline-small-tracking);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// Sets the font to the headline medium typeface. Use for medium headlines, such as a section
|
|
222
|
+
// title.
|
|
223
|
+
.mat-font-headline-medium {
|
|
224
|
+
font: var(--mat-sys-headline-medium);
|
|
225
|
+
letter-spacing: var(--mat-sys-headline-medium-tracking);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Sets the font to the headline large typeface. Use for large headlines, such as a page title on
|
|
229
|
+
// a large screen.
|
|
230
|
+
.mat-font-headline-large {
|
|
231
|
+
font: var(--mat-sys-headline-large);
|
|
232
|
+
letter-spacing: var(--mat-sys-headline-large-tracking);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// Sets the font to the title small typeface. Use for small titles, such as a card title. In
|
|
236
|
+
// Angular Material, this is used for the header of a table and the label of an option group.
|
|
237
|
+
.mat-font-title-small {
|
|
238
|
+
font: var(--mat-sys-title-small);
|
|
239
|
+
letter-spacing: var(--mat-sys-title-small-tracking);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// Sets the font to the title medium typeface. Use for medium titles, such as a dialog title
|
|
243
|
+
// or the primary text in a list item. In Angular Material, this is used for the subtitle
|
|
244
|
+
// of a card and the header of an expansion panel.
|
|
245
|
+
.mat-font-title-medium {
|
|
246
|
+
font: var(--mat-sys-title-medium);
|
|
247
|
+
letter-spacing: var(--mat-sys-title-medium-tracking);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// Sets the font to the title large typeface. Use for large titles, such as a page title on a
|
|
251
|
+
// small screen. In Angular Material, this is used for the title of a card and the title of a
|
|
252
|
+
// toolbar.
|
|
253
|
+
.mat-font-title-large {
|
|
254
|
+
font: var(--mat-sys-title-large);
|
|
255
|
+
letter-spacing: var(--mat-sys-title-large-tracking);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
// ***********************************************************************************************
|
|
260
|
+
// Corner
|
|
261
|
+
// ***********************************************************************************************
|
|
262
|
+
|
|
263
|
+
// Sets the border radius to extra small. Use for components that need a small amount of rounding,
|
|
264
|
+
// such as a chip. In Angular Material, this is used for the shape of a snackbar and a tooltip.
|
|
265
|
+
.mat-corner-extra-small {
|
|
266
|
+
border-radius: var(--mat-sys-corner-extra-small);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// Sets the border radius to small. Use for components that need a small amount of rounding, such
|
|
270
|
+
// as a text field.
|
|
271
|
+
.mat-corner-small {
|
|
272
|
+
border-radius: var(--mat-sys-corner-small);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// Sets the border radius to medium. Use for components that need a medium amount of rounding,
|
|
276
|
+
// such as a button. In Angular Material, this is used for the shape of a card.
|
|
277
|
+
.mat-corner-medium {
|
|
278
|
+
border-radius: var(--mat-sys-corner-medium);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// Sets the border radius to large. Use for components that need a large amount of rounding, such
|
|
282
|
+
// as a card. In Angular Material, this is used for the shape of a floating action button and a
|
|
283
|
+
// datepicker.
|
|
284
|
+
.mat-corner-large {
|
|
285
|
+
border-radius: var(--mat-sys-corner-large);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// Sets the border radius to extra large. Use for components that need a large amount of
|
|
289
|
+
// rounding. In Angular Material, this is used for the shape of a button toggle and the shape of
|
|
290
|
+
// a dialog.
|
|
291
|
+
.mat-corner-extra-large {
|
|
292
|
+
border-radius: var(--mat-sys-corner-extra-large);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
// Sets the border radius to full. Use for components that are circular, such as a user avatar.
|
|
296
|
+
// In Angular Material, this is used for the shape of a badge and the shape of a button.
|
|
297
|
+
.mat-corner-full {
|
|
298
|
+
border-radius: var(--mat-sys-corner-full);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
// ***********************************************************************************************
|
|
303
|
+
// Border
|
|
304
|
+
// ***********************************************************************************************
|
|
305
|
+
|
|
306
|
+
// Adds an outline to an element. Use for components that need a visible boundary. In Angular
|
|
307
|
+
// Material, this is used for the outline of an outlined button.
|
|
308
|
+
.mat-outline {
|
|
309
|
+
border: 1px solid var(--mat-sys-outline);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
// Adds a less prominent outline to an element. Use for components that need a less obvious
|
|
313
|
+
// boundary. In Angular Material, this is used for the outline of an outlined card and the color
|
|
314
|
+
// of the divider
|
|
315
|
+
.mat-outline-variant {
|
|
316
|
+
border: 1px solid var(--mat-sys-outline-variant);
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
// ***********************************************************************************************
|
|
321
|
+
// State
|
|
322
|
+
// ***********************************************************************************************
|
|
323
|
+
|
|
324
|
+
// Adds hover, focus, and active states to an element by applying varying shades of the surface
|
|
325
|
+
// color. Use for interactive components that are not based on a primary color.
|
|
326
|
+
.mat-stateful {
|
|
327
|
+
&:hover {
|
|
328
|
+
background: color-mix(
|
|
329
|
+
in srgb,
|
|
330
|
+
var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%),
|
|
331
|
+
transparent
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
&:focus {
|
|
336
|
+
background: color-mix(
|
|
337
|
+
in srgb,
|
|
338
|
+
var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%),
|
|
339
|
+
transparent
|
|
340
|
+
);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
&:active {
|
|
344
|
+
background: color-mix(
|
|
345
|
+
in srgb,
|
|
346
|
+
var(--mat-sys-on-surface) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%),
|
|
347
|
+
transparent
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
// Adds hover, focus, and active states to an element by applying varying shades of the primary
|
|
353
|
+
// color. Use for interactive components that are not based on a primary color.
|
|
354
|
+
.mat-stateful-primary {
|
|
355
|
+
&:hover {
|
|
356
|
+
background: color-mix(
|
|
357
|
+
in srgb,
|
|
358
|
+
var(--mat-sys-primary) calc(var(--mat-sys-hover-state-layer-opacity) * 100%),
|
|
359
|
+
transparent
|
|
360
|
+
);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
&:focus {
|
|
364
|
+
background: color-mix(
|
|
365
|
+
in srgb,
|
|
366
|
+
var(--mat-sys-primary) calc(var(--mat-sys-focus-state-layer-opacity) * 100%),
|
|
367
|
+
transparent
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
&:active {
|
|
372
|
+
background: color-mix(
|
|
373
|
+
in srgb,
|
|
374
|
+
var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%),
|
|
375
|
+
transparent
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
// ***********************************************************************************************
|
|
382
|
+
// Elevation
|
|
383
|
+
// ***********************************************************************************************
|
|
384
|
+
|
|
385
|
+
// Use to slightly raise the appearance of a surface. In Angular Material, this is used for the
|
|
386
|
+
// elevation of an elevated card and the handle of a slider.
|
|
387
|
+
.mat-shadow-level-1 {
|
|
388
|
+
box-shadow: var(--mat-sys-level1);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
// Use to raise the appearance of a surface. In Angular Material, this is used for the
|
|
392
|
+
// elevation of a menu and a select panel.
|
|
393
|
+
.mat-shadow-level-2 {
|
|
394
|
+
box-shadow: var(--mat-sys-level2);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// Used to raise the appearance of a surface. In Angular Material, this is used for the elevation
|
|
398
|
+
// of a floating action button.
|
|
399
|
+
.mat-shadow-level-3 {
|
|
400
|
+
box-shadow: var(--mat-sys-level3);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
// Used to raise the appearance of a surface. This is generally reserved for elevation changes
|
|
404
|
+
// due to interaction like focus and hover. In Angular Material, this is used for the elevation
|
|
405
|
+
// of a hovered floating action button.
|
|
406
|
+
.mat-shadow-level-4 {
|
|
407
|
+
box-shadow: var(--mat-sys-level4);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// Used to greatly raise the appearance of a surface. This is generally reserved for elevation
|
|
411
|
+
// changes due to interaction like focus and hover.
|
|
412
|
+
.mat-shadow-level-5 {
|
|
413
|
+
box-shadow: var(--mat-sys-level5);
|
|
414
|
+
}
|
|
415
|
+
}
|
package/divider/_m3-divider.scss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation.mjs","sources":["../../../../../
|
|
1
|
+
{"version":3,"file":"animation.mjs","sources":["../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/material/core/animation/animation.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {MediaMatcher} from '@angular/cdk/layout';\nimport {ANIMATION_MODULE_TYPE, inject, InjectionToken} from '@angular/core';\n\n/** Object used to configure the animation in Angular Material. */\nexport interface AnimationsConfig {\n /** Whether all animations should be disabled. */\n animationsDisabled?: boolean;\n}\n\n/** Injection token used to configure the animations in Angular Material. */\nexport const MATERIAL_ANIMATIONS = new InjectionToken<AnimationsConfig>('MATERIAL_ANIMATIONS');\n\n/**\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n * @docs-private\n */\nexport class AnimationCurves {\n static STANDARD_CURVE = 'cubic-bezier(0.4,0.0,0.2,1)';\n static DECELERATION_CURVE = 'cubic-bezier(0.0,0.0,0.2,1)';\n static ACCELERATION_CURVE = 'cubic-bezier(0.4,0.0,1,1)';\n static SHARP_CURVE = 'cubic-bezier(0.4,0.0,0.6,1)';\n}\n\n/**\n * @deprecated No longer used, will be removed.\n * @breaking-change 21.0.0\n * @docs-private\n */\nexport class AnimationDurations {\n static COMPLEX = '375ms';\n static ENTERING = '225ms';\n static EXITING = '195ms';\n}\n\nlet reducedMotion: boolean | null = null;\n\n/**\n * Gets the the configured animations state.\n * @docs-private\n */\nexport function _getAnimationsState(): 'enabled' | 'di-disabled' | 'reduced-motion' {\n if (\n inject(MATERIAL_ANIMATIONS, {optional: true})?.animationsDisabled ||\n inject(ANIMATION_MODULE_TYPE, {optional: true}) === 'NoopAnimations'\n ) {\n return 'di-disabled';\n }\n\n reducedMotion ??= inject(MediaMatcher).matchMedia('(prefers-reduced-motion)').matches;\n return reducedMotion ? 'reduced-motion' : 'enabled';\n}\n\n/**\n * Returns whether animations have been disabled by DI. Must be called in a DI context.\n * @docs-private\n */\nexport function _animationsDisabled(): boolean {\n return _getAnimationsState() !== 'enabled';\n}\n"],"names":[],"mappings":";;;AAiBA;MACa,mBAAmB,GAAG,IAAI,cAAc,CAAmB,qBAAqB;AAE7F;;;;AAIG;MACU,eAAe,CAAA;AAC1B,IAAA,OAAO,cAAc,GAAG,6BAA6B;AACrD,IAAA,OAAO,kBAAkB,GAAG,6BAA6B;AACzD,IAAA,OAAO,kBAAkB,GAAG,2BAA2B;AACvD,IAAA,OAAO,WAAW,GAAG,6BAA6B;;AAGpD;;;;AAIG;MACU,kBAAkB,CAAA;AAC7B,IAAA,OAAO,OAAO,GAAG,OAAO;AACxB,IAAA,OAAO,QAAQ,GAAG,OAAO;AACzB,IAAA,OAAO,OAAO,GAAG,OAAO;;AAG1B,IAAI,aAAa,GAAmB,IAAI;AAExC;;;AAGG;SACa,mBAAmB,GAAA;IACjC,IACE,MAAM,CAAC,mBAAmB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,EAAE,kBAAkB;AACjE,QAAA,MAAM,CAAC,qBAAqB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC,KAAK,gBAAgB,EACpE;AACA,QAAA,OAAO,aAAa;;AAGtB,IAAA,aAAa,KAAK,MAAM,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC,OAAO;IACrF,OAAO,aAAa,GAAG,gBAAgB,GAAG,SAAS;AACrD;AAEA;;;AAGG;SACa,mBAAmB,GAAA;AACjC,IAAA,OAAO,mBAAmB,EAAE,KAAK,SAAS;AAC5C;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testing.mjs","sources":["../../../../../../
|
|
1
|
+
{"version":3,"file":"testing.mjs","sources":["../../../../../../k8-fastbuild-ST-c646aa77115d/bin/src/material/autocomplete/testing/autocomplete-harness.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n ComponentHarness,\n ComponentHarnessConstructor,\n HarnessPredicate,\n TestElement,\n} from '@angular/cdk/testing';\nimport {\n MatOptgroupHarness,\n MatOptionHarness,\n OptgroupHarnessFilters,\n OptionHarnessFilters,\n} from '../../core/testing';\nimport {AutocompleteHarnessFilters} from './autocomplete-harness-filters';\n\nexport class MatAutocompleteHarness extends ComponentHarness {\n private _documentRootLocator = this.documentRootLocatorFactory();\n\n /** The selector for the host element of a `MatAutocomplete` instance. */\n static hostSelector = '.mat-mdc-autocomplete-trigger';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for an autocomplete with specific\n * attributes.\n * @param options Options for filtering which autocomplete instances are considered a match.\n * @return a `HarnessPredicate` configured with the given options.\n */\n static with<T extends MatAutocompleteHarness>(\n this: ComponentHarnessConstructor<T>,\n options: AutocompleteHarnessFilters = {},\n ): HarnessPredicate<T> {\n return new HarnessPredicate(this, options)\n .addOption('value', options.value, (harness, value) =>\n HarnessPredicate.stringMatches(harness.getValue(), value),\n )\n .addOption('disabled', options.disabled, async (harness, disabled) => {\n return (await harness.isDisabled()) === disabled;\n });\n }\n\n /** Gets the value of the autocomplete input. */\n async getValue(): Promise<string> {\n return (await this.host()).getProperty<string>('value');\n }\n\n /** Whether the autocomplete input is disabled. */\n async isDisabled(): Promise<boolean> {\n const disabled = (await this.host()).getAttribute('disabled');\n return coerceBooleanProperty(await disabled);\n }\n\n /** Focuses the autocomplete input. */\n async focus(): Promise<void> {\n return (await this.host()).focus();\n }\n\n /** Blurs the autocomplete input. */\n async blur(): Promise<void> {\n return (await this.host()).blur();\n }\n\n /** Whether the autocomplete input is focused. */\n async isFocused(): Promise<boolean> {\n return (await this.host()).isFocused();\n }\n\n /** Enters text into the autocomplete. */\n async enterText(value: string): Promise<void> {\n return (await this.host()).sendKeys(value);\n }\n\n /** Clears the input value. */\n async clear(): Promise<void> {\n return (await this.host()).clear();\n }\n\n /** Gets the options inside the autocomplete panel. */\n async getOptions(filters?: Omit<OptionHarnessFilters, 'ancestor'>): Promise<MatOptionHarness[]> {\n if (!(await this.isOpen())) {\n throw new Error('Unable to retrieve options for autocomplete. Autocomplete panel is closed.');\n }\n\n return this._documentRootLocator.locatorForAll(\n MatOptionHarness.with({\n ...(filters || {}),\n ancestor: await this._getPanelSelector(),\n } as OptionHarnessFilters),\n )();\n }\n\n /** Gets the option groups inside the autocomplete panel. */\n async getOptionGroups(\n filters?: Omit<OptgroupHarnessFilters, 'ancestor'>,\n ): Promise<MatOptgroupHarness[]> {\n if (!(await this.isOpen())) {\n throw new Error(\n 'Unable to retrieve option groups for autocomplete. Autocomplete panel is closed.',\n );\n }\n\n return this._documentRootLocator.locatorForAll(\n MatOptgroupHarness.with({\n ...(filters || {}),\n ancestor: await this._getPanelSelector(),\n } as OptgroupHarnessFilters),\n )();\n }\n\n /** Selects the first option matching the given filters. */\n async selectOption(filters: OptionHarnessFilters): Promise<void> {\n await this.focus(); // Focus the input to make sure the autocomplete panel is shown.\n const options = await this.getOptions(filters);\n if (!options.length) {\n throw Error(`Could not find a mat-option matching ${JSON.stringify(filters)}`);\n }\n await options[0].click();\n }\n\n /** Whether the autocomplete is open. */\n async isOpen(): Promise<boolean> {\n const panel = await this._getPanel();\n return !!panel && (await panel.hasClass(`mat-mdc-autocomplete-visible`));\n }\n\n /** Gets the panel associated with this autocomplete trigger. */\n private async _getPanel(): Promise<TestElement | null> {\n // Technically this is static, but it needs to be in a\n // function, because the autocomplete's panel ID can changed.\n return this._documentRootLocator.locatorForOptional(await this._getPanelSelector())();\n }\n\n /** Gets the selector that can be used to find the autocomplete trigger's panel. */\n protected async _getPanelSelector(): Promise<string> {\n return `#${await (await this.host()).getAttribute('aria-controls')}`;\n }\n}\n"],"names":[],"mappings":";;;;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