@@ -33,7 +33,6 @@ import {
3333 DOCUMENT ,
3434 Renderer2 ,
3535} from '@angular/core' ;
36- import { NgClass } from '@angular/common' ;
3736import { Platform } from '@angular/cdk/platform' ;
3837import { AriaDescriber , FocusMonitor } from '@angular/cdk/a11y' ;
3938import { Directionality } from '@angular/cdk/bidi' ;
@@ -719,7 +718,8 @@ export class MatTooltip implements OnDestroy, AfterViewInit {
719718 tooltipClass : string | string [ ] | Set < string > | { [ key : string ] : unknown } ,
720719 ) {
721720 if ( this . _tooltipInstance ) {
722- this . _tooltipInstance . tooltipClass = tooltipClass ;
721+ this . _tooltipInstance . tooltipClass =
722+ tooltipClass instanceof Set ? Array . from ( tooltipClass ) : tooltipClass ;
723723 this . _tooltipInstance . _markForCheck ( ) ;
724724 }
725725 }
@@ -951,7 +951,6 @@ export class MatTooltip implements OnDestroy, AfterViewInit {
951951 '(mouseleave)' : '_handleMouseLeave($event)' ,
952952 'aria-hidden' : 'true' ,
953953 } ,
954- imports : [ NgClass ] ,
955954} )
956955export class TooltipComponent implements OnDestroy {
957956 private _changeDetectorRef = inject ( ChangeDetectorRef ) ;
@@ -963,8 +962,8 @@ export class TooltipComponent implements OnDestroy {
963962 /** Message to display in the tooltip */
964963 message ! : string ;
965964
966- /** Classes to be added to the tooltip. Supports the same syntax as `ngClass`. */
967- tooltipClass ! : string | string [ ] | Set < string > | { [ key : string ] : unknown } ;
965+ /** Classes to be added to the tooltip. */
966+ tooltipClass ! : string | string [ ] | { [ key : string ] : unknown } ;
968967
969968 /** The timeout ID of any current timer set to show the tooltip */
970969 private _showTimeoutId : ReturnType < typeof setTimeout > | undefined ;
0 commit comments