Comparing version 2.5.1 to 2.5.2
@@ -51,20 +51,19 @@ 'use strict'; | ||
var _props = this.props; | ||
var className = _props.className; | ||
var prefixCls = _props.prefixCls; | ||
var style = _props.style; | ||
var itemWidth = _props.itemWidth; | ||
var _props$status = _props.status; | ||
var status = _props$status === undefined ? 'wait' : _props$status; | ||
var iconPrefix = _props.iconPrefix; | ||
var icon = _props.icon; | ||
var wrapperStyle = _props.wrapperStyle; | ||
var adjustMarginRight = _props.adjustMarginRight; | ||
var stepNumber = _props.stepNumber; | ||
var description = _props.description; | ||
var title = _props.title; | ||
var progressDot = _props.progressDot; | ||
var _props = this.props, | ||
className = _props.className, | ||
prefixCls = _props.prefixCls, | ||
style = _props.style, | ||
itemWidth = _props.itemWidth, | ||
_props$status = _props.status, | ||
status = _props$status === undefined ? 'wait' : _props$status, | ||
iconPrefix = _props.iconPrefix, | ||
icon = _props.icon, | ||
wrapperStyle = _props.wrapperStyle, | ||
adjustMarginRight = _props.adjustMarginRight, | ||
stepNumber = _props.stepNumber, | ||
description = _props.description, | ||
title = _props.title, | ||
progressDot = _props.progressDot, | ||
restProps = _objectWithoutProperties(_props, ['className', 'prefixCls', 'style', 'itemWidth', 'status', 'iconPrefix', 'icon', 'wrapperStyle', 'adjustMarginRight', 'stepNumber', 'description', 'title', 'progressDot']); | ||
var restProps = _objectWithoutProperties(_props, ['className', 'prefixCls', 'style', 'itemWidth', 'status', 'iconPrefix', 'icon', 'wrapperStyle', 'adjustMarginRight', 'stepNumber', 'description', 'title', 'progressDot']); | ||
var iconClassName = (0, _classnames2["default"])((_classNames = {}, _defineProperty(_classNames, prefixCls + '-icon', true), _defineProperty(_classNames, iconPrefix + 'icon', true), _defineProperty(_classNames, iconPrefix + 'icon-' + icon, icon && isString(icon)), _defineProperty(_classNames, iconPrefix + 'icon-check', !icon && status === 'finish'), _defineProperty(_classNames, iconPrefix + 'icon-cross', !icon && status === 'error'), _classNames)); | ||
@@ -71,0 +70,0 @@ |
@@ -98,18 +98,21 @@ 'use strict'; | ||
var props = this.props; | ||
var prefixCls = props.prefixCls; | ||
var _props$style = props.style; | ||
var style = _props$style === undefined ? {} : _props$style; | ||
var className = props.className; | ||
var children = props.children; | ||
var direction = props.direction; | ||
var labelPlacement = props.labelPlacement; | ||
var iconPrefix = props.iconPrefix; | ||
var status = props.status; | ||
var size = props.size; | ||
var current = props.current; | ||
var progressDot = props.progressDot; | ||
var restProps = _objectWithoutProperties(props, ['prefixCls', 'style', 'className', 'children', 'direction', 'labelPlacement', 'iconPrefix', 'status', 'size', 'current', 'progressDot']); | ||
var prefixCls = props.prefixCls, | ||
_props$style = props.style, | ||
style = _props$style === undefined ? {} : _props$style, | ||
className = props.className, | ||
children = props.children, | ||
direction = props.direction, | ||
labelPlacement = props.labelPlacement, | ||
iconPrefix = props.iconPrefix, | ||
status = props.status, | ||
size = props.size, | ||
current = props.current, | ||
progressDot = props.progressDot, | ||
restProps = _objectWithoutProperties(props, ['prefixCls', 'style', 'className', 'children', 'direction', 'labelPlacement', 'iconPrefix', 'status', 'size', 'current', 'progressDot']); | ||
var lastIndex = children.length - 1; | ||
var filteredChildren = _react2["default"].Children.toArray(children).filter(function (c) { | ||
return !!c; | ||
}); | ||
var lastIndex = filteredChildren.length - 1; | ||
var reLayouted = this.state.lastStepOffsetWidth > 0; | ||
@@ -122,3 +125,6 @@ var adjustedlabelPlacement = !!progressDot ? 'vertical' : labelPlacement; | ||
_extends({ className: classString, style: style }, restProps), | ||
_react2["default"].Children.map(children, function (ele, idx) { | ||
_react2["default"].Children.map(filteredChildren, function (ele, idx) { | ||
if (!ele) { | ||
return null; | ||
} | ||
var itemWidth = direction === 'vertical' || idx === lastIndex || !reLayouted ? null : 100 / lastIndex + '%'; | ||
@@ -125,0 +131,0 @@ var adjustMarginRight = direction === 'vertical' || idx === lastIndex ? null : -Math.round(_this2.state.lastStepOffsetWidth / lastIndex + 1); |
{ | ||
"name": "rc-steps", | ||
"version": "2.5.1", | ||
"version": "2.5.2", | ||
"description": "steps ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39605
1185