@carbon/ibm-products 2.43.2-canary.30 → 2.43.2-canary.31
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.
@@ -0,0 +1,87 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
9
|
+
import React__default from 'react';
|
10
|
+
import PropTypes from '../../node_modules/prop-types/index.js';
|
11
|
+
import cx from 'classnames';
|
12
|
+
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
13
|
+
import { pkg } from '../../settings.js';
|
14
|
+
import { InlineLoading } from '@carbon/react';
|
15
|
+
import { CircleStroke, ErrorOutline, CheckmarkOutline } from '@carbon/react/icons';
|
16
|
+
|
17
|
+
var _CircleStroke, _InlineLoading, _ErrorOutline, _CheckmarkOutline;
|
18
|
+
var _excluded = ["className", "description", "errorMessage", "status"];
|
19
|
+
|
20
|
+
// The block part of our conventional BEM class names (blockClass__E--M).
|
21
|
+
var blockClass = "".concat(pkg.prefix, "--status-indicator-step");
|
22
|
+
var componentName = 'StatusIndicatorStep';
|
23
|
+
var defaults = {
|
24
|
+
status: 'inactive'
|
25
|
+
};
|
26
|
+
|
27
|
+
/**
|
28
|
+
* An icon/description pair that describes one step of the `StatusIndicator`.
|
29
|
+
*/
|
30
|
+
var StatusIndicatorStep = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
31
|
+
var className = _ref.className,
|
32
|
+
description = _ref.description,
|
33
|
+
errorMessage = _ref.errorMessage,
|
34
|
+
_ref$status = _ref.status,
|
35
|
+
status = _ref$status === void 0 ? defaults.status : _ref$status,
|
36
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
37
|
+
return /*#__PURE__*/React__default.createElement("li", _extends({}, rest, {
|
38
|
+
className: cx(blockClass, className, "".concat(blockClass, "--").concat(status)),
|
39
|
+
ref: ref
|
40
|
+
}, getDevtoolsProps(componentName)), /*#__PURE__*/React__default.createElement("div", {
|
41
|
+
className: "".concat(blockClass, "__details")
|
42
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
43
|
+
className: "".concat(blockClass, "__icon")
|
44
|
+
}, status === 'inactive' && (_CircleStroke || (_CircleStroke = /*#__PURE__*/React__default.createElement(CircleStroke, {
|
45
|
+
size: 16,
|
46
|
+
viewBox: "1 1 14 14"
|
47
|
+
}))), status === 'active' && (_InlineLoading || (_InlineLoading = /*#__PURE__*/React__default.createElement(InlineLoading, null))), status === 'error' && (_ErrorOutline || (_ErrorOutline = /*#__PURE__*/React__default.createElement(ErrorOutline, {
|
48
|
+
size: 16
|
49
|
+
}))), status === 'finished' && (_CheckmarkOutline || (_CheckmarkOutline = /*#__PURE__*/React__default.createElement(CheckmarkOutline, {
|
50
|
+
size: 16
|
51
|
+
})))), /*#__PURE__*/React__default.createElement("div", {
|
52
|
+
className: "".concat(blockClass, "__text")
|
53
|
+
}, description)), status === 'error' && errorMessage && /*#__PURE__*/React__default.createElement("div", {
|
54
|
+
className: "".concat(blockClass, "__error-message")
|
55
|
+
}, errorMessage));
|
56
|
+
});
|
57
|
+
|
58
|
+
// Return a placeholder if not released and not enabled by feature flag
|
59
|
+
StatusIndicatorStep = pkg.checkComponentEnabled(StatusIndicatorStep, componentName);
|
60
|
+
|
61
|
+
// The display name of the component, used by React. Note that displayName
|
62
|
+
// is used in preference to relying on function.name.
|
63
|
+
StatusIndicatorStep.displayName = componentName;
|
64
|
+
|
65
|
+
// The types and DocGen commentary for the component props,
|
66
|
+
// in alphabetical order (for consistency).
|
67
|
+
// See https://www.npmjs.com/package/prop-types#usage.
|
68
|
+
StatusIndicatorStep.propTypes = {
|
69
|
+
/**
|
70
|
+
* Provide an optional class to be applied to the containing node.
|
71
|
+
*/
|
72
|
+
className: PropTypes.string,
|
73
|
+
/**
|
74
|
+
* The text associated with the icon.
|
75
|
+
*/
|
76
|
+
description: PropTypes.string.isRequired,
|
77
|
+
/**
|
78
|
+
* This message will appear below the description if the `status` is "error".
|
79
|
+
*/
|
80
|
+
errorMessage: PropTypes.string,
|
81
|
+
/**
|
82
|
+
* Each `status` represents a different icon..
|
83
|
+
*/
|
84
|
+
status: PropTypes.oneOf(['inactive', 'active', 'error', 'finished']).isRequired
|
85
|
+
};
|
86
|
+
|
87
|
+
export { StatusIndicatorStep };
|
package/es/components/index.d.ts
CHANGED
@@ -50,7 +50,6 @@ export { Nav } from "./Nav";
|
|
50
50
|
export { StringFormatter } from "./StringFormatter";
|
51
51
|
export { UserAvatar } from "./UserAvatar";
|
52
52
|
export { ScrollGradient } from "./ScrollGradient";
|
53
|
-
export { StatusIndicator } from "./StatusIndicator";
|
54
53
|
export { TagOverflow } from "./TagOverflow";
|
55
54
|
export { ActionBar } from "./ActionBar";
|
56
55
|
export { ConditionBuilder } from "./ConditionBuilder";
|
@@ -68,5 +67,6 @@ export { EditTearsheet, EditTearsheetForm } from "./EditTearsheet";
|
|
68
67
|
export { Guidebanner, GuidebannerElement, GuidebannerElementButton, GuidebannerElementLink } from "./Guidebanner";
|
69
68
|
export { InlineTip, InlineTipButton, InlineTipLink } from "./InlineTip";
|
70
69
|
export { DescriptionList, DescriptionListBody, DescriptionListCell, DescriptionListRow } from "./DescriptionList";
|
70
|
+
export { StatusIndicator, StatusIndicatorStep } from "./StatusIndicator";
|
71
71
|
export { FilterPanel, FilterPanelAccordion, FilterPanelAccordionItem, FilterPanelCheckbox, FilterPanelCheckboxWithOverflow, FilterPanelGroup, FilterPanelLabel, FilterPanelSearch } from "./FilterPanel";
|
72
72
|
export { FeatureFlags as unstable_FeatureFlags, useFeatureFlag as unstable_useFeatureFlag, useFeatureFlags as unstable_useFeatureFlags } from "./FeatureFlags";
|
package/es/index.js
CHANGED
@@ -122,6 +122,7 @@ export { StringFormatter } from './components/StringFormatter/StringFormatter.js
|
|
122
122
|
export { UserAvatar } from './components/UserAvatar/UserAvatar.js';
|
123
123
|
export { ScrollGradient } from './components/ScrollGradient/ScrollGradient.js';
|
124
124
|
export { StatusIndicator } from './components/StatusIndicator/StatusIndicator.js';
|
125
|
+
export { StatusIndicatorStep } from './components/StatusIndicator/StatusIndicatorStep.js';
|
125
126
|
export { TagOverflow } from './components/TagOverflow/TagOverflow.js';
|
126
127
|
export { ActionBar } from './components/ActionBar/ActionBar.js';
|
127
128
|
export { FilterPanel } from './components/FilterPanel/FilterPanel.js';
|
@@ -0,0 +1,94 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright IBM Corp. 2020, 2024
|
3
|
+
*
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
6
|
+
*/
|
7
|
+
|
8
|
+
'use strict';
|
9
|
+
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
11
|
+
|
12
|
+
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
13
|
+
var React = require('react');
|
14
|
+
var index = require('../../node_modules/prop-types/index.js');
|
15
|
+
var cx = require('classnames');
|
16
|
+
var devtools = require('../../global/js/utils/devtools.js');
|
17
|
+
var settings = require('../../settings.js');
|
18
|
+
var react = require('@carbon/react');
|
19
|
+
var icons = require('@carbon/react/icons');
|
20
|
+
|
21
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
22
|
+
|
23
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
24
|
+
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
25
|
+
|
26
|
+
var _CircleStroke, _InlineLoading, _ErrorOutline, _CheckmarkOutline;
|
27
|
+
var _excluded = ["className", "description", "errorMessage", "status"];
|
28
|
+
|
29
|
+
// The block part of our conventional BEM class names (blockClass__E--M).
|
30
|
+
var blockClass = "".concat(settings.pkg.prefix, "--status-indicator-step");
|
31
|
+
var componentName = 'StatusIndicatorStep';
|
32
|
+
var defaults = {
|
33
|
+
status: 'inactive'
|
34
|
+
};
|
35
|
+
|
36
|
+
/**
|
37
|
+
* An icon/description pair that describes one step of the `StatusIndicator`.
|
38
|
+
*/
|
39
|
+
exports.StatusIndicatorStep = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
|
40
|
+
var className = _ref.className,
|
41
|
+
description = _ref.description,
|
42
|
+
errorMessage = _ref.errorMessage,
|
43
|
+
_ref$status = _ref.status,
|
44
|
+
status = _ref$status === void 0 ? defaults.status : _ref$status,
|
45
|
+
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
46
|
+
return /*#__PURE__*/React__default["default"].createElement("li", _rollupPluginBabelHelpers["extends"]({}, rest, {
|
47
|
+
className: cx__default["default"](blockClass, className, "".concat(blockClass, "--").concat(status)),
|
48
|
+
ref: ref
|
49
|
+
}, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/React__default["default"].createElement("div", {
|
50
|
+
className: "".concat(blockClass, "__details")
|
51
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
52
|
+
className: "".concat(blockClass, "__icon")
|
53
|
+
}, status === 'inactive' && (_CircleStroke || (_CircleStroke = /*#__PURE__*/React__default["default"].createElement(icons.CircleStroke, {
|
54
|
+
size: 16,
|
55
|
+
viewBox: "1 1 14 14"
|
56
|
+
}))), status === 'active' && (_InlineLoading || (_InlineLoading = /*#__PURE__*/React__default["default"].createElement(react.InlineLoading, null))), status === 'error' && (_ErrorOutline || (_ErrorOutline = /*#__PURE__*/React__default["default"].createElement(icons.ErrorOutline, {
|
57
|
+
size: 16
|
58
|
+
}))), status === 'finished' && (_CheckmarkOutline || (_CheckmarkOutline = /*#__PURE__*/React__default["default"].createElement(icons.CheckmarkOutline, {
|
59
|
+
size: 16
|
60
|
+
})))), /*#__PURE__*/React__default["default"].createElement("div", {
|
61
|
+
className: "".concat(blockClass, "__text")
|
62
|
+
}, description)), status === 'error' && errorMessage && /*#__PURE__*/React__default["default"].createElement("div", {
|
63
|
+
className: "".concat(blockClass, "__error-message")
|
64
|
+
}, errorMessage));
|
65
|
+
});
|
66
|
+
|
67
|
+
// Return a placeholder if not released and not enabled by feature flag
|
68
|
+
exports.StatusIndicatorStep = settings.pkg.checkComponentEnabled(exports.StatusIndicatorStep, componentName);
|
69
|
+
|
70
|
+
// The display name of the component, used by React. Note that displayName
|
71
|
+
// is used in preference to relying on function.name.
|
72
|
+
exports.StatusIndicatorStep.displayName = componentName;
|
73
|
+
|
74
|
+
// The types and DocGen commentary for the component props,
|
75
|
+
// in alphabetical order (for consistency).
|
76
|
+
// See https://www.npmjs.com/package/prop-types#usage.
|
77
|
+
exports.StatusIndicatorStep.propTypes = {
|
78
|
+
/**
|
79
|
+
* Provide an optional class to be applied to the containing node.
|
80
|
+
*/
|
81
|
+
className: index["default"].string,
|
82
|
+
/**
|
83
|
+
* The text associated with the icon.
|
84
|
+
*/
|
85
|
+
description: index["default"].string.isRequired,
|
86
|
+
/**
|
87
|
+
* This message will appear below the description if the `status` is "error".
|
88
|
+
*/
|
89
|
+
errorMessage: index["default"].string,
|
90
|
+
/**
|
91
|
+
* Each `status` represents a different icon..
|
92
|
+
*/
|
93
|
+
status: index["default"].oneOf(['inactive', 'active', 'error', 'finished']).isRequired
|
94
|
+
};
|
@@ -50,7 +50,6 @@ export { Nav } from "./Nav";
|
|
50
50
|
export { StringFormatter } from "./StringFormatter";
|
51
51
|
export { UserAvatar } from "./UserAvatar";
|
52
52
|
export { ScrollGradient } from "./ScrollGradient";
|
53
|
-
export { StatusIndicator } from "./StatusIndicator";
|
54
53
|
export { TagOverflow } from "./TagOverflow";
|
55
54
|
export { ActionBar } from "./ActionBar";
|
56
55
|
export { ConditionBuilder } from "./ConditionBuilder";
|
@@ -68,5 +67,6 @@ export { EditTearsheet, EditTearsheetForm } from "./EditTearsheet";
|
|
68
67
|
export { Guidebanner, GuidebannerElement, GuidebannerElementButton, GuidebannerElementLink } from "./Guidebanner";
|
69
68
|
export { InlineTip, InlineTipButton, InlineTipLink } from "./InlineTip";
|
70
69
|
export { DescriptionList, DescriptionListBody, DescriptionListCell, DescriptionListRow } from "./DescriptionList";
|
70
|
+
export { StatusIndicator, StatusIndicatorStep } from "./StatusIndicator";
|
71
71
|
export { FilterPanel, FilterPanelAccordion, FilterPanelAccordionItem, FilterPanelCheckbox, FilterPanelCheckboxWithOverflow, FilterPanelGroup, FilterPanelLabel, FilterPanelSearch } from "./FilterPanel";
|
72
72
|
export { FeatureFlags as unstable_FeatureFlags, useFeatureFlag as unstable_useFeatureFlag, useFeatureFlags as unstable_useFeatureFlags } from "./FeatureFlags";
|
package/lib/index.js
CHANGED
@@ -126,6 +126,7 @@ var StringFormatter = require('./components/StringFormatter/StringFormatter.js')
|
|
126
126
|
var UserAvatar = require('./components/UserAvatar/UserAvatar.js');
|
127
127
|
var ScrollGradient = require('./components/ScrollGradient/ScrollGradient.js');
|
128
128
|
var StatusIndicator = require('./components/StatusIndicator/StatusIndicator.js');
|
129
|
+
var StatusIndicatorStep = require('./components/StatusIndicator/StatusIndicatorStep.js');
|
129
130
|
var TagOverflow = require('./components/TagOverflow/TagOverflow.js');
|
130
131
|
var ActionBar = require('./components/ActionBar/ActionBar.js');
|
131
132
|
var FilterPanel = require('./components/FilterPanel/FilterPanel.js');
|
@@ -535,6 +536,10 @@ Object.defineProperty(exports, 'StatusIndicator', {
|
|
535
536
|
enumerable: true,
|
536
537
|
get: function () { return StatusIndicator.StatusIndicator; }
|
537
538
|
});
|
539
|
+
Object.defineProperty(exports, 'StatusIndicatorStep', {
|
540
|
+
enumerable: true,
|
541
|
+
get: function () { return StatusIndicatorStep.StatusIndicatorStep; }
|
542
|
+
});
|
538
543
|
Object.defineProperty(exports, 'TagOverflow', {
|
539
544
|
enumerable: true,
|
540
545
|
get: function () { return TagOverflow.TagOverflow; }
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@carbon/ibm-products",
|
3
3
|
"description": "Carbon for IBM Products",
|
4
|
-
"version": "2.43.2-canary.
|
4
|
+
"version": "2.43.2-canary.31+97156281c",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -119,5 +119,5 @@
|
|
119
119
|
"react": "^16.8.6 || ^17.0.1 || ^18.2.0",
|
120
120
|
"react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
|
121
121
|
},
|
122
|
-
"gitHead": "
|
122
|
+
"gitHead": "97156281c7fc1d54f5bd34ebcefedc5f2b616de4"
|
123
123
|
}
|