UNPKG

rmwc

Version:

A thin React wrapper for Material Design (Web) Components

334 lines (333 loc) 13.1 kB
import { CustomEventT } from '../Base'; import * as React from 'react'; export declare type SliderPropsT = { /** A callback that fires when the Slider stops sliding which takes an event with event.detail.value set to the Slider's value. */ onChange?: (evt: { detail: { value: number; }; } & CustomEventT) => any; /** A callback that fires continuously while the Slider is sliding that takes an event with event.detail.value set to the Slider's value. */ onInput?: (evt: { detail: { value: number; }; } & CustomEventT) => any; /** The value of the Slider. */ value?: number | string; /** The minimum value of the Slider. */ min?: number | string; /** The maximum value of the Slider. */ max?: number | string; /** A step to quantize values by. */ step?: number | string; /** Displays the exact value of the Slider on the knob. */ discrete?: boolean; /** Displays the individual step markers on the Slider track. */ displayMarkers?: boolean; /** Disables the control. */ disabled?: boolean; }; export declare const SliderRoot: { new <P>(props: any, context?: any): { render(): React.ReactElement<any> | null; setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: any) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callBack?: (() => void) | undefined): void; props: Readonly<{ children?: React.ReactNode; }> & Readonly<any>; state: Readonly<{}>; context: any; refs: { [key: string]: React.ReactInstance; }; }; displayName: string; defaultProps: { tag: string | React.ComponentClass<any> | React.StatelessComponent<any>; constructor: Function; toString(): string; toLocaleString(): string; valueOf(): Object; hasOwnProperty(v: string | number | symbol): boolean; isPrototypeOf(v: Object): boolean; propertyIsEnumerable(v: string | number | symbol): boolean; }; isSimpleTag: boolean; }; export declare const SliderTrackContainer: { new <P>(props: any, context?: any): { render(): React.ReactElement<any> | null; setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: any) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callBack?: (() => void) | undefined): void; props: Readonly<{ children?: React.ReactNode; }> & Readonly<any>; state: Readonly<{}>; context: any; refs: { [key: string]: React.ReactInstance; }; }; displayName: string; defaultProps: { tag: string | React.ComponentClass<any> | React.StatelessComponent<any>; constructor: Function; toString(): string; toLocaleString(): string; valueOf(): Object; hasOwnProperty(v: string | number | symbol): boolean; isPrototypeOf(v: Object): boolean; propertyIsEnumerable(v: string | number | symbol): boolean; }; isSimpleTag: boolean; }; export declare const SliderTrack: { new <P>(props: any, context?: any): { render(): React.ReactElement<any> | null; setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: any) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callBack?: (() => void) | undefined): void; props: Readonly<{ children?: React.ReactNode; }> & Readonly<any>; state: Readonly<{}>; context: any; refs: { [key: string]: React.ReactInstance; }; }; displayName: string; defaultProps: { tag: string | React.ComponentClass<any> | React.StatelessComponent<any>; constructor: Function; toString(): string; toLocaleString(): string; valueOf(): Object; hasOwnProperty(v: string | number | symbol): boolean; isPrototypeOf(v: Object): boolean; propertyIsEnumerable(v: string | number | symbol): boolean; }; isSimpleTag: boolean; }; export declare const SliderTrackMarkerContainer: { new <P>(props: any, context?: any): { render(): React.ReactElement<any> | null; setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: any) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callBack?: (() => void) | undefined): void; props: Readonly<{ children?: React.ReactNode; }> & Readonly<any>; state: Readonly<{}>; context: any; refs: { [key: string]: React.ReactInstance; }; }; displayName: string; defaultProps: { tag: string | React.ComponentClass<any> | React.StatelessComponent<any>; constructor: Function; toString(): string; toLocaleString(): string; valueOf(): Object; hasOwnProperty(v: string | number | symbol): boolean; isPrototypeOf(v: Object): boolean; propertyIsEnumerable(v: string | number | symbol): boolean; }; isSimpleTag: boolean; }; export declare const SliderThumbContainer: { new <P>(props: any, context?: any): { render(): React.ReactElement<any> | null; setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: any) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callBack?: (() => void) | undefined): void; props: Readonly<{ children?: React.ReactNode; }> & Readonly<any>; state: Readonly<{}>; context: any; refs: { [key: string]: React.ReactInstance; }; }; displayName: string; defaultProps: { tag: string | React.ComponentClass<any> | React.StatelessComponent<any>; constructor: Function; toString(): string; toLocaleString(): string; valueOf(): Object; hasOwnProperty(v: string | number | symbol): boolean; isPrototypeOf(v: Object): boolean; propertyIsEnumerable(v: string | number | symbol): boolean; }; isSimpleTag: boolean; }; export declare const SliderPin: { new <P>(props: any, context?: any): { render(): React.ReactElement<any> | null; setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: any) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callBack?: (() => void) | undefined): void; props: Readonly<{ children?: React.ReactNode; }> & Readonly<any>; state: Readonly<{}>; context: any; refs: { [key: string]: React.ReactInstance; }; }; displayName: string; defaultProps: { tag: string | React.ComponentClass<any> | React.StatelessComponent<any>; constructor: Function; toString(): string; toLocaleString(): string; valueOf(): Object; hasOwnProperty(v: string | number | symbol): boolean; isPrototypeOf(v: Object): boolean; propertyIsEnumerable(v: string | number | symbol): boolean; }; isSimpleTag: boolean; }; export declare const SliderPinValueMarker: { new <P>(props: any, context?: any): { render(): React.ReactElement<any> | null; setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: any) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callBack?: (() => void) | undefined): void; props: Readonly<{ children?: React.ReactNode; }> & Readonly<any>; state: Readonly<{}>; context: any; refs: { [key: string]: React.ReactInstance; }; }; displayName: string; defaultProps: { tag: string | React.ComponentClass<any> | React.StatelessComponent<any>; constructor: Function; toString(): string; toLocaleString(): string; valueOf(): Object; hasOwnProperty(v: string | number | symbol): boolean; isPrototypeOf(v: Object): boolean; propertyIsEnumerable(v: string | number | symbol): boolean; }; isSimpleTag: boolean; }; export declare const SliderThumb: () => JSX.Element; export declare const SliderFocusRing: { new <P>(props: any, context?: any): { render(): React.ReactElement<any> | null; setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: any) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callBack?: (() => void) | undefined): void; props: Readonly<{ children?: React.ReactNode; }> & Readonly<any>; state: Readonly<{}>; context: any; refs: { [key: string]: React.ReactInstance; }; }; displayName: string; defaultProps: { tag: string | React.ComponentClass<any> | React.StatelessComponent<any>; constructor: Function; toString(): string; toLocaleString(): string; valueOf(): Object; hasOwnProperty(v: string | number | symbol): boolean; isPrototypeOf(v: Object): boolean; propertyIsEnumerable(v: string | number | symbol): boolean; }; isSimpleTag: boolean; }; declare const Slider_base: { new <P>(props: P & { tag?: string | React.ComponentClass<any> | React.StatelessComponent<any> | undefined; className?: string | undefined; wrap?: boolean | undefined; elementRef?: any; theme?: string | string[] | undefined; children?: React.ReactNode; apiRef?: (<S>(api: S) => S) | undefined; } & React.HTMLProps<any>): { foundation_: { [key: string]: any; adapter_: any; init: Function; destroy: Function; } | null; foundationRefs: { [name: string]: (ref: HTMLElement) => any; }; root_: Element | Text | null; props: P & { tag?: string | React.ComponentClass<any> | React.StatelessComponent<any> | undefined; className?: string | undefined; wrap?: boolean | undefined; elementRef?: any; theme?: string | string[] | undefined; children?: React.ReactNode; apiRef?: (<S>(api: S) => S) | undefined; } & React.HTMLProps<any>; componentDidMount(): void; componentWillReceiveProps(nextProps: P & { tag?: string | React.ComponentClass<any> | React.StatelessComponent<any> | undefined; className?: string | undefined; wrap?: boolean | undefined; elementRef?: any; theme?: string | string[] | undefined; children?: React.ReactNode; apiRef?: (<S>(api: S) => S) | undefined; } & React.HTMLProps<any>): void; componentWillUnmount(): void; _safeSyncWithProps(props: Object): void; initFoundation(): void; destroyComponent(): void; syncWithProps(nextProps: Object): void; initialize(...args: any[]): void; initialSyncWithDOM(): void; destroy(): void; getDefaultFoundation(): { adapter_: {}; init: () => void; destroy: () => void; }; emit(evtType: string, evtData: Object, shouldBubble?: boolean): any; listen(evtType: string, handler: Function): void; unlisten(evtType: string, handler: Function): void; setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: P & { tag?: string | React.ComponentClass<any> | React.StatelessComponent<any> | undefined; className?: string | undefined; wrap?: boolean | undefined; elementRef?: any; theme?: string | string[] | undefined; children?: React.ReactNode; apiRef?: (<S>(api: S) => S) | undefined; } & React.HTMLProps<any>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callBack?: (() => void) | undefined): void; render(): React.ReactNode; state: Readonly<{}>; context: any; refs: { [key: string]: React.ReactInstance; }; }; }; export declare class Slider extends Slider_base<SliderPropsT> { static displayName: string; value: any; min: number | string; max: number | string; step: number | string; disabled: boolean; discrete: boolean; displayMarkers: boolean; syncWithProps(nextProps: SliderPropsT): void; render(): JSX.Element; } export default Slider;