import * as _angular_cdk_bidi from '@angular/cdk/bidi'; import * as _angular_core from '@angular/core'; import { ElementRef, OnInit, InjectionToken, Type, ExistingProvider } from '@angular/core'; import { NumberInput, BooleanInput } from '@angular/cdk/coercion'; import { ControlValueAccessor, NgControl } from '@angular/forms'; import * as _spartan_ng_brain_slider from '@spartan-ng/brain/slider'; import * as i1 from '@spartan-ng/brain/field'; declare class BrnSliderRange { protected readonly _slider: _spartan_ng_brain_slider.BrnSlider; readonly elementRef: ElementRef; constructor(); protected readonly _rangeInset: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class BrnSliderThumb { private readonly _platform; private readonly _destroyRef; private readonly _size; protected readonly _slider: _spartan_ng_brain_slider.BrnSlider; readonly elementRef: ElementRef; /** * Indicates whether the thumb is ready to be displayed and interactable. * * This signal returns `true` when the element's size has been measured * and the width is greater than 0. It ensures that the thumb is not * rendered or interacted with prematurely, which prevents layout * issues or first-frame “jerks” when using SSR. */ protected readonly _thumbReady: _angular_core.Signal; protected readonly _index: _angular_core.Signal; readonly percentage: _angular_core.Signal; private readonly _thumbInBoundsOffset; /** * Offsets the thumb centre point while sliding to ensure it remains * within the bounds of the slider when reaching the edges. * Based on https://github.com/radix-ui/primitives/blob/main/packages/react/slider/src/slider.tsx */ protected readonly _thumbOffset: _angular_core.Signal; protected readonly _computedAriaLabel: _angular_core.Signal; protected readonly _transformValue: _angular_core.Signal<"translateX(-50%)" | "translateY(-50%)">; constructor(); protected _onPointerDown(event: PointerEvent): void; protected _onPointerMove(event: PointerEvent): void; protected _onPointerUp(event: PointerEvent): void; protected handleKeydown(event: KeyboardEvent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class BrnSliderTrack { private readonly _elementRef; protected readonly _slider: _spartan_ng_brain_slider.BrnSlider; private _rangeDragStartPointer; private _rangeDragAccumulatedDelta; constructor(); onPointerDown(event: PointerEvent): void; onPointerMove(event: PointerEvent): void; onPointerUp(event: PointerEvent): void; private _getValueFromPointer; private _pixelDeltaToValueDelta; private _isTrack; private _isRange; private _getPointerPosition; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare const BRN_SLIDER_VALUE_ACCESSOR: { provide: _angular_core.InjectionToken; useExisting: _angular_core.Type; multi: boolean; }; declare class BrnSlider implements ControlValueAccessor, OnInit { private readonly _dir; private readonly _injector; private readonly _fieldControl; ngControl: NgControl | null; protected readonly _invalid: _angular_core.Signal; protected readonly _dirty: _angular_core.Signal; protected readonly _touched: _angular_core.Signal; protected readonly _spartanInvalid: _angular_core.Signal; /** Unique identifier for the slider element. Auto-generated if not provided. */ readonly id: _angular_core.InputSignal; /** Accessibility label for the slider. Forwarded to all thumbs. */ readonly ariaLabel: _angular_core.InputSignal; /** ID of the element that labels this slider for accessibility. Forwarded to all thumbs. */ readonly ariaLabelledby: _angular_core.InputSignal; /** * The current slider value(s). * * For single-thumb sliders, this contains one value. * For range sliders, values are kept sorted in ascending order. */ readonly valueInput: _angular_core.InputSignal; readonly value: _angular_core.WritableSignal; /** Minimum allowed slider value. */ readonly min: _angular_core.InputSignalWithTransform; /** Maximum allowed slider value. */ readonly max: _angular_core.InputSignalWithTransform; /** Step increment used when changing values. */ readonly step: _angular_core.InputSignalWithTransform; /** Minimum number of steps required between thumbs in a range slider. */ readonly minStepsBetweenThumbs: _angular_core.InputSignalWithTransform; /** Maximum number of steps allowed between thumbs in a range slider. */ readonly maxStepsBetweenThumbs: _angular_core.InputSignalWithTransform; /** Whether a thumb is prevented from being dragged past its neighbouring thumbs in a range slider. */ readonly preventStepOverThumb: _angular_core.InputSignalWithTransform; /** Whether the slider is disabled. */ readonly disabled: _angular_core.InputSignalWithTransform; /** Whether the slider direction is inverted. */ readonly inverted: _angular_core.InputSignalWithTransform; /** Slider orientation. */ readonly orientation: _angular_core.InputSignal<"horizontal" | "vertical">; /** Whether tick marks should be displayed. */ readonly showTicks: _angular_core.InputSignalWithTransform; /** Maximum number of ticks to render. Excess ticks are evenly distributed. */ readonly maxTicks: _angular_core.InputSignalWithTransform; /** Interval at which tick labels are shown. A value of `2` shows a label every second tick. */ readonly tickLabelInterval: _angular_core.InputSignalWithTransform; /** Defines how the tick should be displayed in the UI. */ readonly formatTick: _angular_core.InputSignal<(tick: number) => string>; /** Whether dragging the selected range should move all thumbs together. */ readonly draggableRange: _angular_core.InputSignalWithTransform; /** Whether only dragging the range should work (overrides normal track clicks). */ readonly draggableRangeOnly: _angular_core.InputSignalWithTransform; /** Emits when the value changes. */ readonly valueChange: _angular_core.OutputEmitterRef; /** @internal Normalized slider values. Values are clamped to `[min, max]` and sorted in ascending order. */ readonly normalizedValue: _angular_core.Signal; /** Indexes for all active thumbs. */ readonly thumbIndexes: _angular_core.Signal; /** @internal Whether the slider is in range mode and draggable range is enabled */ readonly isDraggableRange: _angular_core.Signal; /** @internal Whether dragging should only move the range. */ readonly isDraggableRangeOnly: _angular_core.Signal; protected readonly _direction: _angular_core.WritableSignal<_angular_cdk_bidi.Direction>; /** @internal Logical edge from which the slider value increases. */ readonly slidingSource: _angular_core.Signal<"top" | "bottom" | "left" | "right">; /** @internal */ readonly isHorizontal: _angular_core.Signal; /** @internal Reference to the slider track instance. */ readonly track: _angular_core.WritableSignal; /** @internal Reference to the slider range instance. */ readonly range: _angular_core.WritableSignal; /** @internal All registered slider thumbs. */ readonly thumbs: _angular_core.WritableSignal; /** @internal Index of the thumb currently being updated. */ readonly valueIndexToChange: _angular_core.WritableSignal; /** @internal Visible tick values after applying density reduction. */ readonly ticks: _angular_core.Signal; /** @internal Disabled state that can be controlled internally or externally. */ readonly mutableDisabled: _angular_core.WritableSignal; /** @internal Store the on change callback */ private _onChange?; /** @internal Store the on touched callback */ private _onTouched?; ngOnInit(): void; registerOnChange(fn: (value: number[]) => void): void; registerOnTouched(fn: () => void): void; setDisabledState(isDisabled: boolean): void; writeValue(value: number[]): void; /** Sets a new value for the slider at the given thumb index. */ setValue(value: number, atIndex: number): void; /** Moves the entire range by a delta value, snapping to step and preserving spacing. */ setAllValuesByDelta(delta: number): void; /** @internal */ addThumb(thumb: BrnSliderThumb): void; /** @internal */ removeThumb(thumb: BrnSliderThumb): void; protected _onFocusOut(event: FocusEvent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class BrnSliderTick { private readonly _slider; private readonly _templateRef; private readonly _renderer; private readonly _viewContainer; private readonly _destroyRef; private _ticks; constructor(); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } interface BrnSliderTickContext { $implicit: number; index: number; formattedTick: string; } declare const BrnSliderTrackToken: InjectionToken; declare function provideBrnSliderTrack(slider: Type): ExistingProvider; declare function injectBrnSliderTrack(): BrnSliderTrack; declare function provideBrnSlider(slider: Type): ExistingProvider; declare function injectBrnSlider(): BrnSlider; declare const BrnSliderImports: readonly [typeof BrnSlider, typeof BrnSliderTrack, typeof BrnSliderThumb, typeof BrnSliderRange, typeof BrnSliderTick]; export { BRN_SLIDER_VALUE_ACCESSOR, BrnSlider, BrnSliderImports, BrnSliderRange, BrnSliderThumb, BrnSliderTick, BrnSliderTrack, BrnSliderTrackToken, injectBrnSlider, injectBrnSliderTrack, provideBrnSlider, provideBrnSliderTrack }; export type { BrnSliderTickContext };