Skip to content

Commit

Permalink
fixup! fix(material/stepper): switch away from animations module
Browse files Browse the repository at this point in the history
  • Loading branch information
crisbeto committed Jan 13, 2025
1 parent 1dfa8c7 commit a853634
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 24 deletions.
1 change: 0 additions & 1 deletion src/cdk/stepper/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*/

export * from './stepper';
export * from './step-label';
export * from './stepper-button';
export * from './stepper-module';
export * from './step-header';
19 changes: 0 additions & 19 deletions src/cdk/stepper/step-label.ts

This file was deleted.

3 changes: 1 addition & 2 deletions src/cdk/stepper/stepper-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
*/

import {NgModule} from '@angular/core';
import {CdkStepper, CdkStep} from './stepper';
import {CdkStepLabel} from './step-label';
import {CdkStepper, CdkStep, CdkStepLabel} from './stepper';
import {CdkStepperNext, CdkStepperPrevious} from './stepper-button';
import {CdkStepHeader} from './step-header';
import {BidiModule} from '@angular/cdk/bidi';
Expand Down
14 changes: 13 additions & 1 deletion src/cdk/stepper/stepper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ import {Observable, of as observableOf, Subject} from 'rxjs';
import {startWith, takeUntil} from 'rxjs/operators';

import {CdkStepHeader} from './step-header';
import {CdkStepLabel} from './step-label';

/**
* Position state of the content of each step in stepper that is used for transitioning
Expand Down Expand Up @@ -100,6 +99,19 @@ export interface StepperOptions {
displayDefaultIndicatorType?: boolean;
}

@Directive({selector: '[cdkStepLabel]'})
export class CdkStepLabel {
template = inject<TemplateRef<any>>(TemplateRef);

constructor(...args: unknown[]);

constructor() {
// The content gets passed down into the step header components so we need to
// notify the stepper if they come in later or they might not get picked up.
inject(CdkStepper, {optional: true})?._stateChanged();
}
}

@Component({
selector: 'cdk-step',
exportAs: 'cdkStep',
Expand Down
2 changes: 1 addition & 1 deletion tools/public_api_guard/cdk/stepper.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export class CdkStepperModule {
// (undocumented)
static ɵinj: i0.ɵɵInjectorDeclaration<CdkStepperModule>;
// (undocumented)
static ɵmod: i0.ɵɵNgModuleDeclaration<CdkStepperModule, never, [typeof i1.BidiModule, typeof i2.CdkStep, typeof i2.CdkStepper, typeof i3.CdkStepHeader, typeof i4.CdkStepLabel, typeof i5.CdkStepperNext, typeof i5.CdkStepperPrevious], [typeof i2.CdkStep, typeof i2.CdkStepper, typeof i3.CdkStepHeader, typeof i4.CdkStepLabel, typeof i5.CdkStepperNext, typeof i5.CdkStepperPrevious]>;
static ɵmod: i0.ɵɵNgModuleDeclaration<CdkStepperModule, never, [typeof i1.BidiModule, typeof i2.CdkStep, typeof i2.CdkStepper, typeof i3.CdkStepHeader, typeof i2.CdkStepLabel, typeof i4.CdkStepperNext, typeof i4.CdkStepperPrevious], [typeof i2.CdkStep, typeof i2.CdkStepper, typeof i3.CdkStepHeader, typeof i2.CdkStepLabel, typeof i4.CdkStepperNext, typeof i4.CdkStepperPrevious]>;
}

// @public
Expand Down

0 comments on commit a853634

Please sign in to comment.