1 | import type * as React from 'react';
|
2 | export interface GenericSliderProps {
|
3 | min?: number;
|
4 | max?: number;
|
5 | step?: number | null;
|
6 | prefixCls?: string;
|
7 | vertical?: boolean;
|
8 | included?: boolean;
|
9 | disabled?: boolean;
|
10 | reverse?: boolean;
|
11 | trackStyle?: React.CSSProperties | React.CSSProperties[];
|
12 | handleStyle?: React.CSSProperties | React.CSSProperties[];
|
13 | autoFocus?: boolean;
|
14 | onFocus?: (e: React.FocusEvent<HTMLDivElement>) => void;
|
15 | onBlur?: (e: React.FocusEvent<HTMLDivElement>) => void;
|
16 | className?: string;
|
17 | marks?: Record<number, React.ReactNode | {
|
18 | style?: React.CSSProperties;
|
19 | label?: string;
|
20 | }>;
|
21 | dots?: boolean;
|
22 | maximumTrackStyle?: React.CSSProperties;
|
23 | style?: React.CSSProperties;
|
24 | railStyle?: React.CSSProperties;
|
25 | dotStyle?: React.CSSProperties;
|
26 | activeDotStyle?: React.CSSProperties;
|
27 | draggableTrack?: boolean;
|
28 | }
|
29 | export interface GenericSliderState {
|
30 | value?: any;
|
31 | bounds?: number[];
|
32 | }
|
33 | export interface GenericSliderClass<Props, State> extends React.Component<Props, State> {
|
34 | onStart: (position: number) => void;
|
35 | positionGetValue: (pos: number) => number[];
|
36 | onEnd: (force?: boolean) => void;
|
37 | onMove: (e: React.MouseEvent<HTMLDivElement> | React.TouchEvent<HTMLDivElement>, position: number, inTrack: boolean, b: number[]) => void;
|
38 | onKeyboard: (e: React.KeyboardEvent<HTMLDivElement>) => void;
|
39 | onChange: (state: {
|
40 | value: any;
|
41 | }) => void;
|
42 | trimAlignValue: (v: number, nextProps?: Partial<Props>) => number;
|
43 | getUpperBound: () => number;
|
44 | getLowerBound: () => number;
|
45 | }
|
46 | export interface GenericSlider<Props, State> extends Pick<React.ComponentClass<Props, State>, 'displayName' | 'defaultProps' | 'propTypes' | 'contextType' | 'contextTypes' | 'childContextTypes'> {
|
47 | new (props: Props, context?: any): GenericSliderClass<Props, State>;
|
48 | }
|