import { EventEmitter } from '../../stencil-public-runtime'; /** * @slot label - Content to be placed as the label, will override the label prop. * @slot description - Content to be placed as the description, will override the description prop. * @slot error-description - Content to be placed as the error description, will override the errorDescription prop. */ export declare class NvFieldslider { el: HTMLNvFieldsliderElement; /****************************************************************************/ /** * Sets the ID for the start input element and the for attribute of the associated * label. If no ID is provided, a random one will be automatically generated. */ readonly startInputId: string; /** * Sets the ID for the end input element and the for attribute of the associated * label. If no ID is provided, a random one will be automatically generated. */ readonly endInputId: string; /** * Provides a textual description of the slider's function, helping users * understand what the control adjusts. It also supports accessibility by * serving as the accessible name for the component. */ readonly label: string; /** * Keeps the interface clean by removing visible labels, but still announces * the label to screen readers so users relying on assistive tech aren't left * guessing. */ readonly hideLabel: boolean; /** * Add helpful hints or extra information under the slider. This is where you * can clarify what users should enter or provide additional instructions, * making the form easier to fill out correctly. */ readonly description: string; /** * Enables an optional numeric input field alongside the slider, allowing * users to type a value directly instead of—or in addition to—using the * slider handle. The field accepts numeric values in the format based on * client-side local settings. */ readonly hasField: boolean; /** * Allows the slider to display two thumbs, enabling users to select a * continuous range between a minimum and maximum value. Ideal for use cases * like filtering by price or time. */ readonly range: boolean; /** * Disables user interaction with the slider and its associated input fields. */ readonly disabled: boolean; /** * Makes the slider and input non-editable while keeping them focusable and * included in form submissions. */ readonly readonly: boolean; /** * Alters the slider's appearance to indicate an error, helping users * identify fields that need correction. * @validator error */ readonly error: boolean; /** * A description that appears when there is an error related to the slider. * @validator message */ readonly errorDescription: string; /** * Changes the slider's appearance to indicate successful input or validation. */ readonly success: boolean; /** * Numeric value of the slider as an array of numbers. When in single mode, * the value should be a an array of one number. When in range mode, the value * should be an array of two numbers. */ value: number[]; /** * Defines the interval between selectable values on the slider. Controls how * much the value increases or decreases with each keyboard interaction, drag * movement, or direct input. */ readonly step: number; /** * Controls whether the slider handle should visually snap to step values * during dragging. When false, the handle can be positioned at any point * along the track while dragging, but the actual value will still snap to the * nearest step value. When true, the handle will visually snap to the nearest * step value during dragging. */ readonly snap: boolean; /** * When true and custom ticks are provided, the slider will snap to the nearest * tick value during dragging, instead of using the step value. This is useful * when you have custom ticks at specific values that don't align with regular step intervals. */ readonly snapTicks: boolean; /** * Name attribute for the form input element. Required for form submission. * For range sliders, this will be used for the start value input and add -end * to the end input name. */ readonly name: string; /** * Name attribute for the end value input when using range mode. * If not provided, the name attribute will be used with '-end' appended. */ readonly endName: string; /** * Defines the minimum allowed value for the slider. The thumb cannot move * below this value, and manual input is also constrained accordingly. */ readonly min: number; /** * Defines the maximum allowed value for the slider. The thumb cannot move * above this value, and manual input is also constrained accordingly. */ readonly max: number; /** * Controls the visibility of tick marks on the slider. When enabled, all * visual ticks that indicate step points along the track are shown. If custom * ticks are provided, they are always shown regardless of this setting. */ readonly showTicks: boolean; /** * Allows you to specify custom tick marks at specific values along the * slider. Each tick can optionally display a label to provide additional * context or guidance for users. */ readonly ticks: { /** The numeric value of the tick */ value: number; /** The label of the tick */ label?: string; }[]; /** * Allows the field to stretch and fill the entire width of its container. */ readonly fluid: boolean; /** * Use this to automatically show a label, like "~" for approximate values, * before the slider's value in the tooltip or input, giving users quick * context about the number. */ readonly labelBeforeValue: string; /** * Use this to automatically show a label, like "$" or "kg," after the value * on the slider's tooltip or input, helping users better understand the * number. */ readonly labelAfterValue: string; /****************************************************************************/ isDragging: boolean; activeDragThumb: 'left' | 'right' | 'single'; internalTicks: typeof this.ticks; rawPosition: number; rawRangePosition: [number, number]; valueInternal: number; rangeValueInternal: [number, number]; /****************************************************************************/ /** * Ensures value is valid and within bounds. * @param {number} val - The value to validate * @returns {number} The validated and snapped value */ private validateValue; /** * Parses the value string into a number or array of numbers for internal use. */ private parseValue; /** * Handles value changes from slider interaction. * @param {number | number[]} newValue - The new value or range values */ private handleValueChange; /** * Generates the ticks to display based on props and state. */ private generateDisplayTicks; /** * Handles pointer events on the track. * @param {PointerEvent} event - The pointer event */ private onTrackInteraction; /** * Handles pointer move events during drag. * @param {PointerEvent} event - The pointer event */ private onPointerMove; /** * Handles the end of a drag operation. */ private onPointerUp; /** * Registers global events for tracking pointer movement. */ private registerGlobalEvents; /** * Removes global events when tracking ends. */ private removeGlobalEvents; /** * Handles keydown events for keyboard accessibility. * @param {KeyboardEvent} event - The keyboard event */ private onKeyDown; /** * Handles field input value changes. * @param {FieldInputProps['onInput']} details - The parsed value and index */ private handleFieldChange; /****************************************************************************/ onValueChange(): void; onConfigChange(): void; onRangeChange(newValue: boolean): void; /****************************************************************************/ connectedCallback(): void; componentWillLoad(): void; disconnectedCallback(): void; /****************************************************************************/ /** * Emitted when the slider values change. * @bind value */ valueChanged: EventEmitter; /****************************************************************************/ render(): any; }