UNPKG

devextreme

Version:

HTML5 JavaScript Component Suite for Responsive Web Development

32 lines (31 loc) 1.11 kB
/** * DevExtreme (esm/__internal/ui/stepper/stepper_item.js) * Version: 25.1.3 * Build date: Wed Jun 25 2025 * * Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/ */ import CollectionWidgetItem from "../../ui/collection/item"; export const STEP_COMPLETED_CLASS = "dx-step-completed"; export const STEP_INVALID_CLASS = "dx-step-invalid"; export const STEP_VALID_ICON = "check"; export const STEP_INVALID_ICON = "errorcircle"; class StepperItem extends CollectionWidgetItem { _renderWatchers() { super._renderWatchers(); this._startWatcher("hint", (value => { this._renderHint(value) })) } _renderHint(hint) { this._$element.attr("title", hint ?? null) } updateInvalidClass(isValid) { this._$element.toggleClass("dx-step-invalid", void 0 !== isValid && !isValid) } changeCompleted(isCompleted) { this._$element.toggleClass("dx-step-completed", isCompleted) } } export default StepperItem;