import { BooleanInput, NumberInput } from '@angular/cdk/coercion'; import * as i0 from '@angular/core'; import { AfterViewInit, OnDestroy, ElementRef, Renderer2, ChangeDetectorRef, EventEmitter, WritableSignal, Optional } from '@angular/core'; import * as i2 from '@angular/forms'; import { ControlValueAccessor, Validator, FormControl } from '@angular/forms'; import { NxErrorComponent } from '@aposin/ng-aquila/base'; import { MappedStyles } from '@aposin/ng-aquila/core'; import { Decimal } from 'decimal.js'; import { Subject } from 'rxjs'; import * as i1 from '@aposin/ng-aquila/input'; import * as i3 from '@aposin/ng-aquila/icon'; import * as i4 from '@aposin/ng-aquila/button'; import * as i5 from '@angular/common'; /** @docs-private */ declare class NxAutoResizeDirective implements AfterViewInit, OnDestroy { private readonly _element; private readonly _renderer; private readonly _cdr; width: number; set resize(value: BooleanInput); get resize(): boolean; private _resize; constructor(_element: ElementRef, _renderer: Renderer2, _cdr: ChangeDetectorRef); ngAfterViewInit(): void; ngOnDestroy(): void; updateInputWidth(): void; _addEventListener(): void; _removeEventListener(): void; sumStyles(left: string, right: string): number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class NxNumberStepperIntl { /** * Stream that emits whenever the labels here are changed. Use this to notify * components if the labels have changed after initialization. */ readonly changes: Subject; /** The aria label for the decrement '-' button */ decrementAriaLabel: string; /** The aria label for the increment '+' button */ incrementAriaLabel: string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * `Input('size') classNames` defines the size of the number stepper. * * Values: `'big' | 'normal'`. * * Default: `'normal'`. */ declare class NxNumberStepperComponent extends MappedStyles implements AfterViewInit, ControlValueAccessor, Validator, OnDestroy { private readonly _cdr; readonly _intl: NxNumberStepperIntl; private readonly localeId; /** @docs-private */ numberInputValue: string; decimalSeperator: string; /** @docs-private */ inputClassNames: string; /** @docs-private */ private readonly _componentId; /** @docs-private */ readonly inputId: string; /** @docs-private */ readonly labelId: string; projectedLabel: i0.Signal; /** @docs-private */ inputWidth: number; ariaDescribedBy: i0.InputSignal; ariaDescribedByComputed: i0.Signal; /** @docs-private */ projectedLabelWrapper: i0.Signal | undefined>; projectedLabelElement: i0.Signal; errorMessages: i0.Signal; /** @docs-private */ autoResize: NxAutoResizeDirective; /** @docs-private */ nativeInput: ElementRef; /** An event emitted on value change. */ readonly valueChange: EventEmitter; /** Whether the input should be resized. Default: false */ set resize(value: BooleanInput); get resize(): boolean; private _resize; label: i0.InputSignal; /** Sets the aria-label for the increment button. */ set incrementAriaLabel(value: string); get incrementAriaLabel(): string; private _incrementAriaLabel; /** Sets the aria-label for the decrement button. */ set decrementAriaLabel(value: string); get decrementAriaLabel(): string; private _decrementAriaLabel; /** Sets the aria-label for the input of the number stepper. */ inputAriaLabel: i0.InputSignal; ariaLabelledByComputed: i0.Signal; /** Sets the step size. Default: 1 */ set step(value: NumberInput); get step(): number; private _step; /** Sets the minimum accepted number. Default: 0 */ set min(value: NumberInput); get min(): number; private _min; /** Sets the maximum accepted number. Default: 100 */ set max(value: NumberInput); get max(): number; private _max; _value: WritableSignal; private inputValue; /** Sets the value of the number-stepper. */ set value(value: number | null); get value(): number | null; /** @docs-private */ viewValue: i0.Signal; private removeFrontZero; /** @docs-private */ onInputChange(event: Event): void; /** Whether the negative set of styling should be used. */ set negative(value: BooleanInput); get negative(): boolean; private _negative; /** * Whether the number stepper value should have a leading zero. * * Default: `true`. */ leadingZero: i0.InputSignalWithTransform; /** * Whether the user input in the number stepper should be disabled. * * Default: `false`. */ set disabled(value: BooleanInput); get disabled(): boolean; private _disabled; /** Whether the user can directly interact with the input field and buttons. Default: false */ set readonly(value: BooleanInput); get readonly(): boolean; private _readonly; /** Whether the user can directly interact with the input value via input field. Default: false */ inputFieldReadonly: i0.InputSignalWithTransform; private readonly _destroyed; private injector; constructor(_cdr: ChangeDetectorRef, _renderer: Renderer2, _elementRef: ElementRef, _intl: NxNumberStepperIntl, localeId: string); ngAfterViewInit(): void; ngOnDestroy(): void; disabledButton(): true | null; writeValue(value: number | null): void; private onChangeCallback; registerOnChange(onChange: (value: number | null) => void): void; /** @docs-private */ onTouchedCallback: () => void; registerOnTouched(onTouched: () => void): void; /** * Disables the stepper. Part of the ControlValueAccessor interface required * to integrate with Angular's core forms API. * @param isDisabled Sets whether the component is disabled. */ setDisabledState(isDisabled: boolean): void; private getDecimalSeparator; /** @docs-private */ validateUserInput(input: string): boolean; /** @docs-private */ incrementOnClick(): void; /** @docs-private */ incrementOnKey(event: Event): void; /** @docs-private */ _increment(): void; /** @docs-private */ triggerResize(): void; /** @docs-private */ decrementOnClick(): void; /** @docs-private */ decrementOnKey(event: Event): void; /** @docs-private */ _decrement(): void; /** @docs-private */ enforceLimits(value: number): number; /** @docs-private */ getNextLowerValue(start: number): number; /** @docs-private */ getNextGreaterValue(start: number): number; /** @docs-private */ isBetweenLimits(value: number | Decimal): boolean; /** @docs-private */ isMinimum(): boolean; /** @docs-private */ isMaximum(): boolean; /** @docs-private */ isValidStep(value: number | Decimal | null): boolean; /** @docs-private */ userInputToNumber(value: string): number; _validateFn(): { nxNumberStepperStepError: string; nxNumberStepperFormatError?: undefined; } | { nxNumberStepperFormatError: string; nxNumberStepperStepError?: undefined; } | null; /** @docs-private */ validate(c: FormControl): { nxNumberStepperStepError: string; nxNumberStepperFormatError?: undefined; } | { nxNumberStepperFormatError: string; nxNumberStepperStepError?: undefined; } | null; get _buttonType(): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** Directive used to pass a suffix to the number stepper. */ declare class NxNumberStepperPrefixDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** Directive used to pass a suffix to the number stepper. */ declare class NxNumberStepperSuffixDirective { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** @docs-private */ declare function NX_NUMBER_STEPPER_INTL_PROVIDER_FACTORY(parentIntl: NxNumberStepperIntl): NxNumberStepperIntl; /** @docs-private */ declare const NX_NUMBER_STEPPER_INTL_PROVIDER: { provide: typeof NxNumberStepperIntl; deps: Optional[][]; useFactory: typeof NX_NUMBER_STEPPER_INTL_PROVIDER_FACTORY; }; declare class NxNumberStepperModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { NX_NUMBER_STEPPER_INTL_PROVIDER, NX_NUMBER_STEPPER_INTL_PROVIDER_FACTORY, NxAutoResizeDirective, NxNumberStepperComponent, NxNumberStepperIntl, NxNumberStepperModule, NxNumberStepperPrefixDirective, NxNumberStepperSuffixDirective };