UNPKG

primeng

Version:

PrimeNG is a premium UI library for Angular featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock,

92 lines (89 loc) 2.2 kB
import { PassThrough, PassThroughOption } from 'primeng/api'; /** * Defines the orientation of the slider. * @group Types */ type SliderOrientation = 'horizontal' | 'vertical'; /** * Custom passthrough(pt) options. * @template I Type of instance. * * @see {@link Slider.pt} * @group Interface */ interface SliderPassThroughOptions<I = unknown> { /** * Used to pass attributes to the root's DOM element. */ root?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the track's DOM element. */ track?: PassThroughOption<HTMLDivElement, I>; /** * Used to pass attributes to the range's DOM element. */ range?: PassThroughOption<HTMLSpanElement, I>; /** * Used to pass attributes to the handle's DOM element. */ handle?: PassThroughOption<HTMLSpanElement, I>; /** * Used to pass attributes to the start handler's DOM element. */ startHandler?: PassThroughOption<HTMLSpanElement, I>; /** * Used to pass attributes to the end handler's DOM element. */ endHandler?: PassThroughOption<HTMLSpanElement, I>; /** * Used to pass attributes to the hidden input's DOM element. */ input?: PassThroughOption<HTMLInputElement, I>; } /** * Defines valid pass-through options in Slider component. * @see {@link SliderPassThroughOptions} * * @template I Type of instance. */ type SliderPassThrough<I = unknown> = PassThrough<I, SliderPassThroughOptions<I>>; /** * Custom change event. * @see {@link Slider.onChange} * @group Events */ interface SliderChangeEvent { /** * Browser event. */ event: Event; /** * New values. */ values?: number[]; /** * New value. */ value?: number; } /** * Custom slide end event. * @see {@link Slider.onSlideEnd} * @group Events */ interface SliderSlideEndEvent { /** * Original event */ originalEvent: Event; /** * New value. */ value?: number; /** * New values. */ values?: number[]; } export type { SliderChangeEvent, SliderOrientation, SliderPassThrough, SliderPassThroughOptions, SliderSlideEndEvent };