rc-slider
Advanced tools
+15
-1
@@ -28,2 +28,10 @@ .rc-slider { | ||
| } | ||
| .rc-slider-track-draggable { | ||
| z-index: 1; | ||
| box-sizing: content-box; | ||
| background-clip: content-box; | ||
| border-top: 5px solid rgba(0, 0, 0, 0); | ||
| border-bottom: 5px solid rgba(0, 0, 0, 0); | ||
| transform: translateY(-5px); | ||
| } | ||
| .rc-slider-handle { | ||
@@ -91,3 +99,2 @@ position: absolute; | ||
| background: transparent; | ||
| pointer-events: none; | ||
| } | ||
@@ -142,2 +149,9 @@ .rc-slider-dot { | ||
| } | ||
| .rc-slider-vertical .rc-slider-track-draggable { | ||
| border-top: 0; | ||
| border-bottom: 0; | ||
| border-right: 5px solid rgba(0, 0, 0, 0); | ||
| border-left: 5px solid rgba(0, 0, 0, 0); | ||
| transform: translateX(-5px); | ||
| } | ||
| .rc-slider-vertical .rc-slider-handle { | ||
@@ -144,0 +158,0 @@ margin-top: 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 |
+2
-2
| 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; |
+2
-2
@@ -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 |
+2
-2
| 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; |
+2
-2
@@ -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, |
+4
-4
| { | ||
| "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", |
+16
-2
@@ -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 @@ |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
146990
1.08%3185
0.66%166
9.21%