Socket
Socket
Sign inDemoInstall

rc-slider

Package Overview
Dependencies
Maintainers
9
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-slider - npm Package Compare versions

Comparing version 10.0.1 to 10.1.0

1

es/context.d.ts

@@ -10,2 +10,3 @@ import * as React from 'react';

disabled?: boolean;
keyboard?: boolean;
included?: boolean;

@@ -12,0 +13,0 @@ step: number | null;

3

es/context.js

@@ -9,4 +9,5 @@ import * as React from 'react';

includedEnd: 0,
tabIndex: 0
tabIndex: 0,
keyboard: true
});
export default SliderContext;

@@ -29,2 +29,3 @@ import _extends from "@babel/runtime/helpers/esm/extends";

disabled = _React$useContext.disabled,
keyboard = _React$useContext.keyboard,
range = _React$useContext.range,

@@ -46,3 +47,3 @@ tabIndex = _React$useContext.tabIndex,

var onKeyDown = function onKeyDown(e) {
if (!disabled) {
if (!disabled && keyboard) {
var offset = null; // Change the value

@@ -49,0 +50,0 @@

@@ -23,2 +23,3 @@ import * as React from 'react';

disabled?: boolean;
keyboard?: boolean;
autoFocus?: boolean;

@@ -25,0 +26,0 @@ onFocus?: (e: React.FocusEvent<HTMLDivElement>) => void;

@@ -26,2 +26,4 @@ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";

disabled = _props$disabled === void 0 ? false : _props$disabled,
_props$keyboard = props.keyboard,
keyboard = _props$keyboard === void 0 ? true : _props$keyboard,
autoFocus = props.autoFocus,

@@ -365,2 +367,3 @@ onFocus = props.onFocus,

disabled: disabled,
keyboard: keyboard,
step: mergedStep,

@@ -376,3 +379,3 @@ included: included,

};
}, [mergedMin, mergedMax, direction, disabled, mergedStep, included, includedStart, includedEnd, range, tabIndex, ariaLabelForHandle, ariaLabelledByForHandle, ariaValueTextFormatterForHandle]); // ============================ Render ============================
}, [mergedMin, mergedMax, direction, disabled, keyboard, mergedStep, included, includedStart, includedEnd, range, tabIndex, ariaLabelForHandle, ariaLabelledByForHandle, ariaValueTextFormatterForHandle]); // ============================ Render ============================

@@ -379,0 +382,0 @@ return /*#__PURE__*/React.createElement(SliderContext.Provider, {

@@ -10,2 +10,3 @@ import * as React from 'react';

disabled?: boolean;
keyboard?: boolean;
included?: boolean;

@@ -12,0 +13,0 @@ step: number | null;

@@ -19,5 +19,6 @@ "use strict";

includedEnd: 0,
tabIndex: 0
tabIndex: 0,
keyboard: true
});
var _default = SliderContext;
exports.default = _default;

@@ -49,2 +49,3 @@ "use strict";

disabled = _React$useContext.disabled,
keyboard = _React$useContext.keyboard,
range = _React$useContext.range,

@@ -66,3 +67,3 @@ tabIndex = _React$useContext.tabIndex,

var onKeyDown = function onKeyDown(e) {
if (!disabled) {
if (!disabled && keyboard) {
var offset = null; // Change the value

@@ -69,0 +70,0 @@

@@ -23,2 +23,3 @@ import * as React from 'react';

disabled?: boolean;
keyboard?: boolean;
autoFocus?: boolean;

@@ -25,0 +26,0 @@ onFocus?: (e: React.FocusEvent<HTMLDivElement>) => void;

@@ -53,2 +53,4 @@ "use strict";

disabled = _props$disabled === void 0 ? false : _props$disabled,
_props$keyboard = props.keyboard,
keyboard = _props$keyboard === void 0 ? true : _props$keyboard,
autoFocus = props.autoFocus,

@@ -390,2 +392,3 @@ onFocus = props.onFocus,

disabled: disabled,
keyboard: keyboard,
step: mergedStep,

@@ -401,3 +404,3 @@ included: included,

};
}, [mergedMin, mergedMax, direction, disabled, mergedStep, included, includedStart, includedEnd, range, tabIndex, ariaLabelForHandle, ariaLabelledByForHandle, ariaValueTextFormatterForHandle]); // ============================ Render ============================
}, [mergedMin, mergedMax, direction, disabled, keyboard, mergedStep, included, includedStart, includedEnd, range, tabIndex, ariaLabelForHandle, ariaLabelledByForHandle, ariaValueTextFormatterForHandle]); // ============================ Render ============================

@@ -404,0 +407,0 @@ return /*#__PURE__*/React.createElement(_context.default.Provider, {

{
"name": "rc-slider",
"version": "10.0.1",
"version": "10.1.0",
"description": "Slider UI component for React",

@@ -5,0 +5,0 @@ "engines": {

@@ -91,2 +91,3 @@ # rc-slider

| disabled | boolean | `false` | If `true`, handles can't be moved. |
| keyboard | boolean | `true` | Support using keyboard to move handlers. |
| dots | boolean | `false` | When the `step` value is greater than 1, you can set the `dots` to `true` if you want to render the slider with dots. |

@@ -93,0 +94,0 @@ | onBeforeChange | Function | NOOP | `onBeforeChange` will be triggered when `ontouchstart` or `onmousedown` is triggered. |

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc