@carbon/react 1.6.0 → 1.8.0-rc.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/es/components/ComposedModal/ComposedModal.js +1 -1
- package/es/components/ComposedModal/index.js +4 -4
- package/es/components/DataTable/DataTable.js +1 -1
- package/es/components/DataTable/Table.js +10 -2
- package/es/components/DataTable/TableContainer.js +20 -5
- package/es/components/DataTable/TableContext.js +15 -0
- package/es/components/DataTable/TableSelectRow.js +1 -1
- package/es/components/FileUploader/FileUploader.js +8 -1
- package/es/components/FileUploader/FileUploaderButton.js +3 -1
- package/es/components/FileUploader/FileUploaderDropContainer.js +3 -1
- package/es/components/FileUploader/FileUploaderItem.js +3 -1
- package/es/components/Form/Form.js +1 -1
- package/es/components/FormGroup/FormGroup.js +4 -4
- package/es/components/FormItem/FormItem.js +5 -6
- package/es/components/InlineLoading/InlineLoading.js +9 -5
- package/es/components/Loading/Loading.js +7 -18
- package/es/components/MultiSelect/FilterableMultiSelect.js +345 -386
- package/es/components/MultiSelect/index.js +4 -8
- package/es/components/Notification/Notification.js +322 -189
- package/es/components/Popover/index.js +137 -8
- package/es/components/ProgressBar/ProgressBar.js +6 -3
- package/es/components/RadioButton/RadioButton.js +58 -99
- package/es/components/RadioButton/index.js +2 -8
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +72 -121
- package/es/components/RadioButtonGroup/index.js +2 -8
- package/es/components/Select/Select.js +14 -7
- package/es/components/Slider/Slider.js +2 -1
- package/es/components/Switch/Switch.js +0 -1
- package/es/components/TreeView/TreeView.js +19 -11
- package/es/components/UIShell/HeaderMenu.js +1 -1
- package/es/components/UIShell/HeaderMenuButton.js +4 -0
- package/es/components/UIShell/SideNavDetails.js +8 -3
- package/es/components/UIShell/SideNavLink.js +6 -9
- package/es/index.js +7 -6
- package/es/internal/createClassWrapper.js +2 -5
- package/lib/components/ComposedModal/index.js +7 -7
- package/lib/components/DataTable/DataTable.js +5 -5
- package/lib/components/DataTable/Table.js +9 -1
- package/lib/components/DataTable/TableContainer.js +19 -4
- package/lib/components/DataTable/TableContext.js +19 -0
- package/lib/components/DataTable/TableSelectRow.js +2 -2
- package/lib/components/FileUploader/FileUploader.js +8 -1
- package/lib/components/FileUploader/FileUploaderButton.js +3 -1
- package/lib/components/FileUploader/FileUploaderDropContainer.js +3 -1
- package/lib/components/FileUploader/FileUploaderItem.js +3 -1
- package/lib/components/Form/Form.js +1 -1
- package/lib/components/FormGroup/FormGroup.js +4 -4
- package/lib/components/FormItem/FormItem.js +5 -6
- package/lib/components/InlineLoading/InlineLoading.js +9 -5
- package/lib/components/Loading/Loading.js +6 -17
- package/lib/components/MultiSelect/FilterableMultiSelect.js +341 -382
- package/lib/components/MultiSelect/index.js +5 -28
- package/lib/components/Notification/Notification.js +321 -188
- package/lib/components/Popover/index.js +135 -6
- package/lib/components/ProgressBar/ProgressBar.js +6 -3
- package/lib/components/RadioButton/RadioButton.js +57 -99
- package/lib/components/RadioButton/index.js +2 -25
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +68 -117
- package/lib/components/RadioButtonGroup/index.js +2 -25
- package/lib/components/Select/Select.js +14 -7
- package/lib/components/Slider/Slider.js +2 -1
- package/lib/components/Switch/Switch.js +0 -1
- package/lib/components/TreeView/TreeView.js +18 -10
- package/lib/components/UIShell/HeaderMenu.js +1 -0
- package/lib/components/UIShell/HeaderMenuButton.js +4 -0
- package/lib/components/UIShell/SideNavDetails.js +8 -3
- package/lib/components/UIShell/SideNavLink.js +6 -9
- package/lib/index.js +83 -83
- package/lib/internal/createClassWrapper.js +2 -5
- package/package.json +8 -8
- package/es/components/MultiSelect/next/FilterableMultiSelect.js +0 -542
- package/es/components/Notification/index.js +0 -42
- package/es/components/Notification/next/Notification.js +0 -663
- package/es/components/RadioButton/next/RadioButton.js +0 -130
- package/es/components/RadioButtonGroup/next/RadioButtonGroup.js +0 -141
- package/lib/components/MultiSelect/next/FilterableMultiSelect.js +0 -554
- package/lib/components/Notification/index.js +0 -51
- package/lib/components/Notification/next/Notification.js +0 -677
- package/lib/components/RadioButton/next/RadioButton.js +0 -140
- package/lib/components/RadioButtonGroup/next/RadioButtonGroup.js +0 -151
|
@@ -25,8 +25,6 @@ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
|
25
25
|
|
|
26
26
|
var _excluded = ["className", "status", "iconDescription", "description", "onSuccess", "successDelay"];
|
|
27
27
|
function InlineLoading(_ref) {
|
|
28
|
-
var _title, _title2;
|
|
29
|
-
|
|
30
28
|
var className = _ref.className,
|
|
31
29
|
_ref$status = _ref.status,
|
|
32
30
|
status = _ref$status === void 0 ? 'active' : _ref$status,
|
|
@@ -40,10 +38,12 @@ function InlineLoading(_ref) {
|
|
|
40
38
|
var loadingClasses = cx__default["default"]("".concat(prefix, "--inline-loading"), className);
|
|
41
39
|
|
|
42
40
|
var getLoading = function getLoading() {
|
|
41
|
+
var iconLabel = iconDescription ? iconDescription : status;
|
|
42
|
+
|
|
43
43
|
if (status === 'error') {
|
|
44
44
|
return /*#__PURE__*/React__default["default"].createElement(iconsReact.ErrorFilled, {
|
|
45
45
|
className: "".concat(prefix, "--inline-loading--error")
|
|
46
|
-
},
|
|
46
|
+
}, /*#__PURE__*/React__default["default"].createElement("title", null, iconLabel));
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
if (status === 'finished') {
|
|
@@ -54,13 +54,17 @@ function InlineLoading(_ref) {
|
|
|
54
54
|
}, successDelay);
|
|
55
55
|
return /*#__PURE__*/React__default["default"].createElement(iconsReact.CheckmarkFilled, {
|
|
56
56
|
className: "".concat(prefix, "--inline-loading__checkmark-container")
|
|
57
|
-
},
|
|
57
|
+
}, /*#__PURE__*/React__default["default"].createElement("title", null, iconLabel));
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
if (status === 'inactive' || status === 'active') {
|
|
61
|
+
if (!iconDescription) {
|
|
62
|
+
iconLabel = status === 'active' ? 'loading' : 'not loading';
|
|
63
|
+
}
|
|
64
|
+
|
|
61
65
|
return /*#__PURE__*/React__default["default"].createElement(Loading["default"], {
|
|
62
66
|
small: true,
|
|
63
|
-
description:
|
|
67
|
+
description: iconLabel,
|
|
64
68
|
withOverlay: false,
|
|
65
69
|
active: status === 'active'
|
|
66
70
|
});
|
|
@@ -13,8 +13,8 @@ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelper
|
|
|
13
13
|
var cx = require('classnames');
|
|
14
14
|
var PropTypes = require('prop-types');
|
|
15
15
|
var React = require('react');
|
|
16
|
-
var setupGetInstanceId = require('../../tools/setupGetInstanceId.js');
|
|
17
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
|
+
var deprecate = require('../../prop-types/deprecate.js');
|
|
18
18
|
|
|
19
19
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
20
|
|
|
@@ -22,14 +22,12 @@ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
|
22
22
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
23
23
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
24
24
|
|
|
25
|
-
var _excluded = ["
|
|
26
|
-
var getInstanceId = setupGetInstanceId["default"]();
|
|
25
|
+
var _excluded = ["active", "className", "withOverlay", "small", "description"];
|
|
27
26
|
|
|
28
27
|
function Loading(_ref) {
|
|
29
28
|
var _cx, _cx2;
|
|
30
29
|
|
|
31
|
-
var
|
|
32
|
-
active = _ref.active,
|
|
30
|
+
var active = _ref.active,
|
|
33
31
|
customClassName = _ref.className,
|
|
34
32
|
withOverlay = _ref.withOverlay,
|
|
35
33
|
small = _ref.small,
|
|
@@ -37,22 +35,13 @@ function Loading(_ref) {
|
|
|
37
35
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
38
36
|
|
|
39
37
|
var prefix = usePrefix.usePrefix();
|
|
40
|
-
|
|
41
|
-
var _useRef = React.useRef(getInstanceId()),
|
|
42
|
-
instanceId = _useRef.current;
|
|
43
|
-
|
|
44
38
|
var loadingClassName = cx__default["default"](customClassName, (_cx = {}, _rollupPluginBabelHelpers.defineProperty(_cx, "".concat(prefix, "--loading"), true), _rollupPluginBabelHelpers.defineProperty(_cx, "".concat(prefix, "--loading--small"), small), _rollupPluginBabelHelpers.defineProperty(_cx, "".concat(prefix, "--loading--stop"), !active), _cx));
|
|
45
39
|
var overlayClassName = cx__default["default"]((_cx2 = {}, _rollupPluginBabelHelpers.defineProperty(_cx2, "".concat(prefix, "--loading-overlay"), true), _rollupPluginBabelHelpers.defineProperty(_cx2, "".concat(prefix, "--loading-overlay--stop"), !active), _cx2));
|
|
46
|
-
var loadingId = id || "loading-id-".concat(instanceId);
|
|
47
40
|
var loading = /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
|
|
48
41
|
"aria-atomic": "true",
|
|
49
|
-
"aria-labelledby": loadingId,
|
|
50
42
|
"aria-live": active ? 'assertive' : 'off',
|
|
51
43
|
className: loadingClassName
|
|
52
|
-
}), /*#__PURE__*/React__default["default"].createElement("
|
|
53
|
-
id: loadingId,
|
|
54
|
-
className: "".concat(prefix, "--visually-hidden")
|
|
55
|
-
}, description), /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
44
|
+
}), /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
56
45
|
className: "".concat(prefix, "--loading__svg"),
|
|
57
46
|
viewBox: "0 0 100 100"
|
|
58
47
|
}, /*#__PURE__*/React__default["default"].createElement("title", null, description), small ? /*#__PURE__*/React__default["default"].createElement("circle", {
|
|
@@ -90,7 +79,7 @@ Loading.propTypes = {
|
|
|
90
79
|
/**
|
|
91
80
|
* Provide an `id` to uniquely identify the label
|
|
92
81
|
*/
|
|
93
|
-
id: PropTypes__default["default"].string,
|
|
82
|
+
id: deprecate["default"](PropTypes__default["default"].string, "\nThe prop `id` is no longer needed."),
|
|
94
83
|
|
|
95
84
|
/**
|
|
96
85
|
* Specify whether you would like the small variant of <Loading>
|
|
@@ -106,7 +95,7 @@ Loading.defaultProps = {
|
|
|
106
95
|
active: true,
|
|
107
96
|
withOverlay: true,
|
|
108
97
|
small: false,
|
|
109
|
-
description: '
|
|
98
|
+
description: 'loading'
|
|
110
99
|
};
|
|
111
100
|
|
|
112
101
|
exports["default"] = Loading;
|