rc-slider
Advanced tools
Comparing version 10.1.1 to 10.2.0
@@ -97,3 +97,4 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
"aria-labelledby": getIndex(ariaLabelledByForHandle, valueIndex), | ||
"aria-valuetext": (_getIndex = getIndex(ariaValueTextFormatterForHandle, valueIndex)) === null || _getIndex === void 0 ? void 0 : _getIndex(value) | ||
"aria-valuetext": (_getIndex = getIndex(ariaValueTextFormatterForHandle, valueIndex)) === null || _getIndex === void 0 ? void 0 : _getIndex(value), | ||
"aria-orientation": direction === 'ltr' || direction === 'rtl' ? 'horizontal' : 'vertical' | ||
}, restProps)); | ||
@@ -100,0 +101,0 @@ // Customize |
import Slider from './Slider'; | ||
import type { SliderProps } from './Slider'; | ||
export type { SliderProps }; | ||
import type { SliderProps, SliderRef } from './Slider'; | ||
export type { SliderProps, SliderRef }; | ||
export default Slider; |
@@ -14,2 +14,2 @@ import * as React from 'react'; | ||
} | ||
export default function Marks(props: MarksProps): JSX.Element; | ||
export default function Marks(props: MarksProps): React.JSX.Element; |
@@ -9,2 +9,2 @@ import * as React from 'react'; | ||
} | ||
export default function Mark(props: MarkProps): JSX.Element; | ||
export default function Mark(props: MarkProps): React.JSX.Element; |
@@ -87,4 +87,4 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
var mergedPush = React.useMemo(function () { | ||
if (pushable === true) { | ||
return mergedStep; | ||
if (typeof pushable === 'boolean') { | ||
return pushable ? mergedStep : false; | ||
} | ||
@@ -91,0 +91,0 @@ return pushable >= 0 ? pushable : false; |
@@ -8,2 +8,2 @@ import * as React from 'react'; | ||
} | ||
export default function Dot(props: DotProps): JSX.Element; | ||
export default function Dot(props: DotProps): React.JSX.Element; |
@@ -10,2 +10,2 @@ import * as React from 'react'; | ||
} | ||
export default function Steps(props: StepsProps): JSX.Element; | ||
export default function Steps(props: StepsProps): React.JSX.Element; |
@@ -11,2 +11,2 @@ import * as React from 'react'; | ||
} | ||
export default function Track(props: TrackProps): JSX.Element; | ||
export default function Track(props: TrackProps): React.JSX.Element; |
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty"; | ||
import * as React from 'react'; | ||
@@ -7,2 +8,3 @@ import classNames from 'classnames'; | ||
export default function Track(props) { | ||
var _classNames; | ||
var prefixCls = props.prefixCls, | ||
@@ -49,3 +51,3 @@ style = props.style, | ||
return /*#__PURE__*/React.createElement("div", { | ||
className: classNames(trackPrefixCls, range && "".concat(trackPrefixCls, "-").concat(index + 1)), | ||
className: classNames(trackPrefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(trackPrefixCls, "-").concat(index + 1), range), _defineProperty(_classNames, "".concat(prefixCls, "-track-draggable"), onStartMove), _classNames)), | ||
style: _objectSpread(_objectSpread({}, positionStyle), style), | ||
@@ -52,0 +54,0 @@ onMouseDown: onInternalStartMove, |
@@ -107,3 +107,4 @@ "use strict"; | ||
"aria-labelledby": (0, _util.getIndex)(ariaLabelledByForHandle, valueIndex), | ||
"aria-valuetext": (_getIndex = (0, _util.getIndex)(ariaValueTextFormatterForHandle, valueIndex)) === null || _getIndex === void 0 ? void 0 : _getIndex(value) | ||
"aria-valuetext": (_getIndex = (0, _util.getIndex)(ariaValueTextFormatterForHandle, valueIndex)) === null || _getIndex === void 0 ? void 0 : _getIndex(value), | ||
"aria-orientation": direction === 'ltr' || direction === 'rtl' ? 'horizontal' : 'vertical' | ||
}, restProps)); | ||
@@ -110,0 +111,0 @@ // Customize |
import Slider from './Slider'; | ||
import type { SliderProps } from './Slider'; | ||
export type { SliderProps }; | ||
import type { SliderProps, SliderRef } from './Slider'; | ||
export type { SliderProps, SliderRef }; | ||
export default Slider; |
@@ -14,2 +14,2 @@ import * as React from 'react'; | ||
} | ||
export default function Marks(props: MarksProps): JSX.Element; | ||
export default function Marks(props: MarksProps): React.JSX.Element; |
@@ -9,2 +9,2 @@ import * as React from 'react'; | ||
} | ||
export default function Mark(props: MarkProps): JSX.Element; | ||
export default function Mark(props: MarkProps): React.JSX.Element; |
@@ -97,4 +97,4 @@ "use strict"; | ||
var mergedPush = React.useMemo(function () { | ||
if (pushable === true) { | ||
return mergedStep; | ||
if (typeof pushable === 'boolean') { | ||
return pushable ? mergedStep : false; | ||
} | ||
@@ -101,0 +101,0 @@ return pushable >= 0 ? pushable : false; |
@@ -8,2 +8,2 @@ import * as React from 'react'; | ||
} | ||
export default function Dot(props: DotProps): JSX.Element; | ||
export default function Dot(props: DotProps): React.JSX.Element; |
@@ -10,2 +10,2 @@ import * as React from 'react'; | ||
} | ||
export default function Steps(props: StepsProps): JSX.Element; | ||
export default function Steps(props: StepsProps): React.JSX.Element; |
@@ -11,2 +11,2 @@ import * as React from 'react'; | ||
} | ||
export default function Track(props: TrackProps): JSX.Element; | ||
export default function Track(props: TrackProps): React.JSX.Element; |
@@ -10,2 +10,3 @@ "use strict"; | ||
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2")); | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var React = _interopRequireWildcard(require("react")); | ||
@@ -18,2 +19,3 @@ var _classnames = _interopRequireDefault(require("classnames")); | ||
function Track(props) { | ||
var _classNames; | ||
var prefixCls = props.prefixCls, | ||
@@ -60,3 +62,3 @@ style = props.style, | ||
return /*#__PURE__*/React.createElement("div", { | ||
className: (0, _classnames.default)(trackPrefixCls, range && "".concat(trackPrefixCls, "-").concat(index + 1)), | ||
className: (0, _classnames.default)(trackPrefixCls, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(trackPrefixCls, "-").concat(index + 1), range), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-track-draggable"), onStartMove), _classNames)), | ||
style: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, positionStyle), style), | ||
@@ -63,0 +65,0 @@ onMouseDown: onInternalStartMove, |
{ | ||
"name": "rc-slider", | ||
"version": "10.1.1", | ||
"version": "10.2.0", | ||
"description": "Slider UI component for React", | ||
@@ -60,5 +60,5 @@ "engines": { | ||
"@types/classnames": "^2.2.9", | ||
"@types/jest": "^26.0.0", | ||
"@types/react": "^16.9.2", | ||
"@types/react-dom": "^16.9.0", | ||
"@types/jest": "^29.5.1", | ||
"@types/react": "^17.0.15", | ||
"@types/react-dom": "^18.0.11", | ||
"@umijs/fabric": "^2.0.0", | ||
@@ -65,0 +65,0 @@ "cross-env": "^7.0.0", |
@@ -36,4 +36,5 @@ # rc-slider | ||
## Slider | ||
```js | ||
import Slider, { Range } from 'rc-slider'; | ||
import Slider from 'rc-slider'; | ||
import 'rc-slider/assets/index.css'; | ||
@@ -44,3 +45,2 @@ | ||
<Slider /> | ||
<Range /> | ||
</> | ||
@@ -50,2 +50,16 @@ ); | ||
## Range | ||
Please refer to [#825](https://github.com/react-component/slider/issues/825) for information regarding usage of `Range`. | ||
An example: | ||
```js | ||
import Slider, { Range } from 'rc-slider'; | ||
import 'rc-slider/assets/index.css'; | ||
export default () => ( | ||
<> | ||
<Slider range /> | ||
</> | ||
); | ||
``` | ||
## Compatibility | ||
@@ -52,0 +66,0 @@ |
Sorry, the diff of this file is not supported yet
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
146990
3185
166