@angular/material 16.1.4 → 16.1.5
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/autocomplete/index.d.ts +6 -2
- package/core/index.d.ts +2 -2
- package/core/tokens/_token-utils.scss +1 -0
- package/core/tokens/m2/mat/_expansion.scss +90 -0
- package/esm2022/autocomplete/autocomplete-trigger.mjs +61 -38
- package/esm2022/core/option/option.mjs +9 -5
- package/esm2022/core/version.mjs +1 -1
- package/esm2022/expansion/expansion-animations.mjs +5 -2
- package/esm2022/expansion/expansion-panel-header.mjs +3 -3
- package/esm2022/expansion/expansion-panel.mjs +3 -3
- package/esm2022/legacy-dialog/testing/dialog-opener.mjs +6 -1
- package/esm2022/legacy-menu/menu.mjs +4 -2
- package/esm2022/legacy-table/text-column.mjs +6 -2
- package/esm2022/legacy-tabs/tab.mjs +6 -3
- package/esm2022/legacy-tooltip/tooltip.mjs +5 -2
- package/expansion/_expansion-legacy-index.scss +0 -1
- package/expansion/_expansion-theme.import.scss +0 -2
- package/expansion/_expansion-theme.scss +12 -68
- package/fesm2022/autocomplete.mjs +61 -38
- package/fesm2022/autocomplete.mjs.map +1 -1
- package/fesm2022/core.mjs +9 -5
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/expansion.mjs +8 -5
- package/fesm2022/expansion.mjs.map +1 -1
- package/fesm2022/legacy-dialog/testing.mjs +5 -0
- package/fesm2022/legacy-dialog/testing.mjs.map +1 -1
- package/fesm2022/legacy-menu.mjs +3 -1
- package/fesm2022/legacy-menu.mjs.map +1 -1
- package/fesm2022/legacy-table.mjs +5 -1
- package/fesm2022/legacy-table.mjs.map +1 -1
- package/fesm2022/legacy-tabs.mjs +5 -2
- package/fesm2022/legacy-tabs.mjs.map +1 -1
- package/fesm2022/legacy-tooltip.mjs +4 -1
- package/fesm2022/legacy-tooltip.mjs.map +1 -1
- package/legacy-prebuilt-themes/legacy-deeppurple-amber.css +1 -1
- package/legacy-prebuilt-themes/legacy-indigo-pink.css +1 -1
- package/legacy-prebuilt-themes/legacy-pink-bluegrey.css +1 -1
- package/legacy-prebuilt-themes/legacy-purple-green.css +1 -1
- package/package.json +2 -2
- 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/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
- package/expansion/_expansion-mixins.import.scss +0 -1
- package/expansion/_expansion-mixins.scss +0 -11
package/autocomplete/index.d.ts
CHANGED
|
@@ -302,6 +302,8 @@ export declare abstract class _MatAutocompleteTriggerBase implements ControlValu
|
|
|
302
302
|
private _componentDestroyed;
|
|
303
303
|
private _autocompleteDisabled;
|
|
304
304
|
private _scrollStrategy;
|
|
305
|
+
private _keydownSubscription;
|
|
306
|
+
private _outsideClickSubscription;
|
|
305
307
|
/** Old value of the native input. Used to work around issues with the `input` event on IE. */
|
|
306
308
|
private _previousValue;
|
|
307
309
|
/** Strategy that is used to position the panel. */
|
|
@@ -428,6 +430,10 @@ export declare abstract class _MatAutocompleteTriggerBase implements ControlValu
|
|
|
428
430
|
*/
|
|
429
431
|
private _clearPreviousSelectedOption;
|
|
430
432
|
private _attachOverlay;
|
|
433
|
+
/** Handles keyboard events coming from the overlay panel. */
|
|
434
|
+
private _handlePanelKeydown;
|
|
435
|
+
/** Updates the panel's visibility state and any trigger state tied to id. */
|
|
436
|
+
private _updatePanelState;
|
|
431
437
|
private _getOverlayConfig;
|
|
432
438
|
private _getOverlayPosition;
|
|
433
439
|
/** Sets the positions on a position strategy based on the directive's input state. */
|
|
@@ -450,8 +456,6 @@ export declare abstract class _MatAutocompleteTriggerBase implements ControlValu
|
|
|
450
456
|
private _getWindow;
|
|
451
457
|
/** Scrolls to a particular option in the list. */
|
|
452
458
|
private _scrollToOption;
|
|
453
|
-
/** Handles keyboard events coming from the overlay panel. */
|
|
454
|
-
private _handleOverlayEvents;
|
|
455
459
|
/**
|
|
456
460
|
* Track which modal we have modified the `aria-owns` attribute of. When the combobox trigger is
|
|
457
461
|
* inside an aria-modal, we apply aria-owns to the parent modal with the `id` of the options
|
package/core/index.d.ts
CHANGED
|
@@ -606,9 +606,9 @@ export declare class _MatOptionBase<T = any> implements FocusableOption, AfterVi
|
|
|
606
606
|
*/
|
|
607
607
|
get viewValue(): string;
|
|
608
608
|
/** Selects the option. */
|
|
609
|
-
select(): void;
|
|
609
|
+
select(emitEvent?: boolean): void;
|
|
610
610
|
/** Deselects the option. */
|
|
611
|
-
deselect(): void;
|
|
611
|
+
deselect(emitEvent?: boolean): void;
|
|
612
612
|
/** Sets focus onto this option. */
|
|
613
613
|
focus(_origin?: FocusOrigin, options?: FocusOptions): void;
|
|
614
614
|
/**
|
|
@@ -39,6 +39,7 @@ $placeholder-typography-config: (
|
|
|
39
39
|
caption: $_placeholder-typography-level-config,
|
|
40
40
|
button: $_placeholder-typography-level-config,
|
|
41
41
|
overline: $_placeholder-typography-level-config,
|
|
42
|
+
subheading-1: $_placeholder-typography-level-config,
|
|
42
43
|
);
|
|
43
44
|
|
|
44
45
|
// Placeholder density config that can be passed to token getter functions when generating token
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../token-utils';
|
|
3
|
+
@use '../../../theming/theming';
|
|
4
|
+
@use '../../../style/sass-utils';
|
|
5
|
+
@use '../../../typography/typography-utils';
|
|
6
|
+
|
|
7
|
+
// The prefix used to generate the fully qualified name for tokens in this file.
|
|
8
|
+
$prefix: (mat, expansion);
|
|
9
|
+
|
|
10
|
+
// Tokens that can't be configured through Angular Material's current theming API,
|
|
11
|
+
// but may be in a future version of the theming API.
|
|
12
|
+
@function get-unthemable-tokens() {
|
|
13
|
+
@return (
|
|
14
|
+
container-shape: 4px,
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Tokens that can be configured through Angular Material's color theming API.
|
|
19
|
+
@function get-color-tokens($config) {
|
|
20
|
+
$foreground: map.get($config, foreground);
|
|
21
|
+
$background: map.get($config, background);
|
|
22
|
+
|
|
23
|
+
@return (
|
|
24
|
+
container-background-color: theming.get-color-from-palette($background, card),
|
|
25
|
+
container-text-color: theming.get-color-from-palette($foreground, text),
|
|
26
|
+
actions-divider-color: theming.get-color-from-palette($foreground, divider),
|
|
27
|
+
header-hover-state-layer-color: theming.get-color-from-palette($background, hover),
|
|
28
|
+
header-focus-state-layer-color: theming.get-color-from-palette($background, hover),
|
|
29
|
+
header-disabled-state-text-color: theming.get-color-from-palette($foreground, disabled-button),
|
|
30
|
+
header-text-color: theming.get-color-from-palette($foreground, text),
|
|
31
|
+
header-description-color: theming.get-color-from-palette($foreground, secondary-text),
|
|
32
|
+
header-indicator-color: theming.get-color-from-palette($foreground, secondary-text),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Tokens that can be configured through Angular Material's typography theming API.
|
|
37
|
+
@function get-typography-tokens($config) {
|
|
38
|
+
$fallback-font-family: typography-utils.font-family($config);
|
|
39
|
+
|
|
40
|
+
@return (
|
|
41
|
+
header-text-font: typography-utils.font-family($config, subheading-1) or $fallback-font-family,
|
|
42
|
+
header-text-size: typography-utils.font-size($config, subheading-1),
|
|
43
|
+
header-text-weight: typography-utils.font-weight($config, subheading-1),
|
|
44
|
+
|
|
45
|
+
// TODO(crisbeto): these two properties weren't set at all before the introduction of tokens,
|
|
46
|
+
// but it's inconsistent not to provide them since the container sets all of them. Eventually
|
|
47
|
+
// we should change the values to use come from `subheading-1`.
|
|
48
|
+
header-text-line-height: inherit,
|
|
49
|
+
header-text-tracking: inherit,
|
|
50
|
+
|
|
51
|
+
container-text-font: typography-utils.font-family($config, body-1) or $fallback-font-family,
|
|
52
|
+
container-text-line-height: typography-utils.line-height($config, body-1),
|
|
53
|
+
container-text-size: typography-utils.font-size($config, body-1),
|
|
54
|
+
container-text-tracking: typography-utils.letter-spacing($config, body-1),
|
|
55
|
+
container-text-weight: typography-utils.font-weight($config, body-1),
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Tokens that can be configured through Angular Material's density theming API.
|
|
60
|
+
@function get-density-tokens($config) {
|
|
61
|
+
$scale: theming.clamp-density($config, -3);
|
|
62
|
+
$collapsed-scale: (
|
|
63
|
+
0: 48px,
|
|
64
|
+
-1: 44px,
|
|
65
|
+
-2: 40px,
|
|
66
|
+
-3: 36px,
|
|
67
|
+
);
|
|
68
|
+
$expanded-scale: (
|
|
69
|
+
0: 64px,
|
|
70
|
+
-1: 60px,
|
|
71
|
+
-2: 56px,
|
|
72
|
+
-3: 48px,
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
@return (
|
|
76
|
+
header-collapsed-state-height: map.get($collapsed-scale, $scale),
|
|
77
|
+
header-expanded-state-height: map.get($expanded-scale, $scale),
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Combines the tokens generated by the above functions into a single map with placeholder values.
|
|
82
|
+
// This is used to create token slots.
|
|
83
|
+
@function get-token-slots() {
|
|
84
|
+
@return sass-utils.deep-merge-all(
|
|
85
|
+
get-unthemable-tokens(),
|
|
86
|
+
get-color-tokens(token-utils.$placeholder-color-config),
|
|
87
|
+
get-typography-tokens(token-utils.$placeholder-typography-config),
|
|
88
|
+
get-density-tokens(token-utils.$placeholder-density-config)
|
|
89
|
+
);
|
|
90
|
+
}
|