@angular/material-experimental 13.1.3 → 13.2.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 +2 -1
- package/esm2020/column-resize/column-resize-directives/column-resize-flex.mjs +4 -4
- package/esm2020/column-resize/column-resize-directives/column-resize.mjs +4 -4
- package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize-flex.mjs +4 -4
- package/esm2020/column-resize/column-resize-directives/default-enabled-column-resize.mjs +4 -4
- package/esm2020/column-resize/column-resize-module.mjs +13 -13
- package/esm2020/column-resize/overlay-handle.mjs +4 -4
- package/esm2020/column-resize/resizable-directives/default-enabled-resizable.mjs +4 -4
- package/esm2020/column-resize/resizable-directives/resizable.mjs +4 -4
- package/esm2020/column-resize/resize-strategy.mjs +4 -4
- package/esm2020/mdc-autocomplete/autocomplete-origin.mjs +4 -4
- package/esm2020/mdc-autocomplete/autocomplete-trigger.mjs +4 -4
- package/esm2020/mdc-autocomplete/autocomplete.mjs +4 -4
- package/esm2020/mdc-autocomplete/module.mjs +5 -5
- package/esm2020/mdc-button/button-base.mjs +9 -9
- package/esm2020/mdc-button/button.mjs +9 -9
- package/esm2020/mdc-button/fab.mjs +17 -17
- package/esm2020/mdc-button/icon-button.mjs +11 -13
- package/esm2020/mdc-button/module.mjs +5 -5
- package/esm2020/mdc-card/card.mjs +43 -43
- package/esm2020/mdc-card/module.mjs +5 -5
- package/esm2020/mdc-checkbox/checkbox.mjs +9 -16
- package/esm2020/mdc-checkbox/module.mjs +6 -7
- package/esm2020/mdc-chips/chip-action.mjs +123 -0
- package/esm2020/mdc-chips/chip-edit-input.mjs +5 -5
- package/esm2020/mdc-chips/chip-grid.mjs +49 -99
- package/esm2020/mdc-chips/chip-icons.mjs +39 -101
- package/esm2020/mdc-chips/chip-input.mjs +6 -13
- package/esm2020/mdc-chips/chip-listbox.mjs +51 -156
- package/esm2020/mdc-chips/chip-option.mjs +84 -95
- package/esm2020/mdc-chips/chip-row.mjs +81 -89
- package/esm2020/mdc-chips/chip-set.mjs +119 -120
- package/esm2020/mdc-chips/chip.mjs +188 -180
- package/esm2020/mdc-chips/emit-event.mjs +27 -0
- package/esm2020/mdc-chips/module.mjs +8 -10
- package/esm2020/mdc-chips/testing/chip-harness.mjs +5 -1
- package/esm2020/mdc-chips/testing/chip-option-harness.mjs +2 -2
- package/esm2020/mdc-chips/testing/chip-row-harness.mjs +10 -1
- package/esm2020/mdc-core/option/index.mjs +5 -5
- package/esm2020/mdc-core/option/optgroup.mjs +4 -4
- package/esm2020/mdc-core/option/option.mjs +5 -5
- package/esm2020/mdc-core/public-api.mjs +2 -2
- package/esm2020/mdc-dialog/dialog-container.mjs +4 -4
- package/esm2020/mdc-dialog/dialog-content-directives.mjs +13 -13
- package/esm2020/mdc-dialog/dialog.mjs +4 -4
- package/esm2020/mdc-dialog/module.mjs +5 -5
- package/esm2020/mdc-form-field/directives/error.mjs +4 -4
- package/esm2020/mdc-form-field/directives/floating-label.mjs +4 -4
- package/esm2020/mdc-form-field/directives/hint.mjs +4 -4
- package/esm2020/mdc-form-field/directives/label.mjs +4 -4
- package/esm2020/mdc-form-field/directives/line-ripple.mjs +4 -4
- package/esm2020/mdc-form-field/directives/notched-outline.mjs +4 -4
- package/esm2020/mdc-form-field/directives/prefix.mjs +4 -4
- package/esm2020/mdc-form-field/directives/suffix.mjs +4 -4
- package/esm2020/mdc-form-field/form-field.mjs +21 -5
- package/esm2020/mdc-form-field/module.mjs +5 -5
- package/esm2020/mdc-input/input.mjs +4 -4
- package/esm2020/mdc-input/module.mjs +5 -5
- package/esm2020/mdc-list/action-list.mjs +5 -5
- package/esm2020/mdc-list/interactive-list-base.mjs +4 -4
- package/esm2020/mdc-list/list-base.mjs +138 -41
- package/esm2020/mdc-list/list-item-sections.mjs +138 -0
- package/esm2020/mdc-list/list-option.mjs +25 -17
- package/esm2020/mdc-list/list.mjs +24 -18
- package/esm2020/mdc-list/module.mjs +46 -23
- package/esm2020/mdc-list/nav-list.mjs +5 -5
- package/esm2020/mdc-list/public-api.mjs +3 -2
- package/esm2020/mdc-list/selection-list.mjs +8 -8
- package/esm2020/mdc-list/subheader.mjs +27 -0
- package/esm2020/mdc-list/testing/list-harness-filters.mjs +1 -1
- package/esm2020/mdc-list/testing/list-item-harness-base.mjs +100 -12
- package/esm2020/mdc-list/testing/public-api.mjs +2 -1
- package/esm2020/mdc-list/testing/selection-list-harness.mjs +1 -5
- package/esm2020/mdc-menu/directives.mjs +7 -7
- package/esm2020/mdc-menu/menu-item.mjs +4 -4
- package/esm2020/mdc-menu/menu.mjs +4 -4
- package/esm2020/mdc-menu/module.mjs +5 -5
- package/esm2020/mdc-paginator/module.mjs +5 -5
- package/esm2020/mdc-paginator/paginator.mjs +4 -4
- package/esm2020/mdc-progress-bar/module.mjs +5 -5
- package/esm2020/mdc-progress-bar/progress-bar.mjs +4 -4
- package/esm2020/mdc-progress-spinner/module.mjs +5 -5
- package/esm2020/mdc-progress-spinner/progress-spinner.mjs +4 -4
- package/esm2020/mdc-radio/module.mjs +5 -5
- package/esm2020/mdc-radio/radio.mjs +8 -8
- package/esm2020/mdc-select/module.mjs +5 -5
- package/esm2020/mdc-select/select.mjs +7 -7
- package/esm2020/mdc-sidenav/module.mjs +5 -5
- package/esm2020/mdc-slide-toggle/module.mjs +5 -5
- package/esm2020/mdc-slide-toggle/slide-toggle.mjs +4 -4
- package/esm2020/mdc-slider/global-change-and-input-listener.mjs +4 -4
- package/esm2020/mdc-slider/module.mjs +5 -5
- package/esm2020/mdc-slider/slider.mjs +10 -10
- package/esm2020/mdc-snack-bar/module.mjs +5 -5
- package/esm2020/mdc-snack-bar/simple-snack-bar.mjs +4 -4
- package/esm2020/mdc-snack-bar/snack-bar-container.mjs +4 -4
- package/esm2020/mdc-snack-bar/snack-bar-content.mjs +10 -10
- package/esm2020/mdc-snack-bar/snack-bar.mjs +4 -4
- package/esm2020/mdc-table/cell.mjs +22 -22
- package/esm2020/mdc-table/module.mjs +5 -5
- package/esm2020/mdc-table/row.mjs +22 -22
- package/esm2020/mdc-table/table.mjs +7 -7
- package/esm2020/mdc-table/text-column.mjs +4 -4
- package/esm2020/mdc-tabs/module.mjs +10 -6
- package/esm2020/mdc-tabs/public-api.mjs +2 -2
- package/esm2020/mdc-tabs/tab-body.mjs +8 -8
- package/esm2020/mdc-tabs/tab-content.mjs +4 -4
- package/esm2020/mdc-tabs/tab-group.mjs +7 -7
- package/esm2020/mdc-tabs/tab-header.mjs +5 -5
- package/esm2020/mdc-tabs/tab-label-wrapper.mjs +4 -4
- package/esm2020/mdc-tabs/tab-label.mjs +4 -4
- package/esm2020/mdc-tabs/tab-nav-bar/tab-nav-bar.mjs +48 -11
- package/esm2020/mdc-tabs/tab.mjs +5 -5
- package/esm2020/mdc-tabs/testing/tab-harness-filters.mjs +1 -1
- package/esm2020/mdc-tabs/testing/tab-nav-bar-harness.mjs +13 -1
- package/esm2020/mdc-tabs/testing/tab-nav-panel-harness.mjs +27 -0
- package/esm2020/mdc-tooltip/module.mjs +5 -5
- package/esm2020/mdc-tooltip/tooltip.mjs +7 -7
- package/esm2020/menubar/menubar-item.mjs +4 -4
- package/esm2020/menubar/menubar-module.mjs +5 -5
- package/esm2020/menubar/menubar.mjs +4 -4
- package/esm2020/popover-edit/lens-directives.mjs +10 -10
- package/esm2020/popover-edit/popover-edit-module.mjs +5 -5
- package/esm2020/popover-edit/table-directives.mjs +13 -13
- package/esm2020/selection/row-selection.mjs +4 -4
- package/esm2020/selection/select-all.mjs +4 -4
- package/esm2020/selection/selection-column.mjs +4 -4
- package/esm2020/selection/selection-module.mjs +5 -5
- package/esm2020/selection/selection-toggle.mjs +4 -4
- package/esm2020/selection/selection.mjs +4 -4
- package/esm2020/version.mjs +1 -1
- package/fesm2015/column-resize.mjs +36 -36
- package/fesm2015/column-resize.mjs.map +1 -1
- package/fesm2015/material-experimental.mjs +1 -1
- package/fesm2015/material-experimental.mjs.map +1 -1
- package/fesm2015/mdc-autocomplete.mjs +13 -13
- package/fesm2015/mdc-autocomplete.mjs.map +1 -1
- package/fesm2015/mdc-button.mjs +46 -48
- package/fesm2015/mdc-button.mjs.map +1 -1
- package/fesm2015/mdc-card.mjs +46 -46
- package/fesm2015/mdc-card.mjs.map +1 -1
- package/fesm2015/mdc-checkbox.mjs +13 -21
- package/fesm2015/mdc-checkbox.mjs.map +1 -1
- package/fesm2015/mdc-chips/testing.mjs +18 -8
- package/fesm2015/mdc-chips/testing.mjs.map +1 -1
- package/fesm2015/mdc-chips.mjs +752 -1062
- package/fesm2015/mdc-chips.mjs.map +1 -1
- package/fesm2015/mdc-core.mjs +12 -12
- package/fesm2015/mdc-core.mjs.map +1 -1
- package/fesm2015/mdc-dialog.mjs +22 -22
- package/fesm2015/mdc-dialog.mjs.map +1 -1
- package/fesm2015/mdc-form-field.mjs +50 -32
- package/fesm2015/mdc-form-field.mjs.map +1 -1
- package/fesm2015/mdc-input.mjs +7 -7
- package/fesm2015/mdc-input.mjs.map +1 -1
- package/fesm2015/mdc-list/testing.mjs +110 -18
- package/fesm2015/mdc-list/testing.mjs.map +1 -1
- package/fesm2015/mdc-list.mjs +353 -148
- package/fesm2015/mdc-list.mjs.map +1 -1
- package/fesm2015/mdc-menu.mjs +16 -16
- package/fesm2015/mdc-menu.mjs.map +1 -1
- package/fesm2015/mdc-paginator.mjs +7 -7
- package/fesm2015/mdc-paginator.mjs.map +1 -1
- package/fesm2015/mdc-progress-bar.mjs +7 -7
- package/fesm2015/mdc-progress-bar.mjs.map +1 -1
- package/fesm2015/mdc-progress-spinner.mjs +7 -7
- package/fesm2015/mdc-progress-spinner.mjs.map +1 -1
- package/fesm2015/mdc-radio.mjs +11 -11
- package/fesm2015/mdc-radio.mjs.map +1 -1
- package/fesm2015/mdc-select.mjs +10 -10
- package/fesm2015/mdc-select.mjs.map +1 -1
- package/fesm2015/mdc-sidenav.mjs +4 -4
- package/fesm2015/mdc-sidenav.mjs.map +1 -1
- package/fesm2015/mdc-slide-toggle.mjs +7 -7
- package/fesm2015/mdc-slide-toggle.mjs.map +1 -1
- package/fesm2015/mdc-slider.mjs +16 -16
- package/fesm2015/mdc-slider.mjs.map +1 -1
- package/fesm2015/mdc-snack-bar.mjs +22 -22
- package/fesm2015/mdc-snack-bar.mjs.map +1 -1
- package/fesm2015/mdc-table.mjs +55 -55
- package/fesm2015/mdc-table.mjs.map +1 -1
- package/fesm2015/mdc-tabs/testing.mjs +34 -0
- package/fesm2015/mdc-tabs/testing.mjs.map +1 -1
- package/fesm2015/mdc-tabs.mjs +86 -45
- package/fesm2015/mdc-tabs.mjs.map +1 -1
- package/fesm2015/mdc-tooltip.mjs +10 -10
- package/fesm2015/mdc-tooltip.mjs.map +1 -1
- package/fesm2015/menubar.mjs +10 -10
- package/fesm2015/menubar.mjs.map +1 -1
- package/fesm2015/popover-edit.mjs +25 -25
- package/fesm2015/popover-edit.mjs.map +1 -1
- package/fesm2015/selection.mjs +19 -19
- package/fesm2015/selection.mjs.map +1 -1
- package/fesm2020/column-resize.mjs +36 -36
- package/fesm2020/column-resize.mjs.map +1 -1
- package/fesm2020/material-experimental.mjs +1 -1
- package/fesm2020/material-experimental.mjs.map +1 -1
- package/fesm2020/mdc-autocomplete.mjs +13 -13
- package/fesm2020/mdc-autocomplete.mjs.map +1 -1
- package/fesm2020/mdc-button.mjs +46 -48
- package/fesm2020/mdc-button.mjs.map +1 -1
- package/fesm2020/mdc-card.mjs +46 -46
- package/fesm2020/mdc-card.mjs.map +1 -1
- package/fesm2020/mdc-checkbox.mjs +13 -21
- package/fesm2020/mdc-checkbox.mjs.map +1 -1
- package/fesm2020/mdc-chips/testing.mjs +14 -1
- package/fesm2020/mdc-chips/testing.mjs.map +1 -1
- package/fesm2020/mdc-chips.mjs +732 -1067
- package/fesm2020/mdc-chips.mjs.map +1 -1
- package/fesm2020/mdc-core.mjs +12 -12
- package/fesm2020/mdc-core.mjs.map +1 -1
- package/fesm2020/mdc-dialog.mjs +22 -22
- package/fesm2020/mdc-dialog.mjs.map +1 -1
- package/fesm2020/mdc-form-field.mjs +48 -32
- package/fesm2020/mdc-form-field.mjs.map +1 -1
- package/fesm2020/mdc-input.mjs +7 -7
- package/fesm2020/mdc-input.mjs.map +1 -1
- package/fesm2020/mdc-list/testing.mjs +100 -16
- package/fesm2020/mdc-list/testing.mjs.map +1 -1
- package/fesm2020/mdc-list.mjs +351 -148
- package/fesm2020/mdc-list.mjs.map +1 -1
- package/fesm2020/mdc-menu.mjs +16 -16
- package/fesm2020/mdc-menu.mjs.map +1 -1
- package/fesm2020/mdc-paginator.mjs +7 -7
- package/fesm2020/mdc-paginator.mjs.map +1 -1
- package/fesm2020/mdc-progress-bar.mjs +7 -7
- package/fesm2020/mdc-progress-bar.mjs.map +1 -1
- package/fesm2020/mdc-progress-spinner.mjs +7 -7
- package/fesm2020/mdc-progress-spinner.mjs.map +1 -1
- package/fesm2020/mdc-radio.mjs +11 -11
- package/fesm2020/mdc-radio.mjs.map +1 -1
- package/fesm2020/mdc-select.mjs +10 -10
- package/fesm2020/mdc-select.mjs.map +1 -1
- package/fesm2020/mdc-sidenav.mjs +4 -4
- package/fesm2020/mdc-sidenav.mjs.map +1 -1
- package/fesm2020/mdc-slide-toggle.mjs +7 -7
- package/fesm2020/mdc-slide-toggle.mjs.map +1 -1
- package/fesm2020/mdc-slider.mjs +16 -16
- package/fesm2020/mdc-slider.mjs.map +1 -1
- package/fesm2020/mdc-snack-bar.mjs +22 -22
- package/fesm2020/mdc-snack-bar.mjs.map +1 -1
- package/fesm2020/mdc-table.mjs +55 -55
- package/fesm2020/mdc-table.mjs.map +1 -1
- package/fesm2020/mdc-tabs/testing.mjs +37 -0
- package/fesm2020/mdc-tabs/testing.mjs.map +1 -1
- package/fesm2020/mdc-tabs.mjs +86 -45
- package/fesm2020/mdc-tabs.mjs.map +1 -1
- package/fesm2020/mdc-tooltip.mjs +10 -10
- package/fesm2020/mdc-tooltip.mjs.map +1 -1
- package/fesm2020/menubar.mjs +10 -10
- package/fesm2020/menubar.mjs.map +1 -1
- package/fesm2020/popover-edit.mjs +25 -25
- package/fesm2020/popover-edit.mjs.map +1 -1
- package/fesm2020/selection.mjs +19 -19
- package/fesm2020/selection.mjs.map +1 -1
- package/mdc-button/_button-base.scss +28 -15
- package/mdc-button/_button-theme-private.scss +35 -28
- package/mdc-button/_button-theme.scss +115 -80
- package/mdc-button/_fab-theme.scss +31 -37
- package/mdc-button/_icon-button-theme.scss +15 -22
- package/mdc-button/button-base.d.ts +2 -2
- package/mdc-button/icon-button.d.ts +2 -2
- package/mdc-checkbox/_checkbox-theme.scss +4 -11
- package/mdc-checkbox/checkbox.d.ts +0 -6
- package/mdc-checkbox/module.d.ts +2 -3
- package/mdc-chips/_chips-theme.scss +53 -53
- package/mdc-chips/chip-action.d.ts +40 -0
- package/mdc-chips/chip-grid.d.ts +6 -24
- package/mdc-chips/chip-icons.d.ts +14 -37
- package/mdc-chips/chip-listbox.d.ts +4 -40
- package/mdc-chips/chip-option.d.ts +15 -11
- package/mdc-chips/chip-row.d.ts +13 -28
- package/mdc-chips/chip-set.d.ts +25 -42
- package/mdc-chips/chip.d.ts +37 -36
- package/mdc-chips/emit-event.d.ts +16 -0
- package/mdc-chips/module.d.ts +13 -12
- package/mdc-chips/testing/chip-harness.d.ts +1 -0
- package/mdc-chips/testing/chip-row-harness.d.ts +4 -0
- package/mdc-core/_core-theme.scss +47 -14
- package/mdc-core/option/_option-theme.scss +3 -3
- package/mdc-core/public-api.d.ts +1 -1
- package/mdc-form-field/_form-field-subscript.scss +11 -0
- package/mdc-form-field/form-field.d.ts +12 -1
- package/mdc-helpers/_focus-indicators.scss +11 -3
- package/mdc-list/_interactive-list-theme.scss +17 -11
- package/mdc-list/list-base.d.ts +56 -11
- package/mdc-list/list-item-sections.d.ts +77 -0
- package/mdc-list/list-option.d.ts +11 -8
- package/mdc-list/list.d.ts +6 -2
- package/mdc-list/module.d.ts +7 -5
- package/mdc-list/public-api.d.ts +2 -1
- package/mdc-list/subheader.d.ts +9 -0
- package/mdc-list/testing/list-harness-filters.d.ts +8 -0
- package/mdc-list/testing/list-item-harness-base.d.ts +36 -3
- package/mdc-list/testing/public-api.d.ts +1 -1
- package/mdc-list/testing/selection-list-harness.d.ts +0 -2
- package/mdc-radio/_radio-theme.scss +0 -6
- package/mdc-tabs/_tabs-common.scss +8 -1
- package/mdc-tabs/_tabs-theme.scss +8 -55
- package/mdc-tabs/module.d.ts +1 -1
- package/mdc-tabs/public-api.d.ts +1 -1
- package/mdc-tabs/tab-nav-bar/tab-nav-bar.d.ts +11 -0
- package/mdc-tabs/testing/tab-harness-filters.d.ts +3 -0
- package/mdc-tabs/testing/tab-nav-bar-harness.d.ts +3 -0
- package/mdc-tabs/testing/tab-nav-panel-harness.d.ts +23 -0
- package/mdc-theming/prebuilt/deeppurple-amber.css +1 -1
- package/mdc-theming/prebuilt/indigo-pink.css +1 -1
- package/mdc-theming/prebuilt/pink-bluegrey.css +1 -1
- package/mdc-theming/prebuilt/purple-green.css +1 -1
- package/package.json +3 -3
- package/esm2020/mdc-chips/grid-focus-key-manager.mjs +0 -21
- package/esm2020/mdc-chips/grid-key-manager.mjs +0 -218
- package/esm2020/mdc-list/list-styling.mjs +0 -92
- package/mdc-chips/grid-focus-key-manager.d.ts +0 -28
- package/mdc-chips/grid-key-manager.d.ts +0 -116
- package/mdc-list/list-styling.d.ts +0 -40
package/mdc-list/list-base.d.ts
CHANGED
|
@@ -7,24 +7,44 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
9
9
|
import { Platform } from '@angular/cdk/platform';
|
|
10
|
-
import {
|
|
10
|
+
import { AfterViewInit, ElementRef, NgZone, OnDestroy, QueryList } from '@angular/core';
|
|
11
11
|
import { RippleConfig, RippleGlobalOptions, RippleTarget } from '@angular/material-experimental/mdc-core';
|
|
12
|
+
import { MatListItemLine, MatListItemTitle } from './list-item-sections';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
|
-
export declare abstract class MatListItemBase implements
|
|
14
|
+
export declare abstract class MatListItemBase implements AfterViewInit, OnDestroy, RippleTarget {
|
|
14
15
|
_elementRef: ElementRef<HTMLElement>;
|
|
15
16
|
protected _ngZone: NgZone;
|
|
16
17
|
private _listBase;
|
|
17
18
|
private _platform;
|
|
18
19
|
/** Query list matching list-item line elements. */
|
|
19
|
-
abstract
|
|
20
|
-
/**
|
|
21
|
-
abstract
|
|
20
|
+
abstract _lines: QueryList<MatListItemLine> | undefined;
|
|
21
|
+
/** Query list matching list-item title elements. */
|
|
22
|
+
abstract _titles: QueryList<MatListItemTitle> | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Element reference to the unscoped content in a list item.
|
|
25
|
+
*
|
|
26
|
+
* Unscoped content is user-projected text content in a list item that is
|
|
27
|
+
* not part of an explicit line or title.
|
|
28
|
+
*/
|
|
29
|
+
abstract _unscopedContent: ElementRef<HTMLSpanElement> | undefined;
|
|
22
30
|
/** Host element for the list item. */
|
|
23
31
|
_hostElement: HTMLElement;
|
|
24
32
|
/** Whether animations are disabled. */
|
|
25
33
|
_noopAnimations: boolean;
|
|
26
34
|
_avatars: QueryList<never>;
|
|
27
35
|
_icons: QueryList<never>;
|
|
36
|
+
/**
|
|
37
|
+
* The number of lines this list item should reserve space for. If not specified,
|
|
38
|
+
* lines are inferred based on the projected content.
|
|
39
|
+
*
|
|
40
|
+
* Explicitly specifying the number of lines is useful if you want to acquire additional
|
|
41
|
+
* space and enable the wrapping of text. The unscoped text content of a list item will
|
|
42
|
+
* always be able to take up the remaining space of the item, unless it represents the title.
|
|
43
|
+
*
|
|
44
|
+
* A maximum of three lines is supported as per the Material Design specification.
|
|
45
|
+
*/
|
|
46
|
+
set lines(lines: number | string | null);
|
|
47
|
+
_explicitLines: number | null;
|
|
28
48
|
get disableRipple(): boolean;
|
|
29
49
|
set disableRipple(value: boolean);
|
|
30
50
|
private _disableRipple;
|
|
@@ -34,6 +54,8 @@ export declare abstract class MatListItemBase implements AfterContentInit, OnDes
|
|
|
34
54
|
private _disabled;
|
|
35
55
|
private _subscriptions;
|
|
36
56
|
private _rippleRenderer;
|
|
57
|
+
/** Whether the list item has unscoped text content. */
|
|
58
|
+
_hasUnscopedTextContent: boolean;
|
|
37
59
|
/**
|
|
38
60
|
* Implemented as part of `RippleTarget`.
|
|
39
61
|
* @docs-private
|
|
@@ -44,8 +66,8 @@ export declare abstract class MatListItemBase implements AfterContentInit, OnDes
|
|
|
44
66
|
* @docs-private
|
|
45
67
|
*/
|
|
46
68
|
get rippleDisabled(): boolean;
|
|
47
|
-
constructor(_elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _listBase: MatListBase, _platform: Platform, globalRippleOptions?: RippleGlobalOptions, animationMode?: string);
|
|
48
|
-
|
|
69
|
+
protected constructor(_elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _listBase: MatListBase, _platform: Platform, globalRippleOptions?: RippleGlobalOptions, animationMode?: string);
|
|
70
|
+
ngAfterViewInit(): void;
|
|
49
71
|
ngOnDestroy(): void;
|
|
50
72
|
/** Gets the label for the list item. This is used for the typeahead. */
|
|
51
73
|
_getItemLabel(): string;
|
|
@@ -53,12 +75,35 @@ export declare abstract class MatListItemBase implements AfterContentInit, OnDes
|
|
|
53
75
|
_hasIconOrAvatar(): boolean;
|
|
54
76
|
private _initInteractiveListItem;
|
|
55
77
|
/**
|
|
56
|
-
* Subscribes to changes in
|
|
57
|
-
*
|
|
78
|
+
* Subscribes to changes in the projected title and lines. Triggers a
|
|
79
|
+
* item lines update whenever a change occurs.
|
|
80
|
+
*/
|
|
81
|
+
private _monitorProjectedLinesAndTitle;
|
|
82
|
+
/**
|
|
83
|
+
* Updates the lines of the list item. Based on the projected user content and optional
|
|
84
|
+
* explicit lines setting, the visual appearance of the list item is determined.
|
|
85
|
+
*
|
|
86
|
+
* This method should be invoked whenever the projected user content changes, or
|
|
87
|
+
* when the explicit lines have been updated.
|
|
88
|
+
*
|
|
89
|
+
* @param recheckUnscopedContent Whether the projected unscoped content should be re-checked.
|
|
90
|
+
* The unscoped content is not re-checked for every update as it is a rather expensive check
|
|
91
|
+
* for content that is expected to not change very often.
|
|
92
|
+
*/
|
|
93
|
+
_updateItemLines(recheckUnscopedContent: boolean): void;
|
|
94
|
+
/**
|
|
95
|
+
* Infers the number of lines based on the projected user content. This is useful
|
|
96
|
+
* if no explicit number of lines has been specified on the list item.
|
|
97
|
+
*
|
|
98
|
+
* The number of lines is inferred based on whether there is a title, the number of
|
|
99
|
+
* additional lines (secondary/tertiary). An additional line is acquired if there is
|
|
100
|
+
* unscoped text content.
|
|
58
101
|
*/
|
|
59
|
-
private
|
|
102
|
+
private _inferLinesFromContent;
|
|
103
|
+
/** Checks whether the list item has unscoped text content. */
|
|
104
|
+
private _checkDomForUnscopedTextContent;
|
|
60
105
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatListItemBase, [null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
61
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<MatListItemBase, never, never, { "disableRipple": "disableRipple"; "disabled": "disabled"; }, {}, ["_avatars", "_icons"]>;
|
|
106
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatListItemBase, never, never, { "lines": "lines"; "disableRipple": "disableRipple"; "disabled": "disabled"; }, {}, ["_avatars", "_icons"]>;
|
|
62
107
|
}
|
|
63
108
|
export declare abstract class MatListBase {
|
|
64
109
|
_isNonInteractive: boolean;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { ElementRef } from '@angular/core';
|
|
9
|
+
import { ListOption } from './list-option-types';
|
|
10
|
+
import * as i0 from "@angular/core";
|
|
11
|
+
/**
|
|
12
|
+
* Directive capturing the title of a list item. A list item usually consists of a
|
|
13
|
+
* title and optional secondary or tertiary lines.
|
|
14
|
+
*
|
|
15
|
+
* Text content for the title never wraps. There can only be a single title per list item.
|
|
16
|
+
*/
|
|
17
|
+
export declare class MatListItemTitle {
|
|
18
|
+
_elementRef: ElementRef<HTMLElement>;
|
|
19
|
+
constructor(_elementRef: ElementRef<HTMLElement>);
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatListItemTitle, never>;
|
|
21
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatListItemTitle, "[matListItemTitle]", never, {}, {}, never>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Directive capturing a line in a list item. A list item usually consists of a
|
|
25
|
+
* title and optional secondary or tertiary lines.
|
|
26
|
+
*
|
|
27
|
+
* Text content inside a line never wraps. There can be at maximum two lines per list item.
|
|
28
|
+
*/
|
|
29
|
+
export declare class MatListItemLine {
|
|
30
|
+
_elementRef: ElementRef<HTMLElement>;
|
|
31
|
+
constructor(_elementRef: ElementRef<HTMLElement>);
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatListItemLine, never>;
|
|
33
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatListItemLine, "[matListItemLine]", never, {}, {}, never>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Directive matching an optional meta section for list items.
|
|
37
|
+
*
|
|
38
|
+
* List items can reserve space at the end of an item to display a control,
|
|
39
|
+
* button or additional text content.
|
|
40
|
+
*/
|
|
41
|
+
export declare class MatListItemMeta {
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatListItemMeta, never>;
|
|
43
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatListItemMeta, "[matListItemMeta]", never, {}, {}, never>;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* @docs-private
|
|
47
|
+
*
|
|
48
|
+
* MDC uses the very intuitively named classes `.mdc-list-item__start` and `.mat-list-item__end`
|
|
49
|
+
* to position content such as icons or checkboxes that comes either before or after the text
|
|
50
|
+
* content respectively. This directive detects the placement of the checkbox and applies the
|
|
51
|
+
* correct MDC class to position the icon/avatar on the opposite side.
|
|
52
|
+
*/
|
|
53
|
+
export declare class _MatListItemGraphicBase {
|
|
54
|
+
_listOption: ListOption;
|
|
55
|
+
constructor(_listOption: ListOption);
|
|
56
|
+
_isAlignedAtStart(): boolean;
|
|
57
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<_MatListItemGraphicBase, [{ optional: true; }]>;
|
|
58
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<_MatListItemGraphicBase, never, never, {}, {}, never>;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Directive matching an optional avatar within a list item.
|
|
62
|
+
*
|
|
63
|
+
* List items can reserve space at the beginning of an item to display an avatar.
|
|
64
|
+
*/
|
|
65
|
+
export declare class MatListItemAvatar extends _MatListItemGraphicBase {
|
|
66
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatListItemAvatar, never>;
|
|
67
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatListItemAvatar, "[matListItemAvatar]", never, {}, {}, never>;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Directive matching an optional icon within a list item.
|
|
71
|
+
*
|
|
72
|
+
* List items can reserve space at the beginning of an item to display an icon.
|
|
73
|
+
*/
|
|
74
|
+
export declare class MatListItemIcon extends _MatListItemGraphicBase {
|
|
75
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatListItemIcon, never>;
|
|
76
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatListItemIcon, "[matListItemIcon]", never, {}, {}, never>;
|
|
77
|
+
}
|
|
@@ -12,6 +12,7 @@ import { ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, NgZone, On
|
|
|
12
12
|
import { RippleGlobalOptions, ThemePalette } from '@angular/material-experimental/mdc-core';
|
|
13
13
|
import { MatListBase, MatListItemBase } from './list-base';
|
|
14
14
|
import { ListOption, MatListOptionCheckboxPosition } from './list-option-types';
|
|
15
|
+
import { MatListItemLine, MatListItemTitle } from './list-item-sections';
|
|
15
16
|
import * as i0 from "@angular/core";
|
|
16
17
|
/**
|
|
17
18
|
* Injection token that can be used to reference instances of an `SelectionList`. It serves
|
|
@@ -36,19 +37,16 @@ export interface SelectionList extends MatListBase {
|
|
|
36
37
|
export declare class MatListOption extends MatListItemBase implements ListOption, OnInit, OnDestroy {
|
|
37
38
|
_selectionList: SelectionList;
|
|
38
39
|
private _changeDetectorRef;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
private _inputsInitialized;
|
|
40
|
+
_lines: QueryList<MatListItemLine>;
|
|
41
|
+
_titles: QueryList<MatListItemTitle>;
|
|
42
|
+
_unscopedContent: ElementRef<HTMLSpanElement>;
|
|
43
|
+
_itemText: ElementRef<HTMLElement>;
|
|
44
44
|
/**
|
|
45
45
|
* Emits when the selected state of the option has changed.
|
|
46
46
|
* Use to facilitate two-data binding to the `selected` property.
|
|
47
47
|
* @docs-private
|
|
48
48
|
*/
|
|
49
49
|
readonly selectedChange: EventEmitter<boolean>;
|
|
50
|
-
_itemText: ElementRef<HTMLElement>;
|
|
51
|
-
lines: QueryList<ElementRef<Element>>;
|
|
52
50
|
/** Whether the label should appear before or after the checkbox. Defaults to 'after' */
|
|
53
51
|
checkboxPosition: MatListOptionCheckboxPosition;
|
|
54
52
|
/** Theme color of the list option. This sets the color of the checkbox. */
|
|
@@ -63,6 +61,11 @@ export declare class MatListOption extends MatListItemBase implements ListOption
|
|
|
63
61
|
get selected(): boolean;
|
|
64
62
|
set selected(value: BooleanInput);
|
|
65
63
|
private _selected;
|
|
64
|
+
/**
|
|
65
|
+
* This is set to true after the first OnChanges cycle so we don't
|
|
66
|
+
* clear the value of `selected` in the first cycle.
|
|
67
|
+
*/
|
|
68
|
+
private _inputsInitialized;
|
|
66
69
|
constructor(element: ElementRef, ngZone: NgZone, platform: Platform, _selectionList: SelectionList, _changeDetectorRef: ChangeDetectorRef, globalRippleOptions?: RippleGlobalOptions, animationMode?: string);
|
|
67
70
|
ngOnInit(): void;
|
|
68
71
|
ngOnDestroy(): void;
|
|
@@ -91,5 +94,5 @@ export declare class MatListOption extends MatListItemBase implements ListOption
|
|
|
91
94
|
*/
|
|
92
95
|
_markForCheck(): void;
|
|
93
96
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatListOption, [null, null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
94
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatListOption, "mat-list-option", ["matListOption"], { "checkboxPosition": "checkboxPosition"; "color": "color"; "value": "value"; "selected": "selected"; }, { "selectedChange": "selectedChange"; }, ["
|
|
97
|
+
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"]>;
|
|
95
98
|
}
|
package/mdc-list/list.d.ts
CHANGED
|
@@ -9,15 +9,19 @@ import { Platform } from '@angular/cdk/platform';
|
|
|
9
9
|
import { ElementRef, NgZone, QueryList } from '@angular/core';
|
|
10
10
|
import { RippleGlobalOptions } from '@angular/material-experimental/mdc-core';
|
|
11
11
|
import { MatListBase, MatListItemBase } from './list-base';
|
|
12
|
+
import { MatListItemLine, MatListItemMeta, MatListItemTitle } from './list-item-sections';
|
|
12
13
|
import * as i0 from "@angular/core";
|
|
13
14
|
export declare class MatList extends MatListBase {
|
|
14
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatList, never>;
|
|
15
16
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatList, "mat-list", ["matList"], {}, {}, never, ["*"]>;
|
|
16
17
|
}
|
|
17
18
|
export declare class MatListItem extends MatListItemBase {
|
|
18
|
-
|
|
19
|
+
_lines: QueryList<MatListItemLine>;
|
|
20
|
+
_titles: QueryList<MatListItemTitle>;
|
|
21
|
+
_meta: QueryList<MatListItemMeta>;
|
|
22
|
+
_unscopedContent: ElementRef<HTMLSpanElement>;
|
|
19
23
|
_itemText: ElementRef<HTMLElement>;
|
|
20
24
|
constructor(element: ElementRef, ngZone: NgZone, listBase: MatListBase, platform: Platform, globalRippleOptions?: RippleGlobalOptions, animationMode?: string);
|
|
21
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatListItem, [null, null, null, null, { optional: true; }, { optional: true; }]>;
|
|
22
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MatListItem, "mat-list-item, a[mat-list-item], button[mat-list-item]", ["matListItem"], {}, {}, ["
|
|
26
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatListItem, "mat-list-item, a[mat-list-item], button[mat-list-item]", ["matListItem"], {}, {}, ["_lines", "_titles", "_meta"], ["[matListItemAvatar],[matListItemIcon]", "[matListItemTitle]", "[matListItemLine]", "*", "[matListItemMeta]", "mat-divider"]>;
|
|
23
27
|
}
|
package/mdc-list/module.d.ts
CHANGED
|
@@ -4,12 +4,14 @@ import * as i2 from "./action-list";
|
|
|
4
4
|
import * as i3 from "./nav-list";
|
|
5
5
|
import * as i4 from "./selection-list";
|
|
6
6
|
import * as i5 from "./list-option";
|
|
7
|
-
import * as i6 from "./
|
|
8
|
-
import * as i7 from "
|
|
9
|
-
import * as i8 from "@angular/
|
|
10
|
-
import * as i9 from "@angular/
|
|
7
|
+
import * as i6 from "./subheader";
|
|
8
|
+
import * as i7 from "./list-item-sections";
|
|
9
|
+
import * as i8 from "@angular/cdk/observers";
|
|
10
|
+
import * as i9 from "@angular/common";
|
|
11
|
+
import * as i10 from "@angular/material-experimental/mdc-core";
|
|
12
|
+
import * as i11 from "@angular/material/divider";
|
|
11
13
|
export declare class MatListModule {
|
|
12
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatListModule, never>;
|
|
13
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MatListModule, [typeof i1.MatList, typeof i2.MatActionList, typeof i3.MatNavList, typeof i4.MatSelectionList, typeof i1.MatListItem, typeof i5.MatListOption, typeof i6.
|
|
15
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MatListModule, [typeof i1.MatList, typeof i2.MatActionList, typeof i3.MatNavList, typeof i4.MatSelectionList, typeof i1.MatListItem, typeof i5.MatListOption, typeof i6.MatListSubheaderCssMatStyler, typeof i7.MatListItemAvatar, typeof i7.MatListItemIcon, typeof i7.MatListItemLine, typeof i7.MatListItemTitle, typeof i7.MatListItemMeta], [typeof i8.ObserversModule, typeof i9.CommonModule, typeof i10.MatCommonModule, typeof i10.MatRippleModule, typeof i10.MatPseudoCheckboxModule], [typeof i1.MatList, typeof i2.MatActionList, typeof i3.MatNavList, typeof i4.MatSelectionList, typeof i1.MatListItem, typeof i5.MatListOption, typeof i7.MatListItemAvatar, typeof i7.MatListItemIcon, typeof i6.MatListSubheaderCssMatStyler, typeof i11.MatDividerModule, typeof i7.MatListItemLine, typeof i7.MatListItemTitle, typeof i7.MatListItemMeta]>;
|
|
14
16
|
static ɵinj: i0.ɵɵInjectorDeclaration<MatListModule>;
|
|
15
17
|
}
|
package/mdc-list/public-api.d.ts
CHANGED
|
@@ -11,7 +11,8 @@ export * from './module';
|
|
|
11
11
|
export * from './nav-list';
|
|
12
12
|
export * from './selection-list';
|
|
13
13
|
export * from './list-option';
|
|
14
|
-
export * from './
|
|
14
|
+
export * from './subheader';
|
|
15
|
+
export * from './list-item-sections';
|
|
15
16
|
export { MatListOptionCheckboxPosition } from './list-option-types';
|
|
16
17
|
export { MatListOption } from './list-option';
|
|
17
18
|
export { MAT_LIST, MAT_NAV_LIST, MAT_SELECTION_LIST_VALUE_ACCESSOR } from '@angular/material/list';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Directive whose purpose is to add the mat- CSS styling to this selector.
|
|
4
|
+
* @docs-private
|
|
5
|
+
*/
|
|
6
|
+
export declare class MatListSubheaderCssMatStyler {
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatListSubheaderCssMatStyler, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MatListSubheaderCssMatStyler, "[mat-subheader], [matSubheader]", never, {}, {}, never>;
|
|
9
|
+
}
|
|
@@ -15,6 +15,14 @@ export interface NavListHarnessFilters extends BaseHarnessFilters {
|
|
|
15
15
|
export interface SelectionListHarnessFilters extends BaseHarnessFilters {
|
|
16
16
|
}
|
|
17
17
|
export interface BaseListItemHarnessFilters extends BaseHarnessFilters {
|
|
18
|
+
title?: string | RegExp;
|
|
19
|
+
secondaryText?: string | RegExp | null;
|
|
20
|
+
tertiaryText?: string | RegExp | null;
|
|
21
|
+
fullText?: string | RegExp;
|
|
22
|
+
/**
|
|
23
|
+
* @deprecated Use the `fullText` filter instead.
|
|
24
|
+
* @breaking-change 16.0.0
|
|
25
|
+
*/
|
|
18
26
|
text?: string | RegExp;
|
|
19
27
|
}
|
|
20
28
|
export interface ListItemHarnessFilters extends BaseListItemHarnessFilters {
|
|
@@ -27,18 +27,51 @@ export declare class MatSubheaderHarness extends ComponentHarness {
|
|
|
27
27
|
export declare const enum MatListItemSection {
|
|
28
28
|
CONTENT = ".mdc-list-item__content"
|
|
29
29
|
}
|
|
30
|
+
/** Enum describing the possible variants of a list item. */
|
|
31
|
+
export declare const enum MatListItemType {
|
|
32
|
+
ONE_LINE_ITEM = 0,
|
|
33
|
+
TWO_LINE_ITEM = 1,
|
|
34
|
+
THREE_LINE_ITEM = 2
|
|
35
|
+
}
|
|
30
36
|
/**
|
|
31
37
|
* Shared behavior among the harnesses for the various `MatListItem` flavors.
|
|
32
38
|
* @docs-private
|
|
33
39
|
*/
|
|
34
40
|
export declare abstract class MatListItemHarnessBase extends ContentContainerComponentHarness<MatListItemSection> {
|
|
35
41
|
private _lines;
|
|
42
|
+
private _primaryText;
|
|
36
43
|
private _avatar;
|
|
37
44
|
private _icon;
|
|
38
|
-
|
|
45
|
+
private _unscopedTextContent;
|
|
46
|
+
/** Gets the type of the list item, currently describing how many lines there are. */
|
|
47
|
+
getType(): Promise<MatListItemType>;
|
|
48
|
+
/**
|
|
49
|
+
* Gets the full text content of the list item, excluding text
|
|
50
|
+
* from icons and avatars.
|
|
51
|
+
*
|
|
52
|
+
* @deprecated Use the `getFullText` method instead.
|
|
53
|
+
* @breaking-change 16.0.0
|
|
54
|
+
*/
|
|
39
55
|
getText(): Promise<string>;
|
|
40
|
-
/**
|
|
41
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Gets the full text content of the list item, excluding text
|
|
58
|
+
* from icons and avatars.
|
|
59
|
+
*/
|
|
60
|
+
getFullText(): Promise<string>;
|
|
61
|
+
/** Gets the title of the list item. */
|
|
62
|
+
getTitle(): Promise<string>;
|
|
63
|
+
/** Whether the list item is disabled. */
|
|
64
|
+
isDisabled(): Promise<boolean>;
|
|
65
|
+
/**
|
|
66
|
+
* Gets the secondary line text of the list item. Null if the list item
|
|
67
|
+
* does not have a secondary line.
|
|
68
|
+
*/
|
|
69
|
+
getSecondaryText(): Promise<string | null>;
|
|
70
|
+
/**
|
|
71
|
+
* Gets the tertiary line text of the list item. Null if the list item
|
|
72
|
+
* does not have a tertiary line.
|
|
73
|
+
*/
|
|
74
|
+
getTertiaryText(): Promise<string | null>;
|
|
42
75
|
/** Whether this list item has an avatar. */
|
|
43
76
|
hasAvatar(): Promise<boolean>;
|
|
44
77
|
/** Whether this list item has an icon. */
|
|
@@ -10,4 +10,4 @@ export * from './list-harness';
|
|
|
10
10
|
export * from './list-harness-filters';
|
|
11
11
|
export * from './nav-list-harness';
|
|
12
12
|
export * from './selection-list-harness';
|
|
13
|
-
export { MatListItemSection } from './list-item-harness-base';
|
|
13
|
+
export { MatListItemSection, MatSubheaderHarness, MatListItemType } from './list-item-harness-base';
|
|
@@ -53,8 +53,6 @@ export declare class MatListOptionHarness extends MatListItemHarnessBase {
|
|
|
53
53
|
getCheckboxPosition(): Promise<MatListOptionCheckboxPosition>;
|
|
54
54
|
/** Whether the list option is selected. */
|
|
55
55
|
isSelected(): Promise<boolean>;
|
|
56
|
-
/** Whether the list option is disabled. */
|
|
57
|
-
isDisabled(): Promise<boolean>;
|
|
58
56
|
/** Focuses the list option. */
|
|
59
57
|
focus(): Promise<void>;
|
|
60
58
|
/** Blurs the list option. */
|
|
@@ -10,12 +10,9 @@
|
|
|
10
10
|
@mixin _color-palette($color-palette) {
|
|
11
11
|
@include mdc-radio-theme.theme((
|
|
12
12
|
selected-focus-icon-color: $color-palette,
|
|
13
|
-
selected-focus-state-layer-color: $color-palette,
|
|
14
13
|
selected-hover-icon-color: $color-palette,
|
|
15
|
-
selected-hover-state-layer-color: $color-palette,
|
|
16
14
|
selected-icon-color: $color-palette,
|
|
17
15
|
selected-pressed-icon-color: $color-palette,
|
|
18
|
-
selected-pressed-state-layer-color: $color-palette,
|
|
19
16
|
));
|
|
20
17
|
|
|
21
18
|
// TODO(crisbeto): this should be included by MDC's `theme-styles`, but it isn't currently.
|
|
@@ -39,12 +36,9 @@
|
|
|
39
36
|
disabled-selected-icon-color: mdc-theme-color.$on-surface,
|
|
40
37
|
disabled-unselected-icon-color: mdc-theme-color.$on-surface,
|
|
41
38
|
unselected-focus-icon-color: $on-surface,
|
|
42
|
-
unselected-focus-state-layer-color: $on-surface,
|
|
43
39
|
unselected-hover-icon-color: $on-surface,
|
|
44
|
-
unselected-hover-state-layer-color: $on-surface,
|
|
45
40
|
unselected-icon-color: $on-surface,
|
|
46
41
|
unselected-pressed-icon-color: $on-surface,
|
|
47
|
-
unselected-pressed-state-layer-color: $on-surface,
|
|
48
42
|
));
|
|
49
43
|
|
|
50
44
|
&.mat-primary {
|
|
@@ -11,7 +11,7 @@ $mat-tab-animation-duration: 500ms !default;
|
|
|
11
11
|
// Combines the various structural styles we need for the tab group and tab nav bar.
|
|
12
12
|
@mixin structural-styles {
|
|
13
13
|
@include mdc-helpers.disable-fallback-declarations {
|
|
14
|
-
@include mdc-tab.
|
|
14
|
+
@include mdc-tab.static-styles($query: mdc-helpers.$mat-base-styles-query);
|
|
15
15
|
@include mdc-tab-indicator.core-styles($query: mdc-helpers.$mat-base-styles-query);
|
|
16
16
|
}
|
|
17
17
|
|
|
@@ -51,6 +51,13 @@ $mat-tab-animation-duration: 500ms !default;
|
|
|
51
51
|
pointer-events: none;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
// Required for `fitInkBarToContent` to work. This used to be included with MDC's `without-ripple`
|
|
55
|
+
// mixin, but that no longer appears to be the case with `static-styles`. Since the latter is
|
|
56
|
+
// ~10kb smaller, we include this one extra style ourselves.
|
|
57
|
+
.mdc-tab__content {
|
|
58
|
+
@include mdc-tab-indicator.surface;
|
|
59
|
+
}
|
|
60
|
+
|
|
54
61
|
// We need to handle the hover and focus indication ourselves, because we don't use MDC's ripple.
|
|
55
62
|
&:hover .mdc-tab__ripple::before {
|
|
56
63
|
opacity: map.get(mdc-ripple.$dark-ink-opacities, hover);
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
@use '@material/tab-indicator' as mdc-tab-indicator;
|
|
5
5
|
@use '@material/tab-indicator/tab-indicator-theme' as mdc-tab-indicator-theme;
|
|
6
6
|
@use '@material/tab' as mdc-tab;
|
|
7
|
-
@use '@material/tab/
|
|
7
|
+
@use '@material/tab/mixins' as mdc-tab-mixins;
|
|
8
8
|
@use '@material/tab-bar' as mdc-tab-bar;
|
|
9
9
|
@use '../mdc-helpers/mdc-helpers';
|
|
10
10
|
@use '../../material/core/typography/typography';
|
|
@@ -18,39 +18,9 @@
|
|
|
18
18
|
|
|
19
19
|
@include mdc-helpers.mat-using-mdc-theme($config) {
|
|
20
20
|
.mat-mdc-tab, .mat-mdc-tab-link {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
// TODO(crisbeto): these styles should actually be set through the `theme` mixin while the
|
|
25
|
-
// `theme-styles` are included in the `tab` mixin inside `_tabs-common.scss`. Currently
|
|
26
|
-
// they are not, because `theme-styles` outputs the token values directly, rather than
|
|
27
|
-
// generating CSS variables.
|
|
28
|
-
@include mdc-tab-theme.primary-navigation-tab-theme-styles(map.merge(
|
|
29
|
-
mdc-tab-theme.$primary-light-theme,
|
|
30
|
-
(
|
|
31
|
-
container-color: $surface,
|
|
32
|
-
inactive-focus-state-layer-color: $on-surface,
|
|
33
|
-
inactive-hover-state-layer-color: $on-surface,
|
|
34
|
-
inactive-pressed-state-layer-color: $on-surface,
|
|
35
|
-
with-icon-inactive-focus-icon-color: $on-surface,
|
|
36
|
-
with-icon-inactive-hover-icon-color: $on-surface,
|
|
37
|
-
with-icon-inactive-icon-color: $on-surface,
|
|
38
|
-
with-icon-inactive-pressed-icon-color: $on-surface,
|
|
39
|
-
with-label-text-inactive-focus-label-text-color: $on-surface,
|
|
40
|
-
with-label-text-inactive-hover-label-text-color: $on-surface,
|
|
41
|
-
with-label-text-inactive-label-text-color: $on-surface,
|
|
42
|
-
with-label-text-inactive-pressed-label-text-color: $on-surface,
|
|
43
|
-
|
|
44
|
-
// TODO(crisbeto): MDC's styles are set up so that the icon size is set through a
|
|
45
|
-
// `font-size` at the root of the tab while the text size of the tab is set on
|
|
46
|
-
// `.mdc-tab__text-label` which overrides the one from the root. The problem is that
|
|
47
|
-
// the `$light-theme` is looking for a `subhead2` level which doesn't exist in MDC's
|
|
48
|
-
// code which in turn causes no text label styles to be emitted and for the icon size
|
|
49
|
-
// to be applied to the entire tab. Since we don't support icons inside the tab
|
|
50
|
-
// anyway, we can temporarily work around it by preventing MDC from emitting icon
|
|
51
|
-
// styles. The correct label typography will be applied by our theme instead.
|
|
52
|
-
with-icon-icon-size: null
|
|
53
|
-
)));
|
|
21
|
+
&:not(.mat-mdc-tab-disabled) {
|
|
22
|
+
@include mdc-tab-mixins.text-label-color(rgba(mdc-theme-color.$on-surface, 0.6));
|
|
23
|
+
}
|
|
54
24
|
|
|
55
25
|
// MDC seems to include a background color on tabs which only stands out on dark themes.
|
|
56
26
|
// Disable for now for backwards compatibility. These styles are inside the theme in order
|
|
@@ -125,27 +95,10 @@
|
|
|
125
95
|
|
|
126
96
|
@mixin _palette-styles($color) {
|
|
127
97
|
.mat-mdc-tab, .mat-mdc-tab-link {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
@include mdc-tab-theme.primary-navigation-tab-theme-styles((
|
|
133
|
-
active-focus-state-layer-color: $color,
|
|
134
|
-
active-hover-state-layer-color: $color,
|
|
135
|
-
active-pressed-state-layer-color: $color,
|
|
136
|
-
with-icon-active-focus-icon-color: $color,
|
|
137
|
-
with-icon-active-hover-icon-color: $color,
|
|
138
|
-
with-icon-active-icon-color: $color,
|
|
139
|
-
with-icon-active-pressed-icon-color: $color,
|
|
140
|
-
with-label-text-active-focus-label-text-color: $color,
|
|
141
|
-
with-label-text-active-hover-label-text-color: $color,
|
|
142
|
-
with-label-text-active-label-text-color: $color,
|
|
143
|
-
with-label-text-active-pressed-label-text-color: $color,
|
|
144
|
-
));
|
|
145
|
-
|
|
146
|
-
@include mdc-tab-indicator-theme.theme-styles((
|
|
147
|
-
active-indicator-color: $color
|
|
148
|
-
));
|
|
98
|
+
&:not(.mat-mdc-tab-disabled) {
|
|
99
|
+
@include mdc-tab-mixins.active-text-label-color($color);
|
|
100
|
+
@include mdc-tab-indicator-theme.theme-styles((active-indicator-color: $color));
|
|
101
|
+
}
|
|
149
102
|
}
|
|
150
103
|
|
|
151
104
|
.mdc-tab__ripple::before,
|
package/mdc-tabs/module.d.ts
CHANGED
|
@@ -14,6 +14,6 @@ import * as i12 from "@angular/cdk/observers";
|
|
|
14
14
|
import * as i13 from "@angular/cdk/a11y";
|
|
15
15
|
export declare class MatTabsModule {
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatTabsModule, never>;
|
|
17
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<MatTabsModule, [typeof i1.MatTabContent, typeof i2.MatTabLabel, typeof i3.MatTab, typeof i4.MatTabGroup, typeof i5.MatTabNav, typeof i5.MatTabLink, typeof i6.MatTabBody, typeof i6.MatTabBodyPortal, typeof i7.MatTabLabelWrapper, typeof i8.MatTabHeader], [typeof i9.CommonModule, typeof i10.MatCommonModule, typeof i11.PortalModule, typeof i10.MatRippleModule, typeof i12.ObserversModule, typeof i13.A11yModule], [typeof i10.MatCommonModule, typeof i1.MatTabContent, typeof i2.MatTabLabel, typeof i3.MatTab, typeof i4.MatTabGroup, typeof i5.MatTabNav, typeof i5.MatTabLink]>;
|
|
17
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MatTabsModule, [typeof i1.MatTabContent, typeof i2.MatTabLabel, typeof i3.MatTab, typeof i4.MatTabGroup, typeof i5.MatTabNav, typeof i5.MatTabNavPanel, typeof i5.MatTabLink, typeof i6.MatTabBody, typeof i6.MatTabBodyPortal, typeof i7.MatTabLabelWrapper, typeof i8.MatTabHeader], [typeof i9.CommonModule, typeof i10.MatCommonModule, typeof i11.PortalModule, typeof i10.MatRippleModule, typeof i12.ObserversModule, typeof i13.A11yModule], [typeof i10.MatCommonModule, typeof i1.MatTabContent, typeof i2.MatTabLabel, typeof i3.MatTab, typeof i4.MatTabGroup, typeof i5.MatTabNav, typeof i5.MatTabNavPanel, typeof i5.MatTabLink]>;
|
|
18
18
|
static ɵinj: i0.ɵɵInjectorDeclaration<MatTabsModule>;
|
|
19
19
|
}
|
package/mdc-tabs/public-api.d.ts
CHANGED
|
@@ -14,5 +14,5 @@ export { MatTab } from './tab';
|
|
|
14
14
|
export { MatInkBar } from './ink-bar';
|
|
15
15
|
export { MatTabHeader } from './tab-header';
|
|
16
16
|
export { MatTabGroup } from './tab-group';
|
|
17
|
-
export { MatTabNav, MatTabLink } from './tab-nav-bar/tab-nav-bar';
|
|
17
|
+
export { MatTabNav, MatTabNavPanel, MatTabLink } from './tab-nav-bar/tab-nav-bar';
|
|
18
18
|
export { MatTabBodyPositionState, MatTabBodyOriginState, matTabsAnimations, _MatInkBarPositioner, _MAT_INK_BAR_POSITIONER, MatTabChangeEvent, MatTabHeaderPosition, MatTabsConfig, MAT_TABS_CONFIG, MAT_TAB_GROUP, MAT_TAB, ScrollDirection, } from '@angular/material/tabs';
|
|
@@ -50,3 +50,14 @@ export declare class MatTabLink extends _MatTabLinkBase implements MatInkBarItem
|
|
|
50
50
|
static ɵfac: i0.ɵɵFactoryDeclaration<MatTabLink, [null, null, { optional: true; }, { attribute: "tabindex"; }, null, null, { optional: true; }]>;
|
|
51
51
|
static ɵcmp: i0.ɵɵComponentDeclaration<MatTabLink, "[mat-tab-link], [matTabLink]", ["matTabLink"], { "disabled": "disabled"; "disableRipple": "disableRipple"; "tabIndex": "tabIndex"; }, {}, never, ["*"]>;
|
|
52
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Tab panel component associated with MatTabNav.
|
|
55
|
+
*/
|
|
56
|
+
export declare class MatTabNavPanel {
|
|
57
|
+
/** Unique id for the tab panel. */
|
|
58
|
+
id: string;
|
|
59
|
+
/** Id of the active tab in the nav bar. */
|
|
60
|
+
_activeTabId?: string;
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MatTabNavPanel, never>;
|
|
62
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MatTabNavPanel, "mat-tab-nav-panel", ["matTabNavPanel"], { "id": "id"; }, {}, never, ["*"]>;
|
|
63
|
+
}
|
|
@@ -24,3 +24,6 @@ export interface TabLinkHarnessFilters extends BaseHarnessFilters {
|
|
|
24
24
|
/** A set of criteria that can be used to filter a list of `MatTabNavBarHarness` instances. */
|
|
25
25
|
export interface TabNavBarHarnessFilters extends BaseHarnessFilters {
|
|
26
26
|
}
|
|
27
|
+
/** A set of criteria that can be used to filter a list of `MatTabNavBarHarness` instances. */
|
|
28
|
+
export interface TabNavPanelHarnessFilters extends BaseHarnessFilters {
|
|
29
|
+
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
9
9
|
import { TabNavBarHarnessFilters, TabLinkHarnessFilters } from './tab-harness-filters';
|
|
10
10
|
import { MatTabLinkHarness } from './tab-link-harness';
|
|
11
|
+
import { MatTabNavPanelHarness } from './tab-nav-panel-harness';
|
|
11
12
|
/** Harness for interacting with an MDC-based mat-tab-nav-bar in tests. */
|
|
12
13
|
export declare class MatTabNavBarHarness extends ComponentHarness {
|
|
13
14
|
/** The selector for the host element of a `MatTabNavBar` instance. */
|
|
@@ -32,4 +33,6 @@ export declare class MatTabNavBarHarness extends ComponentHarness {
|
|
|
32
33
|
* will be clicked.
|
|
33
34
|
*/
|
|
34
35
|
clickLink(filter?: TabLinkHarnessFilters): Promise<void>;
|
|
36
|
+
/** Gets the panel associated with the nav bar. */
|
|
37
|
+
getPanel(): Promise<MatTabNavPanelHarness>;
|
|
35
38
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { ContentContainerComponentHarness, HarnessPredicate } from '@angular/cdk/testing';
|
|
9
|
+
import { TabNavPanelHarnessFilters } from './tab-harness-filters';
|
|
10
|
+
/** Harness for interacting with a standard mat-tab-nav-panel in tests. */
|
|
11
|
+
export declare class MatTabNavPanelHarness extends ContentContainerComponentHarness {
|
|
12
|
+
/** The selector for the host element of a `MatTabNavPanel` instance. */
|
|
13
|
+
static hostSelector: string;
|
|
14
|
+
/**
|
|
15
|
+
* Gets a `HarnessPredicate` that can be used to search for a `MatTabNavPanel` that meets
|
|
16
|
+
* certain criteria.
|
|
17
|
+
* @param options Options for filtering which tab nav panel instances are considered a match.
|
|
18
|
+
* @return a `HarnessPredicate` configured with the given options.
|
|
19
|
+
*/
|
|
20
|
+
static with(options?: TabNavPanelHarnessFilters): HarnessPredicate<MatTabNavPanelHarness>;
|
|
21
|
+
/** Gets the tab panel text content. */
|
|
22
|
+
getTextContent(): Promise<string>;
|
|
23
|
+
}
|