projects/ui-kit-lib/src/lib/v2/executors/step-header.ts
Header (tab) for a step in the stepper. Responsibilities:
CdkStepHeader
| changeDetection | ChangeDetectionStrategy.OnPush |
| encapsulation | ViewEncapsulation.None |
| host | { |
| selector | md-step-header |
| imports |
NgTemplateOutlet
|
| templateUrl | step-header.html |
| styleUrl | step-header.scss |
Properties |
Methods |
|
Inputs |
constructor()
|
| active |
Type : boolean
|
|
Whether this step is currently active (focused/engaged). |
| errorMessage |
Type : string
|
|
Error message displayed when state === 'error'. |
| iconOverrides |
Type : literal type
|
|
Optional templates to override the default icons by state. |
| index |
Type : number
|
|
0-based index of the step within the stepper. |
| label |
Type : MDStepLabel | string
|
|
Label can be a template (MDStepLabel) or plain string. |
| optional |
Type : boolean
|
|
Marks the step as optional (affects label rendering). |
| selected |
Type : boolean
|
|
Whether this step is selected (active tab). |
| state |
Type : StepState
|
|
Visual/logical state of this step (e.g., 'number' | 'done' | 'error' | 'edit'). |
| _getDefaultTextForState | ||||||
_getDefaultTextForState(state: StepState)
|
||||||
|
Default text for built-in states when an icon template isn’t provided.
Parameters :
Returns :
string
|
| _getHostElement |
_getHostElement()
|
|
Host element getter used by base classes/templates.
Returns :
any
|
| Protected _hasEmptyLabel |
_hasEmptyLabel()
|
|
True if no label, no optional/error labels — used for styling empty headers.
Returns :
boolean
|
| Protected _hasErrorLabel |
_hasErrorLabel()
|
|
True if the current state is 'error'.
Returns :
boolean
|
| Protected _hasOptionalLabel |
_hasOptionalLabel()
|
|
True if the step is optional and not in error state.
Returns :
boolean
|
| _stringLabel |
_stringLabel()
|
|
Returns string label if provided directly, otherwise null.
Returns :
string | null
|
| _templateLabel |
_templateLabel()
|
|
Returns template label if provided, otherwise null.
Returns :
MDStepLabel | null
|
| focus | |||||||||
focus(origin?: FocusOrigin, options?: FocusOptions)
|
|||||||||
|
Programmatic focus with optional origin (mouse/keyboard/touch/program). Falls back to direct focus if no origin is provided.
Parameters :
Returns :
void
|
| _intl |
Type : unknown
|
Default value : inject(StepperIntl)
|
|
Stepper i18n service (emits when labels change). |