UNPKG

@engie-group/fluid-design-system

Version:

The Fluid Design System is ENGIE’s open-source library to create, build and deliver ENGIE digital services in a more efficient way.

47 lines (46 loc) 1.58 kB
import AbstractComponent from '../../globals/ts/abstract-component'; export default class InputNumber extends AbstractComponent { static readonly NAME = "nj-form-item--input-number"; protected static readonly DATA_KEY = "nj.input-number"; protected static readonly EVENT_KEY: string; private static readonly LIVEZONE_TIMEOUT; protected static readonly SELECTOR: { default: string; field: string; incrementButton: string; decrementButton: string; liveZone: string; }; private static readonly EVENT; private readonly field; private readonly incrementButton; private readonly decrementButton; private readonly liveZone; private liveZoneTimeoutId; constructor(element: HTMLDivElement); dispose(): void; get valueAsNumber(): number; get step(): number; get min(): number | null; get max(): number | null; /** * Update the width of the input field based on its value length */ updateFieldSize: () => void; /** Add or remove the disabled attribute to the increment and decrement buttons if needed. */ disableButtonsIfNeeded(moveFocus?: boolean): void; updateLiveZone(): void; /** * Decrement field value with the "-" button */ decrementValue: () => void; /** * Increment field value with the "+" button */ incrementValue: () => void; /** * Return clamped value according to min and max if present. */ getClampedValue(value: number): number; static init(options?: {}): InputNumber[]; }