@angular/material-experimental 13.2.3 → 13.2.6

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 (126) hide show
  1. package/esm2020/mdc-autocomplete/autocomplete-trigger.mjs +4 -3
  2. package/esm2020/mdc-button/button-base.mjs +2 -2
  3. package/esm2020/mdc-button/button.mjs +2 -2
  4. package/esm2020/mdc-button/fab.mjs +3 -3
  5. package/esm2020/mdc-button/icon-button.mjs +2 -2
  6. package/esm2020/mdc-card/card.mjs +2 -2
  7. package/esm2020/mdc-checkbox/checkbox.mjs +4 -2
  8. package/esm2020/mdc-chips/testing/public-api.mjs +2 -1
  9. package/esm2020/mdc-dialog/dialog-container.mjs +4 -4
  10. package/esm2020/mdc-dialog/dialog.mjs +7 -2
  11. package/esm2020/mdc-dialog/testing/dialog-opener.mjs +45 -0
  12. package/esm2020/mdc-dialog/testing/public-api.mjs +2 -1
  13. package/esm2020/mdc-form-field/directives/floating-label.mjs +3 -8
  14. package/esm2020/mdc-form-field/form-field.mjs +3 -3
  15. package/esm2020/mdc-list/action-list.mjs +3 -3
  16. package/esm2020/mdc-menu/menu.mjs +3 -3
  17. package/esm2020/mdc-paginator/paginator.mjs +2 -2
  18. package/esm2020/mdc-progress-bar/progress-bar.mjs +2 -2
  19. package/esm2020/mdc-select/select.mjs +3 -3
  20. package/esm2020/mdc-slide-toggle/slide-toggle.mjs +3 -2
  21. package/esm2020/mdc-slider/slider.mjs +12 -12
  22. package/esm2020/mdc-snack-bar/snack-bar-container.mjs +2 -2
  23. package/esm2020/mdc-table/table.mjs +2 -2
  24. package/esm2020/mdc-tabs/tab-body.mjs +3 -3
  25. package/esm2020/mdc-tabs/tab-header.mjs +3 -3
  26. package/esm2020/mdc-tabs/tab-nav-bar/tab-nav-bar.mjs +3 -3
  27. package/esm2020/mdc-tooltip/testing/tooltip-harness.mjs +4 -1
  28. package/esm2020/mdc-tooltip/tooltip.mjs +27 -11
  29. package/esm2020/version.mjs +1 -1
  30. package/fesm2015/material-experimental.mjs +1 -1
  31. package/fesm2015/material-experimental.mjs.map +1 -1
  32. package/fesm2015/mdc-autocomplete.mjs +3 -2
  33. package/fesm2015/mdc-autocomplete.mjs.map +1 -1
  34. package/fesm2015/mdc-button.mjs +5 -5
  35. package/fesm2015/mdc-button.mjs.map +1 -1
  36. package/fesm2015/mdc-card.mjs +2 -2
  37. package/fesm2015/mdc-checkbox.mjs +3 -1
  38. package/fesm2015/mdc-checkbox.mjs.map +1 -1
  39. package/fesm2015/mdc-chips/testing.mjs +2 -2
  40. package/fesm2015/mdc-chips/testing.mjs.map +1 -1
  41. package/fesm2015/mdc-dialog/testing.mjs +44 -2
  42. package/fesm2015/mdc-dialog/testing.mjs.map +1 -1
  43. package/fesm2015/mdc-dialog.mjs +9 -4
  44. package/fesm2015/mdc-dialog.mjs.map +1 -1
  45. package/fesm2015/mdc-form-field.mjs +4 -9
  46. package/fesm2015/mdc-form-field.mjs.map +1 -1
  47. package/fesm2015/mdc-list.mjs +2 -2
  48. package/fesm2015/mdc-list.mjs.map +1 -1
  49. package/fesm2015/mdc-menu.mjs +2 -2
  50. package/fesm2015/mdc-menu.mjs.map +1 -1
  51. package/fesm2015/mdc-paginator.mjs +2 -2
  52. package/fesm2015/mdc-progress-bar.mjs +2 -2
  53. package/fesm2015/mdc-select.mjs +2 -2
  54. package/fesm2015/mdc-select.mjs.map +1 -1
  55. package/fesm2015/mdc-slide-toggle.mjs +2 -1
  56. package/fesm2015/mdc-slide-toggle.mjs.map +1 -1
  57. package/fesm2015/mdc-slider.mjs +20 -11
  58. package/fesm2015/mdc-slider.mjs.map +1 -1
  59. package/fesm2015/mdc-snack-bar.mjs +2 -2
  60. package/fesm2015/mdc-table.mjs +2 -2
  61. package/fesm2015/mdc-tabs.mjs +6 -6
  62. package/fesm2015/mdc-tabs.mjs.map +1 -1
  63. package/fesm2015/mdc-tooltip/testing.mjs +3 -0
  64. package/fesm2015/mdc-tooltip/testing.mjs.map +1 -1
  65. package/fesm2015/mdc-tooltip.mjs +52 -33
  66. package/fesm2015/mdc-tooltip.mjs.map +1 -1
  67. package/fesm2020/material-experimental.mjs +1 -1
  68. package/fesm2020/material-experimental.mjs.map +1 -1
  69. package/fesm2020/mdc-autocomplete.mjs +3 -2
  70. package/fesm2020/mdc-autocomplete.mjs.map +1 -1
  71. package/fesm2020/mdc-button.mjs +5 -5
  72. package/fesm2020/mdc-button.mjs.map +1 -1
  73. package/fesm2020/mdc-card.mjs +2 -2
  74. package/fesm2020/mdc-checkbox.mjs +3 -1
  75. package/fesm2020/mdc-checkbox.mjs.map +1 -1
  76. package/fesm2020/mdc-chips/testing.mjs +1 -1
  77. package/fesm2020/mdc-chips/testing.mjs.map +1 -1
  78. package/fesm2020/mdc-dialog/testing.mjs +44 -2
  79. package/fesm2020/mdc-dialog/testing.mjs.map +1 -1
  80. package/fesm2020/mdc-dialog.mjs +9 -4
  81. package/fesm2020/mdc-dialog.mjs.map +1 -1
  82. package/fesm2020/mdc-form-field.mjs +4 -9
  83. package/fesm2020/mdc-form-field.mjs.map +1 -1
  84. package/fesm2020/mdc-list.mjs +2 -2
  85. package/fesm2020/mdc-list.mjs.map +1 -1
  86. package/fesm2020/mdc-menu.mjs +2 -2
  87. package/fesm2020/mdc-menu.mjs.map +1 -1
  88. package/fesm2020/mdc-paginator.mjs +2 -2
  89. package/fesm2020/mdc-progress-bar.mjs +2 -2
  90. package/fesm2020/mdc-select.mjs +2 -2
  91. package/fesm2020/mdc-select.mjs.map +1 -1
  92. package/fesm2020/mdc-slide-toggle.mjs +2 -1
  93. package/fesm2020/mdc-slide-toggle.mjs.map +1 -1
  94. package/fesm2020/mdc-slider.mjs +11 -11
  95. package/fesm2020/mdc-slider.mjs.map +1 -1
  96. package/fesm2020/mdc-snack-bar.mjs +2 -2
  97. package/fesm2020/mdc-table.mjs +2 -2
  98. package/fesm2020/mdc-tabs.mjs +6 -6
  99. package/fesm2020/mdc-tabs.mjs.map +1 -1
  100. package/fesm2020/mdc-tooltip/testing.mjs +3 -0
  101. package/fesm2020/mdc-tooltip/testing.mjs.map +1 -1
  102. package/fesm2020/mdc-tooltip.mjs +49 -32
  103. package/fesm2020/mdc-tooltip.mjs.map +1 -1
  104. package/mdc-button/_button-theme.scss +5 -2
  105. package/mdc-button/_icon-button-theme.scss +2 -1
  106. package/mdc-chips/testing/public-api.d.ts +1 -0
  107. package/mdc-dialog/dialog.d.ts +6 -1
  108. package/mdc-dialog/testing/dialog-opener.d.ts +18 -0
  109. package/mdc-dialog/testing/public-api.d.ts +1 -0
  110. package/mdc-form-field/_form-field-density.scss +2 -2
  111. package/mdc-form-field/_form-field-high-contrast.scss +14 -5
  112. package/mdc-form-field/_form-field-theme.scss +1 -1
  113. package/mdc-form-field/_mdc-text-field-structure-overrides.scss +2 -2
  114. package/mdc-form-field/directives/floating-label.d.ts +1 -3
  115. package/mdc-helpers/_mdc-helpers.scss +1 -2
  116. package/mdc-list/_list-theme.scss +9 -0
  117. package/mdc-select/_select-theme.scss +1 -1
  118. package/mdc-table/_table-theme.scss +2 -9
  119. package/mdc-tabs/_tabs-common.scss +9 -0
  120. package/mdc-theming/prebuilt/deeppurple-amber.css +1 -1
  121. package/mdc-theming/prebuilt/indigo-pink.css +1 -1
  122. package/mdc-theming/prebuilt/pink-bluegrey.css +1 -1
  123. package/mdc-theming/prebuilt/purple-green.css +1 -1
  124. package/mdc-tooltip/testing/tooltip-harness.d.ts +3 -0
  125. package/mdc-tooltip/tooltip.d.ts +6 -2
  126. package/package.json +3 -3
@@ -1,8 +1,9 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, Inject, Optional, Component, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';
2
+ import { Directive, Inject, Optional, Component, ViewEncapsulation, ChangeDetectionStrategy, ViewChild, NgModule } from '@angular/core';
3
3
  import * as i5 from '@angular/common';
4
4
  import { DOCUMENT, CommonModule } from '@angular/common';
5
5
  import * as i2 from '@angular/cdk/platform';
6
+ import { ANIMATION_MODULE_TYPE } from '@angular/platform-browser/animations';
6
7
  import * as i3 from '@angular/cdk/a11y';
7
8
  import { A11yModule } from '@angular/cdk/a11y';
8
9
  import * as i4 from '@angular/cdk/bidi';
@@ -15,29 +16,6 @@ import { trigger, state, style, transition, animate } from '@angular/animations'
15
16
  import { CdkScrollableModule } from '@angular/cdk/scrolling';
16
17
  import { MatCommonModule } from '@angular/material-experimental/mdc-core';
17
18
 
18
- /**
19
- * @license
20
- * Copyright Google LLC All Rights Reserved.
21
- *
22
- * Use of this source code is governed by an MIT-style license that can be
23
- * found in the LICENSE file at https://angular.io/license
24
- */
25
- /**
26
- * Animations used by MatTooltip.
27
- * @docs-private
28
- */
29
- const matTooltipAnimations = {
30
- /** Animation that transitions a tooltip in and out. */
31
- tooltipState: trigger('state', [
32
- // TODO(crisbeto): these values are based on MDC's CSS.
33
- // We should be able to use their styles directly once we land #19432.
34
- state('initial, void, hidden', style({ opacity: 0, transform: 'scale(0.8)' })),
35
- state('visible', style({ transform: 'scale(1)' })),
36
- transition('* => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),
37
- transition('* => hidden', animate('75ms cubic-bezier(0.4, 0, 1, 1)')),
38
- ]),
39
- };
40
-
41
19
  /**
42
20
  * @license
43
21
  * Copyright Google LLC All Rights Reserved.
@@ -112,14 +90,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImpor
112
90
  * @docs-private
113
91
  */
114
92
  class TooltipComponent extends _TooltipComponentBase {
115
- constructor(changeDetectorRef, _elementRef) {
116
- super(changeDetectorRef);
93
+ constructor(changeDetectorRef, _elementRef, animationMode) {
94
+ super(changeDetectorRef, animationMode);
117
95
  this._elementRef = _elementRef;
118
96
  /* Whether the tooltip text overflows to multiple lines */
119
97
  this._isMultiline = false;
98
+ this._showAnimation = 'mat-mdc-tooltip-show';
99
+ this._hideAnimation = 'mat-mdc-tooltip-hide';
120
100
  }
121
101
  _onShow() {
122
102
  this._isMultiline = this._isTooltipMultiline();
103
+ this._markForCheck();
123
104
  }
124
105
  /** Whether the tooltip text has overflown to the next line */
125
106
  _isTooltipMultiline() {
@@ -127,17 +108,53 @@ class TooltipComponent extends _TooltipComponentBase {
127
108
  return rect.height > numbers.MIN_HEIGHT && rect.width >= numbers.MAX_WIDTH;
128
109
  }
129
110
  }
130
- TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
131
- TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: TooltipComponent, selector: "mat-tooltip-component", host: { attributes: { "aria-hidden": "true" }, properties: { "style.zoom": "_visibility === \"visible\" ? 1 : null" } }, usesInheritance: true, ngImport: i0, template: "<div\n class=\"mdc-tooltip mdc-tooltip--shown mat-mdc-tooltip\"\n [ngClass]=\"tooltipClass\"\n [class.mdc-tooltip--multiline]=\"_isMultiline\"\n [@state]=\"_visibility\"\n (@state.start)=\"_animationStart()\"\n (@state.done)=\"_animationDone($event)\">\n <div class=\"mdc-tooltip__surface mdc-tooltip__surface-animation\">{{message}}</div>\n</div>\n", styles: [".mdc-tooltip__surface{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-tooltip__surface{word-break:break-all;word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip{z-index:9}.mdc-tooltip{position:fixed;display:none}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface{line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface::before{border-color:CanvasText}}.mdc-tooltip--rich .mdc-tooltip__surface{align-items:flex-start;border-radius:4px;display:flex;flex-direction:column;line-height:20px;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{display:block;margin-top:0;line-height:20px;margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__title::before{display:inline-block;width:0;height:24px;content:\"\";vertical-align:0}.mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(100% - 2 * 8px);margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(0.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(0.9396926208)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-bottom{outline:1px solid transparent;z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mat-mdc-tooltip{position:static;pointer-events:none !important}\n"], directives: [{ type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [matTooltipAnimations.tooltipState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
111
+ TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: ANIMATION_MODULE_TYPE, optional: true }], target: i0.ɵɵFactoryTarget.Component });
112
+ TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.0", type: TooltipComponent, selector: "mat-tooltip-component", host: { attributes: { "aria-hidden": "true" }, listeners: { "mouseleave": "_handleMouseLeave($event)" }, properties: { "style.zoom": "isVisible() ? 1 : null" } }, viewQueries: [{ propertyName: "_tooltip", first: true, predicate: ["tooltip"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div\n #tooltip\n class=\"mdc-tooltip mdc-tooltip--shown mat-mdc-tooltip\"\n [ngClass]=\"tooltipClass\"\n (animationend)=\"_handleAnimationEnd($event)\"\n [class.mdc-tooltip--multiline]=\"_isMultiline\">\n <div class=\"mdc-tooltip__surface mdc-tooltip__surface-animation\">{{message}}</div>\n</div>\n", styles: [".mdc-tooltip__surface{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-tooltip__surface{word-break:break-all;word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip{z-index:9}.mdc-tooltip{position:fixed;display:none}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface{line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface::before{border-color:CanvasText}}.mdc-tooltip--rich .mdc-tooltip__surface{align-items:flex-start;border-radius:4px;display:flex;flex-direction:column;line-height:20px;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{display:block;margin-top:0;line-height:20px;margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__title::before{display:inline-block;width:0;height:24px;content:\"\";vertical-align:0}.mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(100% - 2 * 8px);margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(0.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(0.9396926208)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-bottom{outline:1px solid transparent;z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mat-mdc-tooltip{position:relative;transform:scale(0)}.mat-mdc-tooltip::before{content:\"\";top:-8px;right:-8px;bottom:-8px;left:-8px;z-index:-1;position:absolute}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}\n"], directives: [{ type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
132
113
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.0", ngImport: i0, type: TooltipComponent, decorators: [{
133
114
  type: Component,
134
- args: [{ selector: 'mat-tooltip-component', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [matTooltipAnimations.tooltipState], host: {
115
+ args: [{ selector: 'mat-tooltip-component', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
135
116
  // Forces the element to have a layout in IE and Edge. This fixes issues where the element
136
117
  // won't be rendered if the animations are disabled or there is no web animations polyfill.
137
- '[style.zoom]': '_visibility === "visible" ? 1 : null',
118
+ '[style.zoom]': 'isVisible() ? 1 : null',
119
+ '(mouseleave)': '_handleMouseLeave($event)',
138
120
  'aria-hidden': 'true',
139
- }, template: "<div\n class=\"mdc-tooltip mdc-tooltip--shown mat-mdc-tooltip\"\n [ngClass]=\"tooltipClass\"\n [class.mdc-tooltip--multiline]=\"_isMultiline\"\n [@state]=\"_visibility\"\n (@state.start)=\"_animationStart()\"\n (@state.done)=\"_animationDone($event)\">\n <div class=\"mdc-tooltip__surface mdc-tooltip__surface-animation\">{{message}}</div>\n</div>\n", styles: [".mdc-tooltip__surface{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-tooltip__surface{word-break:break-all;word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip{z-index:9}.mdc-tooltip{position:fixed;display:none}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface{line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface::before{border-color:CanvasText}}.mdc-tooltip--rich .mdc-tooltip__surface{align-items:flex-start;border-radius:4px;display:flex;flex-direction:column;line-height:20px;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{display:block;margin-top:0;line-height:20px;margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__title::before{display:inline-block;width:0;height:24px;content:\"\";vertical-align:0}.mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(100% - 2 * 8px);margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(0.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(0.9396926208)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-bottom{outline:1px solid transparent;z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mat-mdc-tooltip{position:static;pointer-events:none !important}\n"] }]
140
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; } });
121
+ }, template: "<div\n #tooltip\n class=\"mdc-tooltip mdc-tooltip--shown mat-mdc-tooltip\"\n [ngClass]=\"tooltipClass\"\n (animationend)=\"_handleAnimationEnd($event)\"\n [class.mdc-tooltip--multiline]=\"_isMultiline\">\n <div class=\"mdc-tooltip__surface mdc-tooltip__surface-animation\">{{message}}</div>\n</div>\n", styles: [".mdc-tooltip__surface{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{border-radius:4px;border-radius:var(--mdc-shape-small, 4px)}.mdc-tooltip__surface{word-break:break-all;word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip{z-index:9}.mdc-tooltip{position:fixed;display:none}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface{line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid transparent;border-radius:inherit;content:\"\";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface::before{border-color:CanvasText}}.mdc-tooltip--rich .mdc-tooltip__surface{align-items:flex-start;border-radius:4px;display:flex;flex-direction:column;line-height:20px;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{display:block;margin-top:0;line-height:20px;margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__title::before{display:inline-block;width:0;height:24px;content:\"\";vertical-align:0}.mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(100% - 2 * 8px);margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(0.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(0.9396926208)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-bottom{outline:1px solid transparent;z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mat-mdc-tooltip{position:relative;transform:scale(0)}.mat-mdc-tooltip::before{content:\"\";top:-8px;right:-8px;bottom:-8px;left:-8px;z-index:-1;position:absolute}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}\n"] }]
122
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: undefined, decorators: [{
123
+ type: Optional
124
+ }, {
125
+ type: Inject,
126
+ args: [ANIMATION_MODULE_TYPE]
127
+ }] }]; }, propDecorators: { _tooltip: [{
128
+ type: ViewChild,
129
+ args: ['tooltip', {
130
+ // Use a static query here since we interact directly with
131
+ // the DOM which can happen before `ngAfterViewInit`.
132
+ static: true,
133
+ }]
134
+ }] } });
135
+
136
+ /**
137
+ * @license
138
+ * Copyright Google LLC All Rights Reserved.
139
+ *
140
+ * Use of this source code is governed by an MIT-style license that can be
141
+ * found in the LICENSE file at https://angular.io/license
142
+ */
143
+ /**
144
+ * Animations used by MatTooltip.
145
+ * @docs-private
146
+ */
147
+ const matTooltipAnimations = {
148
+ /** Animation that transitions a tooltip in and out. */
149
+ tooltipState: trigger('state', [
150
+ // TODO(crisbeto): these values are based on MDC's CSS.
151
+ // We should be able to use their styles directly once we land #19432.
152
+ state('initial, void, hidden', style({ opacity: 0, transform: 'scale(0.8)' })),
153
+ state('visible', style({ transform: 'scale(1)' })),
154
+ transition('* => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),
155
+ transition('* => hidden', animate('75ms cubic-bezier(0.4, 0, 1, 1)')),
156
+ ]),
157
+ };
141
158
 
142
159
  /**
143
160
  * @license
@@ -1 +1 @@
1
- {"version":3,"file":"mdc-tooltip.mjs","sources":["../../../../../../src/material-experimental/mdc-tooltip/tooltip-animations.ts","../../../../../../src/material-experimental/mdc-tooltip/tooltip.ts","../../../../../../src/material-experimental/mdc-tooltip/tooltip.html","../../../../../../src/material-experimental/mdc-tooltip/module.ts","../../../../../../src/material-experimental/mdc-tooltip/public-api.ts","../../../../../../src/material-experimental/mdc-tooltip/index.ts","../../../../../../src/material-experimental/mdc-tooltip/mdc-tooltip_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n animate,\n AnimationTriggerMetadata,\n state,\n style,\n transition,\n trigger,\n} from '@angular/animations';\n\n/**\n * Animations used by MatTooltip.\n * @docs-private\n */\nexport const matTooltipAnimations: {\n readonly tooltipState: AnimationTriggerMetadata;\n} = {\n /** Animation that transitions a tooltip in and out. */\n tooltipState: trigger('state', [\n // TODO(crisbeto): these values are based on MDC's CSS.\n // We should be able to use their styles directly once we land #19432.\n state('initial, void, hidden', style({opacity: 0, transform: 'scale(0.8)'})),\n state('visible', style({transform: 'scale(1)'})),\n transition('* => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),\n transition('* => hidden', animate('75ms cubic-bezier(0.4, 0, 1, 1)')),\n ]),\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Directive,\n ElementRef,\n Inject,\n NgZone,\n Optional,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {Platform} from '@angular/cdk/platform';\nimport {AriaDescriber, FocusMonitor} from '@angular/cdk/a11y';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {ConnectedPosition, Overlay, ScrollDispatcher} from '@angular/cdk/overlay';\nimport {\n MatTooltipDefaultOptions,\n MAT_TOOLTIP_DEFAULT_OPTIONS,\n MAT_TOOLTIP_SCROLL_STRATEGY,\n _MatTooltipBase,\n _TooltipComponentBase,\n} from '@angular/material/tooltip';\nimport {numbers} from '@material/tooltip';\nimport {matTooltipAnimations} from './tooltip-animations';\n\n/**\n * CSS class that will be attached to the overlay panel.\n * @deprecated\n * @breaking-change 13.0.0 remove this variable\n */\nexport const TOOLTIP_PANEL_CLASS = 'mat-mdc-tooltip-panel';\n\n/**\n * Directive that attaches a material design tooltip to the host element. Animates the showing and\n * hiding of a tooltip provided position (defaults to below the element).\n *\n * https://material.io/design/components/tooltips.html\n */\n@Directive({\n selector: '[matTooltip]',\n exportAs: 'matTooltip',\n host: {\n 'class': 'mat-mdc-tooltip-trigger',\n },\n})\nexport class MatTooltip extends _MatTooltipBase<TooltipComponent> {\n protected override readonly _tooltipComponent = TooltipComponent;\n protected override readonly _cssClassPrefix = 'mat-mdc';\n\n constructor(\n overlay: Overlay,\n elementRef: ElementRef<HTMLElement>,\n scrollDispatcher: ScrollDispatcher,\n viewContainerRef: ViewContainerRef,\n ngZone: NgZone,\n platform: Platform,\n ariaDescriber: AriaDescriber,\n focusMonitor: FocusMonitor,\n @Inject(MAT_TOOLTIP_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() dir: Directionality,\n @Optional() @Inject(MAT_TOOLTIP_DEFAULT_OPTIONS) defaultOptions: MatTooltipDefaultOptions,\n @Inject(DOCUMENT) _document: any,\n ) {\n super(\n overlay,\n elementRef,\n scrollDispatcher,\n viewContainerRef,\n ngZone,\n platform,\n ariaDescriber,\n focusMonitor,\n scrollStrategy,\n dir,\n defaultOptions,\n _document,\n );\n this._viewportMargin = numbers.MIN_VIEWPORT_TOOLTIP_THRESHOLD;\n }\n\n protected override _addOffset(position: ConnectedPosition): ConnectedPosition {\n const offset = numbers.UNBOUNDED_ANCHOR_GAP;\n const isLtr = !this._dir || this._dir.value == 'ltr';\n\n if (position.originY === 'top') {\n position.offsetY = -offset;\n } else if (position.originY === 'bottom') {\n position.offsetY = offset;\n } else if (position.originX === 'start') {\n position.offsetX = isLtr ? -offset : offset;\n } else if (position.originX === 'end') {\n position.offsetX = isLtr ? offset : -offset;\n }\n\n return position;\n }\n}\n\n/**\n * Internal component that wraps the tooltip's content.\n * @docs-private\n */\n@Component({\n selector: 'mat-tooltip-component',\n templateUrl: 'tooltip.html',\n styleUrls: ['tooltip.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [matTooltipAnimations.tooltipState],\n host: {\n // Forces the element to have a layout in IE and Edge. This fixes issues where the element\n // won't be rendered if the animations are disabled or there is no web animations polyfill.\n '[style.zoom]': '_visibility === \"visible\" ? 1 : null',\n 'aria-hidden': 'true',\n },\n})\nexport class TooltipComponent extends _TooltipComponentBase {\n /* Whether the tooltip text overflows to multiple lines */\n _isMultiline: boolean = false;\n\n constructor(changeDetectorRef: ChangeDetectorRef, private _elementRef: ElementRef) {\n super(changeDetectorRef);\n }\n\n protected override _onShow(): void {\n this._isMultiline = this._isTooltipMultiline();\n }\n\n /** Whether the tooltip text has overflown to the next line */\n private _isTooltipMultiline() {\n const rect = this._elementRef.nativeElement.getBoundingClientRect();\n return rect.height > numbers.MIN_HEIGHT && rect.width >= numbers.MAX_WIDTH;\n }\n}\n","<div\n class=\"mdc-tooltip mdc-tooltip--shown mat-mdc-tooltip\"\n [ngClass]=\"tooltipClass\"\n [class.mdc-tooltip--multiline]=\"_isMultiline\"\n [@state]=\"_visibility\"\n (@state.start)=\"_animationStart()\"\n (@state.done)=\"_animationDone($event)\">\n <div class=\"mdc-tooltip__surface mdc-tooltip__surface-animation\">{{message}}</div>\n</div>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {A11yModule} from '@angular/cdk/a11y';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {CdkScrollableModule} from '@angular/cdk/scrolling';\nimport {MatCommonModule} from '@angular/material-experimental/mdc-core';\nimport {MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER} from '@angular/material/tooltip';\nimport {MatTooltip, TooltipComponent} from './tooltip';\n\n@NgModule({\n imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule],\n exports: [MatTooltip, TooltipComponent, MatCommonModule, CdkScrollableModule],\n declarations: [MatTooltip, TooltipComponent],\n providers: [MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER],\n})\nexport class MatTooltipModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './tooltip';\nexport * from './tooltip-animations';\nexport * from './module';\n\nexport {\n getMatTooltipInvalidPositionError,\n MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY,\n MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY,\n TooltipPosition,\n TooltipTouchGestures,\n TooltipVisibility,\n SCROLL_THROTTLE_MS,\n MAT_TOOLTIP_SCROLL_STRATEGY,\n MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER,\n MatTooltipDefaultOptions,\n MAT_TOOLTIP_DEFAULT_OPTIONS,\n} from '@angular/material/tooltip';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;AAgBA;;;;MAIa,oBAAoB,GAE7B;;IAEF,YAAY,EAAE,OAAO,CAAC,OAAO,EAAE;;;QAG7B,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,EAAC,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAC,CAAC,CAAC;QAC5E,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,EAAC,SAAS,EAAE,UAAU,EAAC,CAAC,CAAC;QAChD,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,kCAAkC,CAAC,CAAC;QACvE,UAAU,CAAC,aAAa,EAAE,OAAO,CAAC,iCAAiC,CAAC,CAAC;KACtE,CAAC;;;AC/BJ;;;;;;;AAmCA;;;;;MAKa,mBAAmB,GAAG,wBAAwB;AAE3D;;;;;;MAaa,UAAW,SAAQ,eAAiC;IAI/D,YACE,OAAgB,EAChB,UAAmC,EACnC,gBAAkC,EAClC,gBAAkC,EAClC,MAAc,EACd,QAAkB,EAClB,aAA4B,EAC5B,YAA0B,EACW,cAAmB,EAC5C,GAAmB,EACkB,cAAwC,EACvE,SAAc;QAEhC,K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;mBAAC;oBACR,OAAO,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC;oBACnE,OAAO,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,mBAAmB,CAAC;oBAC7E,YAAY,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;oBAC5C,SAAS,EAAE,CAAC,4CAA4C,CAAC;iBAC1D;;;ACtBD;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"mdc-tooltip.mjs","sources":["../../../../../../src/material-experimental/mdc-tooltip/tooltip.ts","../../../../../../src/material-experimental/mdc-tooltip/tooltip.html","../../../../../../src/material-experimental/mdc-tooltip/tooltip-animations.ts","../../../../../../src/material-experimental/mdc-tooltip/module.ts","../../../../../../src/material-experimental/mdc-tooltip/public-api.ts","../../../../../../src/material-experimental/mdc-tooltip/index.ts","../../../../../../src/material-experimental/mdc-tooltip/mdc-tooltip_public_index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Directive,\n ElementRef,\n Inject,\n NgZone,\n Optional,\n ViewChild,\n ViewContainerRef,\n ViewEncapsulation,\n} from '@angular/core';\nimport {DOCUMENT} from '@angular/common';\nimport {Platform} from '@angular/cdk/platform';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\nimport {AriaDescriber, FocusMonitor} from '@angular/cdk/a11y';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {ConnectedPosition, Overlay, ScrollDispatcher} from '@angular/cdk/overlay';\nimport {\n MatTooltipDefaultOptions,\n MAT_TOOLTIP_DEFAULT_OPTIONS,\n MAT_TOOLTIP_SCROLL_STRATEGY,\n _MatTooltipBase,\n _TooltipComponentBase,\n} from '@angular/material/tooltip';\nimport {numbers} from '@material/tooltip';\n\n/**\n * CSS class that will be attached to the overlay panel.\n * @deprecated\n * @breaking-change 13.0.0 remove this variable\n */\nexport const TOOLTIP_PANEL_CLASS = 'mat-mdc-tooltip-panel';\n\n/**\n * Directive that attaches a material design tooltip to the host element. Animates the showing and\n * hiding of a tooltip provided position (defaults to below the element).\n *\n * https://material.io/design/components/tooltips.html\n */\n@Directive({\n selector: '[matTooltip]',\n exportAs: 'matTooltip',\n host: {\n 'class': 'mat-mdc-tooltip-trigger',\n },\n})\nexport class MatTooltip extends _MatTooltipBase<TooltipComponent> {\n protected override readonly _tooltipComponent = TooltipComponent;\n protected override readonly _cssClassPrefix = 'mat-mdc';\n\n constructor(\n overlay: Overlay,\n elementRef: ElementRef<HTMLElement>,\n scrollDispatcher: ScrollDispatcher,\n viewContainerRef: ViewContainerRef,\n ngZone: NgZone,\n platform: Platform,\n ariaDescriber: AriaDescriber,\n focusMonitor: FocusMonitor,\n @Inject(MAT_TOOLTIP_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() dir: Directionality,\n @Optional() @Inject(MAT_TOOLTIP_DEFAULT_OPTIONS) defaultOptions: MatTooltipDefaultOptions,\n @Inject(DOCUMENT) _document: any,\n ) {\n super(\n overlay,\n elementRef,\n scrollDispatcher,\n viewContainerRef,\n ngZone,\n platform,\n ariaDescriber,\n focusMonitor,\n scrollStrategy,\n dir,\n defaultOptions,\n _document,\n );\n this._viewportMargin = numbers.MIN_VIEWPORT_TOOLTIP_THRESHOLD;\n }\n\n protected override _addOffset(position: ConnectedPosition): ConnectedPosition {\n const offset = numbers.UNBOUNDED_ANCHOR_GAP;\n const isLtr = !this._dir || this._dir.value == 'ltr';\n\n if (position.originY === 'top') {\n position.offsetY = -offset;\n } else if (position.originY === 'bottom') {\n position.offsetY = offset;\n } else if (position.originX === 'start') {\n position.offsetX = isLtr ? -offset : offset;\n } else if (position.originX === 'end') {\n position.offsetX = isLtr ? offset : -offset;\n }\n\n return position;\n }\n}\n\n/**\n * Internal component that wraps the tooltip's content.\n * @docs-private\n */\n@Component({\n selector: 'mat-tooltip-component',\n templateUrl: 'tooltip.html',\n styleUrls: ['tooltip.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n // Forces the element to have a layout in IE and Edge. This fixes issues where the element\n // won't be rendered if the animations are disabled or there is no web animations polyfill.\n '[style.zoom]': 'isVisible() ? 1 : null',\n '(mouseleave)': '_handleMouseLeave($event)',\n 'aria-hidden': 'true',\n },\n})\nexport class TooltipComponent extends _TooltipComponentBase {\n /* Whether the tooltip text overflows to multiple lines */\n _isMultiline = false;\n\n /** Reference to the internal tooltip element. */\n @ViewChild('tooltip', {\n // Use a static query here since we interact directly with\n // the DOM which can happen before `ngAfterViewInit`.\n static: true,\n })\n _tooltip: ElementRef<HTMLElement>;\n _showAnimation = 'mat-mdc-tooltip-show';\n _hideAnimation = 'mat-mdc-tooltip-hide';\n\n constructor(\n changeDetectorRef: ChangeDetectorRef,\n private _elementRef: ElementRef<HTMLElement>,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) animationMode?: string,\n ) {\n super(changeDetectorRef, animationMode);\n }\n\n protected override _onShow(): void {\n this._isMultiline = this._isTooltipMultiline();\n this._markForCheck();\n }\n\n /** Whether the tooltip text has overflown to the next line */\n private _isTooltipMultiline() {\n const rect = this._elementRef.nativeElement.getBoundingClientRect();\n return rect.height > numbers.MIN_HEIGHT && rect.width >= numbers.MAX_WIDTH;\n }\n}\n","<div\n #tooltip\n class=\"mdc-tooltip mdc-tooltip--shown mat-mdc-tooltip\"\n [ngClass]=\"tooltipClass\"\n (animationend)=\"_handleAnimationEnd($event)\"\n [class.mdc-tooltip--multiline]=\"_isMultiline\">\n <div class=\"mdc-tooltip__surface mdc-tooltip__surface-animation\">{{message}}</div>\n</div>\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {\n animate,\n AnimationTriggerMetadata,\n state,\n style,\n transition,\n trigger,\n} from '@angular/animations';\n\n/**\n * Animations used by MatTooltip.\n * @docs-private\n */\nexport const matTooltipAnimations: {\n readonly tooltipState: AnimationTriggerMetadata;\n} = {\n /** Animation that transitions a tooltip in and out. */\n tooltipState: trigger('state', [\n // TODO(crisbeto): these values are based on MDC's CSS.\n // We should be able to use their styles directly once we land #19432.\n state('initial, void, hidden', style({opacity: 0, transform: 'scale(0.8)'})),\n state('visible', style({transform: 'scale(1)'})),\n transition('* => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),\n transition('* => hidden', animate('75ms cubic-bezier(0.4, 0, 1, 1)')),\n ]),\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {A11yModule} from '@angular/cdk/a11y';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {CdkScrollableModule} from '@angular/cdk/scrolling';\nimport {MatCommonModule} from '@angular/material-experimental/mdc-core';\nimport {MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER} from '@angular/material/tooltip';\nimport {MatTooltip, TooltipComponent} from './tooltip';\n\n@NgModule({\n imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule],\n exports: [MatTooltip, TooltipComponent, MatCommonModule, CdkScrollableModule],\n declarations: [MatTooltip, TooltipComponent],\n providers: [MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER],\n})\nexport class MatTooltipModule {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './tooltip';\nexport * from './tooltip-animations';\nexport * from './module';\n\nexport {\n getMatTooltipInvalidPositionError,\n MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY,\n MAT_TOOLTIP_DEFAULT_OPTIONS_FACTORY,\n TooltipPosition,\n TooltipTouchGestures,\n TooltipVisibility,\n SCROLL_THROTTLE_MS,\n MAT_TOOLTIP_SCROLL_STRATEGY,\n MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER,\n MatTooltipDefaultOptions,\n MAT_TOOLTIP_DEFAULT_OPTIONS,\n} from '@angular/material/tooltip';\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport * from './public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;AAoCA;;;;;MAKa,mBAAmB,GAAG,wBAAwB;AAE3D;;;;;;MAaa,UAAW,SAAQ,eAAiC;IAI/D,YACE,OAAgB,EAChB,UAAmC,EACnC,gBAAkC,EAClC,gBAAkC,EAClC,MAAc,EACd,QAAkB,EAClB,aAA4B,EAC5B,YAA0B,EACW,cAAmB,EAC5C,GAAmB,EACkB,cAAwC,EACvE,SAAc;QAEhC,KAAK,CACH,OAAO,EACP,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,EACN,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,cAAc,EACd,GAAG,EACH,cAAc,EACd,SAAS,CACV,CAAC;QA9BwB,sBAAiB,GAAG,gBAAgB,CAAC;QACrC,oBAAe,GAAG,SAAS,CAAC;QA8BtD,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC,8BAA8B,CAAC;KAC/D;IAEkB,UAAU,CAAC,QAA2B;QACvD,MAAM,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;QAC5C,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC;QAErD,IAAI,QAAQ,CAAC,OAAO,KAAK,KAAK,EAAE;YAC9B,QAAQ,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YAHhD,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC,EAC3B,eAAe,EAAE,mBAAmB;2FAIjE,gBAAgB;kBAN5B,QAAQ;mBAAC;oBACR,OAAO,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC;oBACnE,OAAO,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,mBAAmB,CAAC;oBAC7E,YAAY,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;oBAC5C,SAAS,EAAE,CAAC,4CAA4C,CAAC;iBAC1D;;;ACtBD;;;;;;;;ACAA;;;;;;;;ACAA;;;;;;"}
@@ -196,8 +196,11 @@
196
196
  .mat-mdc-raised-button,
197
197
  .mat-mdc-unelevated-button,
198
198
  .mat-mdc-outlined-button {
199
- @include mdc-button-theme.density($density-scale, $query: mdc-helpers.$mat-base-styles-query);
200
- @include button-theme-private.touch-target-density($density-scale);
199
+ // Use `mat-mdc-button-base` to increase the specificity over the button's structural styles.
200
+ &.mat-mdc-button-base {
201
+ @include mdc-button-theme.density($density-scale, $query: mdc-helpers.$mat-base-styles-query);
202
+ @include button-theme-private.touch-target-density($density-scale);
203
+ }
201
204
  }
202
205
  }
203
206
 
@@ -49,7 +49,8 @@
49
49
 
50
50
  @mixin density($config-or-theme) {
51
51
  $density-scale: theming.get-density-config($config-or-theme);
52
- .mat-mdc-icon-button {
52
+ // Use `mat-mdc-button-base` to increase the specificity over the button's structural styles.
53
+ .mat-mdc-icon-button.mat-mdc-button-base {
53
54
  @include mdc-icon-button.density($density-scale, $query: mdc-helpers.$mat-base-styles-query);
54
55
  @include button-theme-private.touch-target-density($density-scale);
55
56
  }
@@ -5,6 +5,7 @@
5
5
  * Use of this source code is governed by an MIT-style license that can be
6
6
  * found in the LICENSE file at https://angular.io/license
7
7
  */
8
+ export * from './chip-avatar-harness';
8
9
  export * from './chip-harness';
9
10
  export * from './chip-harness-filters';
10
11
  export * from './chip-input-harness';
@@ -34,7 +34,12 @@ export declare class MatDialog extends _MatDialogBase<MatDialogContainer> {
34
34
  * @deprecated `_location` parameter to be removed.
35
35
  * @breaking-change 10.0.0
36
36
  */
37
- location: Location, defaultOptions: MatDialogConfig, scrollStrategy: any, parentDialog: MatDialog, overlayContainer: OverlayContainer, animationMode?: 'NoopAnimations' | 'BrowserAnimations');
37
+ location: Location, defaultOptions: MatDialogConfig, scrollStrategy: any, parentDialog: MatDialog, overlayContainer: OverlayContainer,
38
+ /**
39
+ * @deprecated No longer used. To be removed.
40
+ * @breaking-change 14.0.0
41
+ */
42
+ animationMode?: 'NoopAnimations' | 'BrowserAnimations');
38
43
  static ɵfac: i0.ɵɵFactoryDeclaration<MatDialog, [null, null, { optional: true; }, { optional: true; }, null, { optional: true; skipSelf: true; }, null, { optional: true; }]>;
39
44
  static ɵprov: i0.ɵɵInjectableDeclaration<MatDialog>;
40
45
  }
@@ -0,0 +1,18 @@
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 { ComponentType } from '@angular/cdk/overlay';
9
+ import { _MatTestDialogOpenerBase } from '@angular/material/dialog/testing';
10
+ import { MatDialog, MatDialogContainer, MatDialogConfig } from '@angular/material-experimental/mdc-dialog';
11
+ /** Test component that immediately opens a dialog when bootstrapped. */
12
+ export declare class MatTestDialogOpener<T = unknown, R = unknown> extends _MatTestDialogOpenerBase<MatDialogContainer, T, R> {
13
+ constructor(dialog: MatDialog);
14
+ /** Static method that prepares this class to open the provided component. */
15
+ static withComponent<T = unknown, R = unknown>(component: ComponentType<T>, config?: MatDialogConfig): ComponentType<MatTestDialogOpener<T, R>>;
16
+ }
17
+ export declare class MatTestDialogOpenerModule {
18
+ }
@@ -7,3 +7,4 @@
7
7
  */
8
8
  export { DialogHarnessFilters } from '@angular/material/dialog/testing';
9
9
  export { MatDialogHarness, MatDialogSection } from './dialog-harness';
10
+ export * from './dialog-opener';
@@ -77,7 +77,7 @@
77
77
  // on whether a textarea is used. This is not possible in our implementation of the
78
78
  // form-field because we do not know what type of form-field control is set up. Hence
79
79
  // we always use a fixed position for the label. This does not have any implications.
80
- .mat-mdc-form-field .mat-mdc-text-field-wrapper .mdc-floating-label {
80
+ .mat-mdc-form-field .mat-mdc-text-field-wrapper .mat-mdc-floating-label {
81
81
  top: math.div($height, 2);
82
82
  }
83
83
 
@@ -107,7 +107,7 @@
107
107
  // Update the spacing for filled form fields to account for the hidden floating label.
108
108
  @include _infix-vertical-spacing-filled(
109
109
  $no-label-padding, $no-label-padding);
110
- .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mdc-floating-label {
110
+ .mat-mdc-text-field-wrapper:not(.mdc-text-field--outlined) .mat-mdc-floating-label {
111
111
  display: none;
112
112
  }
113
113
  }
@@ -4,11 +4,20 @@
4
4
  $focus-indicator-width: 3px;
5
5
  $focus-indicator-style: dashed;
6
6
 
7
- // The outline of the `fill` appearance is achieved through a background color
8
- // which won't be visible in high contrast mode. Add an outline to replace it.
9
- .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper {
10
- @include a11y.high-contrast(active, off) {
11
- outline: solid 1px;
7
+ .mat-form-field-appearance-fill {
8
+ // The outline of the `fill` appearance is achieved through a background color
9
+ // which won't be visible in high contrast mode. Add an outline to replace it.
10
+ .mat-mdc-text-field-wrapper {
11
+ @include a11y.high-contrast(active, off) {
12
+ outline: solid 1px;
13
+ }
14
+ }
15
+
16
+ // Use GreyText for the disabled outline color which will account for the user's configuration.
17
+ &.mat-form-field-disabled .mat-mdc-text-field-wrapper {
18
+ @include a11y.high-contrast(active, off) {
19
+ outline-color: GrayText;
20
+ }
12
21
  }
13
22
  }
14
23
 
@@ -76,7 +76,7 @@
76
76
  // shows `body1` for text fields though, so we manually override the typography.
77
77
  // Note: Form controls inherit the typography from the parent form field.
78
78
  .mat-mdc-form-field,
79
- .mat-mdc-form-field .mdc-floating-label {
79
+ .mat-mdc-floating-label {
80
80
  @include mdc-typography.typography(body1, $query: mdc-helpers.$mat-typography-styles-query);
81
81
  }
82
82
 
@@ -20,7 +20,7 @@
20
20
  // In order to ensure proper alignment of the floating label, we reset its line-height.
21
21
  // The line-height is not important as the element is absolutely positioned and only has one line
22
22
  // of text.
23
- .mat-mdc-form-field .mdc-floating-label.mdc-floating-label {
23
+ .mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label {
24
24
  line-height: normal;
25
25
  }
26
26
 
@@ -95,7 +95,7 @@
95
95
  // the notched outline container, and already applies a specific horizontal spacing which
96
96
  // we do not want to overwrite. *Note*: We need to have increased specificity for this
97
97
  // override because the `right` property will be set with higher specificity in RTL mode.
98
- .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mdc-floating-label {
98
+ .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label {
99
99
  left: auto;
100
100
  right: auto;
101
101
  }
@@ -24,13 +24,11 @@ export declare class MatFormFieldFloatingLabel {
24
24
  private _elementRef;
25
25
  /** Whether the label is floating. */
26
26
  floating: boolean;
27
- /** Whether the label is required. */
28
- required: boolean;
29
27
  constructor(_elementRef: ElementRef);
30
28
  /** Gets the width of the label. Used for the outline notch. */
31
29
  getWidth(): number;
32
30
  /** Gets the HTML element for the floating label. */
33
31
  get element(): HTMLElement;
34
32
  static ɵfac: i0.ɵɵFactoryDeclaration<MatFormFieldFloatingLabel, never>;
35
- static ɵdir: i0.ɵɵDirectiveDeclaration<MatFormFieldFloatingLabel, "label[matFormFieldFloatingLabel]", never, { "floating": "floating"; "required": "required"; }, {}, never>;
33
+ static ɵdir: i0.ɵɵDirectiveDeclaration<MatFormFieldFloatingLabel, "label[matFormFieldFloatingLabel]", never, { "floating": "floating"; }, {}, never>;
36
34
  }
@@ -1,6 +1,5 @@
1
1
  // TODO(mmalerba): this file should be split into separate cohesive partials for things like
2
- // "theming", "typography", "core". Currently splitting it is difficult because of our brittle
3
- // gulp-based release build process. We can update this when we switch to bazel.
2
+ // "theming", "typography", "core".
4
3
 
5
4
  @use '@material/feature-targeting' as mdc-feature-targeting;
6
5
  @use '@material/typography' as mdc-typography;
@@ -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) {
@@ -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);