UNPKG

igniteui-webcomponents

Version:

Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.

166 lines (165 loc) 5.48 kB
import { LitElement, type TemplateResult } from 'lit'; import { type StyleInfo } from 'lit/directives/style-map.js'; export declare class IgcSliderBaseComponent extends LitElement { static styles: import("lit").CSSResult[]; protected thumb: HTMLElement; protected base: HTMLDivElement; private labelElements; private _min; private _max; private _lowerBound?; private _upperBound?; private _step; private startValue?; private pointerCaptured; private thumbHoverTimer; protected activeThumb?: HTMLElement; protected thumbLabelsVisible: boolean; protected labels: string[]; protected get hasLabels(): boolean; protected get distance(): number; /** * The minimum value of the slider scale. Defaults to 0. * * If `min` is greater than `max` the call is a no-op. * * If `labels` are provided (projected), then `min` is always set to 0. * * If `lowerBound` ends up being less than than the current `min` value, * it is automatically assigned the new `min` value. * @attr */ set min(value: number); get min(): number; /** * The maximum value of the slider scale. Defaults to 100. * * If `max` is less than `min` the call is a no-op. * * If `labels` are provided (projected), then `max` is always set to * the number of labels. * * If `upperBound` ends up being greater than than the current `max` value, * it is automatically assigned the new `max` value. * @attr */ set max(value: number); get max(): number; /** * The lower bound of the slider value. If not set, the `min` value is applied. * @attr lower-bound */ set lowerBound(value: number); get lowerBound(): number; /** * The upper bound of the slider value. If not set, the `max` value is applied. * @attr upper-bound */ set upperBound(value: number); get upperBound(): number; /** * Disables the UI interactions of the slider. * @attr */ disabled: boolean; /** * Marks the slider track as discrete so it displays the steps. * If the `step` is 0, the slider will remain continuos even if `discreteTrack` is `true`. * @attr discrete-track */ discreteTrack: boolean; /** * Hides the thumb tooltip. * @attr hide-tooltip */ hideTooltip: boolean; /** * Specifies the granularity that the value must adhere to. * * If set to 0 no stepping is implied and any value in the range is allowed. * If `labels` are provided (projected) then the step is always assumed to be 1 since it is a discrete slider. * * @attr */ set step(value: number); get step(): number; /** * The number of primary ticks. It defaults to 0 which means no primary ticks are displayed. * @attr primary-ticks */ primaryTicks: number; /** * The number of secondary ticks. It defaults to 0 which means no secondary ticks are displayed. * @attr secondary-ticks */ secondaryTicks: number; /** * Changes the orientation of the ticks. * @attr tick-orientation */ tickOrientation: 'mirror' | 'start' | 'end'; /** * Hides the primary tick labels. * @attr hide-primary-labels */ hidePrimaryLabels: boolean; /** * Hides the secondary tick labels. * @attr hide-secondary-labels */ hideSecondaryLabels: boolean; /** * The locale used to format the thumb and tick label values in the slider. * @attr */ locale: string; /** * String format used for the thumb and tick label values in the slider. * @attr value-format */ valueFormat?: string; /** * Number format options used for the thumb and tick label values in the slider. */ valueFormatOptions?: Intl.NumberFormatOptions; /** * The degrees for the rotation of the tick labels. Defaults to 0. * @attr tick-label-rotation */ tickLabelRotation: 0 | 90 | -90; protected constraintsChange(): void; constructor(); private handleArrowKeys; private handlePageKeys; private handleKeyboardIncrement; private handleKeyUp; protected handleSlotChange(): void; protected get activeValue(): number; protected normalizeValue(): void; protected getTrackStyle(): StyleInfo; protected updateValue(_increment: number): boolean; protected renderThumbs(): TemplateResult<1>; protected emitInputEvent(): void; protected emitChangeEvent(): void; protected validateValue(value: number): number; protected formatValue(value: number): string; private normalizeByStep; protected closestHandle(_event: PointerEvent): HTMLElement; private totalTickCount; private tickValue; private isPrimary; protected showThumbLabels(): void; protected hideThumbLabels(): void; private calculateTrackUpdate; private updateSlider; private pointerDown; private pointerMove; private lostPointerCapture; protected handleThumbFocus(event: FocusEvent): void; protected handleThumbBlur(): void; protected _renderTicks(): Generator<TemplateResult<1>, void, unknown>; protected renderTicks(): TemplateResult<1>; protected renderThumb(value: number, ariaLabel?: string, thumbId?: string): TemplateResult<1>; private renderSteps; protected render(): TemplateResult<1>; }