Skip to main content
cngx-src documentation

resolveStepperStatusLabel

Functioncommon/stepper

projects/common/stepper/status-label.ts

Description#

Resolve the status-pill label for a step node against the resolved i18n bundle. Used by skins that surface a per-step status pill (e.g. stripe-status-rich). Pure factory - no injection context, no signal graph involvement.

Resolution order:

  1. success data-state -> statusLabels.done
  2. error data-state -> statusLabels.errored
  3. aria-current="step" -> statusLabels.inProgress
  4. otherwise -> statusLabels.upNext

Group nodes (non-step) return an empty string.

Signature#

resolveStepperStatusLabel(node: CngxStepNode, i18n: CngxStepperI18n, isActive: boolean)

Parameters#

@paramnodeCngxStepNode
@parami18nCngxStepperI18n
@paramisActiveboolean

Returns#

string