Skip to content

Commit a853634

Browse files
committed
fixup! fix(material/stepper): switch away from animations module
1 parent 1dfa8c7 commit a853634

File tree

5 files changed

+15
-24
lines changed

5 files changed

+15
-24
lines changed

src/cdk/stepper/public-api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88

99
export * from './stepper';
10-
export * from './step-label';
1110
export * from './stepper-button';
1211
export * from './stepper-module';
1312
export * from './step-header';

src/cdk/stepper/step-label.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/cdk/stepper/stepper-module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
*/
88

99
import {NgModule} from '@angular/core';
10-
import {CdkStepper, CdkStep} from './stepper';
11-
import {CdkStepLabel} from './step-label';
10+
import {CdkStepper, CdkStep, CdkStepLabel} from './stepper';
1211
import {CdkStepperNext, CdkStepperPrevious} from './stepper-button';
1312
import {CdkStepHeader} from './step-header';
1413
import {BidiModule} from '@angular/cdk/bidi';

src/cdk/stepper/stepper.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import {Observable, of as observableOf, Subject} from 'rxjs';
4444
import {startWith, takeUntil} from 'rxjs/operators';
4545

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

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

102+
@Directive({selector: '[cdkStepLabel]'})
103+
export class CdkStepLabel {
104+
template = inject<TemplateRef<any>>(TemplateRef);
105+
106+
constructor(...args: unknown[]);
107+
108+
constructor() {
109+
// The content gets passed down into the step header components so we need to
110+
// notify the stepper if they come in later or they might not get picked up.
111+
inject(CdkStepper, {optional: true})?._stateChanged();
112+
}
113+
}
114+
103115
@Component({
104116
selector: 'cdk-step',
105117
exportAs: 'cdkStep',

tools/public_api_guard/cdk/stepper.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export class CdkStepperModule {
143143
// (undocumented)
144144
static ɵinj: i0.ɵɵInjectorDeclaration<CdkStepperModule>;
145145
// (undocumented)
146-
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]>;
146+
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]>;
147147
}
148148

149149
// @public

0 commit comments

Comments
 (0)