Skip to content

Commit

Permalink
fix(material/core): deprecate AnimationCurves and AnimationDurations
Browse files Browse the repository at this point in the history
The `AnimationCurves` and `AnimationDurations` were exposed from `material/core`, because some Material components were using them to define JavaScript-based animations. That's no longer the case so they can be removed.
  • Loading branch information
crisbeto committed Feb 24, 2025
1 parent 8b2b944 commit 6f76575
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions src/material/core/animation/animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,23 @@
* found in the LICENSE file at https://angular.dev/license
*/

/** @docs-private */
/**
* @deprecated No longer used, will be removed.
* @breaking-change 21.0.0
* @docs-private
*/
export class AnimationCurves {
static STANDARD_CURVE = 'cubic-bezier(0.4,0.0,0.2,1)';
static DECELERATION_CURVE = 'cubic-bezier(0.0,0.0,0.2,1)';
static ACCELERATION_CURVE = 'cubic-bezier(0.4,0.0,1,1)';
static SHARP_CURVE = 'cubic-bezier(0.4,0.0,0.6,1)';
}

/** @docs-private */
/**
* @deprecated No longer used, will be removed.
* @breaking-change 21.0.0
* @docs-private
*/
export class AnimationDurations {
static COMPLEX = '375ms';
static ENTERING = '225ms';
Expand Down
4 changes: 2 additions & 2 deletions tools/public_api_guard/material/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { Signal } from '@angular/core';
import { Subject } from 'rxjs';
import { Version } from '@angular/core';

// @public
// @public @deprecated (undocumented)
export class AnimationCurves {
// (undocumented)
static ACCELERATION_CURVE: string;
Expand All @@ -41,7 +41,7 @@ export class AnimationCurves {
static STANDARD_CURVE: string;
}

// @public
// @public @deprecated (undocumented)
export class AnimationDurations {
// (undocumented)
static COMPLEX: string;
Expand Down

0 comments on commit 6f76575

Please sign in to comment.