@angular/material 15.0.2 → 15.1.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/autocomplete/index.d.ts +8 -1
- package/chips/index.d.ts +3 -1
- package/datepicker/index.d.ts +60 -5
- package/esm2020/autocomplete/autocomplete-trigger.mjs +7 -5
- package/esm2020/autocomplete/autocomplete.mjs +13 -1
- package/esm2020/chips/chip-option.mjs +5 -4
- package/esm2020/chips/chip-row.mjs +5 -4
- package/esm2020/chips/chip.mjs +7 -2
- package/esm2020/core/version.mjs +1 -1
- package/esm2020/datepicker/calendar-body.mjs +124 -11
- package/esm2020/datepicker/calendar.mjs +25 -3
- package/esm2020/datepicker/date-range-selection-strategy.mjs +28 -1
- package/esm2020/datepicker/datepicker-base.mjs +11 -4
- package/esm2020/datepicker/datepicker-input-base.mjs +6 -3
- package/esm2020/datepicker/month-view.mjs +59 -7
- package/esm2020/datepicker/multi-year-view.mjs +1 -1
- package/esm2020/datepicker/year-view.mjs +1 -1
- package/esm2020/legacy-list/selection-list.mjs +1 -1
- package/esm2020/legacy-tabs/testing/tab-harness-filters.mjs +1 -1
- package/esm2020/legacy-tabs/testing/tab-harness.mjs +4 -2
- package/esm2020/list/list-item-sections.mjs +10 -10
- package/esm2020/list/list-option-types.mjs +1 -1
- package/esm2020/list/list-option.mjs +36 -19
- package/esm2020/list/public-api.mjs +1 -1
- package/esm2020/list/testing/selection-list-harness.mjs +6 -1
- package/esm2020/tabs/testing/tab-harness-filters.mjs +1 -1
- package/esm2020/tabs/testing/tab-harness.mjs +4 -2
- package/fesm2015/autocomplete.mjs +20 -5
- package/fesm2015/autocomplete.mjs.map +1 -1
- package/fesm2015/chips.mjs +14 -7
- package/fesm2015/chips.mjs.map +1 -1
- package/fesm2015/core.mjs +1 -1
- package/fesm2015/core.mjs.map +1 -1
- package/fesm2015/datepicker.mjs +252 -24
- package/fesm2015/datepicker.mjs.map +1 -1
- package/fesm2015/legacy-list.mjs.map +1 -1
- package/fesm2015/legacy-tabs/testing.mjs +3 -1
- package/fesm2015/legacy-tabs/testing.mjs.map +1 -1
- package/fesm2015/list/testing.mjs +7 -0
- package/fesm2015/list/testing.mjs.map +1 -1
- package/fesm2015/list.mjs +44 -27
- package/fesm2015/list.mjs.map +1 -1
- package/fesm2015/tabs/testing.mjs +3 -1
- package/fesm2015/tabs/testing.mjs.map +1 -1
- package/fesm2020/autocomplete.mjs +18 -3
- package/fesm2020/autocomplete.mjs.map +1 -1
- package/fesm2020/chips.mjs +14 -7
- package/fesm2020/chips.mjs.map +1 -1
- package/fesm2020/core.mjs +1 -1
- package/fesm2020/core.mjs.map +1 -1
- package/fesm2020/datepicker.mjs +248 -24
- package/fesm2020/datepicker.mjs.map +1 -1
- package/fesm2020/legacy-list.mjs.map +1 -1
- package/fesm2020/legacy-tabs/testing.mjs +3 -1
- package/fesm2020/legacy-tabs/testing.mjs.map +1 -1
- package/fesm2020/list/testing.mjs +5 -0
- package/fesm2020/list/testing.mjs.map +1 -1
- package/fesm2020/list.mjs +44 -27
- package/fesm2020/list.mjs.map +1 -1
- package/fesm2020/tabs/testing.mjs +3 -1
- package/fesm2020/tabs/testing.mjs.map +1 -1
- package/legacy-list/index.d.ts +1 -1
- package/legacy-tabs/testing/index.d.ts +2 -0
- package/list/_interactive-list-theme.scss +0 -17
- package/list/_list-option-theme.scss +6 -3
- package/list/index.d.ts +25 -13
- package/list/testing/index.d.ts +5 -2
- 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/radio/_radio-private.scss +60 -0
- package/radio/_radio-theme.scss +7 -45
- package/tabs/testing/index.d.ts +5 -3
|
@@ -22,6 +22,8 @@ export declare interface LegacyTabGroupHarnessFilters extends BaseHarnessFilters
|
|
|
22
22
|
export declare interface LegacyTabHarnessFilters extends BaseHarnessFilters {
|
|
23
23
|
/** Only find instances whose label matches the given value. */
|
|
24
24
|
label?: string | RegExp;
|
|
25
|
+
/** Only find instances whose selected state matches the given value. */
|
|
26
|
+
selected?: boolean;
|
|
25
27
|
}
|
|
26
28
|
|
|
27
29
|
/**
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '@material/ripple' as mdc-ripple;
|
|
3
|
-
@use '../core/theming/theming';
|
|
4
3
|
|
|
5
4
|
// Mixin that provides colors for the various states of an interactive list-item. MDC
|
|
6
5
|
// has integrated styles for these states but relies on their complex ripples for it.
|
|
7
6
|
@mixin private-interactive-list-item-state-colors($config) {
|
|
8
7
|
$is-dark-theme: map.get($config, is-dark);
|
|
9
8
|
$active-base-color: if($is-dark-theme, white, black);
|
|
10
|
-
$selected-color: theming.get-color-from-palette(map.get($config, primary));
|
|
11
9
|
|
|
12
10
|
.mat-mdc-list-item-interactive {
|
|
13
11
|
&::before {
|
|
@@ -18,21 +16,6 @@
|
|
|
18
16
|
opacity: mdc-ripple.states-opacity($active-base-color, hover);
|
|
19
17
|
}
|
|
20
18
|
|
|
21
|
-
&.mdc-list-item--selected {
|
|
22
|
-
&::before {
|
|
23
|
-
background: $selected-color;
|
|
24
|
-
opacity: mdc-ripple.states-opacity($selected-color, selected);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&:not(:focus):not(.mdc-list-item--disabled):hover::before {
|
|
28
|
-
// The hover and selected opacities need to be combined to match with what the MDC
|
|
29
|
-
// ripple state would render. More details here:
|
|
30
|
-
// https://github.com/material-components/material-components-web/blob/348665978ce73694ad4518626dd70cdf5b984113/packages/mdc-ripple/_ripple-theme.scss#L450.
|
|
31
|
-
opacity: mdc-ripple.states-opacity($selected-color, hover) +
|
|
32
|
-
mdc-ripple.states-opacity($selected-color, selected);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
19
|
&:focus::before {
|
|
37
20
|
opacity: mdc-ripple.states-opacity($active-base-color, focus);
|
|
38
21
|
}
|
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
@use '../core/mdc-helpers/mdc-helpers';
|
|
3
3
|
@use '../checkbox/checkbox-private';
|
|
4
4
|
@use './list-option-trailing-avatar-compat';
|
|
5
|
+
@use '../radio/radio-private';
|
|
5
6
|
|
|
6
|
-
// Mixin that overrides the selected item and
|
|
7
|
-
// default, the MDC list uses the `primary` color for list items.
|
|
8
|
-
// inside list options by default uses the `primary`
|
|
7
|
+
// Mixin that overrides the selected item and toggle indicator colors for list
|
|
8
|
+
// options. By default, the MDC list uses the `primary` color for list items.
|
|
9
|
+
// The MDC radio/checkbox inside list options by default uses the `primary`
|
|
10
|
+
// color too.
|
|
9
11
|
@mixin private-list-option-color-override($color-config, $color, $mdc-color) {
|
|
10
12
|
& .mdc-list-item__start, & .mdc-list-item__end {
|
|
11
13
|
@include checkbox-private.private-checkbox-styles-with-color($color-config, $color, $mdc-color);
|
|
14
|
+
@include radio-private.private-radio-color($color-config, $color);
|
|
12
15
|
}
|
|
13
16
|
}
|
|
14
17
|
|
package/list/index.d.ts
CHANGED
|
@@ -83,7 +83,7 @@ declare namespace i7 {
|
|
|
83
83
|
* @docs-private
|
|
84
84
|
*/
|
|
85
85
|
declare interface ListOption {
|
|
86
|
-
|
|
86
|
+
_getTogglePosition(): MatListOptionTogglePosition;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/**
|
|
@@ -256,9 +256,9 @@ declare abstract class MatListItemBase implements AfterViewInit, OnDestroy, Ripp
|
|
|
256
256
|
/**
|
|
257
257
|
* @docs-private
|
|
258
258
|
*
|
|
259
|
-
* MDC uses the very intuitively named classes `.mdc-list-item__start` and `.mat-list-item__end`
|
|
260
|
-
*
|
|
261
|
-
* content respectively. This directive detects the placement of the checkbox and applies the
|
|
259
|
+
* MDC uses the very intuitively named classes `.mdc-list-item__start` and `.mat-list-item__end` to
|
|
260
|
+
* position content such as icons or checkboxes/radios that comes either before or after the text
|
|
261
|
+
* content respectively. This directive detects the placement of the checkbox/radio and applies the
|
|
262
262
|
* correct MDC class to position the icon/avatar on the opposite side.
|
|
263
263
|
*/
|
|
264
264
|
export declare class _MatListItemGraphicBase {
|
|
@@ -334,9 +334,17 @@ export declare class MatListOption extends MatListItemBase implements ListOption
|
|
|
334
334
|
* @docs-private
|
|
335
335
|
*/
|
|
336
336
|
readonly selectedChange: EventEmitter<boolean>;
|
|
337
|
-
/** Whether the label should appear before or after the checkbox. Defaults to 'after' */
|
|
338
|
-
|
|
339
|
-
/**
|
|
337
|
+
/** Whether the label should appear before or after the checkbox/radio. Defaults to 'after' */
|
|
338
|
+
togglePosition: MatListOptionTogglePosition;
|
|
339
|
+
/**
|
|
340
|
+
* Whether the label should appear before or after the checkbox/radio. Defaults to 'after'
|
|
341
|
+
*
|
|
342
|
+
* @deprecated Use `togglePosition` instead.
|
|
343
|
+
* @breaking-change 17.0.0
|
|
344
|
+
*/
|
|
345
|
+
get checkboxPosition(): MatListOptionTogglePosition;
|
|
346
|
+
set checkboxPosition(value: MatListOptionTogglePosition);
|
|
347
|
+
/** Theme color of the list option. This sets the color of the checkbox/radio. */
|
|
340
348
|
get color(): ThemePalette;
|
|
341
349
|
set color(newValue: ThemePalette);
|
|
342
350
|
private _color;
|
|
@@ -363,14 +371,16 @@ export declare class MatListOption extends MatListItemBase implements ListOption
|
|
|
363
371
|
/** Gets the text label of the list option. Used for the typeahead functionality in the list. */
|
|
364
372
|
getLabel(): string;
|
|
365
373
|
/** Whether a checkbox is shown at the given position. */
|
|
366
|
-
_hasCheckboxAt(position:
|
|
374
|
+
_hasCheckboxAt(position: MatListOptionTogglePosition): boolean;
|
|
375
|
+
/** Where a radio indicator is shown at the given position. */
|
|
376
|
+
_hasRadioAt(position: MatListOptionTogglePosition): boolean;
|
|
367
377
|
/** Whether icons or avatars are shown at the given position. */
|
|
368
378
|
_hasIconsOrAvatarsAt(position: 'before' | 'after'): boolean;
|
|
369
379
|
/** Gets whether the given type of element is projected at the specified position. */
|
|
370
380
|
_hasProjected(type: 'icons' | 'avatars', position: 'before' | 'after'): boolean;
|
|
371
381
|
_handleBlur(): void;
|
|
372
|
-
/** Gets the current position of the checkbox. */
|
|
373
|
-
|
|
382
|
+
/** Gets the current position of the checkbox/radio. */
|
|
383
|
+
_getTogglePosition(): MatListOptionTogglePosition;
|
|
374
384
|
/**
|
|
375
385
|
* Sets the selected state of the option.
|
|
376
386
|
* @returns Whether the value has changed.
|
|
@@ -387,14 +397,16 @@ export declare class MatListOption extends MatListItemBase implements ListOption
|
|
|
387
397
|
/** Sets the tabindex of the list option. */
|
|
388
398
|
_setTabindex(value: number): void;
|
|
389
399
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatListOption, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
390
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatListOption, "mat-list-option", ["matListOption"], { "checkboxPosition": "checkboxPosition"; "color": "color"; "value": "value"; "selected": "selected"; }, { "selectedChange": "selectedChange"; }, ["_lines", "_titles"], ["[matListItemAvatar],[matListItemIcon]", "[matListItemTitle]", "[matListItemLine]", "*", "mat-divider"], false, never>;
|
|
400
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatListOption, "mat-list-option", ["matListOption"], { "togglePosition": "togglePosition"; "checkboxPosition": "checkboxPosition"; "color": "color"; "value": "value"; "selected": "selected"; }, { "selectedChange": "selectedChange"; }, ["_lines", "_titles"], ["[matListItemAvatar],[matListItemIcon]", "[matListItemTitle]", "[matListItemLine]", "*", "mat-divider"], false, never>;
|
|
391
401
|
}
|
|
392
402
|
|
|
393
403
|
/**
|
|
394
|
-
* Type describing possible positions of a checkbox in a list option
|
|
404
|
+
* Type describing possible positions of a checkbox or radio in a list option
|
|
395
405
|
* with respect to the list item's text.
|
|
396
406
|
*/
|
|
397
|
-
|
|
407
|
+
declare type MatListOptionTogglePosition = 'before' | 'after';
|
|
408
|
+
export { MatListOptionTogglePosition as MatListOptionCheckboxPosition }
|
|
409
|
+
export { MatListOptionTogglePosition }
|
|
398
410
|
|
|
399
411
|
/**
|
|
400
412
|
* Directive whose purpose is to add the mat- CSS styling to this selector.
|
package/list/testing/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { ContentContainerComponentHarness } from '@angular/cdk/testing';
|
|
|
5
5
|
import { DividerHarnessFilters } from '@angular/material/divider/testing';
|
|
6
6
|
import { HarnessPredicate } from '@angular/cdk/testing';
|
|
7
7
|
import { MatDividerHarness } from '@angular/material/divider/testing';
|
|
8
|
-
import {
|
|
8
|
+
import { MatListOptionTogglePosition } from '@angular/material/list';
|
|
9
9
|
|
|
10
10
|
export declare interface ActionListHarnessFilters extends BaseHarnessFilters {
|
|
11
11
|
}
|
|
@@ -255,8 +255,11 @@ export declare class MatListOptionHarness extends MatListItemHarnessBase {
|
|
|
255
255
|
*/
|
|
256
256
|
static with<T extends MatListOptionHarness>(this: ComponentHarnessConstructor<T>, options?: ListOptionHarnessFilters): HarnessPredicate<T>;
|
|
257
257
|
private _beforeCheckbox;
|
|
258
|
+
private _beforeRadio;
|
|
258
259
|
/** Gets the position of the checkbox relative to the list option content. */
|
|
259
|
-
getCheckboxPosition(): Promise<
|
|
260
|
+
getCheckboxPosition(): Promise<MatListOptionTogglePosition>;
|
|
261
|
+
/** Gets the position of the radio relative to the list option content. */
|
|
262
|
+
getRadioPosition(): Promise<MatListOptionTogglePosition>;
|
|
260
263
|
/** Whether the list option is selected. */
|
|
261
264
|
isSelected(): Promise<boolean>;
|
|
262
265
|
/** Focuses the list option. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/material",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.1.0-next.1",
|
|
4
4
|
"description": "Angular Material",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -989,7 +989,7 @@
|
|
|
989
989
|
},
|
|
990
990
|
"peerDependencies": {
|
|
991
991
|
"@angular/animations": "^15.0.0 || ^16.0.0",
|
|
992
|
-
"@angular/cdk": "15.0.
|
|
992
|
+
"@angular/cdk": "15.1.0-next.1",
|
|
993
993
|
"@angular/core": "^15.0.0 || ^16.0.0",
|
|
994
994
|
"@angular/common": "^15.0.0 || ^16.0.0",
|
|
995
995
|
"@angular/forms": "^15.0.0 || ^16.0.0",
|