@cas-smartdesign/stage
v5.0.4
Published
An element which can be used to represent the progress in a given workflow
Downloads
752
Readme
@cas-smartdesign/stage
An element which can be used to represent the progress in a given workflow
This element must be used together with the design tokens of SmartDesign. For an independent application, make sure to include the @cas-smartdesign/design-tokens package. For a web app / web widget, refer to the official documentation about design token usage.
Attributes
value: string|number (default: undefined)- The current value of the element
- An attribute value is a string, and it matches an id by its string form:
value="1"selects the id1
readonly: boolean (default: false)- A flag which determines whether the value can be changed or not
- The steps stay focusable and navigable with the keyboard, only without a hover effect; there is no disabled state
Properties
value: string|number (default: undefined)- The current value of the element
readonly: boolean (default: false)- A flag which determines whether the value can be changed or not
possibleValues: SelectionModel[] (default: undefined)- A collection of possible values. Examples:
[1,2,3]["A","B","C"][{id: "0x12345", label: "A"}, {id: "0x67890", label: "B"}]
- A collection of possible values. Examples:
Events
sd-stage-value-change- Dispatched when the value is changed by user interaction. Contains the current value in the event details.
- Selecting the step that is already selected (click, Enter or Space) dispatches nothing.
Validation
The element could show validation messages via an sd-field-validation-message element which can be configured with the following attributes & properties which are all delegated to that:
validationMessagevalidationIconSrcvalidationLevel
Styling
The element is configured to use @cas-smartdesign/design-tokens package and in addition allows component level customization too via the following css properties:
--sd-stage-border-color--sd-stage-border-focus-color--sd-stage-border-highlight-color--sd-stage-inactive-color--sd-stage-active-color--sd-stage-selected-color--sd-stage-hover-color--sd-stage-focus-color--sd-stage-font-color--sd-stage-font-inactive-color--sd-stage-font-selected-color--sd-stage-font-hover-color--sd-stage-font-focus-color--sd-stage-transition-time-short--sd-stage-height--sd-stage-arrow-width--sd-stage-arrow-border-radius--sd-stage-border-width
The previously present --component-stage-xy properties are kept for backward compatibility and may be removed in the next major version.
