@salutejs/plasma-new-hope 0.191.1-canary.1532.11799177518.0 → 0.191.2-canary.1517.11801064973.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Steps/Steps.css +10 -10
- package/cjs/components/Steps/Steps.js +21 -14
- package/cjs/components/Steps/Steps.js.map +1 -1
- package/cjs/components/Steps/Steps.styles.js +1 -1
- package/cjs/components/Steps/Steps.styles.js.map +1 -1
- package/cjs/components/Steps/{Steps.styles_1xmqxqu.css → Steps.styles_wa45kj.css} +1 -1
- package/cjs/components/Steps/Steps.tokens.js +1 -0
- package/cjs/components/Steps/Steps.tokens.js.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.css +9 -9
- package/cjs/components/Steps/ui/StepItem/StepItem.js +32 -8
- package/cjs/components/Steps/ui/StepItem/StepItem.js.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +6 -6
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles_acxstj.css +9 -0
- package/cjs/index.css +11 -11
- package/emotion/cjs/components/Steps/Steps.js +23 -14
- package/emotion/cjs/components/Steps/Steps.styles.js +1 -1
- package/emotion/cjs/components/Steps/Steps.tokens.js +1 -0
- package/emotion/cjs/components/Steps/ui/StepItem/StepItem.js +32 -8
- package/emotion/cjs/components/Steps/ui/StepItem/StepItem.styles.js +22 -11
- package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +5 -5
- package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/emotion/cjs/examples/plasma_web/components/Steps/Steps.config.js +5 -5
- package/emotion/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/emotion/es/components/Steps/Steps.js +24 -15
- package/emotion/es/components/Steps/Steps.styles.js +1 -1
- package/emotion/es/components/Steps/Steps.tokens.js +1 -0
- package/emotion/es/components/Steps/ui/StepItem/StepItem.js +32 -8
- package/emotion/es/components/Steps/ui/StepItem/StepItem.styles.js +22 -11
- package/emotion/es/examples/plasma_b2c/components/Steps/Steps.config.js +5 -5
- package/emotion/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/emotion/es/examples/plasma_web/components/Steps/Steps.config.js +5 -5
- package/emotion/es/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/es/components/Steps/Steps.css +10 -10
- package/es/components/Steps/Steps.js +23 -16
- package/es/components/Steps/Steps.js.map +1 -1
- package/es/components/Steps/Steps.styles.js +1 -1
- package/es/components/Steps/Steps.styles.js.map +1 -1
- package/es/components/Steps/{Steps.styles_1xmqxqu.css → Steps.styles_wa45kj.css} +1 -1
- package/es/components/Steps/Steps.tokens.js +1 -0
- package/es/components/Steps/Steps.tokens.js.map +1 -1
- package/es/components/Steps/ui/StepItem/StepItem.css +9 -9
- package/es/components/Steps/ui/StepItem/StepItem.js +33 -9
- package/es/components/Steps/ui/StepItem/StepItem.js.map +1 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles.js +6 -6
- package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles_acxstj.css +9 -0
- package/es/index.css +11 -11
- package/package.json +2 -2
- package/styled-components/cjs/components/Steps/Steps.js +23 -14
- package/styled-components/cjs/components/Steps/Steps.styles.js +1 -1
- package/styled-components/cjs/components/Steps/Steps.tokens.js +1 -0
- package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.js +32 -8
- package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.styles.js +17 -6
- package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/styled-components/es/components/Steps/Steps.js +24 -15
- package/styled-components/es/components/Steps/Steps.styles.js +1 -1
- package/styled-components/es/components/Steps/Steps.tokens.js +1 -0
- package/styled-components/es/components/Steps/ui/StepItem/StepItem.js +32 -8
- package/styled-components/es/components/Steps/ui/StepItem/StepItem.styles.js +17 -6
- package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_web/components/Steps/Steps.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/types/components/Steps/Steps.d.ts.map +1 -1
- package/types/components/Steps/Steps.styles.d.ts.map +1 -1
- package/types/components/Steps/Steps.tokens.d.ts +1 -0
- package/types/components/Steps/Steps.tokens.d.ts.map +1 -1
- package/types/components/Steps/ui/StepItem/StepItem.d.ts.map +1 -1
- package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts +2 -2
- package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Steps/Steps.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Steps/Steps.config.d.ts.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +0 -9
- package/es/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +0 -9
@@ -1,6 +1,8 @@
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
2
|
var _excluded = ["view", "size", "orientation", "contentAlign", "hasLine", "hasContent", "hasLoader", "items", "onChange", "current", "status"];
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
4
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
5
7
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
6
8
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
@@ -12,7 +14,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
12
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
13
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; }
|
14
16
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
15
|
-
import React, { forwardRef, useState, useEffect } from 'react';
|
17
|
+
import React, { forwardRef, useState, useEffect, useMemo } from 'react';
|
16
18
|
import cls from 'classnames';
|
17
19
|
import { classes } from './Steps.tokens';
|
18
20
|
import { StepItem } from './ui';
|
@@ -44,19 +46,33 @@ export var stepsRoot = function stepsRoot(Root) {
|
|
44
46
|
_useState2 = _slicedToArray(_useState, 2),
|
45
47
|
prevIndex = _useState2[0],
|
46
48
|
setPrevIndex = _useState2[1];
|
47
|
-
var isUncontrolled = current !== undefined;
|
48
49
|
var hasIndicator = items.some(function (item) {
|
49
50
|
return item.indicator != null;
|
50
51
|
});
|
51
52
|
var isSimple = items.every(function (item) {
|
52
53
|
return !item.title && !item.content;
|
53
54
|
});
|
55
|
+
var innerItems = useMemo(function () {
|
56
|
+
var isUncontrolled = current !== undefined;
|
57
|
+
return items.map(function (item, index) {
|
58
|
+
var itemStatus = getItemStatus({
|
59
|
+
isUncontrolled: isUncontrolled,
|
60
|
+
current: current,
|
61
|
+
status: status,
|
62
|
+
index: index,
|
63
|
+
item: item
|
64
|
+
});
|
65
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
66
|
+
status: itemStatus
|
67
|
+
});
|
68
|
+
});
|
69
|
+
}, [status, current, items]);
|
54
70
|
useEffect(function () {
|
55
71
|
var calcPrevIndex = function calcPrevIndex() {
|
56
72
|
if (current !== undefined) {
|
57
73
|
setPrevIndex(current);
|
58
74
|
} else {
|
59
|
-
var index =
|
75
|
+
var index = innerItems.findIndex(function (item) {
|
60
76
|
return item.status === 'active';
|
61
77
|
});
|
62
78
|
setPrevIndex(index !== -1 ? index : undefined);
|
@@ -66,21 +82,14 @@ export var stepsRoot = function stepsRoot(Root) {
|
|
66
82
|
return function () {
|
67
83
|
calcPrevIndex();
|
68
84
|
};
|
69
|
-
}, [current,
|
85
|
+
}, [current, innerItems]);
|
70
86
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
71
87
|
size: size,
|
72
88
|
view: view,
|
73
89
|
ref: outerRef,
|
74
90
|
className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, orientation === 'vertical'), classes.simple, isSimple), classes.hasIndicator, hasIndicator))
|
75
|
-
}, rest),
|
76
|
-
var
|
77
|
-
isUncontrolled: isUncontrolled,
|
78
|
-
current: current,
|
79
|
-
status: status,
|
80
|
-
index: index,
|
81
|
-
item: item
|
82
|
-
});
|
83
|
-
var isActive = itemStatus === 'active';
|
91
|
+
}, rest), innerItems.map(function (item, index) {
|
92
|
+
var isActive = item.status === 'active';
|
84
93
|
var itemContent = hasContent === 'active' && !isActive || hasContent === 'none' ? '' : item.content;
|
85
94
|
var itemContentAlign = orientation === 'horizontal' ? contentAlign : 'left';
|
86
95
|
var onClick = onChange ? function () {
|
@@ -92,14 +101,14 @@ export var stepsRoot = function stepsRoot(Root) {
|
|
92
101
|
title: item.title,
|
93
102
|
content: itemContent,
|
94
103
|
indicator: item.indicator,
|
95
|
-
status:
|
104
|
+
status: item.status,
|
96
105
|
size: size,
|
97
106
|
orientation: orientation,
|
98
107
|
contentAlign: itemContentAlign,
|
99
108
|
hasLine: hasLine,
|
100
109
|
hasLoader: hasLoader && isActive,
|
101
110
|
onClick: onClick,
|
102
|
-
items:
|
111
|
+
items: innerItems
|
103
112
|
});
|
104
113
|
}));
|
105
114
|
});
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { css } from '@emotion/react';
|
2
2
|
import { classes, tokens } from './Steps.tokens';
|
3
|
-
export var base = /*#__PURE__*/css("display:flex;flex-direction:row;&.", classes.simple, "{align-items:center;&:not(&.", classes.verticalOrientation, "){&.", classes.hasIndicator, "{height:var(", tokens.activeIndicatorSize, ");}&:not(.", classes.hasIndicator, "){height:var(", tokens.activeBulletSize, ");}}&.", classes.verticalOrientation, "{&.", classes.hasIndicator, "{width:var(", tokens.activeIndicatorSize, ");}&:not(.", classes.hasIndicator, "){width:var(", tokens.activeBulletSize, ");}}}&.", classes.verticalOrientation, "{display:flex;flex-direction:column;justify-content:center;height:100
|
3
|
+
export var base = /*#__PURE__*/css("display:flex;flex-direction:row;&.", classes.simple, "{align-items:center;&:not(&.", classes.verticalOrientation, "){&.", classes.hasIndicator, "{height:var(", tokens.activeIndicatorSize, ");}&:not(.", classes.hasIndicator, "){height:var(", tokens.activeBulletSize, ");}}&.", classes.verticalOrientation, "{&.", classes.hasIndicator, "{width:var(", tokens.activeIndicatorSize, ");}&:not(.", classes.hasIndicator, "){width:var(", tokens.activeBulletSize, ");}}}&.", classes.verticalOrientation, "{display:flex;flex-direction:column;justify-content:center;height:100%;};label:plasma-new-hope__base;" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvU3RlcHMvU3RlcHMuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUl1QiIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL1N0ZXBzL1N0ZXBzLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHsgY2xhc3NlcywgdG9rZW5zIH0gZnJvbSAnLi9TdGVwcy50b2tlbnMnO1xuXG5leHBvcnQgY29uc3QgYmFzZSA9IGNzc2BcbiAgICBkaXNwbGF5OiBmbGV4O1xuICAgIGZsZXgtZGlyZWN0aW9uOiByb3c7XG5cbiAgICAmLiR7Y2xhc3Nlcy5zaW1wbGV9IHtcbiAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcblxuICAgICAgICAmOm5vdCgmLiR7Y2xhc3Nlcy52ZXJ0aWNhbE9yaWVudGF0aW9ufSkge1xuICAgICAgICAgICAgJi4ke2NsYXNzZXMuaGFzSW5kaWNhdG9yfSB7XG4gICAgICAgICAgICAgICAgaGVpZ2h0OiB2YXIoJHt0b2tlbnMuYWN0aXZlSW5kaWNhdG9yU2l6ZX0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmOm5vdCguJHtjbGFzc2VzLmhhc0luZGljYXRvcn0pIHtcbiAgICAgICAgICAgICAgICBoZWlnaHQ6IHZhcigke3Rva2Vucy5hY3RpdmVCdWxsZXRTaXplfSk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAmLiR7Y2xhc3Nlcy52ZXJ0aWNhbE9yaWVudGF0aW9ufSB7XG4gICAgICAgICAgICAmLiR7Y2xhc3Nlcy5oYXNJbmRpY2F0b3J9IHtcbiAgICAgICAgICAgICAgICB3aWR0aDogdmFyKCR7dG9rZW5zLmFjdGl2ZUluZGljYXRvclNpemV9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgICY6bm90KC4ke2NsYXNzZXMuaGFzSW5kaWNhdG9yfSkge1xuICAgICAgICAgICAgICAgIHdpZHRoOiB2YXIoJHt0b2tlbnMuYWN0aXZlQnVsbGV0U2l6ZX0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgJi4ke2NsYXNzZXMudmVydGljYWxPcmllbnRhdGlvbn0ge1xuICAgICAgICBkaXNwbGF5OiBmbGV4O1xuICAgICAgICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbiAgICAgICAgaGVpZ2h0OiAxMDAlO1xuICAgIH1cbmA7XG4iXX0= */"));
|
@@ -56,6 +56,7 @@ export var tokens = {
|
|
56
56
|
inactiveTitleColor: '--plasma-step-item-inactive-title-color',
|
57
57
|
inactiveTitleColorHover: '--plasma-step-item-inactive-title-color-hover',
|
58
58
|
contentColor: '--plasma-step-item-content-color',
|
59
|
+
focusColor: '--plasma-step-item-focus-color',
|
59
60
|
activeIndicatorBorder: '--plasma-step-item-active-indicator-border',
|
60
61
|
activeIndicatorBorderHover: '--plasma-step-item-active-indicator-border-hover',
|
61
62
|
activeIndicatorColor: '--plasma-step-item-active-indicator-color',
|
@@ -43,6 +43,7 @@ export var StepItem = function StepItem(_ref) {
|
|
43
43
|
var prevItem = items[index - 1];
|
44
44
|
var nextItem = items[index + 1];
|
45
45
|
var isActive = status === 'active';
|
46
|
+
var isNextActive = (nextItem === null || nextItem === void 0 ? void 0 : nextItem.status) === 'active';
|
46
47
|
var isInactive = status === 'inactive';
|
47
48
|
var isPrevInactive = prevItem && !(prevItem !== null && prevItem !== void 0 && prevItem.status) || (prevItem === null || prevItem === void 0 ? void 0 : prevItem.status) === 'inactive';
|
48
49
|
var isNextInactive = !(nextItem !== null && nextItem !== void 0 && nextItem.status) || (nextItem === null || nextItem === void 0 ? void 0 : nextItem.status) === 'inactive';
|
@@ -80,8 +81,32 @@ export var StepItem = function StepItem(_ref) {
|
|
80
81
|
setIsHovered(false);
|
81
82
|
}
|
82
83
|
}, [isDisabled]);
|
84
|
+
if (isSimple) {
|
85
|
+
var _cls;
|
86
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StepItemStyled, {
|
87
|
+
className: cls((_cls = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_cls, classes.simple, isSimple), classes.active, isActive), classes.hovered, isHovered && !isActive), classes.inactive, isInactive), classes.centered, isCentered), classes.disabled, isDisabled), classes.clickable, clickable && !isActive), classes.hasIndicator, hasIndicator), classes.transparentDivider, !hasLine), classes.verticalOrientation, isVertical), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_cls, "isFirst", isFirst), "isLast", isLast), "isPrevInactive", isPrevInactive), "isNextInactive", isNextInactive)))
|
88
|
+
}, /*#__PURE__*/React.createElement(BulletIndicatorWrapper, {
|
89
|
+
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.centered, isCentered), classes.simple, isSimple), classes.hasIndicator, hasIndicator)),
|
90
|
+
onClick: onClickHandler,
|
91
|
+
onFocus: onMouseOver,
|
92
|
+
onBlur: onMouseOut,
|
93
|
+
onMouseOver: onMouseOver,
|
94
|
+
onMouseOut: onMouseOut
|
95
|
+
}, hasLoader && /*#__PURE__*/React.createElement(SpinnerStyled, {
|
96
|
+
hasIndicator: hasIndicator
|
97
|
+
}), !hasLoader && /*#__PURE__*/React.createElement(BulletNode, {
|
98
|
+
className: cls(_defineProperty(_defineProperty({}, classes.active, isActive), classes.inactive, isInactive)),
|
99
|
+
disabled: isDisabled
|
100
|
+
}, typeof indicator === 'function' && indicator({
|
101
|
+
status: status,
|
102
|
+
item: item,
|
103
|
+
size: size
|
104
|
+
}), typeof indicator !== 'function' && indicator))), !isLast && /*#__PURE__*/React.createElement(StepItemDivider, {
|
105
|
+
className: cls(classes.simple, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.transparentDivider, !hasLine), classes.active, isActive), classes.inactive, isInactive || isNextInactive), classes.disabled, isDisabled))
|
106
|
+
}));
|
107
|
+
}
|
83
108
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StepItemStyled, {
|
84
|
-
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.active, isActive), classes.hovered, isHovered && !isActive), classes.inactive, isInactive), classes.centered, isCentered), classes.disabled, isDisabled), classes.clickable, clickable && !isActive), classes.hasIndicator, hasIndicator), classes.verticalOrientation, isVertical))
|
109
|
+
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.active, isActive), classes.hovered, isHovered && !isActive), classes.inactive, isInactive), classes.centered, isCentered), classes.disabled, isDisabled), classes.clickable, clickable && !isActive), classes.hasIndicator, hasIndicator), classes.verticalOrientation, isVertical), "isNextActive", isNextActive))
|
85
110
|
}, /*#__PURE__*/React.createElement(BulletIndicatorWrapper, {
|
86
111
|
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.centered, isCentered), classes.simple, isSimple), classes.hasIndicator, hasIndicator)),
|
87
112
|
onClick: onClickHandler,
|
@@ -91,20 +116,21 @@ export var StepItem = function StepItem(_ref) {
|
|
91
116
|
onMouseOut: onMouseOut
|
92
117
|
}, contentAlign === 'center' && !isSimple && /*#__PURE__*/React.createElement(StepItemDivider, {
|
93
118
|
className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine || isFirst), classes.inactive, isInactive || isPrevInactive))
|
94
|
-
}), isVertical &&
|
119
|
+
}), isVertical && /*#__PURE__*/React.createElement(StepItemDivider, {
|
95
120
|
className: cls(classes.indentDivider, _defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine || isFirst), classes.inactive, isInactive || isPrevInactive)),
|
96
121
|
indentToken: indentToken
|
97
122
|
}), hasLoader && /*#__PURE__*/React.createElement(SpinnerStyled, {
|
98
123
|
hasIndicator: hasIndicator
|
99
124
|
}), !hasLoader && /*#__PURE__*/React.createElement(BulletNode, {
|
100
|
-
className: cls(_defineProperty(_defineProperty({}, classes.active, isActive), classes.inactive, isInactive))
|
125
|
+
className: cls(_defineProperty(_defineProperty({}, classes.active, isActive), classes.inactive, isInactive)),
|
126
|
+
disabled: isDisabled
|
101
127
|
}, typeof indicator === 'function' && indicator({
|
102
128
|
status: status,
|
103
129
|
item: item,
|
104
130
|
size: size
|
105
|
-
}), typeof indicator !== 'function' && indicator),
|
131
|
+
}), typeof indicator !== 'function' && indicator), /*#__PURE__*/React.createElement(StepItemDivider, {
|
106
132
|
className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine || isLast), classes.inactive, isInactive || isNextInactive))
|
107
|
-
})),
|
133
|
+
})), /*#__PURE__*/React.createElement(StepItemContentWrapper, {
|
108
134
|
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.centered, isCentered), classes.active, isActive), classes.hasIndicator, hasIndicator))
|
109
135
|
}, /*#__PURE__*/React.createElement(StepItemTitle, {
|
110
136
|
onClick: onClickHandler,
|
@@ -112,7 +138,5 @@ export var StepItem = function StepItem(_ref) {
|
|
112
138
|
onBlur: onMouseOut,
|
113
139
|
onMouseOver: onMouseOver,
|
114
140
|
onMouseOut: onMouseOut
|
115
|
-
}, title), content && /*#__PURE__*/React.createElement(StepItemContent, null, typeof content === 'function' ? content(status, index, items) : content)))
|
116
|
-
className: cls(classes.simple, _defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.transparentDivider, !hasLine), classes.inactive, isInactive || isNextInactive))
|
117
|
-
}));
|
141
|
+
}, title), content && /*#__PURE__*/React.createElement(StepItemContent, null, typeof content === 'function' ? content(status, index, items) : content))));
|
118
142
|
};
|