carbon-react 104.31.1 → 104.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/step-sequence/step-sequence-item/step-sequence-item.component.d.ts +3 -0
- package/lib/components/step-sequence/step-sequence-item/step-sequence-item.component.js +8 -2
- package/lib/components/step-sequence/step-sequence-item/step-sequence-item.d.ts +2 -0
- package/package.json +1 -1
|
@@ -4,6 +4,7 @@ declare namespace StepSequenceItem {
|
|
|
4
4
|
namespace propTypes {
|
|
5
5
|
const children: PropTypes.Validator<string | number | boolean | {} | PropTypes.ReactElementLike | PropTypes.ReactNodeArray>;
|
|
6
6
|
const indicator: PropTypes.Validator<string>;
|
|
7
|
+
const hideIndicator: PropTypes.Requireable<boolean>;
|
|
7
8
|
const ariaLabel: PropTypes.Requireable<string>;
|
|
8
9
|
const status: PropTypes.Requireable<string>;
|
|
9
10
|
const hiddenCompleteLabel: PropTypes.Requireable<string>;
|
|
@@ -12,6 +13,8 @@ declare namespace StepSequenceItem {
|
|
|
12
13
|
namespace defaultProps {
|
|
13
14
|
const status_1: string;
|
|
14
15
|
export { status_1 as status };
|
|
16
|
+
const hideIndicator_1: boolean;
|
|
17
|
+
export { hideIndicator_1 as hideIndicator };
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
20
|
import PropTypes from "prop-types";
|
|
@@ -24,7 +24,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
24
24
|
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); }
|
|
25
25
|
|
|
26
26
|
const StepSequenceItem = props => {
|
|
27
|
-
const indicatorText = () =>
|
|
27
|
+
const indicatorText = () => {
|
|
28
|
+
return !props.hideIndicator ? /*#__PURE__*/_react.default.createElement(_stepSequenceItemIndicator.default, null, props.indicator) : null;
|
|
29
|
+
};
|
|
28
30
|
|
|
29
31
|
const icon = () => props.status === "complete" ? /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
30
32
|
type: "tick"
|
|
@@ -62,6 +64,9 @@ StepSequenceItem.propTypes = {
|
|
|
62
64
|
/** Value to be displayed before text for uncompleted steps */
|
|
63
65
|
indicator: _propTypes.default.string.isRequired,
|
|
64
66
|
|
|
67
|
+
/** Flag to hide the indicator for uncompleted steps */
|
|
68
|
+
hideIndicator: _propTypes.default.bool,
|
|
69
|
+
|
|
65
70
|
/** Aria label */
|
|
66
71
|
ariaLabel: _propTypes.default.string,
|
|
67
72
|
|
|
@@ -75,7 +80,8 @@ StepSequenceItem.propTypes = {
|
|
|
75
80
|
hiddenCurrentLabel: _propTypes.default.string
|
|
76
81
|
};
|
|
77
82
|
StepSequenceItem.defaultProps = {
|
|
78
|
-
status: "incomplete"
|
|
83
|
+
status: "incomplete",
|
|
84
|
+
hideIndicator: false
|
|
79
85
|
};
|
|
80
86
|
var _default = StepSequenceItem;
|
|
81
87
|
exports.default = _default;
|
|
@@ -9,6 +9,8 @@ export interface StepSequenceItemProps {
|
|
|
9
9
|
hiddenCurrentLabel?: string;
|
|
10
10
|
/** Value to be displayed before text for uncomplete steps */
|
|
11
11
|
indicator: string;
|
|
12
|
+
/** Flag to hide the indicator for uncomplete steps */
|
|
13
|
+
hideIndicator?: boolean;
|
|
12
14
|
/** Status for the step */
|
|
13
15
|
status?: "complete" | "current" | "incomplete";
|
|
14
16
|
}
|