Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-steps

Package Overview
Dependencies
Maintainers
8
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-steps - npm Package Compare versions

Comparing version 3.5.0 to 3.6.0

89

es/Step.js

@@ -5,3 +5,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

@@ -18,16 +18,20 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
/* eslint react/prop-types: 0 */
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';

@@ -39,10 +43,8 @@

var Step =
/*#__PURE__*/
function (_React$Component) {
var Step = /*#__PURE__*/function (_React$Component) {
_inherits(Step, _React$Component);
var _super = _createSuper(Step);
function Step() {
var _getPrototypeOf2;
var _this;

@@ -56,3 +58,3 @@

_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Step)).call.apply(_getPrototypeOf2, [this].concat(_args)));
_this = _super.call.apply(_super, [this].concat(_args));

@@ -91,4 +93,4 @@ _defineProperty(_assertThisInitialized(_this), "onClick", function () {

var iconNode;
var iconClassName = classNames("".concat(prefixCls, "-icon"), "".concat(iconPrefix, "icon"), (_classNames = {}, _defineProperty(_classNames, "".concat(iconPrefix, "icon-").concat(icon), icon && isString(icon)), _defineProperty(_classNames, "".concat(iconPrefix, "icon-check"), !icon && status === 'finish' && icons && !icons.finish), _defineProperty(_classNames, "".concat(iconPrefix, "icon-close"), !icon && status === 'error' && icons && !icons.error), _classNames));
var iconDot = React.createElement("span", {
var iconClassName = classNames("".concat(prefixCls, "-icon"), "".concat(iconPrefix, "icon"), (_classNames = {}, _defineProperty(_classNames, "".concat(iconPrefix, "icon-").concat(icon), icon && isString(icon)), _defineProperty(_classNames, "".concat(iconPrefix, "icon-check"), !icon && status === 'finish' && (icons && !icons.finish || !icons)), _defineProperty(_classNames, "".concat(iconPrefix, "icon-cross"), !icon && status === 'error' && (icons && !icons.error || !icons)), _classNames));
var iconDot = /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-icon-dot")

@@ -99,3 +101,3 @@ }); // `progressDot` enjoy the highest priority

if (typeof progressDot === 'function') {
iconNode = React.createElement("span", {
iconNode = /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-icon")

@@ -109,3 +111,3 @@ }, progressDot(iconDot, {

} else {
iconNode = React.createElement("span", {
iconNode = /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-icon")

@@ -115,19 +117,19 @@ }, iconDot);

} else if (icon && !isString(icon)) {
iconNode = React.createElement("span", {
iconNode = /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-icon")
}, icon);
} else if (icons && icons.finish && status === 'finish') {
iconNode = React.createElement("span", {
iconNode = /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-icon")
}, icons.finish);
} else if (icons && icons.error && status === 'error') {
iconNode = React.createElement("span", {
iconNode = /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-icon")
}, icons.error);
} else if (icon || status === 'finish' || status === 'error') {
iconNode = React.createElement("span", {
iconNode = /*#__PURE__*/React.createElement("span", {
className: iconClassName
});
} else {
iconNode = React.createElement("span", {
iconNode = /*#__PURE__*/React.createElement("span", {
className: "".concat(prefixCls, "-icon")

@@ -189,21 +191,21 @@ }, stepNumber);

return React.createElement("div", _extends({}, restProps, {
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
className: classString,
style: stepItemStyle
}), React.createElement("div", _extends({
}), /*#__PURE__*/React.createElement("div", _extends({
onClick: onClick
}, accessibilityProps, {
className: "".concat(prefixCls, "-item-container")
}), React.createElement("div", {
}), /*#__PURE__*/React.createElement("div", {
className: "".concat(prefixCls, "-item-tail")
}, tailContent), React.createElement("div", {
}, tailContent), /*#__PURE__*/React.createElement("div", {
className: "".concat(prefixCls, "-item-icon")
}, this.renderIconNode()), React.createElement("div", {
}, this.renderIconNode()), /*#__PURE__*/React.createElement("div", {
className: "".concat(prefixCls, "-item-content")
}, React.createElement("div", {
}, /*#__PURE__*/React.createElement("div", {
className: "".concat(prefixCls, "-item-title")
}, title, subTitle && React.createElement("div", {
title: subTitle,
}, title, subTitle && /*#__PURE__*/React.createElement("div", {
title: typeof subTitle === 'string' ? subTitle : undefined,
className: "".concat(prefixCls, "-item-subtitle")
}, subTitle)), description && React.createElement("div", {
}, subTitle)), description && /*#__PURE__*/React.createElement("div", {
className: "".concat(prefixCls, "-item-description")

@@ -217,29 +219,2 @@ }, description))));

_defineProperty(Step, "propTypes", {
className: PropTypes.string,
prefixCls: PropTypes.string,
style: PropTypes.object,
wrapperStyle: PropTypes.object,
itemWidth: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
active: PropTypes.bool,
disabled: PropTypes.bool,
status: PropTypes.string,
iconPrefix: PropTypes.string,
icon: PropTypes.node,
adjustMarginRight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
stepNumber: PropTypes.string,
stepIndex: PropTypes.number,
description: PropTypes.any,
title: PropTypes.any,
subTitle: PropTypes.any,
progressDot: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
tailContent: PropTypes.any,
icons: PropTypes.shape({
finish: PropTypes.node,
error: PropTypes.node
}),
onClick: PropTypes.func,
onStepClick: PropTypes.func
});
export { Step as default };

@@ -5,3 +5,3 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

@@ -18,17 +18,20 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
/* eslint react/no-did-mount-set-state: 0 */
/* eslint react/no-did-mount-set-state: 0, react/prop-types: 0 */
import React, { cloneElement, Children, Component } from 'react';
import PropTypes from 'prop-types';
import { findDOMNode } from 'react-dom';

@@ -39,7 +42,7 @@ import classNames from 'classnames';

var Steps =
/*#__PURE__*/
function (_Component) {
var Steps = /*#__PURE__*/function (_Component) {
_inherits(Steps, _Component);
var _super = _createSuper(Steps);
function Steps(props) {

@@ -50,3 +53,3 @@ var _this;

_this = _possibleConstructorReturn(this, _getPrototypeOf(Steps).call(this, props));
_this = _super.call(this, props);

@@ -162,3 +165,3 @@ _defineProperty(_assertThisInitialized(_this), "onStepClick", function (next) {

var classString = classNames(prefixCls, "".concat(prefixCls, "-").concat(direction), className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(size), size), _defineProperty(_classNames, "".concat(prefixCls, "-label-").concat(adjustedlabelPlacement), direction === 'horizontal'), _defineProperty(_classNames, "".concat(prefixCls, "-dot"), !!progressDot), _defineProperty(_classNames, "".concat(prefixCls, "-navigation"), isNav), _defineProperty(_classNames, "".concat(prefixCls, "-flex-not-supported"), !flexSupported), _classNames));
return React.createElement("div", _extends({
return /*#__PURE__*/React.createElement("div", _extends({
className: classString,

@@ -218,23 +221,2 @@ style: style

_defineProperty(Steps, "propTypes", {
type: PropTypes.string,
prefixCls: PropTypes.string,
className: PropTypes.string,
iconPrefix: PropTypes.string,
direction: PropTypes.string,
labelPlacement: PropTypes.string,
children: PropTypes.any,
status: PropTypes.string,
size: PropTypes.string,
progressDot: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
style: PropTypes.object,
initial: PropTypes.number,
current: PropTypes.number,
icons: PropTypes.shape({
finish: PropTypes.node,
error: PropTypes.node
}),
onChange: PropTypes.func
});
_defineProperty(Steps, "defaultProps", {

@@ -241,0 +223,0 @@ type: 'default',

# History
----
## 3.6.0
- Remove babel-runtime and prop-types
- Fix icon missing #85
## 3.5.0

@@ -5,0 +10,0 @@

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

var _propTypes = _interopRequireDefault(require("prop-types"));
var _classnames = _interopRequireDefault(require("classnames"));

@@ -21,3 +19,3 @@

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

@@ -34,11 +32,15 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

@@ -51,10 +53,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var Step =
/*#__PURE__*/
function (_React$Component) {
var Step = /*#__PURE__*/function (_React$Component) {
_inherits(Step, _React$Component);
var _super = _createSuper(Step);
function Step() {
var _getPrototypeOf2;
var _this;

@@ -68,3 +68,3 @@

_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Step)).call.apply(_getPrototypeOf2, [this].concat(_args)));
_this = _super.call.apply(_super, [this].concat(_args));

@@ -103,5 +103,5 @@ _defineProperty(_assertThisInitialized(_this), "onClick", function () {

var iconNode;
var iconClassName = (0, _classnames["default"])("".concat(prefixCls, "-icon"), "".concat(iconPrefix, "icon"), (_classNames = {}, _defineProperty(_classNames, "".concat(iconPrefix, "icon-").concat(icon), icon && isString(icon)), _defineProperty(_classNames, "".concat(iconPrefix, "icon-check"), !icon && status === 'finish' && icons && !icons.finish), _defineProperty(_classNames, "".concat(iconPrefix, "icon-close"), !icon && status === 'error' && icons && !icons.error), _classNames));
var iconClassName = (0, _classnames["default"])("".concat(prefixCls, "-icon"), "".concat(iconPrefix, "icon"), (_classNames = {}, _defineProperty(_classNames, "".concat(iconPrefix, "icon-").concat(icon), icon && isString(icon)), _defineProperty(_classNames, "".concat(iconPrefix, "icon-check"), !icon && status === 'finish' && (icons && !icons.finish || !icons)), _defineProperty(_classNames, "".concat(iconPrefix, "icon-cross"), !icon && status === 'error' && (icons && !icons.error || !icons)), _classNames));
var iconDot = _react["default"].createElement("span", {
var iconDot = /*#__PURE__*/_react["default"].createElement("span", {
className: "".concat(prefixCls, "-icon-dot")

@@ -113,3 +113,3 @@ }); // `progressDot` enjoy the highest priority

if (typeof progressDot === 'function') {
iconNode = _react["default"].createElement("span", {
iconNode = /*#__PURE__*/_react["default"].createElement("span", {
className: "".concat(prefixCls, "-icon")

@@ -123,3 +123,3 @@ }, progressDot(iconDot, {

} else {
iconNode = _react["default"].createElement("span", {
iconNode = /*#__PURE__*/_react["default"].createElement("span", {
className: "".concat(prefixCls, "-icon")

@@ -129,19 +129,19 @@ }, iconDot);

} else if (icon && !isString(icon)) {
iconNode = _react["default"].createElement("span", {
iconNode = /*#__PURE__*/_react["default"].createElement("span", {
className: "".concat(prefixCls, "-icon")
}, icon);
} else if (icons && icons.finish && status === 'finish') {
iconNode = _react["default"].createElement("span", {
iconNode = /*#__PURE__*/_react["default"].createElement("span", {
className: "".concat(prefixCls, "-icon")
}, icons.finish);
} else if (icons && icons.error && status === 'error') {
iconNode = _react["default"].createElement("span", {
iconNode = /*#__PURE__*/_react["default"].createElement("span", {
className: "".concat(prefixCls, "-icon")
}, icons.error);
} else if (icon || status === 'finish' || status === 'error') {
iconNode = _react["default"].createElement("span", {
iconNode = /*#__PURE__*/_react["default"].createElement("span", {
className: iconClassName
});
} else {
iconNode = _react["default"].createElement("span", {
iconNode = /*#__PURE__*/_react["default"].createElement("span", {
className: "".concat(prefixCls, "-icon")

@@ -203,21 +203,21 @@ }, stepNumber);

return _react["default"].createElement("div", _extends({}, restProps, {
return /*#__PURE__*/_react["default"].createElement("div", _extends({}, restProps, {
className: classString,
style: stepItemStyle
}), _react["default"].createElement("div", _extends({
}), /*#__PURE__*/_react["default"].createElement("div", _extends({
onClick: onClick
}, accessibilityProps, {
className: "".concat(prefixCls, "-item-container")
}), _react["default"].createElement("div", {
}), /*#__PURE__*/_react["default"].createElement("div", {
className: "".concat(prefixCls, "-item-tail")
}, tailContent), _react["default"].createElement("div", {
}, tailContent), /*#__PURE__*/_react["default"].createElement("div", {
className: "".concat(prefixCls, "-item-icon")
}, this.renderIconNode()), _react["default"].createElement("div", {
}, this.renderIconNode()), /*#__PURE__*/_react["default"].createElement("div", {
className: "".concat(prefixCls, "-item-content")
}, _react["default"].createElement("div", {
}, /*#__PURE__*/_react["default"].createElement("div", {
className: "".concat(prefixCls, "-item-title")
}, title, subTitle && _react["default"].createElement("div", {
title: subTitle,
}, title, subTitle && /*#__PURE__*/_react["default"].createElement("div", {
title: typeof subTitle === 'string' ? subTitle : undefined,
className: "".concat(prefixCls, "-item-subtitle")
}, subTitle)), description && _react["default"].createElement("div", {
}, subTitle)), description && /*#__PURE__*/_react["default"].createElement("div", {
className: "".concat(prefixCls, "-item-description")

@@ -231,29 +231,2 @@ }, description))));

exports["default"] = Step;
_defineProperty(Step, "propTypes", {
className: _propTypes["default"].string,
prefixCls: _propTypes["default"].string,
style: _propTypes["default"].object,
wrapperStyle: _propTypes["default"].object,
itemWidth: _propTypes["default"].oneOfType([_propTypes["default"].number, _propTypes["default"].string]),
active: _propTypes["default"].bool,
disabled: _propTypes["default"].bool,
status: _propTypes["default"].string,
iconPrefix: _propTypes["default"].string,
icon: _propTypes["default"].node,
adjustMarginRight: _propTypes["default"].oneOfType([_propTypes["default"].number, _propTypes["default"].string]),
stepNumber: _propTypes["default"].string,
stepIndex: _propTypes["default"].number,
description: _propTypes["default"].any,
title: _propTypes["default"].any,
subTitle: _propTypes["default"].any,
progressDot: _propTypes["default"].oneOfType([_propTypes["default"].bool, _propTypes["default"].func]),
tailContent: _propTypes["default"].any,
icons: _propTypes["default"].shape({
finish: _propTypes["default"].node,
error: _propTypes["default"].node
}),
onClick: _propTypes["default"].func,
onStepClick: _propTypes["default"].func
});
exports["default"] = Step;

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

var _propTypes = _interopRequireDefault(require("prop-types"));
var _reactDom = require("react-dom");

@@ -23,4 +21,6 @@

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

@@ -30,3 +30,3 @@

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

@@ -43,19 +43,23 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var Steps =
/*#__PURE__*/
function (_Component) {
var Steps = /*#__PURE__*/function (_Component) {
_inherits(Steps, _Component);
var _super = _createSuper(Steps);
function Steps(props) {

@@ -66,3 +70,3 @@ var _this;

_this = _possibleConstructorReturn(this, _getPrototypeOf(Steps).call(this, props));
_this = _super.call(this, props);

@@ -180,3 +184,3 @@ _defineProperty(_assertThisInitialized(_this), "onStepClick", function (next) {

var classString = (0, _classnames["default"])(prefixCls, "".concat(prefixCls, "-").concat(direction), className, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(size), size), _defineProperty(_classNames, "".concat(prefixCls, "-label-").concat(adjustedlabelPlacement), direction === 'horizontal'), _defineProperty(_classNames, "".concat(prefixCls, "-dot"), !!progressDot), _defineProperty(_classNames, "".concat(prefixCls, "-navigation"), isNav), _defineProperty(_classNames, "".concat(prefixCls, "-flex-not-supported"), !flexSupported), _classNames));
return _react["default"].createElement("div", _extends({
return /*#__PURE__*/_react["default"].createElement("div", _extends({
className: classString,

@@ -238,23 +242,2 @@ style: style

_defineProperty(Steps, "propTypes", {
type: _propTypes["default"].string,
prefixCls: _propTypes["default"].string,
className: _propTypes["default"].string,
iconPrefix: _propTypes["default"].string,
direction: _propTypes["default"].string,
labelPlacement: _propTypes["default"].string,
children: _propTypes["default"].any,
status: _propTypes["default"].string,
size: _propTypes["default"].string,
progressDot: _propTypes["default"].oneOfType([_propTypes["default"].bool, _propTypes["default"].func]),
style: _propTypes["default"].object,
initial: _propTypes["default"].number,
current: _propTypes["default"].number,
icons: _propTypes["default"].shape({
finish: _propTypes["default"].node,
error: _propTypes["default"].node
}),
onChange: _propTypes["default"].func
});
_defineProperty(Steps, "defaultProps", {

@@ -261,0 +244,0 @@ type: 'default',

{
"name": "rc-steps",
"version": "3.5.0",
"version": "3.6.0",
"description": "steps ui component for react",

@@ -38,6 +38,6 @@ "keywords": [

"build": "rc-tools run build",
"compile": "rc-tools run compile --babel-runtime",
"compile": "rc-tools run compile",
"gh-pages": "rc-tools run gh-pages",
"start": "rc-tools run server",
"pub": "rc-tools run pub --babel-runtime",
"pub": "rc-tools run pub",
"lint": "rc-tools run lint",

@@ -67,2 +67,3 @@ "lint:fix": "rc-tools run lint --fix",

"devDependencies": {
"babel-core": "^7.0.0-bridge.0",
"coveralls": "^3.0.4",

@@ -72,11 +73,11 @@ "enzyme": "^3.0.0",

"enzyme-to-json": "^3.0.0",
"jest": "^20.0.4",
"jest": "^26.0.0",
"lint-staged": "^10.0.1",
"pre-commit": "1.x",
"querystring": "^0.2.0",
"rc-dialog": "6.x",
"rc-tools": "9.x",
"rc-dialog": "7.x",
"rc-tools": "^9.6.1",
"react": "^16.0.0",
"react-dom": "^16.0.0",
"react-test-renderer": "^16.0.0",
"lint-staged": "^9.0.0"
"react-test-renderer": "^16.0.0"
},

@@ -88,12 +89,9 @@ "pre-commit": [

"*.{js,jsx,ts,tsx}": [
"npm run pre-commit",
"git add"
"npm run pre-commit"
]
},
"dependencies": {
"babel-runtime": "^6.23.0",
"classnames": "^2.2.3",
"lodash": "^4.17.5",
"prop-types": "^15.5.7"
"lodash": "^4.17.5"
}
}

@@ -10,8 +10,9 @@ # rc-steps

[![Test coverage][coveralls-image]][coveralls-url]
[![Dependencies][david-image]][david-url]
[![DevDependencies][david-dev-image]][david-dev-url]
[![npm download][download-image]][download-url]
[![bundle size][bundlephobia-image]][bundlephobia-url]
[npm-image]: http://img.shields.io/npm/v/rc-steps.svg?style=flat-square
[npm-url]: http://npmjs.org/package/rc-steps
[download-image]: https://img.shields.io/npm/dm/rc-steps.svg?style=flat-square
[download-url]: https://npmjs.org/package/rc-steps
[travis-image]: https://img.shields.io/travis/react-component/steps.svg?style=flat-square

@@ -21,2 +22,10 @@ [travis-url]: https://travis-ci.org/react-component/steps

[coveralls-url]: https://coveralls.io/r/react-component/steps?branch=master
[david-url]: https://david-dm.org/react-component/steps
[david-image]: https://david-dm.org/react-component/steps/status.svg?style=flat-square
[david-dev-url]: https://david-dm.org/react-component/steps?type=dev
[david-dev-image]: https://david-dm.org/react-component/steps/dev-status.svg?style=flat-square
[download-image]: https://img.shields.io/npm/dm/rc-steps.svg?style=flat-square
[download-url]: https://npmjs.org/package/rc-steps
[bundlephobia-url]: https://bundlephobia.com/result?p=rc-steps
[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-steps

@@ -101,3 +110,3 @@ ## Usage

<td></td>
<td>spicify the default finish icon and error icon</td>
<td>specify the default finish icon and error icon</td>
</tr>

@@ -104,0 +113,0 @@ <tr>

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