@angular/material 20.0.2 → 20.1.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 +0 -1
- package/autocomplete/_m2-autocomplete.scss +1 -14
- package/badge/_badge-theme.scss +2 -2
- package/badge/_m2-badge.scss +13 -34
- package/bottom-sheet/_m2-bottom-sheet.scss +2 -15
- package/button/_button-theme.scss +2 -2
- package/button/_fab-theme.scss +2 -2
- package/button/_icon-button-theme.scss +2 -2
- package/button/_m2-button.scss +59 -108
- package/button/_m2-fab.scss +28 -60
- package/button/_m2-icon-button.scss +12 -26
- package/button-toggle/_button-toggle-theme.scss +2 -1
- package/button-toggle/_m2-button-toggle.scss +24 -49
- package/card/_m2-card.scss +9 -18
- package/checkbox/_checkbox-theme.scss +4 -3
- package/checkbox/_m2-checkbox.scss +31 -59
- package/chips/_chips-theme.scss +7 -4
- package/chips/_m2-chip.scss +19 -27
- package/chips/index.d.ts +56 -4
- package/chips/testing/index.d.ts +23 -2
- package/core/_m2-app.scss +6 -19
- package/core/m2/_theming.scss +55 -9
- package/core/option/_m2-optgroup.scss +1 -14
- package/core/option/_m2-option.scss +8 -16
- package/core/option/_option-theme.scss +3 -3
- package/core/ripple/_m2-ripple.scss +0 -13
- package/core/selection/pseudo-checkbox/_m2-pseudo-checkbox.scss +10 -20
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.scss +3 -3
- package/core/style/_private.scss +6 -9
- package/core/style/_sass-utils.scss +0 -29
- package/core/tokens/_m2-utils.scss +20 -42
- package/{date-range-input-harness.d-CaEyN8dT.d.ts → date-range-input-harness.d-CJ4r85Uf.d.ts} +7 -4
- package/datepicker/_datepicker-theme.scss +10 -6
- package/datepicker/_m2-datepicker.scss +32 -41
- package/datepicker/testing/index.d.ts +3 -3
- package/dialog/_m2-dialog.scss +3 -24
- package/divider/_m2-divider.scss +1 -14
- package/expansion/_m2-expansion.scss +15 -25
- package/fesm2022/chips/testing.mjs +26 -1
- package/fesm2022/chips/testing.mjs.map +1 -1
- package/fesm2022/chips.mjs +131 -13
- package/fesm2022/chips.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/{date-range-input-harness-Bp1T4oUe.mjs → date-range-input-harness-DEyfkeOs.mjs} +32 -4
- package/fesm2022/date-range-input-harness-DEyfkeOs.mjs.map +1 -0
- package/fesm2022/datepicker/testing.mjs +3 -3
- package/fesm2022/form-field/testing/control.mjs +26 -1
- package/fesm2022/form-field/testing/control.mjs.map +1 -1
- package/fesm2022/form-field/testing.mjs +4 -4
- package/fesm2022/input/testing.mjs +7 -4
- package/fesm2022/input/testing.mjs.map +1 -1
- package/fesm2022/{input-harness-oQzj5EsQ.mjs → input-harness-C5Msdc4-.mjs} +6 -3
- package/fesm2022/input-harness-C5Msdc4-.mjs.map +1 -0
- package/fesm2022/menu.mjs +11 -2
- package/fesm2022/menu.mjs.map +1 -1
- package/fesm2022/paginator/testing.mjs +2 -3
- package/fesm2022/paginator/testing.mjs.map +1 -1
- package/fesm2022/select/testing.mjs +8 -5
- package/fesm2022/select/testing.mjs.map +1 -1
- package/fesm2022/stepper.mjs +2 -2
- package/fesm2022/stepper.mjs.map +1 -1
- package/form-field/_form-field-theme.scss +2 -2
- package/form-field/_m2-form-field.scss +58 -92
- package/form-field/testing/control/index.d.ts +8 -5
- package/form-field/testing/index.d.ts +5 -5
- package/form-field-control-harness.d-BLvFBy6v.d.ts +18 -0
- package/grid-list/_m2-grid-list.scss +0 -13
- package/icon/_m2-icon.scss +0 -13
- package/input/testing/index.d.ts +5 -4
- package/{input-harness.d-8fkAAbu2.d.ts → input-harness.d-DVI6ttzl.d.ts} +4 -4
- package/list/_list-theme.scss +10 -5
- package/list/_m2-list.scss +17 -31
- package/menu/_m2-menu.scss +4 -18
- package/menu/index.d.ts +2 -0
- package/package.json +6 -6
- package/paginator/_m2-paginator.scss +6 -18
- package/paginator/testing/index.d.ts +2 -3
- 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/progress-bar/_m2-progress-bar.scss +11 -20
- package/progress-bar/_progress-bar-theme.scss +2 -2
- package/progress-spinner/_m2-progress-spinner.scss +7 -15
- package/progress-spinner/_progress-spinner-theme.scss +2 -2
- package/radio/_m2-radio.scss +21 -32
- package/radio/_radio-theme.scss +6 -3
- package/schematics/ng-add/index.js +2 -2
- package/select/_m2-select.scss +12 -35
- package/select/testing/index.d.ts +5 -6
- package/sidenav/_m2-sidenav.scss +10 -20
- package/slide-toggle/_m2-slide-toggle.scss +13 -20
- package/slide-toggle/_slide-toggle-theme.scss +3 -2
- package/slider/_m2-slider.scss +5 -18
- package/snack-bar/_m2-snack-bar.scss +6 -22
- package/sort/_m2-sort.scss +1 -34
- package/stepper/_m2-stepper.scss +23 -34
- package/stepper/_m3-stepper.scss +2 -2
- package/stepper/_stepper-theme.scss +2 -2
- package/table/_m2-table.scss +4 -17
- package/tabs/_m2-tabs.scss +16 -27
- package/tabs/_tabs-theme.scss +4 -4
- package/timepicker/_m2-timepicker.scss +1 -14
- package/toolbar/_m2-toolbar.scss +2 -15
- package/tooltip/_m2-tooltip.scss +4 -14
- package/tree/_m2-tree.scss +2 -17
- package/core/tokens/_m2-tokens.scss +0 -131
- package/fesm2022/date-range-input-harness-Bp1T4oUe.mjs.map +0 -1
- package/fesm2022/input-harness-oQzj5EsQ.mjs.map +0 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@use 'sass:meta';
|
|
3
|
-
@use '../core/tokens/m2-utils';
|
|
4
2
|
@use '../core/theming/theming';
|
|
5
3
|
@use '../core/theming/inspection';
|
|
6
|
-
@use '../core/
|
|
4
|
+
@use '../core/tokens/m2-utils';
|
|
5
|
+
@use '../core/tokens/m3-utils';
|
|
7
6
|
|
|
8
7
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
9
8
|
// but may be in a future version of the theming API.
|
|
10
|
-
@function get-unthemable-tokens() {
|
|
9
|
+
@function get-unthemable-tokens($theme) {
|
|
10
|
+
$system: m2-utils.get-system($theme);
|
|
11
11
|
@return (
|
|
12
|
-
button-toggle-focus-state-layer-opacity:
|
|
13
|
-
button-toggle-hover-state-layer-opacity:
|
|
12
|
+
button-toggle-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
|
|
13
|
+
button-toggle-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
14
14
|
button-toggle-legacy-focus-state-layer-opacity: 1,
|
|
15
15
|
button-toggle-legacy-height: 36px,
|
|
16
16
|
button-toggle-legacy-shape: 2px,
|
|
@@ -20,48 +20,34 @@
|
|
|
20
20
|
|
|
21
21
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
22
22
|
@function get-color-tokens($theme) {
|
|
23
|
-
$
|
|
24
|
-
|
|
25
|
-
// By default the theme usually has an rgba color for the dividers, which can
|
|
26
|
-
// stack up with the background of a button toggle. This can cause the border
|
|
27
|
-
// of a selected toggle to look different from an unselected one. We use a solid
|
|
28
|
-
// color to ensure that the border always stays the same.
|
|
29
|
-
$divider-color: if(
|
|
30
|
-
meta.type-of($theme-divider-color) == color,
|
|
31
|
-
theming.private-rgba-to-hex(
|
|
32
|
-
$theme-divider-color, inspection.get-theme-color($theme, background, card)),
|
|
33
|
-
$theme-divider-color);
|
|
23
|
+
$system: m2-utils.get-system($theme);
|
|
34
24
|
|
|
35
25
|
@return (
|
|
36
|
-
button-toggle-background-color:
|
|
26
|
+
button-toggle-background-color: map.get($system, surface),
|
|
37
27
|
button-toggle-disabled-selected-state-background-color:
|
|
38
|
-
|
|
28
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 12%),
|
|
39
29
|
button-toggle-disabled-selected-state-text-color:
|
|
40
|
-
|
|
41
|
-
button-toggle-disabled-state-background-color:
|
|
42
|
-
inspection.get-theme-color($theme, background, card),
|
|
30
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
31
|
+
button-toggle-disabled-state-background-color: map.get($system, surface),
|
|
43
32
|
button-toggle-disabled-state-text-color:
|
|
44
|
-
|
|
45
|
-
button-toggle-divider-color: $
|
|
33
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
34
|
+
button-toggle-divider-color: map.get($system, outline),
|
|
46
35
|
button-toggle-legacy-disabled-selected-state-background-color:
|
|
47
|
-
|
|
48
|
-
button-toggle-legacy-disabled-state-background-color:
|
|
49
|
-
inspection.get-theme-color($theme, background, disabled-button-toggle),
|
|
36
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 12%),
|
|
37
|
+
button-toggle-legacy-disabled-state-background-color: map.get($system, surface),
|
|
50
38
|
button-toggle-legacy-disabled-state-text-color:
|
|
51
|
-
|
|
39
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 38%),
|
|
52
40
|
button-toggle-legacy-selected-state-background-color:
|
|
53
|
-
|
|
54
|
-
button-toggle-legacy-selected-state-text-color:
|
|
55
|
-
inspection.get-theme-color($theme, foreground, secondary-text),
|
|
41
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 12%),
|
|
42
|
+
button-toggle-legacy-selected-state-text-color: map.get($system, on-surface),
|
|
56
43
|
button-toggle-legacy-state-layer-color:
|
|
57
|
-
|
|
58
|
-
button-toggle-legacy-text-color:
|
|
44
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 12%),
|
|
45
|
+
button-toggle-legacy-text-color: map.get($system, on-surface),
|
|
59
46
|
button-toggle-selected-state-background-color:
|
|
60
|
-
|
|
61
|
-
button-toggle-selected-state-text-color:
|
|
62
|
-
button-toggle-state-layer-color:
|
|
63
|
-
|
|
64
|
-
button-toggle-text-color: inspection.get-theme-color($theme, foreground, text),
|
|
47
|
+
m3-utils.color-with-opacity(map.get($system, on-surface), 12%),
|
|
48
|
+
button-toggle-selected-state-text-color: map.get($system, on-surface),
|
|
49
|
+
button-toggle-state-layer-color: map.get($system, on-surface),
|
|
50
|
+
button-toggle-text-color: map.get($system, on-surface),
|
|
65
51
|
);
|
|
66
52
|
}
|
|
67
53
|
|
|
@@ -103,14 +89,3 @@
|
|
|
103
89
|
button-toggle-height: map.get($size-scale, $density-scale)
|
|
104
90
|
);
|
|
105
91
|
}
|
|
106
|
-
|
|
107
|
-
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
108
|
-
// This is used to create token slots.
|
|
109
|
-
@function get-token-slots() {
|
|
110
|
-
@return sass-utils.deep-merge-all(
|
|
111
|
-
get-unthemable-tokens(),
|
|
112
|
-
get-color-tokens(m2-utils.$placeholder-color-config),
|
|
113
|
-
get-typography-tokens(m2-utils.$placeholder-typography-config),
|
|
114
|
-
get-density-tokens(m2-utils.$placeholder-density-config)
|
|
115
|
-
);
|
|
116
|
-
}
|
package/card/_m2-card.scss
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@use '../core/tokens/m2-utils';
|
|
2
1
|
@use '../core/theming/inspection';
|
|
3
|
-
@use '../core/style/sass-utils';
|
|
4
2
|
@use '../core/style/elevation';
|
|
3
|
+
@use '../core/tokens/m2-utils';
|
|
4
|
+
@use 'sass:map';
|
|
5
5
|
|
|
6
6
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
7
7
|
// but may be in a future version of the theming API.
|
|
@@ -16,14 +16,16 @@
|
|
|
16
16
|
|
|
17
17
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
18
18
|
@function get-color-tokens($theme) {
|
|
19
|
+
$system: m2-utils.get-system($theme);
|
|
20
|
+
|
|
19
21
|
@return (
|
|
20
|
-
card-elevated-container-color:
|
|
22
|
+
card-elevated-container-color: map.get($system, surface),
|
|
21
23
|
card-elevated-container-elevation: elevation.get-box-shadow(1),
|
|
22
|
-
card-outlined-container-color:
|
|
24
|
+
card-outlined-container-color: map.get($system, surface),
|
|
23
25
|
card-outlined-container-elevation: elevation.get-box-shadow(0),
|
|
24
|
-
card-outlined-outline-color:
|
|
25
|
-
card-subtitle-text-color:
|
|
26
|
-
card-filled-container-color:
|
|
26
|
+
card-outlined-outline-color: inspection.get-theme-color($theme, system, outline),
|
|
27
|
+
card-subtitle-text-color: map.get($system, on-surface-variant),
|
|
28
|
+
card-filled-container-color: map.get($system, surface),
|
|
27
29
|
card-filled-container-elevation: elevation.get-box-shadow(0)
|
|
28
30
|
);
|
|
29
31
|
}
|
|
@@ -50,14 +52,3 @@
|
|
|
50
52
|
@function get-density-tokens($theme) {
|
|
51
53
|
@return ();
|
|
52
54
|
}
|
|
53
|
-
|
|
54
|
-
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
55
|
-
// This is used to create token slots.
|
|
56
|
-
@function get-token-slots() {
|
|
57
|
-
@return sass-utils.deep-merge-all(
|
|
58
|
-
get-unthemable-tokens(),
|
|
59
|
-
get-color-tokens(m2-utils.$placeholder-color-config),
|
|
60
|
-
get-typography-tokens(m2-utils.$placeholder-typography-config),
|
|
61
|
-
get-density-tokens(m2-utils.$placeholder-density-config)
|
|
62
|
-
);
|
|
63
|
-
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
@include token-utils.create-token-values(map.get(m3-checkbox.get-tokens($theme), base));
|
|
16
16
|
} @else {
|
|
17
17
|
@include sass-utils.current-selector-or-root() {
|
|
18
|
-
@include token-utils.create-token-values-mixed(m2-checkbox.get-unthemable-tokens());
|
|
18
|
+
@include token-utils.create-token-values-mixed(m2-checkbox.get-unthemable-tokens($theme));
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
map.get(m3-checkbox.get-tokens($theme, $color-variant), color));
|
|
30
30
|
} @else {
|
|
31
31
|
@include sass-utils.current-selector-or-root() {
|
|
32
|
-
@include token-utils.create-token-values-mixed(
|
|
32
|
+
@include token-utils.create-token-values-mixed(
|
|
33
|
+
m2-checkbox.get-color-tokens($theme, secondary));
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
.mat-mdc-checkbox {
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
|
|
43
44
|
&.mat-warn {
|
|
44
45
|
@include token-utils.create-token-values-mixed(
|
|
45
|
-
m2-checkbox.get-color-tokens($theme,
|
|
46
|
+
m2-checkbox.get-color-tokens($theme, error,
|
|
46
47
|
$exclude: (checkbox-disabled-label-color, checkbox-label-text-color))
|
|
47
48
|
);
|
|
48
49
|
}
|
|
@@ -1,68 +1,51 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '../core/tokens/m2-utils';
|
|
3
|
+
@use '../core/tokens/m3-utils';
|
|
3
4
|
@use '../core/theming/theming';
|
|
4
5
|
@use '../core/theming/inspection';
|
|
5
|
-
@use '../core/style/sass-utils';
|
|
6
|
-
@use '../core/m2/theming' as m2-theming;
|
|
7
|
-
@use '../core/m2/palette' as m2-palette;
|
|
8
6
|
|
|
9
7
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
10
8
|
// but may be in a future version of the theming API.
|
|
11
|
-
@function get-unthemable-tokens() {
|
|
9
|
+
@function get-unthemable-tokens($theme) {
|
|
10
|
+
$system: m2-utils.get-system($theme);
|
|
11
|
+
|
|
12
12
|
@return (
|
|
13
13
|
checkbox-disabled-selected-checkmark-color: #fff,
|
|
14
|
-
checkbox-selected-focus-state-layer-opacity:
|
|
15
|
-
checkbox-selected-hover-state-layer-opacity:
|
|
16
|
-
checkbox-selected-pressed-state-layer-opacity:
|
|
17
|
-
checkbox-unselected-focus-state-layer-opacity:
|
|
18
|
-
checkbox-unselected-hover-state-layer-opacity:
|
|
19
|
-
checkbox-unselected-pressed-state-layer-opacity:
|
|
14
|
+
checkbox-selected-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
|
|
15
|
+
checkbox-selected-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
16
|
+
checkbox-selected-pressed-state-layer-opacity: map.get($system, pressed-state-layer-opacity),
|
|
17
|
+
checkbox-unselected-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
|
|
18
|
+
checkbox-unselected-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
19
|
+
checkbox-unselected-pressed-state-layer-opacity: map.get($system, pressed-state-layer-opacity),
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
24
|
-
@function get-color-tokens($theme, $
|
|
24
|
+
@function get-color-tokens($theme, $color-variant, $exclude: ()) {
|
|
25
|
+
$system: m2-utils.get-system($theme);
|
|
26
|
+
$system: m3-utils.replace-colors-with-variant($system, secondary, $color-variant);
|
|
25
27
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
26
28
|
$foreground-base: inspection.get-theme-color($theme, foreground, base);
|
|
27
|
-
$
|
|
28
|
-
$disabled-color: sass-utils.safe-color-change(
|
|
29
|
-
inspection.get-theme-color($theme, foreground, base), $alpha: 0.38);
|
|
30
|
-
$palette-selected: inspection.get-theme-color($theme, $palette-name);
|
|
31
|
-
$border-color: sass-utils.safe-color-change(
|
|
32
|
-
inspection.get-theme-color($theme, foreground, base), $alpha: 0.54);
|
|
33
|
-
$active-border-color:
|
|
34
|
-
m2-theming.get-color-from-palette(m2-palette.$gray-palette, if($is-dark, 200, 900));
|
|
35
|
-
$selected-checkmark-color: null;
|
|
36
|
-
|
|
37
|
-
// Ideally we would derive all values directly from the theme, but it causes a lot of regressions
|
|
38
|
-
// internally. For now we fall back to the old hardcoded behavior only for internal apps.
|
|
39
|
-
@if (m2-utils.$private-is-internal-build) {
|
|
40
|
-
$contrast-tone: m2-utils.contrast-tone($palette-selected, $is-dark);
|
|
41
|
-
$selected-checkmark-color: if($contrast-tone == 'dark', #000, #fff);
|
|
42
|
-
}
|
|
43
|
-
@else {
|
|
44
|
-
$selected-checkmark-color:
|
|
45
|
-
inspection.get-theme-color($theme, $palette-name, default-contrast, 1);
|
|
46
|
-
}
|
|
29
|
+
$disabled: m3-utils.color-with-opacity(map.get($system, on-surface), 38%);
|
|
47
30
|
|
|
48
31
|
$tokens: (
|
|
49
|
-
checkbox-disabled-label-color:
|
|
50
|
-
checkbox-label-text-color:
|
|
51
|
-
checkbox-disabled-selected-icon-color: $disabled
|
|
52
|
-
checkbox-disabled-unselected-icon-color: $disabled
|
|
53
|
-
checkbox-selected-checkmark-color: $
|
|
54
|
-
checkbox-selected-focus-icon-color: $
|
|
55
|
-
checkbox-selected-hover-icon-color: $
|
|
56
|
-
checkbox-selected-icon-color: $
|
|
57
|
-
checkbox-selected-pressed-icon-color: $
|
|
58
|
-
checkbox-unselected-focus-icon-color: $
|
|
59
|
-
checkbox-unselected-hover-icon-color: $
|
|
60
|
-
checkbox-unselected-icon-color: $
|
|
61
|
-
checkbox-selected-focus-state-layer-color: $
|
|
62
|
-
checkbox-selected-hover-state-layer-color: $
|
|
63
|
-
checkbox-selected-pressed-state-layer-color: $
|
|
64
|
-
checkbox-unselected-focus-state-layer-color: $
|
|
65
|
-
checkbox-unselected-hover-state-layer-color: $
|
|
32
|
+
checkbox-disabled-label-color: $disabled,
|
|
33
|
+
checkbox-label-text-color: map.get($system, on-surface),
|
|
34
|
+
checkbox-disabled-selected-icon-color: $disabled,
|
|
35
|
+
checkbox-disabled-unselected-icon-color: $disabled,
|
|
36
|
+
checkbox-selected-checkmark-color: map.get($system, on-secondary),
|
|
37
|
+
checkbox-selected-focus-icon-color: map.get($system, secondary),
|
|
38
|
+
checkbox-selected-hover-icon-color: map.get($system, secondary),
|
|
39
|
+
checkbox-selected-icon-color: map.get($system, secondary),
|
|
40
|
+
checkbox-selected-pressed-icon-color: map.get($system, secondary),
|
|
41
|
+
checkbox-unselected-focus-icon-color: map.get($system, on-surface),
|
|
42
|
+
checkbox-unselected-hover-icon-color: map.get($system, on-surface),
|
|
43
|
+
checkbox-unselected-icon-color: map.get($system, on-surface-variant),
|
|
44
|
+
checkbox-selected-focus-state-layer-color: map.get($system, secondary),
|
|
45
|
+
checkbox-selected-hover-state-layer-color: map.get($system, secondary),
|
|
46
|
+
checkbox-selected-pressed-state-layer-color: map.get($system, secondary),
|
|
47
|
+
checkbox-unselected-focus-state-layer-color: map.get($system, on-surface),
|
|
48
|
+
checkbox-unselected-hover-state-layer-color: map.get($system, on-surface),
|
|
66
49
|
checkbox-unselected-pressed-state-layer-color: $foreground-base,
|
|
67
50
|
);
|
|
68
51
|
|
|
@@ -98,14 +81,3 @@
|
|
|
98
81
|
), $scale)
|
|
99
82
|
);
|
|
100
83
|
}
|
|
101
|
-
|
|
102
|
-
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
103
|
-
// This is used to create token slots.
|
|
104
|
-
@function get-token-slots() {
|
|
105
|
-
@return sass-utils.deep-merge-all(
|
|
106
|
-
get-unthemable-tokens(),
|
|
107
|
-
get-color-tokens(m2-utils.$placeholder-color-config),
|
|
108
|
-
get-typography-tokens(m2-utils.$placeholder-typography-config),
|
|
109
|
-
get-density-tokens(m2-utils.$placeholder-density-config)
|
|
110
|
-
);
|
|
111
|
-
}
|
package/chips/_chips-theme.scss
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
@include token-utils.create-token-values(map.get(m3-chip.get-tokens($theme), base));
|
|
16
16
|
} @else {
|
|
17
17
|
.mat-mdc-standard-chip {
|
|
18
|
-
@include token-utils.create-token-values-mixed(m2-chip.get-unthemable-tokens());
|
|
18
|
+
@include token-utils.create-token-values-mixed(m2-chip.get-unthemable-tokens($theme));
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -34,15 +34,18 @@
|
|
|
34
34
|
&.mat-mdc-chip-selected,
|
|
35
35
|
&.mat-mdc-chip-highlighted {
|
|
36
36
|
&.mat-primary {
|
|
37
|
-
@include token-utils.create-token-values-mixed(
|
|
37
|
+
@include token-utils.create-token-values-mixed(
|
|
38
|
+
m2-chip.get-color-tokens($theme, primary));
|
|
38
39
|
}
|
|
39
40
|
|
|
40
41
|
&.mat-accent {
|
|
41
|
-
@include token-utils.create-token-values-mixed(
|
|
42
|
+
@include token-utils.create-token-values-mixed(
|
|
43
|
+
m2-chip.get-color-tokens($theme, secondary));
|
|
42
44
|
}
|
|
43
45
|
|
|
44
46
|
&.mat-warn {
|
|
45
|
-
@include token-utils.create-token-values-mixed(
|
|
47
|
+
@include token-utils.create-token-values-mixed(
|
|
48
|
+
m2-chip.get-color-tokens($theme, error));
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
}
|
package/chips/_m2-chip.scss
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use 'sass:meta';
|
|
3
3
|
@use 'sass:color';
|
|
4
|
-
@use '../core/tokens/m2-utils';
|
|
5
4
|
@use '../core/theming/inspection';
|
|
6
|
-
@use '../core/style/sass-utils';
|
|
7
5
|
@use '../core/m2/palette' as m2-palette;
|
|
8
6
|
@use '../core/theming/theming';
|
|
7
|
+
@use '../core/tokens/m2-utils';
|
|
8
|
+
@use '../core/tokens/m3-utils';
|
|
9
9
|
|
|
10
10
|
// Tokens that can't be configured through Angular Material's current theming API,
|
|
11
11
|
// but may be in a future version of the theming API.
|
|
12
|
-
@function get-unthemable-tokens() {
|
|
12
|
+
@function get-unthemable-tokens($theme) {
|
|
13
|
+
$system: m2-utils.get-system($theme);
|
|
14
|
+
|
|
13
15
|
@return (
|
|
14
16
|
chip-container-shape-radius: 16px,
|
|
15
17
|
chip-disabled-container-opacity: 0.4,
|
|
16
18
|
chip-disabled-outline-color: transparent,
|
|
17
19
|
chip-flat-selected-outline-width: 0,
|
|
18
20
|
chip-focus-outline-color: transparent,
|
|
19
|
-
chip-hover-state-layer-opacity:
|
|
21
|
+
chip-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
20
22
|
chip-outline-color: transparent,
|
|
21
23
|
chip-outline-width: 0,
|
|
22
|
-
chip-selected-hover-state-layer-opacity:
|
|
24
|
+
chip-selected-hover-state-layer-opacity: map.get($system, hover-state-layer-opacity),
|
|
23
25
|
chip-selected-trailing-action-state-layer-color: transparent,
|
|
24
26
|
chip-trailing-action-focus-opacity: 1,
|
|
25
27
|
chip-trailing-action-focus-state-layer-opacity: 0,
|
|
@@ -36,20 +38,19 @@
|
|
|
36
38
|
}
|
|
37
39
|
|
|
38
40
|
// Tokens that can be configured through Angular Material's color theming API.
|
|
39
|
-
@function get-color-tokens($theme, $
|
|
41
|
+
@function get-color-tokens($theme, $color-variant: null) {
|
|
42
|
+
$system: m2-utils.get-system($theme);
|
|
40
43
|
$foreground: null;
|
|
41
44
|
$background: null;
|
|
42
45
|
$state-layer-color: inspection.get-theme-color($theme, foreground, base);
|
|
43
|
-
$state-layer-opacity: 0.12; // 0.12 is a common value in Material Design for opacity.
|
|
44
|
-
$surface: inspection.get-theme-color($theme, background, card);
|
|
45
46
|
|
|
46
|
-
@if $
|
|
47
|
+
@if $color-variant == null {
|
|
47
48
|
$is-dark: inspection.get-theme-type($theme) == dark;
|
|
48
49
|
$grey-50: map.get(m2-palette.$grey-palette, 50);
|
|
49
50
|
$grey-900: map.get(m2-palette.$grey-palette, 900);
|
|
50
51
|
$foreground: if($is-dark, $grey-50, $grey-900);
|
|
51
52
|
|
|
52
|
-
$surface:
|
|
53
|
+
$surface: map.get($system, surface);
|
|
53
54
|
$background: if(
|
|
54
55
|
meta.type-of($state-layer-color) == color and meta.type-of($surface) == color,
|
|
55
56
|
color.mix($state-layer-color, $surface, 12%),
|
|
@@ -57,8 +58,10 @@
|
|
|
57
58
|
);
|
|
58
59
|
}
|
|
59
60
|
@else {
|
|
60
|
-
$
|
|
61
|
-
|
|
61
|
+
$system: m3-utils.replace-colors-with-variant($system, primary, $color-variant);
|
|
62
|
+
|
|
63
|
+
$background: map.get($system, primary);
|
|
64
|
+
$foreground: map.get($system, on-primary);
|
|
62
65
|
}
|
|
63
66
|
@return (
|
|
64
67
|
chip-disabled-label-text-color: $foreground,
|
|
@@ -67,13 +70,13 @@
|
|
|
67
70
|
chip-elevated-selected-container-color: $background,
|
|
68
71
|
chip-flat-disabled-selected-container-color: $background,
|
|
69
72
|
chip-focus-state-layer-color: $state-layer-color,
|
|
70
|
-
chip-focus-state-layer-opacity: $state-layer-opacity,
|
|
73
|
+
chip-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
|
|
71
74
|
chip-hover-state-layer-color: $state-layer-color,
|
|
72
75
|
chip-label-text-color: $foreground,
|
|
73
76
|
chip-selected-disabled-trailing-icon-color: $foreground,
|
|
74
|
-
chip-selected-focus-state-layer-color: $state-layer-
|
|
75
|
-
chip-selected-focus-state-layer-opacity: $state-layer-opacity,
|
|
76
|
-
chip-selected-hover-state-layer-color: $state-layer-
|
|
77
|
+
chip-selected-focus-state-layer-color: map.get($system, focus-state-layer-opacity),
|
|
78
|
+
chip-selected-focus-state-layer-opacity: map.get($system, focus-state-layer-opacity),
|
|
79
|
+
chip-selected-hover-state-layer-color: map.get($system, hover-state-layer-opacity),
|
|
77
80
|
chip-selected-label-text-color: $foreground,
|
|
78
81
|
chip-selected-trailing-icon-color: $foreground,
|
|
79
82
|
chip-with-icon-disabled-icon-color: $foreground,
|
|
@@ -110,14 +113,3 @@
|
|
|
110
113
|
)
|
|
111
114
|
);
|
|
112
115
|
}
|
|
113
|
-
|
|
114
|
-
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
115
|
-
// This is used to create token slots.
|
|
116
|
-
@function get-token-slots() {
|
|
117
|
-
@return sass-utils.deep-merge-all(
|
|
118
|
-
get-unthemable-tokens(),
|
|
119
|
-
get-color-tokens(m2-utils.$placeholder-color-config),
|
|
120
|
-
get-typography-tokens(m2-utils.$placeholder-typography-config),
|
|
121
|
-
get-density-tokens(m2-utils.$placeholder-density-config)
|
|
122
|
-
);
|
|
123
|
-
}
|
package/chips/index.d.ts
CHANGED
|
@@ -21,12 +21,15 @@ declare class MatChipAction {
|
|
|
21
21
|
_handlePrimaryActionInteraction(): void;
|
|
22
22
|
remove(): void;
|
|
23
23
|
disabled: boolean;
|
|
24
|
+
_edit(): void;
|
|
24
25
|
_isEditing?: boolean;
|
|
25
26
|
};
|
|
26
27
|
/** Whether the action is interactive. */
|
|
27
28
|
isInteractive: boolean;
|
|
28
29
|
/** Whether this is the primary action in the chip. */
|
|
29
30
|
_isPrimary: boolean;
|
|
31
|
+
/** Whether this is the leading action in the chip. */
|
|
32
|
+
_isLeading: boolean;
|
|
30
33
|
/** Whether the action is disabled. */
|
|
31
34
|
get disabled(): boolean;
|
|
32
35
|
set disabled(value: boolean);
|
|
@@ -71,6 +74,31 @@ declare class MatChipTrailingIcon extends MatChipAction {
|
|
|
71
74
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipTrailingIcon, never>;
|
|
72
75
|
static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipTrailingIcon, "mat-chip-trailing-icon, [matChipTrailingIcon]", never, {}, {}, never, never, true, never>;
|
|
73
76
|
}
|
|
77
|
+
/**
|
|
78
|
+
* Directive to edit the parent chip when the leading action icon is clicked or
|
|
79
|
+
* when the ENTER key is pressed on it.
|
|
80
|
+
*
|
|
81
|
+
* Recommended for use with the Material Design "edit" icon
|
|
82
|
+
* available at https://material.io/icons/#ic_edit.
|
|
83
|
+
*
|
|
84
|
+
* Example:
|
|
85
|
+
*
|
|
86
|
+
* ```
|
|
87
|
+
* <mat-chip>
|
|
88
|
+
* <button matChipEdit aria-label="Edit">
|
|
89
|
+
* <mat-icon>edit</mat-icon>
|
|
90
|
+
* </button>
|
|
91
|
+
* </mat-chip>
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
declare class MatChipEdit extends MatChipAction {
|
|
95
|
+
_isPrimary: boolean;
|
|
96
|
+
_isLeading: boolean;
|
|
97
|
+
_handleClick(event: MouseEvent): void;
|
|
98
|
+
_handleKeydown(event: KeyboardEvent): void;
|
|
99
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipEdit, never>;
|
|
100
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatChipEdit, "[matChipEdit]", never, {}, {}, never, never, true, never>;
|
|
101
|
+
}
|
|
74
102
|
/**
|
|
75
103
|
* Directive to remove the parent chip when the trailing icon is clicked or
|
|
76
104
|
* when the ENTER key is pressed on it.
|
|
@@ -132,6 +160,8 @@ declare class MatChip implements OnInit, AfterViewInit, AfterContentInit, DoChec
|
|
|
132
160
|
protected _allLeadingIcons: QueryList<MatChipAvatar>;
|
|
133
161
|
/** All trailing icons present in the chip. */
|
|
134
162
|
protected _allTrailingIcons: QueryList<MatChipTrailingIcon>;
|
|
163
|
+
/** All edit icons present in the chip. */
|
|
164
|
+
protected _allEditIcons: QueryList<MatChipEdit>;
|
|
135
165
|
/** All remove icons present in the chip. */
|
|
136
166
|
protected _allRemoveIcons: QueryList<MatChipRemove>;
|
|
137
167
|
_hasFocus(): boolean;
|
|
@@ -183,6 +213,8 @@ declare class MatChip implements OnInit, AfterViewInit, AfterContentInit, DoChec
|
|
|
183
213
|
protected basicChipAttrName: string;
|
|
184
214
|
/** The chip's leading icon. */
|
|
185
215
|
leadingIcon: MatChipAvatar;
|
|
216
|
+
/** The chip's leading edit icon. */
|
|
217
|
+
editIcon: MatChipEdit;
|
|
186
218
|
/** The chip's trailing icon. */
|
|
187
219
|
trailingIcon: MatChipTrailingIcon;
|
|
188
220
|
/** The chip's trailing remove icon. */
|
|
@@ -221,10 +253,12 @@ declare class MatChip implements OnInit, AfterViewInit, AfterContentInit, DoChec
|
|
|
221
253
|
_getActions(): MatChipAction[];
|
|
222
254
|
/** Handles interactions with the primary action of the chip. */
|
|
223
255
|
_handlePrimaryActionInteraction(): void;
|
|
256
|
+
/** Handles interactions with the edit action of the chip. */
|
|
257
|
+
_edit(event: Event): void;
|
|
224
258
|
/** Starts the focus monitoring process on the chip. */
|
|
225
259
|
private _monitorFocus;
|
|
226
260
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatChip, never>;
|
|
227
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatChip, "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", ["matChip"], { "role": { "alias": "role"; "required": false; }; "id": { "alias": "id"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaDescription": { "alias": "aria-description"; "required": false; }; "value": { "alias": "value"; "required": false; }; "color": { "alias": "color"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "highlighted": { "alias": "highlighted"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "removed": "removed"; "destroyed": "destroyed"; }, ["leadingIcon", "trailingIcon", "removeIcon", "_allLeadingIcons", "_allTrailingIcons", "_allRemoveIcons"], ["mat-chip-avatar, [matChipAvatar]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], true, never>;
|
|
261
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatChip, "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", ["matChip"], { "role": { "alias": "role"; "required": false; }; "id": { "alias": "id"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "ariaDescription": { "alias": "aria-description"; "required": false; }; "value": { "alias": "value"; "required": false; }; "color": { "alias": "color"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "highlighted": { "alias": "highlighted"; "required": false; }; "disableRipple": { "alias": "disableRipple"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "removed": "removed"; "destroyed": "destroyed"; }, ["leadingIcon", "editIcon", "trailingIcon", "removeIcon", "_allLeadingIcons", "_allTrailingIcons", "_allEditIcons", "_allRemoveIcons"], ["mat-chip-avatar, [matChipAvatar]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], true, never>;
|
|
228
262
|
static ngAcceptInputType_removable: unknown;
|
|
229
263
|
static ngAcceptInputType_highlighted: unknown;
|
|
230
264
|
static ngAcceptInputType_disableRipple: unknown;
|
|
@@ -353,13 +387,25 @@ declare class MatChipRow extends MatChip implements AfterViewInit {
|
|
|
353
387
|
defaultEditInput?: MatChipEditInput;
|
|
354
388
|
/** The projected chip edit input. */
|
|
355
389
|
contentEditInput?: MatChipEditInput;
|
|
390
|
+
/**
|
|
391
|
+
* Set on a mousedown when the chip is already focused via mouse or keyboard.
|
|
392
|
+
*
|
|
393
|
+
* This allows us to ensure chip is already focused when deciding whether to enter the
|
|
394
|
+
* edit mode on a subsequent click. Otherwise, the chip appears focused when handling the
|
|
395
|
+
* first click event.
|
|
396
|
+
*/
|
|
397
|
+
private _alreadyFocused;
|
|
356
398
|
_isEditing: boolean;
|
|
357
399
|
constructor(...args: unknown[]);
|
|
400
|
+
ngAfterViewInit(): void;
|
|
401
|
+
protected _hasLeadingActionIcon(): boolean;
|
|
358
402
|
_hasTrailingIcon(): boolean;
|
|
359
403
|
/** Sends focus to the first gridcell when the user clicks anywhere inside the chip. */
|
|
360
404
|
_handleFocus(): void;
|
|
361
405
|
_handleKeydown(event: KeyboardEvent): void;
|
|
406
|
+
_handleClick(event: MouseEvent): void;
|
|
362
407
|
_handleDoubleclick(event: MouseEvent): void;
|
|
408
|
+
_edit(): void;
|
|
363
409
|
private _startEditing;
|
|
364
410
|
private _onEditFinish;
|
|
365
411
|
_isRippleDisabled(): boolean;
|
|
@@ -369,7 +415,7 @@ declare class MatChipRow extends MatChip implements AfterViewInit {
|
|
|
369
415
|
*/
|
|
370
416
|
private _getEditInput;
|
|
371
417
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipRow, never>;
|
|
372
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatChipRow, "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", never, { "editable": { "alias": "editable"; "required": false; }; }, { "edited": "edited"; }, ["contentEditInput"], ["mat-chip-avatar, [matChipAvatar]", "[matChipEditInput]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], true, never>;
|
|
418
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatChipRow, "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", never, { "editable": { "alias": "editable"; "required": false; }; }, { "edited": "edited"; }, ["contentEditInput"], ["[matChipEdit]", "mat-chip-avatar, [matChipAvatar]", "[matChipEditInput]", "*", "mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"], true, never>;
|
|
373
419
|
}
|
|
374
420
|
|
|
375
421
|
/**
|
|
@@ -888,7 +934,7 @@ declare class MatChipInput implements MatChipTextControl, OnChanges, OnDestroy {
|
|
|
888
934
|
|
|
889
935
|
declare class MatChipsModule {
|
|
890
936
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatChipsModule, never>;
|
|
891
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MatChipsModule, never, [typeof MatCommonModule, typeof MatRippleModule, typeof MatChipAction, typeof MatChip, typeof MatChipAvatar, typeof MatChipEditInput, typeof MatChipGrid, typeof MatChipInput, typeof MatChipListbox, typeof MatChipOption, typeof MatChipRemove, typeof MatChipRow, typeof MatChipSet, typeof MatChipTrailingIcon], [typeof MatCommonModule, typeof MatChip, typeof MatChipAvatar, typeof MatChipEditInput, typeof MatChipGrid, typeof MatChipInput, typeof MatChipListbox, typeof MatChipOption, typeof MatChipRemove, typeof MatChipRow, typeof MatChipSet, typeof MatChipTrailingIcon]>;
|
|
937
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MatChipsModule, never, [typeof MatCommonModule, typeof MatRippleModule, typeof MatChipAction, typeof MatChip, typeof MatChipAvatar, typeof MatChipEdit, typeof MatChipEditInput, typeof MatChipGrid, typeof MatChipInput, typeof MatChipListbox, typeof MatChipOption, typeof MatChipRemove, typeof MatChipRow, typeof MatChipSet, typeof MatChipTrailingIcon], [typeof MatCommonModule, typeof MatChip, typeof MatChipAvatar, typeof MatChipEdit, typeof MatChipEditInput, typeof MatChipGrid, typeof MatChipInput, typeof MatChipListbox, typeof MatChipOption, typeof MatChipRemove, typeof MatChipRow, typeof MatChipSet, typeof MatChipTrailingIcon]>;
|
|
892
938
|
static ɵinj: i0.ɵɵInjectorDeclaration<MatChipsModule>;
|
|
893
939
|
}
|
|
894
940
|
|
|
@@ -915,6 +961,12 @@ declare const MAT_CHIP_AVATAR: InjectionToken<unknown>;
|
|
|
915
961
|
* retention of the class and its directive metadata.
|
|
916
962
|
*/
|
|
917
963
|
declare const MAT_CHIP_TRAILING_ICON: InjectionToken<unknown>;
|
|
964
|
+
/**
|
|
965
|
+
* Injection token that can be used to reference instances of `MatChipEdit`. It serves as
|
|
966
|
+
* alternative token to the actual `MatChipEdit` class which could cause unnecessary
|
|
967
|
+
* retention of the class and its directive metadata.
|
|
968
|
+
*/
|
|
969
|
+
declare const MAT_CHIP_EDIT: InjectionToken<unknown>;
|
|
918
970
|
/**
|
|
919
971
|
* Injection token that can be used to reference instances of `MatChipRemove`. It serves as
|
|
920
972
|
* alternative token to the actual `MatChipRemove` class which could cause unnecessary
|
|
@@ -926,5 +978,5 @@ declare const MAT_CHIP_REMOVE: InjectionToken<unknown>;
|
|
|
926
978
|
*/
|
|
927
979
|
declare const MAT_CHIP: InjectionToken<unknown>;
|
|
928
980
|
|
|
929
|
-
export { MAT_CHIP, MAT_CHIPS_DEFAULT_OPTIONS, MAT_CHIP_AVATAR, MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR, MAT_CHIP_REMOVE, MAT_CHIP_TRAILING_ICON, MatChip, MatChipAvatar, MatChipEditInput, MatChipGrid, MatChipGridChange, MatChipInput, MatChipListbox, MatChipListboxChange, MatChipOption, MatChipRemove, MatChipRow, MatChipSelectionChange, MatChipSet, MatChipTrailingIcon, MatChipsModule };
|
|
981
|
+
export { MAT_CHIP, MAT_CHIPS_DEFAULT_OPTIONS, MAT_CHIP_AVATAR, MAT_CHIP_EDIT, MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR, MAT_CHIP_REMOVE, MAT_CHIP_TRAILING_ICON, MatChip, MatChipAvatar, MatChipEdit, MatChipEditInput, MatChipGrid, MatChipGridChange, MatChipInput, MatChipListbox, MatChipListboxChange, MatChipOption, MatChipRemove, MatChipRow, MatChipSelectionChange, MatChipSet, MatChipTrailingIcon, MatChipsModule };
|
|
930
982
|
export type { MatChipEditedEvent, MatChipEvent, MatChipInputEvent, MatChipTextControl, MatChipsDefaultOptions };
|
package/chips/testing/index.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ interface ChipRowHarnessFilters extends ChipHarnessFilters {
|
|
|
31
31
|
}
|
|
32
32
|
interface ChipSetHarnessFilters extends BaseHarnessFilters {
|
|
33
33
|
}
|
|
34
|
+
interface ChipEditHarnessFilters extends BaseHarnessFilters {
|
|
35
|
+
}
|
|
34
36
|
interface ChipRemoveHarnessFilters extends BaseHarnessFilters {
|
|
35
37
|
}
|
|
36
38
|
interface ChipAvatarHarnessFilters extends BaseHarnessFilters {
|
|
@@ -50,6 +52,20 @@ declare class MatChipAvatarHarness extends ComponentHarness {
|
|
|
50
52
|
static with<T extends MatChipAvatarHarness>(this: ComponentHarnessConstructor<T>, options?: ChipAvatarHarnessFilters): HarnessPredicate<T>;
|
|
51
53
|
}
|
|
52
54
|
|
|
55
|
+
/** Harness for interacting with a standard Material chip edit button in tests. */
|
|
56
|
+
declare class MatChipEditHarness extends ComponentHarness {
|
|
57
|
+
static hostSelector: string;
|
|
58
|
+
/**
|
|
59
|
+
* Gets a `HarnessPredicate` that can be used to search for a chip edit with specific
|
|
60
|
+
* attributes.
|
|
61
|
+
* @param options Options for filtering which input instances are considered a match.
|
|
62
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
63
|
+
*/
|
|
64
|
+
static with<T extends MatChipEditHarness>(this: ComponentHarnessConstructor<T>, options?: ChipEditHarnessFilters): HarnessPredicate<T>;
|
|
65
|
+
/** Clicks the edit button. */
|
|
66
|
+
click(): Promise<void>;
|
|
67
|
+
}
|
|
68
|
+
|
|
53
69
|
/** Harness for interacting with a standard Material chip remove button in tests. */
|
|
54
70
|
declare class MatChipRemoveHarness extends ComponentHarness {
|
|
55
71
|
static hostSelector: string;
|
|
@@ -80,6 +96,11 @@ declare class MatChipHarness extends ContentContainerComponentHarness {
|
|
|
80
96
|
isDisabled(): Promise<boolean>;
|
|
81
97
|
/** Delete a chip from the set. */
|
|
82
98
|
remove(): Promise<void>;
|
|
99
|
+
/**
|
|
100
|
+
* Gets the edit button inside of a chip.
|
|
101
|
+
* @param filter Optionally filters which chips are included.
|
|
102
|
+
*/
|
|
103
|
+
geEditButton(filter?: ChipEditHarnessFilters): Promise<MatChipEditHarness>;
|
|
83
104
|
/**
|
|
84
105
|
* Gets the remove button inside of a chip.
|
|
85
106
|
* @param filter Optionally filters which chips are included.
|
|
@@ -245,5 +266,5 @@ declare class MatChipSetHarness extends ComponentHarness {
|
|
|
245
266
|
getChips(filter?: ChipHarnessFilters): Promise<MatChipHarness[]>;
|
|
246
267
|
}
|
|
247
268
|
|
|
248
|
-
export { MatChipAvatarHarness, MatChipEditInputHarness, MatChipGridHarness, MatChipHarness, MatChipInputHarness, MatChipListboxHarness, MatChipOptionHarness, MatChipRemoveHarness, MatChipRowHarness, MatChipSetHarness };
|
|
249
|
-
export type { ChipAvatarHarnessFilters, ChipEditInputHarnessFilters, ChipGridHarnessFilters, ChipHarnessFilters, ChipInputHarnessFilters, ChipListboxHarnessFilters, ChipOptionHarnessFilters, ChipRemoveHarnessFilters, ChipRowHarnessFilters, ChipSetHarnessFilters };
|
|
269
|
+
export { MatChipAvatarHarness, MatChipEditHarness, MatChipEditInputHarness, MatChipGridHarness, MatChipHarness, MatChipInputHarness, MatChipListboxHarness, MatChipOptionHarness, MatChipRemoveHarness, MatChipRowHarness, MatChipSetHarness };
|
|
270
|
+
export type { ChipAvatarHarnessFilters, ChipEditHarnessFilters, ChipEditInputHarnessFilters, ChipGridHarnessFilters, ChipHarnessFilters, ChipInputHarnessFilters, ChipListboxHarnessFilters, ChipOptionHarnessFilters, ChipRemoveHarnessFilters, ChipRowHarnessFilters, ChipSetHarnessFilters };
|