@angular/material 11.1.2 → 11.2.2
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/_theming.scss +162 -155
- package/autocomplete/_autocomplete-theme.import.scss +2 -0
- package/autocomplete/autocomplete.d.ts +1 -1
- package/badge/_badge-theme.import.scss +5 -0
- package/bottom-sheet/_bottom-sheet-theme.import.scss +4 -0
- package/bottom-sheet/bottom-sheet-container.d.ts +2 -0
- package/bottom-sheet/index.metadata.json +1 -1
- package/bundles/material-autocomplete.umd.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.js +11 -3
- package/bundles/material-bottom-sheet.umd.js.map +1 -1
- package/bundles/material-bottom-sheet.umd.min.js +1 -1
- package/bundles/material-bottom-sheet.umd.min.js.map +1 -1
- package/bundles/material-core.umd.js +3 -3
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-core.umd.min.js +3 -3
- package/bundles/material-core.umd.min.js.map +1 -1
- package/bundles/material-datepicker.umd.js +21 -2
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.min.js +1 -1
- package/bundles/material-datepicker.umd.min.js.map +1 -1
- package/bundles/material-form-field-testing.umd.js +137 -140
- package/bundles/material-form-field-testing.umd.js.map +1 -1
- package/bundles/material-form-field-testing.umd.min.js +3 -3
- package/bundles/material-form-field-testing.umd.min.js.map +1 -1
- package/bundles/material-form-field.umd.js +1 -1
- package/bundles/material-form-field.umd.min.js +1 -1
- package/bundles/material-form-field.umd.min.js.map +1 -1
- package/bundles/material-input.umd.js +4 -2
- package/bundles/material-input.umd.js.map +1 -1
- package/bundles/material-input.umd.min.js +1 -1
- package/bundles/material-input.umd.min.js.map +1 -1
- package/bundles/material-menu.umd.js +2 -2
- package/bundles/material-menu.umd.js.map +1 -1
- package/bundles/material-menu.umd.min.js +1 -1
- package/bundles/material-menu.umd.min.js.map +1 -1
- package/bundles/material-select.umd.js +8 -2
- package/bundles/material-select.umd.js.map +1 -1
- package/bundles/material-select.umd.min.js +5 -5
- package/bundles/material-select.umd.min.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.js +60 -51
- package/bundles/material-slide-toggle-testing.umd.js.map +1 -1
- package/bundles/material-slide-toggle-testing.umd.min.js +2 -2
- package/bundles/material-slide-toggle-testing.umd.min.js.map +1 -1
- package/bundles/material-sort.umd.js +11 -3
- package/bundles/material-sort.umd.js.map +1 -1
- package/bundles/material-sort.umd.min.js +3 -3
- package/bundles/material-sort.umd.min.js.map +1 -1
- package/bundles/material-stepper.umd.js +6 -2
- package/bundles/material-stepper.umd.js.map +1 -1
- package/bundles/material-stepper.umd.min.js +1 -1
- package/bundles/material-stepper.umd.min.js.map +1 -1
- package/bundles/material-tabs.umd.js +8 -2
- package/bundles/material-tabs.umd.js.map +1 -1
- package/bundles/material-tabs.umd.min.js +4 -4
- package/bundles/material-tabs.umd.min.js.map +1 -1
- package/bundles/material-tooltip-testing.umd.js +44 -16
- package/bundles/material-tooltip-testing.umd.js.map +1 -1
- package/bundles/material-tooltip-testing.umd.min.js +1 -1
- package/bundles/material-tooltip-testing.umd.min.js.map +1 -1
- package/button/_button-base.import.scss +4 -0
- package/button/_button-theme.import.scss +3 -0
- package/button-toggle/_button-toggle-theme.import.scss +6 -0
- package/button-toggle/_button-toggle-variables.import.scss +1 -0
- package/card/_card-theme.import.scss +4 -0
- package/checkbox/_checkbox-theme.import.scss +3 -0
- package/chips/_chips-theme.import.scss +4 -0
- package/core/_core.import.scss +10 -0
- package/core/color/_all-color.import.scss +3 -0
- package/core/density/private/_all-density.import.scss +9 -0
- package/core/density/private/_compatibility.import.scss +1 -0
- package/core/focus-indicators/_focus-indicators.import.scss +3 -0
- package/core/index.metadata.json +1 -1
- package/core/option/_optgroup-theme.import.scss +4 -0
- package/core/option/_option-theme.import.scss +4 -0
- package/core/ripple/_ripple.import.scss +3 -0
- package/core/selection/pseudo-checkbox/_pseudo-checkbox-theme.import.scss +2 -0
- package/core/style/_button-common.import.scss +2 -0
- package/core/style/_checkbox-common.import.scss +2 -0
- package/core/style/_elevation.import.scss +2 -0
- package/core/style/_form-common.import.scss +2 -0
- package/core/style/_layout-common.import.scss +1 -0
- package/core/style/_list-common.import.scss +1 -0
- package/core/style/_menu-common.import.scss +5 -0
- package/core/style/_private.import.scss +2 -0
- package/core/style/_variables.import.scss +1 -0
- package/core/style/_vendor-prefixes.import.scss +1 -0
- package/core/theming/_all-theme.import.scss +37 -0
- package/core/theming/_palette.import.scss +1 -0
- package/core/theming/_theming.import.scss +2 -0
- package/core/theming/_theming.scss +7 -4
- package/core/typography/_all-typography.import.scss +38 -0
- package/core/typography/_typography-utils.import.scss +1 -0
- package/core/typography/_typography.import.scss +2 -0
- package/datepicker/_datepicker-theme.import.scss +4 -0
- package/datepicker/datepicker-base.d.ts +9 -0
- package/datepicker/index.metadata.json +1 -1
- package/dialog/_dialog-theme.import.scss +4 -0
- package/divider/_divider-offset.import.scss +1 -0
- package/divider/_divider-theme.import.scss +3 -0
- package/esm2015/autocomplete/autocomplete.js +1 -1
- package/esm2015/bottom-sheet/bottom-sheet-container.js +12 -4
- package/esm2015/core/common-behaviors/common-module.js +1 -1
- package/esm2015/core/option/optgroup.js +2 -2
- package/esm2015/core/version.js +1 -1
- package/esm2015/datepicker/datepicker-base.js +13 -2
- package/esm2015/datepicker/datepicker-toggle.js +6 -2
- package/esm2015/form-field/form-field.js +1 -1
- package/esm2015/form-field/testing/form-field-harness.js +68 -76
- package/esm2015/input/input.js +5 -3
- package/esm2015/menu/menu-trigger.js +2 -2
- package/esm2015/menu/menu.js +1 -1
- package/esm2015/select/select.js +9 -3
- package/esm2015/slide-toggle/testing/slide-toggle-harness.js +29 -24
- package/esm2015/sort/sort.js +12 -5
- package/esm2015/stepper/stepper-animations.js +7 -3
- package/esm2015/tabs/tab-body.js +2 -2
- package/esm2015/tabs/tab-group.js +8 -2
- package/esm2015/tooltip/testing/tooltip-harness.js +14 -2
- package/expansion/_expansion-mixins.import.scss +1 -0
- package/expansion/_expansion-theme.import.scss +6 -0
- package/expansion/_expansion-variables.import.scss +1 -0
- package/fesm2015/autocomplete.js.map +1 -1
- package/fesm2015/bottom-sheet.js +11 -3
- package/fesm2015/bottom-sheet.js.map +1 -1
- package/fesm2015/core.js +3 -3
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/datepicker.js +17 -2
- package/fesm2015/datepicker.js.map +1 -1
- package/fesm2015/form-field/testing.js +69 -77
- package/fesm2015/form-field/testing.js.map +1 -1
- package/fesm2015/form-field.js +1 -1
- package/fesm2015/input.js +4 -2
- package/fesm2015/input.js.map +1 -1
- package/fesm2015/menu.js +2 -2
- package/fesm2015/menu.js.map +1 -1
- package/fesm2015/select.js +8 -2
- package/fesm2015/select.js.map +1 -1
- package/fesm2015/slide-toggle/testing.js +29 -24
- package/fesm2015/slide-toggle/testing.js.map +1 -1
- package/fesm2015/sort.js +12 -5
- package/fesm2015/sort.js.map +1 -1
- package/fesm2015/stepper.js +6 -2
- package/fesm2015/stepper.js.map +1 -1
- package/fesm2015/tabs.js +8 -2
- package/fesm2015/tabs.js.map +1 -1
- package/fesm2015/tooltip/testing.js +13 -1
- package/fesm2015/tooltip/testing.js.map +1 -1
- package/form-field/_form-field-fill-theme.import.scss +5 -0
- package/form-field/_form-field-legacy-theme.import.scss +5 -0
- package/form-field/_form-field-outline-theme.import.scss +5 -0
- package/form-field/_form-field-standard-theme.import.scss +5 -0
- package/form-field/_form-field-theme.import.scss +9 -0
- package/form-field/index.metadata.json +1 -1
- package/form-field/testing/form-field-harness.d.ts +47 -32
- package/grid-list/_grid-list-theme.import.scss +5 -0
- package/icon/_icon-theme.import.scss +2 -0
- package/input/_input-theme.import.scss +6 -0
- package/input/index.metadata.json +1 -1
- package/list/_list-theme.import.scss +5 -0
- package/menu/_menu-theme.import.scss +4 -0
- package/menu/index.metadata.json +1 -1
- package/package.json +2 -2
- package/paginator/_paginator-theme.import.scss +5 -0
- package/paginator/_paginator-variables.import.scss +1 -0
- 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/_progress-bar-theme.import.scss +3 -0
- package/progress-spinner/_progress-spinner-theme.import.scss +3 -0
- package/radio/_radio-theme.import.scss +4 -0
- package/schematics/ng-add/index.js +1 -1
- package/select/_select-theme.import.scss +5 -0
- package/select/index.metadata.json +1 -1
- package/select/select.d.ts +1 -1
- package/sidenav/_sidenav-theme.import.scss +3 -0
- package/slide-toggle/_slide-toggle-theme.import.scss +4 -0
- package/slide-toggle/testing/slide-toggle-harness.d.ts +19 -15
- package/slider/_slider-theme.import.scss +4 -0
- package/snack-bar/_snack-bar-theme.import.scss +4 -0
- package/sort/_sort-theme.import.scss +2 -0
- package/sort/index.metadata.json +1 -1
- package/sort/sort.d.ts +10 -1
- package/stepper/_stepper-theme.import.scss +5 -0
- package/stepper/_stepper-variables.import.scss +1 -0
- package/stepper/index.metadata.json +1 -1
- package/table/_table-flex-styles.import.scss +1 -0
- package/table/_table-flex-styles.scss +72 -0
- package/table/_table-theme.import.scss +4 -0
- package/tabs/_tabs-common.import.scss +4 -0
- package/tabs/_tabs-theme.import.scss +4 -0
- package/tabs/_tabs-theme.scss +3 -1
- package/tabs/index.metadata.json +1 -1
- package/tabs/tab-group.d.ts +3 -0
- package/toolbar/_toolbar-theme.import.scss +6 -0
- package/toolbar/_toolbar-variables.import.scss +1 -0
- package/tooltip/_tooltip-theme.import.scss +4 -0
- package/tree/_tree-theme.import.scss +4 -0
- package/tree/_tree-variables.import.scss +1 -0
package/fesm2015/datepicker.js
CHANGED
|
@@ -1952,6 +1952,7 @@ class MatDatepickerBase {
|
|
|
1952
1952
|
this.xPosition = 'start';
|
|
1953
1953
|
/** Preferred position of the datepicker in the Y axis. */
|
|
1954
1954
|
this.yPosition = 'below';
|
|
1955
|
+
this._restoreFocus = true;
|
|
1955
1956
|
/**
|
|
1956
1957
|
* Emits selected year in multiyear view.
|
|
1957
1958
|
* This doesn't imply a change on the selected date.
|
|
@@ -2021,6 +2022,15 @@ class MatDatepickerBase {
|
|
|
2021
2022
|
this.stateChanges.next(undefined);
|
|
2022
2023
|
}
|
|
2023
2024
|
}
|
|
2025
|
+
/**
|
|
2026
|
+
* Whether to restore focus to the previously-focused element when the calendar is closed.
|
|
2027
|
+
* Note that automatic focus restoration is an accessibility feature and it is recommended that
|
|
2028
|
+
* you provide your own equivalent, if you decide to turn it off.
|
|
2029
|
+
*/
|
|
2030
|
+
get restoreFocus() { return this._restoreFocus; }
|
|
2031
|
+
set restoreFocus(value) {
|
|
2032
|
+
this._restoreFocus = coerceBooleanProperty(value);
|
|
2033
|
+
}
|
|
2024
2034
|
/**
|
|
2025
2035
|
* Classes to be passed to the date picker panel.
|
|
2026
2036
|
* Supports string and string array values, similar to `ngClass`.
|
|
@@ -2149,7 +2159,7 @@ class MatDatepickerBase {
|
|
|
2149
2159
|
this._focusedElementBeforeOpen = null;
|
|
2150
2160
|
}
|
|
2151
2161
|
};
|
|
2152
|
-
if (this._focusedElementBeforeOpen &&
|
|
2162
|
+
if (this._restoreFocus && this._focusedElementBeforeOpen &&
|
|
2153
2163
|
typeof this._focusedElementBeforeOpen.focus === 'function') {
|
|
2154
2164
|
// Because IE moves focus asynchronously, we can't count on it being restored before we've
|
|
2155
2165
|
// marked the datepicker as closed. If the event fires out of sequence and the element that
|
|
@@ -2319,6 +2329,7 @@ MatDatepickerBase.propDecorators = {
|
|
|
2319
2329
|
disabled: [{ type: Input }],
|
|
2320
2330
|
xPosition: [{ type: Input }],
|
|
2321
2331
|
yPosition: [{ type: Input }],
|
|
2332
|
+
restoreFocus: [{ type: Input }],
|
|
2322
2333
|
yearSelected: [{ type: Output }],
|
|
2323
2334
|
monthSelected: [{ type: Output }],
|
|
2324
2335
|
viewChanged: [{ type: Output }],
|
|
@@ -2854,7 +2865,7 @@ class MatDatepickerToggle {
|
|
|
2854
2865
|
MatDatepickerToggle.decorators = [
|
|
2855
2866
|
{ type: Component, args: [{
|
|
2856
2867
|
selector: 'mat-datepicker-toggle',
|
|
2857
|
-
template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"datepicker ? 'dialog' : null\"\n [attr.aria-label]=\"ariaLabel || _intl.openCalendarLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\"
|
|
2868
|
+
template: "<button\n #button\n mat-icon-button\n type=\"button\"\n [attr.aria-haspopup]=\"datepicker ? 'dialog' : null\"\n [attr.aria-label]=\"ariaLabel || _intl.openCalendarLabel\"\n [attr.tabindex]=\"disabled ? -1 : tabIndex\"\n [disabled]=\"disabled\"\n [disableRipple]=\"disableRipple\">\n\n <svg\n *ngIf=\"!_customIcon\"\n class=\"mat-datepicker-toggle-default-icon\"\n viewBox=\"0 0 24 24\"\n width=\"24px\"\n height=\"24px\"\n fill=\"currentColor\"\n focusable=\"false\">\n <path d=\"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z\"/>\n </svg>\n\n <ng-content select=\"[matDatepickerToggleIcon]\"></ng-content>\n</button>\n",
|
|
2858
2869
|
host: {
|
|
2859
2870
|
'class': 'mat-datepicker-toggle',
|
|
2860
2871
|
'[attr.tabindex]': 'null',
|
|
@@ -2863,6 +2874,10 @@ MatDatepickerToggle.decorators = [
|
|
|
2863
2874
|
'[class.mat-warn]': 'datepicker && datepicker.color === "warn"',
|
|
2864
2875
|
// Used by the test harness to tie this toggle to its datepicker.
|
|
2865
2876
|
'[attr.data-mat-calendar]': 'datepicker ? datepicker.id : null',
|
|
2877
|
+
// Bind the `click` on the host, rather than the inner `button`, so that we can call
|
|
2878
|
+
// `stopPropagation` on it without affecting the user's `click` handlers. We need to stop
|
|
2879
|
+
// it so that the input doesn't get focused automatically by the form field (See #21836).
|
|
2880
|
+
'(click)': '_open($event)',
|
|
2866
2881
|
},
|
|
2867
2882
|
exportAs: 'matDatepickerToggle',
|
|
2868
2883
|
encapsulation: ViewEncapsulation.None,
|