/** * ZUI Stepper Component * Value stepper with increment/decrement buttons */ import { Component } from '../../core/Component'; import type { BaseProps, Rect, EventCallback } from '../../core/types'; export interface StepperProps extends BaseProps { /** Current value */ value: number; /** Minimum value (for numeric mode) */ min?: number; /** Maximum value (for numeric mode) */ max?: number; /** Step increment (for numeric mode) */ step?: number; /** List of allowed values (for options mode) */ options?: number[]; /** Unit label (e.g., 'min', 'sec') */ unit?: string; /** Disabled state */ disabled?: boolean; /** Change event handler */ onChange?: EventCallback; /** Position X */ x?: number; /** Position Y */ y?: number; /** Button size */ buttonSize?: number; /** Button color */ buttonColor?: string; /** Value display width */ valueWidth?: number; } /** * Stepper component for incrementing/decrementing values * * Supports two modes: * - Numeric mode: Uses min/max/step * - Options mode: Uses predefined options array * * @example * ```ts * // Numeric stepper (1-10) * const stepper = new Stepper({ * value: 5, * min: 1, * max: 10, * step: 1, * unit: 'min', * onChange: (value) => console.log('New value:', value), * }); * * // Options stepper * const optionStepper = new Stepper({ * value: 5, * options: [5, 10, 15, 20, 25, 30], * unit: 'min', * onChange: (value) => console.log('Selected:', value), * }); * ``` */ export declare class Stepper extends Component { readonly type = "Stepper"; private minusButtonBg; private minusButtonText; private plusButtonBg; private plusButtonText; private valueText; private isMinusPressed; private isPlusPressed; protected getDefaultProps(): Partial; protected calculateLayout(parentRect?: Rect): void; protected createWidgets(): void; protected updateWidgets(): void; protected destroyWidgets(): void; private formatValue; private getNextValue; private handleMinusDown; private handleMinusUp; private handlePlusDown; private handlePlusUp; /** * Get current value */ getValue(): number; /** * Set value programmatically */ setValue(value: number): void; /** * Set disabled state */ setDisabled(disabled: boolean): void; /** * Check if at minimum value */ isAtMin(): boolean; /** * Check if at maximum value */ isAtMax(): boolean; } /** * Create a Stepper component */ export declare function createStepper(props: StepperProps): Stepper; //# sourceMappingURL=Stepper.d.ts.map