Debian Codegraph @

node/@patternfly/react-core/dist/js/components/Slider/Slider.d.ts

raw
1 /// <reference types="react" />
2 /** Properties for creating custom steps in a slider. These properties should be passed in as
3 * an object within an array to the slider component's customSteps property.
4 */
5 export interface SliderStepObject {
6 /** Flag to hide the label. */
7 isLabelHidden?: boolean;
8 /** The display label for the step value. This is also used for the aria-valuetext attribute. */
9 label: string;
10 /** Value of the step. This value is a percentage of the slider where the tick is drawn. */
11 value: number;
12 }
13 export type SliderOnChangeEvent = React.MouseEvent | React.KeyboardEvent | React.FormEvent<HTMLInputElement> | React.TouchEvent | React.FocusEvent<HTMLInputElement>;
14 /** The main slider component. */
15 export interface SliderProps extends Omit<React.HTMLProps<HTMLDivElement>, 'onChange'> {
16 /** Flag indicating if the slider is discrete for custom steps. This will cause the slider
17 * to snap to the closest value.
18 */
19 areCustomStepsContinuous?: boolean;
20 /** One or more id's to use for the slider thumb's accessible description. */
21 'aria-describedby'?: string;
22 /** One or more id's to use for the slider thumb's accessible label. */
23 'aria-labelledby'?: string;
24 /** Additional classes added to the slider. */
25 className?: string;
26 /** Array of custom slider step objects (value and label of each step) for the slider. */
27 customSteps?: SliderStepObject[];
28 hasTooltipOverThumb?: boolean;
29 /** Accessible label for the input field. */
30 inputAriaLabel?: string;
31 /** Text label that is place after the input field. */
32 inputLabel?: string | number;
33 /** Position of the input. Note "right" is deprecated. Use "end" instead*/
34 inputPosition?: 'aboveThumb' | 'right' | 'end';
35 /** Value displayed in the input field. */
36 inputValue?: number;
37 /** Adds disabled styling, and disables the slider and the input component if present. */
38 isDisabled?: boolean;
39 /** Flag to show value input field. */
40 isInputVisible?: boolean;
41 /** @deprecated Use startActions instead. Actions placed at the start of the slider. */
42 leftActions?: React.ReactNode;
43 /** Actions placed at the start of the slider. */
44 startActions?: React.ReactNode;
45 /** The maximum permitted value. */
46 max?: number;
47 /** The minimum permitted value. */
48 min?: number;
49 /** Value change callback. This is called when the slider value changes. */
50 onChange?: (event: SliderOnChangeEvent, value: number, inputValue?: number, setLocalInputValue?: React.Dispatch<React.SetStateAction<number>>) => void;
51 /** @deprecated Use endActions instead. Actions placed to the right of the slider. */
52 rightActions?: React.ReactNode;
53 /** Actions placed at the end of the slider. */
54 endActions?: React.ReactNode;
55 /** Flag to indicate if boundaries should be shown for slider that does not have custom steps. */
56 showBoundaries?: boolean;
57 /** Flag to indicate if ticks should be shown for slider that does not have custom steps. */
58 showTicks?: boolean;
59 /** The step interval. */
60 step?: number;
61 thumbAriaLabel?: string;
62 /** Current value of the slider. */
63 value?: number;
64 }
65 export declare const Slider: React.FunctionComponent<SliderProps>;
66 //# sourceMappingURL=Slider.d.ts.map