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

rc-steps

Package Overview
Dependencies
Maintainers
9
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 5.0.0-alpha.0 to 5.0.0-alpha.1

4

es/index.js

@@ -1,4 +0,4 @@

import Steps from './Steps';
import Step from './Step';
import Steps from "./Steps";
import Step from "./Step";
export { Step };
export default Steps;
import _extends from "@babel/runtime/helpers/esm/extends";
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
var _excluded = ["className", "prefixCls", "style", "active", "status", "iconPrefix", "icon", "wrapperStyle", "stepNumber", "disabled", "description", "title", "subTitle", "progressDot", "stepIcon", "tailContent", "icons", "stepIndex", "onStepClick", "onClick"];

@@ -35,3 +36,3 @@

_this.onClick = function () {
_defineProperty(_assertThisInitialized(_this), "onClick", function () {
var _this$props = _this.props,

@@ -47,3 +48,3 @@ onClick = _this$props.onClick,

onStepClick(stepIndex);
};
});

@@ -50,0 +51,0 @@ return _this;

import React from 'react';
import type { Status, Icons } from './interface';
import type { Icons, Status } from './interface';
import type { StepProps } from './Step';
import Step from './Step';
import type { StepProps } from './Step';
export declare type StepIconRender = (info: {

@@ -6,0 +6,0 @@ index: number;

import _extends from "@babel/runtime/helpers/esm/extends";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
var _excluded = ["prefixCls", "style", "className", "children", "direction", "type", "labelPlacement", "iconPrefix", "status", "size", "current", "progressDot", "stepIcon", "initial", "icons", "onChange", "items"];
/* eslint react/no-did-mount-set-state: 0, react/prop-types: 0 */
import classNames from 'classnames';
import React from 'react';
import classNames from 'classnames';
import Step from './Step';
import Step from "./Step";

@@ -31,3 +33,3 @@ var Steps = /*#__PURE__*/function (_React$Component) {

_this.onStepClick = function (next) {
_defineProperty(_assertThisInitialized(_this), "onStepClick", function (next) {
var _this$props = _this.props,

@@ -40,3 +42,3 @@ onChange = _this$props.onChange,

}
};
});

@@ -80,22 +82,22 @@ return _this;

style: style
}, restProps), (items || []).filter(function (item) {
}, restProps), items.filter(function (item) {
return item;
}).map(function (item, index) {
var mergedItem = _objectSpread({}, item);
var stepNumber = initial + index; // fix tail color
if (status === 'error' && index === current - 1) {
item.className = "".concat(prefixCls, "-next-error");
mergedItem.className = "".concat(prefixCls, "-next-error");
}
if (!item.status) {
if (stepNumber === current) {
item.status = status;
} else if (stepNumber < current) {
item.status = 'finish';
} else {
item.status = 'wait';
}
if (stepNumber === current) {
mergedItem.status = status;
} else if (stepNumber < current) {
mergedItem.status = 'finish';
} else {
mergedItem.status = 'wait';
}
return /*#__PURE__*/React.createElement(Step, _extends({}, item, {
return /*#__PURE__*/React.createElement(Step, _extends({
active: stepNumber === current,

@@ -112,3 +114,3 @@ stepNumber: stepNumber + 1,

onStepClick: onChange && _this2.onStepClick
}));
}, mergedItem));
}));

@@ -121,4 +123,5 @@ }

Steps.Step = Step;
Steps.defaultProps = {
_defineProperty(Steps, "Step", Step);
_defineProperty(Steps, "defaultProps", {
type: 'default',

@@ -134,3 +137,4 @@ prefixCls: 'rc-steps',

progressDot: false
};
});
export { Steps as default };

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

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));

@@ -25,2 +23,4 @@

var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));

@@ -30,2 +30,4 @@

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var React = _interopRequireWildcard(require("react"));

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

_this = _super.call.apply(_super, [this].concat(_args));
_this.onClick = function () {
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onClick", function () {
var _this$props = _this.props,

@@ -69,4 +70,3 @@ onClick = _this$props.onClick,

onStepClick(stepIndex);
};
});
return _this;

@@ -73,0 +73,0 @@ }

import React from 'react';
import type { Status, Icons } from './interface';
import type { Icons, Status } from './interface';
import type { StepProps } from './Step';
import Step from './Step';
import type { StepProps } from './Step';
export declare type StepIconRender = (info: {

@@ -6,0 +6,0 @@ index: number;

@@ -12,3 +12,3 @@ "use strict";

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));

@@ -21,2 +21,4 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));

@@ -26,6 +28,8 @@

var _react = _interopRequireDefault(require("react"));
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _classnames = _interopRequireDefault(require("classnames"));
var _react = _interopRequireDefault(require("react"));
var _Step = _interopRequireDefault(require("./Step"));

@@ -50,4 +54,3 @@

_this = _super.call.apply(_super, [this].concat(args));
_this.onStepClick = function (next) {
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onStepClick", function (next) {
var _this$props = _this.props,

@@ -60,4 +63,3 @@ onChange = _this$props.onChange,

}
};
});
return _this;

@@ -99,22 +101,21 @@ }

style: style
}, restProps), (items || []).filter(function (item) {
}, restProps), items.filter(function (item) {
return item;
}).map(function (item, index) {
var mergedItem = (0, _objectSpread2.default)({}, item);
var stepNumber = initial + index; // fix tail color
if (status === 'error' && index === current - 1) {
item.className = "".concat(prefixCls, "-next-error");
mergedItem.className = "".concat(prefixCls, "-next-error");
}
if (!item.status) {
if (stepNumber === current) {
item.status = status;
} else if (stepNumber < current) {
item.status = 'finish';
} else {
item.status = 'wait';
}
if (stepNumber === current) {
mergedItem.status = status;
} else if (stepNumber < current) {
mergedItem.status = 'finish';
} else {
mergedItem.status = 'wait';
}
return /*#__PURE__*/_react.default.createElement(_Step.default, (0, _extends2.default)({}, item, {
return /*#__PURE__*/_react.default.createElement(_Step.default, (0, _extends2.default)({
active: stepNumber === current,

@@ -131,3 +132,3 @@ stepNumber: stepNumber + 1,

onStepClick: onChange && _this2.onStepClick
}));
}, mergedItem));
}));

@@ -140,4 +141,4 @@ }

exports.default = Steps;
Steps.Step = _Step.default;
Steps.defaultProps = {
(0, _defineProperty2.default)(Steps, "Step", _Step.default);
(0, _defineProperty2.default)(Steps, "defaultProps", {
type: 'default',

@@ -153,2 +154,2 @@ prefixCls: 'rc-steps',

progressDot: false
};
});
{
"name": "rc-steps",
"version": "5.0.0-alpha.0",
"version": "5.0.0-alpha.1",
"description": "steps ui component for react",
"engines": {
"node": ">=8.x"
},
"keywords": [

@@ -13,12 +10,11 @@ "react",

],
"files": [
"assets/*.css",
"dist",
"es",
"lib"
],
"main": "./lib/index",
"module": "./es/index",
"types": "./lib/index.d.ts",
"homepage": "http://github.com/react-component/steps",
"bugs": {
"url": "http://github.com/react-component/steps/issues"
},
"repository": {
"type": "git",
"url": " git+ssh://git@github.com/react-component/steps.git"
},
"license": "MIT",
"maintainers": [

@@ -30,27 +26,38 @@ {

],
"repository": {
"type": "git",
"url": " git+ssh://git@github.com/react-component/steps.git"
},
"bugs": {
"url": "http://github.com/react-component/steps/issues"
},
"license": "MIT",
"main": "./lib/index",
"module": "./es/index",
"types": "./lib/index.d.ts",
"files": [
"assets/*.css",
"dist",
"es",
"lib"
],
"scripts": {
"start": "dumi dev",
"build": "dumi build",
"compile": "father build && lessc assets/index.less assets/index.css",
"gh-pages": "npm run build && father doc deploy",
"coverage": "umi-test --coverage",
"docs:build": "dumi build",
"docs:deploy": "gh-pages -d .doc",
"gh-pages": "npm run docs:build && npm run docs:deploy",
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md",
"prepare": "husky install",
"prepublishOnly": "npm run compile && np --yolo --no-publish",
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
"postpublish": "npm run gh-pages",
"lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md",
"prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
"test": "father test",
"coverage": "father test --coverage"
"start": "dumi dev",
"test": "umi-test"
},
"peerDependencies": {
"react": ">=16.9.0",
"react-dom": ">=16.9.0"
"lint-staged": {
"**/*.{js,jsx,tsx,ts,md,json}": [
"prettier --write",
"git add"
]
},
"dependencies": {
"@babel/runtime": "^7.16.7",
"classnames": "^2.2.3",
"rc-util": "^5.16.1"
},
"devDependencies": {
"@rc-component/father-plugin": "^1.0.1",
"@types/classnames": "^2.2.9",

@@ -68,4 +75,6 @@ "@types/enzyme": "^3.10.11",

"eslint": "^7.1.0",
"father": "^2.30.13",
"father": "^4",
"husky": "^8.0.1",
"less": "^3.11.2",
"lint-staged": "^13.0.3",
"np": "^7.6.0",

@@ -78,9 +87,12 @@ "prettier": "^2.5.1",

"react-dom": "^16.0.0",
"typescript": "^4.5.4"
"typescript": "^4.5.4",
"umi-test": "^1.9.7"
},
"dependencies": {
"@babel/runtime": "^7.16.7",
"classnames": "^2.2.3",
"rc-util": "^5.16.1"
"peerDependencies": {
"react": ">=16.9.0",
"react-dom": ">=16.9.0"
},
"engines": {
"node": ">=8.x"
}
}
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