rc-slider
Advanced tools
Comparing version 10.6.0-4 to 10.6.0
@@ -21,4 +21,5 @@ import * as React from 'react'; | ||
onChangeComplete?: () => void; | ||
mock?: boolean; | ||
} | ||
declare const Handle: React.ForwardRefExoticComponent<HandleProps & React.RefAttributes<HTMLDivElement>>; | ||
export default Handle; |
@@ -12,3 +12,2 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
var Handle = /*#__PURE__*/React.forwardRef(function (props, ref) { | ||
var _getIndex; | ||
var prefixCls = props.prefixCls, | ||
@@ -114,29 +113,30 @@ value = props.value, | ||
// ============================= Aria ============================= | ||
function ignoreAriaProp(val) { | ||
return valueIndex === null ? undefined : val; | ||
// ============================ Render ============================ | ||
var divProps = {}; | ||
if (valueIndex !== null) { | ||
var _getIndex; | ||
divProps = { | ||
tabIndex: disabled ? null : getIndex(tabIndex, valueIndex), | ||
role: 'slider', | ||
'aria-valuemin': min, | ||
'aria-valuemax': max, | ||
'aria-valuenow': value, | ||
'aria-disabled': disabled, | ||
'aria-label': getIndex(ariaLabelForHandle, valueIndex), | ||
'aria-labelledby': getIndex(ariaLabelledByForHandle, valueIndex), | ||
'aria-valuetext': (_getIndex = getIndex(ariaValueTextFormatterForHandle, valueIndex)) === null || _getIndex === void 0 ? void 0 : _getIndex(value), | ||
'aria-orientation': direction === 'ltr' || direction === 'rtl' ? 'horizontal' : 'vertical', | ||
onMouseDown: onInternalStartMove, | ||
onTouchStart: onInternalStartMove, | ||
onFocus: onInternalFocus, | ||
onMouseEnter: onInternalMouseEnter, | ||
onKeyDown: onKeyDown, | ||
onKeyUp: handleKeyUp | ||
}; | ||
} | ||
// ============================ Render ============================ | ||
var handleNode = /*#__PURE__*/React.createElement("div", _extends({ | ||
ref: ref, | ||
className: cls(handlePrefixCls, _defineProperty(_defineProperty({}, "".concat(handlePrefixCls, "-").concat(valueIndex + 1), ignoreAriaProp(range)), "".concat(handlePrefixCls, "-dragging"), dragging), classNames.handle), | ||
style: _objectSpread(_objectSpread(_objectSpread({}, positionStyle), style), styles.handle), | ||
onMouseDown: onInternalStartMove, | ||
onTouchStart: onInternalStartMove, | ||
onFocus: onInternalFocus, | ||
onMouseEnter: onInternalMouseEnter, | ||
onKeyDown: onKeyDown, | ||
onKeyUp: handleKeyUp, | ||
tabIndex: disabled ? null : ignoreAriaProp(getIndex(tabIndex, valueIndex)), | ||
role: "slider", | ||
"aria-valuemin": min, | ||
"aria-valuemax": max, | ||
"aria-valuenow": value, | ||
"aria-disabled": disabled, | ||
"aria-label": ignoreAriaProp(getIndex(ariaLabelForHandle, valueIndex)), | ||
"aria-labelledby": ignoreAriaProp(getIndex(ariaLabelledByForHandle, valueIndex)), | ||
"aria-valuetext": ignoreAriaProp((_getIndex = getIndex(ariaValueTextFormatterForHandle, valueIndex)) === null || _getIndex === void 0 ? void 0 : _getIndex(value)), | ||
"aria-orientation": direction === 'ltr' || direction === 'rtl' ? 'horizontal' : 'vertical' | ||
}, restProps)); | ||
className: cls(handlePrefixCls, _defineProperty(_defineProperty({}, "".concat(handlePrefixCls, "-").concat(valueIndex + 1), valueIndex !== null && range), "".concat(handlePrefixCls, "-dragging"), dragging), classNames.handle), | ||
style: _objectSpread(_objectSpread(_objectSpread({}, positionStyle), style), styles.handle) | ||
}, divProps, restProps)); | ||
@@ -143,0 +143,0 @@ // Customize |
@@ -5,3 +5,3 @@ import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties"; | ||
var _excluded = ["prefixCls", "style", "onStartMove", "onOffsetChange", "values", "handleRender", "activeHandleRender", "draggingIndex", "onFocus", "onBlur"]; | ||
var _excluded = ["prefixCls", "style", "onStartMove", "onOffsetChange", "values", "handleRender", "activeHandleRender", "draggingIndex", "onFocus"]; | ||
import * as React from 'react'; | ||
@@ -20,3 +20,2 @@ import { getIndex } from "../util"; | ||
onFocus = props.onFocus, | ||
onBlur = props.onBlur, | ||
restProps = _objectWithoutProperties(props, _excluded); | ||
@@ -23,0 +22,0 @@ var handlesRef = React.useRef({}); |
@@ -21,4 +21,5 @@ import * as React from 'react'; | ||
onChangeComplete?: () => void; | ||
mock?: boolean; | ||
} | ||
declare const Handle: React.ForwardRefExoticComponent<HandleProps & React.RefAttributes<HTMLDivElement>>; | ||
export default Handle; |
@@ -22,3 +22,2 @@ "use strict"; | ||
var Handle = /*#__PURE__*/React.forwardRef(function (props, ref) { | ||
var _getIndex; | ||
var prefixCls = props.prefixCls, | ||
@@ -124,29 +123,30 @@ value = props.value, | ||
// ============================= Aria ============================= | ||
function ignoreAriaProp(val) { | ||
return valueIndex === null ? undefined : val; | ||
// ============================ Render ============================ | ||
var divProps = {}; | ||
if (valueIndex !== null) { | ||
var _getIndex; | ||
divProps = { | ||
tabIndex: disabled ? null : (0, _util.getIndex)(tabIndex, valueIndex), | ||
role: 'slider', | ||
'aria-valuemin': min, | ||
'aria-valuemax': max, | ||
'aria-valuenow': value, | ||
'aria-disabled': disabled, | ||
'aria-label': (0, _util.getIndex)(ariaLabelForHandle, valueIndex), | ||
'aria-labelledby': (0, _util.getIndex)(ariaLabelledByForHandle, valueIndex), | ||
'aria-valuetext': (_getIndex = (0, _util.getIndex)(ariaValueTextFormatterForHandle, valueIndex)) === null || _getIndex === void 0 ? void 0 : _getIndex(value), | ||
'aria-orientation': direction === 'ltr' || direction === 'rtl' ? 'horizontal' : 'vertical', | ||
onMouseDown: onInternalStartMove, | ||
onTouchStart: onInternalStartMove, | ||
onFocus: onInternalFocus, | ||
onMouseEnter: onInternalMouseEnter, | ||
onKeyDown: onKeyDown, | ||
onKeyUp: handleKeyUp | ||
}; | ||
} | ||
// ============================ Render ============================ | ||
var handleNode = /*#__PURE__*/React.createElement("div", (0, _extends2.default)({ | ||
ref: ref, | ||
className: (0, _classnames.default)(handlePrefixCls, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(handlePrefixCls, "-").concat(valueIndex + 1), ignoreAriaProp(range)), "".concat(handlePrefixCls, "-dragging"), dragging), classNames.handle), | ||
style: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, positionStyle), style), styles.handle), | ||
onMouseDown: onInternalStartMove, | ||
onTouchStart: onInternalStartMove, | ||
onFocus: onInternalFocus, | ||
onMouseEnter: onInternalMouseEnter, | ||
onKeyDown: onKeyDown, | ||
onKeyUp: handleKeyUp, | ||
tabIndex: disabled ? null : ignoreAriaProp((0, _util.getIndex)(tabIndex, valueIndex)), | ||
role: "slider", | ||
"aria-valuemin": min, | ||
"aria-valuemax": max, | ||
"aria-valuenow": value, | ||
"aria-disabled": disabled, | ||
"aria-label": ignoreAriaProp((0, _util.getIndex)(ariaLabelForHandle, valueIndex)), | ||
"aria-labelledby": ignoreAriaProp((0, _util.getIndex)(ariaLabelledByForHandle, valueIndex)), | ||
"aria-valuetext": ignoreAriaProp((_getIndex = (0, _util.getIndex)(ariaValueTextFormatterForHandle, valueIndex)) === null || _getIndex === void 0 ? void 0 : _getIndex(value)), | ||
"aria-orientation": direction === 'ltr' || direction === 'rtl' ? 'horizontal' : 'vertical' | ||
}, restProps)); | ||
className: (0, _classnames.default)(handlePrefixCls, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(handlePrefixCls, "-").concat(valueIndex + 1), valueIndex !== null && range), "".concat(handlePrefixCls, "-dragging"), dragging), classNames.handle), | ||
style: (0, _objectSpread2.default)((0, _objectSpread2.default)((0, _objectSpread2.default)({}, positionStyle), style), styles.handle) | ||
}, divProps, restProps)); | ||
@@ -153,0 +153,0 @@ // Customize |
@@ -16,3 +16,3 @@ "use strict"; | ||
var _Handle = _interopRequireDefault(require("./Handle")); | ||
var _excluded = ["prefixCls", "style", "onStartMove", "onOffsetChange", "values", "handleRender", "activeHandleRender", "draggingIndex", "onFocus", "onBlur"]; | ||
var _excluded = ["prefixCls", "style", "onStartMove", "onOffsetChange", "values", "handleRender", "activeHandleRender", "draggingIndex", "onFocus"]; | ||
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } | ||
@@ -30,3 +30,2 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } | ||
onFocus = props.onFocus, | ||
onBlur = props.onBlur, | ||
restProps = (0, _objectWithoutProperties2.default)(props, _excluded); | ||
@@ -33,0 +32,0 @@ var handlesRef = React.useRef({}); |
{ | ||
"name": "rc-slider", | ||
"version": "10.6.0-4", | ||
"version": "10.6.0", | ||
"description": "Slider UI component for React", | ||
@@ -38,3 +38,3 @@ "keywords": [ | ||
"now-build": "npm run docs:build", | ||
"prepublishOnly": "npm run compile && np --yolo --no-publish --any-branch", | ||
"prepublishOnly": "npm run compile && np --yolo --no-publish", | ||
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"", | ||
@@ -61,4 +61,4 @@ "start": "dumi dev", | ||
"eslint": "^8.54.0", | ||
"eslint-plugin-jest": "^27.6.0", | ||
"eslint-plugin-unicorn": "^51.0.1", | ||
"eslint-plugin-jest": "^28.2.0", | ||
"eslint-plugin-unicorn": "^52.0.0", | ||
"father": "^4.3.5", | ||
@@ -69,3 +69,3 @@ "father-build": "^1.18.6", | ||
"less": "^4.1.3", | ||
"np": "^9.1.0", | ||
"np": "^10.0.4", | ||
"rc-test": "^7.0.15", | ||
@@ -72,0 +72,0 @@ "rc-tooltip": "^6.1.2", |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3470
0
155528