import { TemplateResult } from "lit-element"; import { FormElement } from "../behavior/form-element/form-element-behavior"; import { IInputBehaviorProperties, InputBehavior } from "../behavior/input/input-behavior"; import { AriaRole } from "../util/aria"; /** * Properties of the slider. */ export interface ISliderProperties extends IInputBehaviorProperties { thumbLabel: boolean; min: number; max: number; step?: number; bufferMin: number; bufferMax: number; bufferValue?: number; } /** * Make selections from a range of values. * @slot thumb-label - Optional slot for the thumb label. * @cssprop --slider-height - Height * @cssprop --slider-bg - Background * @cssprop --slider-bg-buffer - Background of the buffer part * @cssprop --slider-bg-active - Background of the active part * @cssprop --slider-bg-disabled - Background when disabled * @cssprop --slider-bg-buffer-disabled - Background of the buffer part when disabled * @cssprop --slider-bg-active-disabled - Background of the active part when disabled * @cssprop --slider-thumb-focus-ring-bg - Background of the thumb focus ring * @cssprop --slider-thumb-bg - Background of the thumb * @cssprop --slider-thumb-bg-disabled - Background of the thumb when disabled * @cssprop --slider-thumb-focus-ring-size - Size of the thumb focus ring when focused * @cssprop --slider-thumb-size - Size of the thumb * @cssprop --slider-thumb-space - Space between slider track and thumb label * @cssprop --slider-thumb-transition - Transition of the thumb * @cssprop --slider-thumb-transform-focus - Transform of the thumb when focused * @cssprop --slider-thumb-border-radius - Border radius of the thumb * @cssprop --slider-thumb-label-size - Size of the thumb label * @cssprop --slider-thumb-label-border-radius - Border radius of the thumb label * @cssprop --slider-thumb-label-bg - Background of the thumb label * @cssprop --slider-thumb-label-transition - Transition of the thumb label * @cssprop --slider-thumb-label-font-size - Font size of the thumb label * @cssprop --slider-thumb-label-color - Color of the thumb label */ export declare class Slider extends InputBehavior implements ISliderProperties { static styles: import("lit-element").CSSResult[]; /** * Role of the slider. * @attr */ role: AriaRole; /** * Label above the thumb that shows the value. * @attr */ thumbLabel: boolean; /** * The minimum value allowed. * @attr */ min: number; /** * The maximum value allowed. * @attr */ max: number; /** * The legal number intervals * @attr */ step?: number; /** * The minimum buffer value allowed. * @attr */ bufferMin: number; /** * The maximum buffer value allowed. * @attr */ bufferMax: number; /** * The buffer value. * @attr */ bufferValue?: number; /** * Slider element. */ protected $slider: HTMLInputElement; /** * The element that the user interacts with. */ protected get $interactiveElement(): FormElement; /** * Value in percentage. */ get perc(): number; /** * Buffer value in percentage. */ get bufferPerc(): number; /** * When the properties changes we need to upgrade the background. * @param props */ protected updated(props: Map): void; /** * Sets the value of the form element and updates the background. * @param value */ protected setValue(value: string): void; /** * Updates the background properties. */ protected updateBackground(): void; /** * Update the value of the form element when the slider value changes. */ protected sliderValueChanged(): void; /** * Renders the form element. * The reason we need to create two different range sliders is because the pseudo selectors of * a range input cannot be styled using the ::slotted(..) selector. */ protected renderFormElement(id?: string, style?: string, onInput?: (e: Event) => void, tabIndex?: string): TemplateResult; /** * Returns the template for the element. */ protected render(): TemplateResult; } declare global { interface HTMLElementTagNameMap { "wl-slider": Slider; } }