@angular/material-experimental 14.0.0-next.1 → 14.0.0-next.4

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.
Files changed (122) hide show
  1. package/esm2020/mdc-autocomplete/autocomplete-trigger.mjs +3 -3
  2. package/esm2020/mdc-button/icon-button.mjs +4 -4
  3. package/esm2020/mdc-card/card.mjs +2 -2
  4. package/esm2020/mdc-checkbox/checkbox.mjs +8 -3
  5. package/esm2020/mdc-chips/chip-grid.mjs +13 -2
  6. package/esm2020/mdc-chips/chip-input.mjs +1 -1
  7. package/esm2020/mdc-dialog/dialog-container.mjs +4 -4
  8. package/esm2020/mdc-dialog/dialog-content-directives.mjs +16 -4
  9. package/esm2020/mdc-form-field/directives/floating-label.mjs +3 -8
  10. package/esm2020/mdc-form-field/form-field.mjs +45 -36
  11. package/esm2020/mdc-list/action-list.mjs +3 -3
  12. package/esm2020/mdc-list/interactive-list-base.mjs +2 -2
  13. package/esm2020/mdc-list/list-option.mjs +2 -2
  14. package/esm2020/mdc-list/list.mjs +15 -3
  15. package/esm2020/mdc-menu/menu.mjs +8 -8
  16. package/esm2020/mdc-paginator/paginator.mjs +2 -2
  17. package/esm2020/mdc-progress-bar/progress-bar.mjs +2 -2
  18. package/esm2020/mdc-progress-spinner/progress-spinner.mjs +4 -1
  19. package/esm2020/mdc-select/select.mjs +3 -3
  20. package/esm2020/mdc-slider/slider.mjs +3 -3
  21. package/esm2020/mdc-snack-bar/snack-bar-container.mjs +2 -2
  22. package/esm2020/mdc-table/table.mjs +2 -2
  23. package/esm2020/mdc-tabs/tab-body.mjs +3 -3
  24. package/esm2020/mdc-tabs/tab-header.mjs +3 -3
  25. package/esm2020/mdc-tabs/tab-nav-bar/tab-nav-bar.mjs +3 -3
  26. package/esm2020/version.mjs +1 -1
  27. package/fesm2015/material-experimental.mjs +1 -1
  28. package/fesm2015/material-experimental.mjs.map +1 -1
  29. package/fesm2015/mdc-autocomplete.mjs +2 -2
  30. package/fesm2015/mdc-autocomplete.mjs.map +1 -1
  31. package/fesm2015/mdc-button.mjs +4 -4
  32. package/fesm2015/mdc-card.mjs +2 -2
  33. package/fesm2015/mdc-checkbox.mjs +7 -2
  34. package/fesm2015/mdc-checkbox.mjs.map +1 -1
  35. package/fesm2015/mdc-chips.mjs +11 -1
  36. package/fesm2015/mdc-chips.mjs.map +1 -1
  37. package/fesm2015/mdc-dialog.mjs +18 -6
  38. package/fesm2015/mdc-dialog.mjs.map +1 -1
  39. package/fesm2015/mdc-form-field.mjs +47 -43
  40. package/fesm2015/mdc-form-field.mjs.map +1 -1
  41. package/fesm2015/mdc-list.mjs +17 -6
  42. package/fesm2015/mdc-list.mjs.map +1 -1
  43. package/fesm2015/mdc-menu.mjs +6 -6
  44. package/fesm2015/mdc-menu.mjs.map +1 -1
  45. package/fesm2015/mdc-paginator.mjs +2 -2
  46. package/fesm2015/mdc-progress-bar.mjs +2 -2
  47. package/fesm2015/mdc-progress-spinner.mjs +3 -0
  48. package/fesm2015/mdc-progress-spinner.mjs.map +1 -1
  49. package/fesm2015/mdc-select.mjs +2 -2
  50. package/fesm2015/mdc-select.mjs.map +1 -1
  51. package/fesm2015/mdc-slider.mjs +2 -2
  52. package/fesm2015/mdc-slider.mjs.map +1 -1
  53. package/fesm2015/mdc-snack-bar.mjs +2 -2
  54. package/fesm2015/mdc-table.mjs +2 -2
  55. package/fesm2015/mdc-tabs.mjs +6 -6
  56. package/fesm2015/mdc-tabs.mjs.map +1 -1
  57. package/fesm2020/material-experimental.mjs +1 -1
  58. package/fesm2020/material-experimental.mjs.map +1 -1
  59. package/fesm2020/mdc-autocomplete.mjs +2 -2
  60. package/fesm2020/mdc-autocomplete.mjs.map +1 -1
  61. package/fesm2020/mdc-button.mjs +4 -4
  62. package/fesm2020/mdc-card.mjs +2 -2
  63. package/fesm2020/mdc-checkbox.mjs +7 -2
  64. package/fesm2020/mdc-checkbox.mjs.map +1 -1
  65. package/fesm2020/mdc-chips.mjs +11 -1
  66. package/fesm2020/mdc-chips.mjs.map +1 -1
  67. package/fesm2020/mdc-dialog.mjs +18 -6
  68. package/fesm2020/mdc-dialog.mjs.map +1 -1
  69. package/fesm2020/mdc-form-field.mjs +46 -42
  70. package/fesm2020/mdc-form-field.mjs.map +1 -1
  71. package/fesm2020/mdc-list.mjs +17 -6
  72. package/fesm2020/mdc-list.mjs.map +1 -1
  73. package/fesm2020/mdc-menu.mjs +6 -6
  74. package/fesm2020/mdc-menu.mjs.map +1 -1
  75. package/fesm2020/mdc-paginator.mjs +2 -2
  76. package/fesm2020/mdc-progress-bar.mjs +2 -2
  77. package/fesm2020/mdc-progress-spinner.mjs +3 -0
  78. package/fesm2020/mdc-progress-spinner.mjs.map +1 -1
  79. package/fesm2020/mdc-select.mjs +2 -2
  80. package/fesm2020/mdc-select.mjs.map +1 -1
  81. package/fesm2020/mdc-slider.mjs +2 -2
  82. package/fesm2020/mdc-slider.mjs.map +1 -1
  83. package/fesm2020/mdc-snack-bar.mjs +2 -2
  84. package/fesm2020/mdc-table.mjs +2 -2
  85. package/fesm2020/mdc-tabs.mjs +6 -6
  86. package/fesm2020/mdc-tabs.mjs.map +1 -1
  87. package/mdc-chips/chip-grid.d.ts +17 -3
  88. package/mdc-chips/chip-input.d.ts +2 -5
  89. package/mdc-dialog/dialog-content-directives.d.ts +5 -1
  90. package/mdc-form-field/_form-field-density.scss +2 -2
  91. package/mdc-form-field/_form-field-high-contrast.scss +14 -5
  92. package/mdc-form-field/_form-field-theme.scss +1 -1
  93. package/mdc-form-field/_mdc-text-field-structure-overrides.scss +2 -2
  94. package/mdc-form-field/directives/floating-label.d.ts +1 -3
  95. package/mdc-form-field/form-field.d.ts +17 -8
  96. package/mdc-list/_list-theme.scss +9 -0
  97. package/mdc-list/list.d.ts +5 -1
  98. package/mdc-menu/menu.d.ts +1 -1
  99. package/mdc-select/_select-theme.scss +1 -1
  100. package/mdc-table/_table-theme.scss +2 -9
  101. package/mdc-tabs/_tabs-common.scss +9 -0
  102. package/mdc-tabs/ink-bar.d.ts +1 -1
  103. package/mdc-theming/prebuilt/deeppurple-amber.css +1 -1
  104. package/mdc-theming/prebuilt/indigo-pink.css +1 -1
  105. package/mdc-theming/prebuilt/pink-bluegrey.css +1 -1
  106. package/mdc-theming/prebuilt/purple-green.css +1 -1
  107. package/package.json +9 -17
  108. package/esm2020/mdc-sidenav/index.mjs +0 -9
  109. package/esm2020/mdc-sidenav/mdc-sidenav_public_index.mjs +0 -5
  110. package/esm2020/mdc-sidenav/module.mjs +0 -23
  111. package/esm2020/mdc-sidenav/public-api.mjs +0 -9
  112. package/fesm2015/mdc-sidenav.mjs +0 -46
  113. package/fesm2015/mdc-sidenav.mjs.map +0 -1
  114. package/fesm2020/mdc-sidenav.mjs +0 -46
  115. package/fesm2020/mdc-sidenav.mjs.map +0 -1
  116. package/mdc-sidenav/_sidenav-theme.import.scss +0 -5
  117. package/mdc-sidenav/_sidenav-theme.scss +0 -28
  118. package/mdc-sidenav/index.d.ts +0 -8
  119. package/mdc-sidenav/mdc-sidenav_public_index.d.ts +0 -4
  120. package/mdc-sidenav/module.d.ts +0 -7
  121. package/mdc-sidenav/package.json +0 -9
  122. package/mdc-sidenav/public-api.d.ts +0 -8
@@ -32,9 +32,18 @@ export declare type SubscriptSizing = 'fixed' | 'dynamic';
32
32
  * using the `MAT_FORM_FIELD_DEFAULT_OPTIONS` injection token.
33
33
  */
34
34
  export interface MatFormFieldDefaultOptions {
35
+ /** Default form field appearance style. */
35
36
  appearance?: MatFormFieldAppearance;
37
+ /** Default color of the form field. */
38
+ color?: ThemePalette;
39
+ /** Whether the required marker should be hidden by default. */
36
40
  hideRequiredMarker?: boolean;
41
+ /**
42
+ * Whether the label for form fields should by default float `always`,
43
+ * `never`, or `auto` (only when necessary).
44
+ */
37
45
  floatLabel?: FloatLabelType;
46
+ /** Whether the form field should reserve space for one line by default. */
38
47
  subscriptSizing?: SubscriptSizing;
39
48
  }
40
49
  /**
@@ -43,7 +52,7 @@ export interface MatFormFieldDefaultOptions {
43
52
  */
44
53
  export declare const MAT_FORM_FIELD_DEFAULT_OPTIONS: InjectionToken<MatFormFieldDefaultOptions>;
45
54
  /** Container for form controls that applies Material Design styling and behavior. */
46
- export declare class MatFormField implements AfterViewInit, OnDestroy, AfterContentChecked, AfterContentInit {
55
+ export declare class MatFormField implements AfterContentInit, AfterContentChecked, AfterViewInit, OnDestroy {
47
56
  private _elementRef;
48
57
  private _changeDetectorRef;
49
58
  private _ngZone;
@@ -69,13 +78,13 @@ export declare class MatFormField implements AfterViewInit, OnDestroy, AfterCont
69
78
  get hideRequiredMarker(): boolean;
70
79
  set hideRequiredMarker(value: BooleanInput);
71
80
  private _hideRequiredMarker;
72
- /** The color palette for the form-field. */
81
+ /** The color palette for the form field. */
73
82
  color: ThemePalette;
74
83
  /** Whether the label should always float or float as the user types. */
75
84
  get floatLabel(): FloatLabelType;
76
85
  set floatLabel(value: FloatLabelType);
77
86
  private _floatLabel;
78
- /** The form-field appearance style. */
87
+ /** The form field appearance style. */
79
88
  get appearance(): MatFormFieldAppearance;
80
89
  set appearance(value: MatFormFieldAppearance);
81
90
  private _appearance;
@@ -120,20 +129,20 @@ export declare class MatFormField implements AfterViewInit, OnDestroy, AfterCont
120
129
  */
121
130
  getLabelId(): string | null;
122
131
  /**
123
- * Gets an ElementRef for the element that a overlay attached to the form-field
132
+ * Gets an ElementRef for the element that a overlay attached to the form field
124
133
  * should be positioned relative to.
125
134
  */
126
135
  getConnectedOverlayOrigin(): ElementRef;
127
136
  /** Animates the placeholder up and locks it in position. */
128
137
  _animateAndLockLabel(): void;
129
- /** Initializes the registered form-field control. */
138
+ /** Initializes the registered form field control. */
130
139
  private _initializeControl;
131
140
  private _checkPrefixAndSuffixTypes;
132
141
  /** Initializes the prefix and suffix containers. */
133
142
  private _initializePrefixAndSuffix;
134
143
  /**
135
144
  * Initializes the subscript by validating hints and synchronizing "aria-describedby" ids
136
- * with the custom form-field control. Also subscribes to hint and error changes in order
145
+ * with the custom form field control. Also subscribes to hint and error changes in order
137
146
  * to be able to validate and synchronize ids on change.
138
147
  */
139
148
  private _initializeSubscript;
@@ -143,7 +152,7 @@ export declare class MatFormField implements AfterViewInit, OnDestroy, AfterCont
143
152
  /**
144
153
  * The floating label in the docked state needs to account for prefixes. The horizontal offset
145
154
  * is calculated whenever the appearance changes to `outline`, the prefixes change, or when the
146
- * form-field is added to the DOM. This method sets up all subscriptions which are needed to
155
+ * form field is added to the DOM. This method sets up all subscriptions which are needed to
147
156
  * trigger the label offset update. In general, we want to avoid performing measurements often,
148
157
  * so we rely on the `NgZone` as indicator when the offset should be recalculated, instead of
149
158
  * checking every change detection cycle.
@@ -155,7 +164,7 @@ export declare class MatFormField implements AfterViewInit, OnDestroy, AfterCont
155
164
  /**
156
165
  * Whether the label should display in the infix. Labels in the outline appearance are
157
166
  * displayed as part of the notched-outline and are horizontally offset to account for
158
- * form-field prefix content. This won't work in server side rendering since we cannot
167
+ * form field prefix content. This won't work in server side rendering since we cannot
159
168
  * measure the width of the prefix container. To make the docked label appear as if the
160
169
  * right offset has been calculated, we forcibly render the label inside the infix. Since
161
170
  * the label is part of the infix, the label cannot overflow the prefix content.
@@ -4,6 +4,7 @@
4
4
  @use './list-option-theme';
5
5
  @use '../mdc-helpers/mdc-helpers';
6
6
  @use '../../material/core/typography/typography';
7
+ @use '../../material/core/typography/typography-utils';
7
8
  @use '../../material/core/theming/theming';
8
9
 
9
10
 
@@ -55,6 +56,14 @@
55
56
  @include mdc-list.without-ripple($query: mdc-helpers.$mat-typography-styles-query);
56
57
  @include list-option-theme.private-list-option-typography-styles();
57
58
  }
59
+
60
+ // According to the public spec this should be subtitle-1.
61
+ // However, body-1 and subtitle-1 are nearly identical in the public spec,
62
+ // and the Google-specific spec states that it should be body-1.
63
+ // For consistency, we use body-1 for both public and Google internal.
64
+ .mat-mdc-list-item .mdc-list-item__primary-text {
65
+ @include typography-utils.typography-level($config, body-1);
66
+ }
58
67
  }
59
68
 
60
69
  @mixin theme($theme-or-color-config) {
@@ -21,7 +21,11 @@ export declare class MatListItem extends MatListItemBase {
21
21
  _meta: QueryList<MatListItemMeta>;
22
22
  _unscopedContent: ElementRef<HTMLSpanElement>;
23
23
  _itemText: ElementRef<HTMLElement>;
24
+ /** Indicates whether an item in a `<mat-nav-list>` is the currently active page. */
25
+ get activated(): boolean;
26
+ set activated(activated: boolean);
27
+ _activated: boolean;
24
28
  constructor(element: ElementRef, ngZone: NgZone, listBase: MatListBase, platform: Platform, globalRippleOptions?: RippleGlobalOptions, animationMode?: string);
25
29
  static ɵfac: i0.ɵɵFactoryDeclaration<MatListItem, [null, null, null, null, { optional: true; }, { optional: true; }]>;
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"]>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatListItem, "mat-list-item, a[mat-list-item], button[mat-list-item]", ["matListItem"], { "activated": "activated"; }, {}, ["_lines", "_titles", "_meta"], ["[matListItemAvatar],[matListItemIcon]", "[matListItemTitle]", "[matListItemLine]", "*", "[matListItemMeta]", "mat-divider"]>;
27
31
  }
@@ -16,7 +16,7 @@ export declare const MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER: Provider;
16
16
  export declare class MatMenu extends _MatMenuBase {
17
17
  protected _elevationPrefix: string;
18
18
  protected _baseElevation: number;
19
- constructor(_elementRef: ElementRef<HTMLElement>, _ngZone: NgZone, _defaultOptions: MatMenuDefaultOptions);
19
+ constructor(elementRef: ElementRef<HTMLElement>, ngZone: NgZone, defaultOptions: MatMenuDefaultOptions);
20
20
  static ɵfac: i0.ɵɵFactoryDeclaration<MatMenu, never>;
21
21
  static ɵcmp: i0.ɵɵComponentDeclaration<MatMenu, "mat-menu", ["matMenu"], {}, {}, never, ["*"]>;
22
22
  }
@@ -71,7 +71,7 @@
71
71
  @include mdc-list.list-base(mdc-helpers.$mat-typography-styles-query);
72
72
  }
73
73
 
74
- .mat-mdc-select-value {
74
+ .mat-mdc-select {
75
75
  @include mdc-typography.typography(body1, $query: mdc-helpers.$mat-typography-styles-query);
76
76
  }
77
77
  }
@@ -15,8 +15,6 @@
15
15
  $orig-row-hover-fill-color: mdc-data-table-theme.$row-hover-fill-color;
16
16
  $orig-header-row-text-color: mdc-data-table-theme.$header-row-text-color;
17
17
  $orig-row-text-color: mdc-data-table-theme.$row-text-color;
18
- $orig-sort-icon-color: mdc-data-table-theme.$sort-icon-color;
19
- $orig-sort-icon-active-color: mdc-data-table-theme.$sort-icon-active-color;
20
18
  $orig-stroke-color: mdc-data-table-theme.$stroke-color;
21
19
 
22
20
  @include mdc-helpers.mat-using-mdc-theme($config) {
@@ -25,12 +23,9 @@
25
23
  mdc-data-table-theme.$row-hover-fill-color: rgba(mdc-theme-color.prop-value(on-surface), 0.04);
26
24
  mdc-data-table-theme.$header-row-text-color: rgba(mdc-theme-color.prop-value(on-surface), 0.87);
27
25
  mdc-data-table-theme.$row-text-color: rgba(mdc-theme-color.prop-value(on-surface), 0.87);
28
- mdc-data-table-theme.$sort-icon-color: rgba(mdc-theme-color.prop-value(on-surface), 0.6);
29
- mdc-data-table-theme.$sort-icon-active-color:
30
- rgba(mdc-theme-color.prop-value(on-surface), 0.87);
31
26
  mdc-data-table-theme.$stroke-color: rgba(mdc-theme-color.prop-value(on-surface), 0.12);
32
27
 
33
- @include mdc-data-table.core-styles($query: mdc-helpers.$mat-theme-styles-query);
28
+ @include mdc-data-table.table-styles($query: mdc-helpers.$mat-theme-styles-query);
34
29
  }
35
30
 
36
31
  // Restore original values of MDC global variables.
@@ -39,8 +34,6 @@
39
34
  mdc-data-table-theme.$row-hover-fill-color: $orig-row-hover-fill-color;
40
35
  mdc-data-table-theme.$header-row-text-color: $orig-header-row-text-color;
41
36
  mdc-data-table-theme.$row-text-color: $orig-row-text-color;
42
- mdc-data-table-theme.$sort-icon-color: $orig-sort-icon-color;
43
- mdc-data-table-theme.$sort-icon-active-color: $orig-sort-icon-active-color;
44
37
  mdc-data-table-theme.$stroke-color: $orig-stroke-color;
45
38
 
46
39
  .mat-mdc-table {
@@ -53,7 +46,7 @@
53
46
  $config: typography.private-typography-to-2018-config(
54
47
  theming.get-typography-config($config-or-theme));
55
48
  @include mdc-helpers.mat-using-mdc-typography($config) {
56
- @include mdc-data-table.core-styles($query: mdc-helpers.$mat-typography-styles-query);
49
+ @include mdc-data-table.table-styles($query: mdc-helpers.$mat-typography-styles-query);
57
50
  }
58
51
  }
59
52
 
@@ -104,6 +104,15 @@ $mat-tab-animation-duration: 500ms !default;
104
104
  z-index: 2;
105
105
  -webkit-tap-highlight-color: transparent;
106
106
  touch-action: none;
107
+ box-sizing: content-box;
108
+ background: none;
109
+ border: none;
110
+ outline: 0;
111
+ padding: 0;
112
+
113
+ &::-moz-focus-inner {
114
+ border: 0;
115
+ }
107
116
 
108
117
  .mat-ripple-element {
109
118
  opacity: map.get(mdc-ripple.$dark-ink-opacities, press);
@@ -47,7 +47,7 @@ export declare class MatInkBarFoundation {
47
47
  /** Removes the ink bar from the current item. */
48
48
  deactivate(): void;
49
49
  /** Gets the ClientRect of the ink bar. */
50
- computeContentClientRect(): ClientRect;
50
+ computeContentClientRect(): DOMRect;
51
51
  /** Initializes the foundation. */
52
52
  init(): void;
53
53
  /** Destroys the foundation. */