@types/rc-slider
Advanced tools
Comparing version 6.1.3 to 8.1.0
@@ -1,154 +0,165 @@ | ||
// Type definitions for rc-slider 6.1 | ||
// Type definitions for rc-slider 8.1 | ||
// Project: https://github.com/react-component/slider | ||
// Definitions by: Marcinkus Mantas <https://github.com/mantasmarcinkus/> | ||
// Definitions by: Marcinkus Mantas <https://github.com/mantasmarcinkus/>, Alexander Mattoni <https://github.com/mattoni/> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.3 | ||
import * as React from 'react'; | ||
import * as React from "react"; | ||
declare namespace RcSliderClass { | ||
interface Marks { | ||
[number: number]: JSX.Element | string | { style: any, label: string | JSX.Element }; | ||
} | ||
export interface Marks { | ||
[number: number]: | ||
| JSX.Element | ||
| string | ||
| { style: any; label: string | JSX.Element }; | ||
} | ||
interface CommonApiProps { | ||
/** | ||
* Additional CSS class for the root DOM node | ||
* @default '' | ||
*/ | ||
className?: string; | ||
/** | ||
* The minimum value of the slider | ||
* @default 0 | ||
*/ | ||
min?: number; | ||
/** | ||
* The maximum value of the slider | ||
* @default 100 | ||
*/ | ||
max?: number; | ||
/** | ||
* Marks on the slider. The key determines the position, and the value determines what will show. | ||
* If you want to set the style of a specific mark point, the value should be an object which contains style and label properties. | ||
* @default '{}' | {number: { style, label }} | ||
*/ | ||
marks?: Marks; | ||
/** | ||
* Value to be added or subtracted on each step the slider makes. Must be greater than zero, and max - min should be evenly divisible by the step value. | ||
* @default 1 | ||
*/ | ||
step?: number; | ||
/** | ||
* If vertical is true, the slider will be vertical. | ||
* @default false | ||
*/ | ||
vertical?: boolean; | ||
/** | ||
* A handle generator which could be used to customized handle. | ||
*/ | ||
handle?(props: any): React.ReactNode; | ||
/** | ||
* If the value is true, it means a continuous value interval, otherwise, it is a independent value. | ||
* @default true | ||
*/ | ||
included?: boolean; | ||
/** | ||
* If true, handles can't be moved. | ||
* @default false | ||
*/ | ||
disabled?: boolean; | ||
/** | ||
* When the step value is greater than 1, you can set the dots to true if you want to render the slider with dots. | ||
* @default false | ||
*/ | ||
dots?: boolean; | ||
/** | ||
* onBeforeChange will be triggered when ontouchstart or onmousedown is triggered. | ||
*/ | ||
onBeforeChange?(value: any): any | undefined; | ||
/** | ||
* onChange will be triggered while the value of Slider changing. | ||
*/ | ||
onChange?(value: any): any | undefined; | ||
/** | ||
* onAfterChange will be triggered when ontouchend or onmouseup is triggered. | ||
*/ | ||
onAfterChange?(value: any): any | undefined; | ||
export interface CommonApiProps { | ||
/** | ||
* Additional CSS class for the root DOM node | ||
* @default '' | ||
*/ | ||
className?: string; | ||
/** | ||
* The minimum value of the slider | ||
* @default 0 | ||
*/ | ||
min?: number; | ||
/** | ||
* The maximum value of the slider | ||
* @default 100 | ||
*/ | ||
max?: number; | ||
/** | ||
* Marks on the slider. The key determines the position, and the value determines what will show. | ||
* If you want to set the style of a specific mark point, the value should be an object which contains style and label properties. | ||
* @default '{}' | {number: { style, label }} | ||
*/ | ||
marks?: Marks; | ||
/** | ||
* Value to be added or subtracted on each step the slider makes. Must be greater than zero, and max - min should be evenly divisible by the step value. | ||
* @default 1 | ||
*/ | ||
step?: number; | ||
/** | ||
* If vertical is true, the slider will be vertical. | ||
* @default false | ||
*/ | ||
vertical?: boolean; | ||
/** | ||
* A handle generator which could be used to customized handle. | ||
*/ | ||
handle?(props: any): React.ReactNode; | ||
/** | ||
* If the value is true, it means a continuous value interval, otherwise, it is a independent value. | ||
* @default true | ||
*/ | ||
included?: boolean; | ||
/** | ||
* If true, handles can't be moved. | ||
* @default false | ||
*/ | ||
disabled?: boolean; | ||
/** | ||
* When the step value is greater than 1, you can set the dots to true if you want to render the slider with dots. | ||
* @default false | ||
*/ | ||
dots?: boolean; | ||
/** | ||
* onBeforeChange will be triggered when ontouchstart or onmousedown is triggered. | ||
*/ | ||
onBeforeChange?(value: any): any | undefined; | ||
/** | ||
* onChange will be triggered while the value of Slider changing. | ||
*/ | ||
onChange?(value: any): any | undefined; | ||
/** | ||
* onAfterChange will be triggered when ontouchend or onmouseup is triggered. | ||
*/ | ||
onAfterChange?(value: any): any | undefined; | ||
/** | ||
* @deprecated in version ^6.0.0. Use rc-tooltip | ||
* Tooltip transition class name | ||
*/ | ||
tipTransitionName?: string; | ||
/** | ||
* @deprecated in version ^6.0.0. Use rc-tooltip | ||
* Tooltip transition class name | ||
*/ | ||
tipTransitionName?: string; | ||
/** | ||
* @deprecated in version ^6.0.0. Use rc-tooltip | ||
* Tooltip formatter | ||
*/ | ||
tipFormatter?: ((value: any) => any | undefined) | null; | ||
} | ||
/** | ||
* @deprecated in version ^6.0.0. Use rc-tooltip | ||
* Tooltip formatter | ||
*/ | ||
tipFormatter?: ((value: any) => any | undefined) | null; | ||
interface SliderProps extends CommonApiProps { | ||
/** | ||
* Set initial value of slider. | ||
* @default 0 | ||
*/ | ||
defaultValue?: number; | ||
/** | ||
* Set current value of slider. | ||
*/ | ||
value?: number; | ||
} | ||
/** | ||
* The style used for handle. (both for slider(Object) and range(Array of Object), the array will be used for mutli handle follow element order) | ||
*/ | ||
handleStyle?: React.CSSProperties[] | React.CSSProperties; | ||
interface RangeProps extends CommonApiProps { | ||
/** | ||
* Set initial positions of handles. | ||
* @default [0,0] | ||
*/ | ||
defaultValue?: number[]; | ||
/** | ||
* Set current positions of handles. | ||
*/ | ||
value?: number[]; | ||
/** | ||
* Determine how many ranges to render, and multiple handles will be rendered (number + 1). | ||
* @default 1 | ||
*/ | ||
count?: number; | ||
/** | ||
* allowCross could be set as true to allow those handles to cross. | ||
* @default true | ||
*/ | ||
allowCross?: boolean; | ||
/** | ||
* pushable could be set as true to allow pushing of surrounding handles when moving an handle. When set to a number, the number will be the minimum ensured distance between handles. | ||
* @default true | ||
*/ | ||
pushable?: boolean; | ||
} | ||
/** | ||
* The style used for track. (both for slider(Object) and range(Array of Object), the array will be used for mutli track follow element order) | ||
*/ | ||
trackStyle?: React.CSSProperties[] | React.CSSProperties; | ||
interface HandleProps extends CommonApiProps { | ||
/** | ||
* Class name | ||
*/ | ||
className: string; | ||
/** | ||
* Styling if true, then bottom: {offset} else left: {offset} | ||
* @default False | ||
*/ | ||
vertical: boolean; | ||
/** | ||
* Styling option offset | ||
*/ | ||
offset: number; | ||
} | ||
/** | ||
* The style used for the track base color. | ||
*/ | ||
railStyle?: React.CSSProperties; | ||
} | ||
declare class RcSliderClass extends React.Component<RcSliderClass.SliderProps> { } | ||
export interface SliderProps extends CommonApiProps { | ||
/** | ||
* Set initial value of slider. | ||
* @default 0 | ||
*/ | ||
defaultValue?: number; | ||
/** | ||
* Set current value of slider. | ||
*/ | ||
value?: number; | ||
} | ||
declare namespace RcSliderClass { | ||
class Range extends React.Component<RcSliderClass.RangeProps> { } | ||
class Handle extends React.Component<RcSliderClass.HandleProps> { } | ||
export interface RangeProps extends CommonApiProps { | ||
/** | ||
* Set initial positions of handles. | ||
* @default [0,0] | ||
*/ | ||
defaultValue?: number[]; | ||
/** | ||
* Set current positions of handles. | ||
*/ | ||
value?: number[]; | ||
/** | ||
* Determine how many ranges to render, and multiple handles will be rendered (number + 1). | ||
* @default 1 | ||
*/ | ||
count?: number; | ||
/** | ||
* allowCross could be set as true to allow those handles to cross. | ||
* @default true | ||
*/ | ||
allowCross?: boolean; | ||
/** | ||
* pushable could be set as true to allow pushing of surrounding handles when moving an handle. When set to a number, the number will be the minimum ensured distance between handles. | ||
* @default true | ||
*/ | ||
pushable?: boolean; | ||
} | ||
export = RcSliderClass; | ||
export interface HandleProps extends CommonApiProps { | ||
/** | ||
* Class name | ||
*/ | ||
className: string; | ||
/** | ||
* Styling if true, then bottom: {offset} else left: {offset} | ||
* @default False | ||
*/ | ||
vertical: boolean; | ||
/** | ||
* Styling option offset | ||
*/ | ||
offset: number; | ||
} | ||
export default class Slider extends React.Component<SliderProps> { } | ||
export class Range extends React.Component<RangeProps> { } | ||
export class Handle extends React.Component<HandleProps> { } |
{ | ||
"name": "@types/rc-slider", | ||
"version": "6.1.3", | ||
"version": "8.1.0", | ||
"description": "TypeScript definitions for rc-slider", | ||
@@ -10,2 +10,6 @@ "license": "MIT", | ||
"url": "https://github.com/mantasmarcinkus/" | ||
}, | ||
{ | ||
"name": "Alexander Mattoni", | ||
"url": "https://github.com/mattoni/" | ||
} | ||
@@ -23,4 +27,4 @@ ], | ||
"peerDependencies": {}, | ||
"typesPublisherContentHash": "9c3644654df63fb3de02324cc21541b8c47c7b9b3c6f5c1c76e00d30540782f9", | ||
"typesPublisherContentHash": "ca6f88d8c476e8ba737b767398a452aeda3af6c19c0e332e2fd8bde764d3a5a0", | ||
"typeScriptVersion": "2.3" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Fri, 23 Jun 2017 14:03:04 GMT | ||
* Last updated: Wed, 05 Jul 2017 14:31:12 GMT | ||
* Dependencies: react | ||
@@ -17,2 +17,2 @@ * Global values: none | ||
# Credits | ||
These definitions were written by Marcinkus Mantas <https://github.com/mantasmarcinkus/>. | ||
These definitions were written by Marcinkus Mantas <https://github.com/mantasmarcinkus/>, Alexander Mattoni <https://github.com/mattoni/>. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7504
153