1 | import * as React from 'react';
|
2 | import type { HandlesProps } from './Handles';
|
3 | import type { AriaValueFormat } from './interface';
|
4 | import type { MarkObj } from './Marks';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | export interface SliderProps<ValueType = number | number[]> {
|
19 | prefixCls?: string;
|
20 | className?: string;
|
21 | style?: React.CSSProperties;
|
22 | disabled?: boolean;
|
23 | keyboard?: boolean;
|
24 | autoFocus?: boolean;
|
25 | onFocus?: (e: React.FocusEvent<HTMLDivElement>) => void;
|
26 | onBlur?: (e: React.FocusEvent<HTMLDivElement>) => void;
|
27 | range?: boolean;
|
28 | count?: number;
|
29 | min?: number;
|
30 | max?: number;
|
31 | step?: number | null;
|
32 | value?: ValueType;
|
33 | defaultValue?: ValueType;
|
34 | onChange?: (value: ValueType) => void;
|
35 |
|
36 | onBeforeChange?: (value: ValueType) => void;
|
37 |
|
38 | onAfterChange?: (value: ValueType) => void;
|
39 | allowCross?: boolean;
|
40 | pushable?: boolean | number;
|
41 |
|
42 | draggableTrack?: boolean;
|
43 | reverse?: boolean;
|
44 | vertical?: boolean;
|
45 | included?: boolean;
|
46 | startPoint?: number;
|
47 | trackStyle?: React.CSSProperties | React.CSSProperties[];
|
48 | handleStyle?: React.CSSProperties | React.CSSProperties[];
|
49 | railStyle?: React.CSSProperties;
|
50 | dotStyle?: React.CSSProperties | ((dotValue: number) => React.CSSProperties);
|
51 | activeDotStyle?: React.CSSProperties | ((dotValue: number) => React.CSSProperties);
|
52 | marks?: Record<string | number, React.ReactNode | MarkObj>;
|
53 | dots?: boolean;
|
54 | handleRender?: HandlesProps['handleRender'];
|
55 | tabIndex?: number | number[];
|
56 | ariaLabelForHandle?: string | string[];
|
57 | ariaLabelledByForHandle?: string | string[];
|
58 | ariaValueTextFormatterForHandle?: AriaValueFormat | AriaValueFormat[];
|
59 | }
|
60 | export interface SliderRef {
|
61 | focus: () => void;
|
62 | blur: () => void;
|
63 | }
|
64 | declare const Slider: React.ForwardRefExoticComponent<SliderProps<number | number[]> & React.RefAttributes<SliderRef>>;
|
65 | export default Slider;
|