@carbon/react 1.7.0-rc.0 → 1.7.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/MultiSelect/next/FilterableMultiSelect.js +3 -1
- package/es/components/ProgressBar/ProgressBar.js +6 -3
- package/es/components/UIShell/SideNavDetails.js +8 -3
- package/lib/components/MultiSelect/next/FilterableMultiSelect.js +3 -1
- package/lib/components/ProgressBar/ProgressBar.js +6 -3
- package/lib/components/UIShell/SideNavDetails.js +8 -3
- package/package.json +4 -4
|
@@ -260,7 +260,9 @@ var FilterableMultiSelect = /*#__PURE__*/React__default.forwardRef(function Filt
|
|
|
260
260
|
// toggleMenu behavior for the toggleButton to correctly open and
|
|
261
261
|
// close the menu.
|
|
262
262
|
onMouseUp: function onMouseUp(event) {
|
|
263
|
-
|
|
263
|
+
if (isOpen) {
|
|
264
|
+
event.stopPropagation();
|
|
265
|
+
}
|
|
264
266
|
}
|
|
265
267
|
});
|
|
266
268
|
var inputProps = getInputProps({
|
|
@@ -84,9 +84,9 @@ function ProgressBar(_ref) {
|
|
|
84
84
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
85
85
|
className: "".concat(prefix, "--progress-bar__track"),
|
|
86
86
|
role: "progressbar",
|
|
87
|
+
"aria-busy": !isFinished,
|
|
87
88
|
"aria-invalid": isError,
|
|
88
89
|
"aria-labelledby": labelId,
|
|
89
|
-
"aria-describedby": helperText ? helperId : null,
|
|
90
90
|
"aria-valuemin": !indeterminate ? 0 : null,
|
|
91
91
|
"aria-valuemax": !indeterminate ? max : null,
|
|
92
92
|
"aria-valuenow": !indeterminate ? cappedValue : null
|
|
@@ -96,9 +96,12 @@ function ProgressBar(_ref) {
|
|
|
96
96
|
transform: "scaleX(".concat(percentage, ")")
|
|
97
97
|
} : null
|
|
98
98
|
})), helperText && /*#__PURE__*/React__default.createElement("div", {
|
|
99
|
-
id: helperId,
|
|
100
99
|
className: "".concat(prefix, "--progress-bar__helper-text")
|
|
101
|
-
}, helperText
|
|
100
|
+
}, helperText, /*#__PURE__*/React__default.createElement("div", {
|
|
101
|
+
className: "".concat(prefix, "--visually-hidden"),
|
|
102
|
+
"aria-live": "polite",
|
|
103
|
+
id: helperId
|
|
104
|
+
}, isFinished ? 'Done' : 'Loading')));
|
|
102
105
|
}
|
|
103
106
|
|
|
104
107
|
ProgressBar.propTypes = {
|
|
@@ -5,20 +5,25 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
8
9
|
import cx from 'classnames';
|
|
9
10
|
import PropTypes from 'prop-types';
|
|
10
11
|
import React__default from 'react';
|
|
11
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
12
13
|
|
|
14
|
+
var _excluded = ["children", "className", "title"];
|
|
15
|
+
|
|
13
16
|
var SideNavDetails = function SideNavDetails(_ref) {
|
|
14
17
|
var children = _ref.children,
|
|
15
18
|
customClassName = _ref.className,
|
|
16
|
-
title = _ref.title
|
|
19
|
+
title = _ref.title,
|
|
20
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
|
|
17
22
|
var prefix = usePrefix();
|
|
18
23
|
var className = cx("".concat(prefix, "--side-nav__details"), customClassName);
|
|
19
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
24
|
+
return /*#__PURE__*/React__default.createElement("div", _extends({
|
|
20
25
|
className: className
|
|
21
|
-
}, /*#__PURE__*/React__default.createElement("h2", {
|
|
26
|
+
}, rest), /*#__PURE__*/React__default.createElement("h2", {
|
|
22
27
|
className: "".concat(prefix, "--side-nav__title"),
|
|
23
28
|
title: title
|
|
24
29
|
}, title), children);
|
|
@@ -272,7 +272,9 @@ var FilterableMultiSelect = /*#__PURE__*/React__default["default"].forwardRef(fu
|
|
|
272
272
|
// toggleMenu behavior for the toggleButton to correctly open and
|
|
273
273
|
// close the menu.
|
|
274
274
|
onMouseUp: function onMouseUp(event) {
|
|
275
|
-
|
|
275
|
+
if (isOpen) {
|
|
276
|
+
event.stopPropagation();
|
|
277
|
+
}
|
|
276
278
|
}
|
|
277
279
|
});
|
|
278
280
|
var inputProps = getInputProps({
|
|
@@ -94,9 +94,9 @@ function ProgressBar(_ref) {
|
|
|
94
94
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
95
95
|
className: "".concat(prefix, "--progress-bar__track"),
|
|
96
96
|
role: "progressbar",
|
|
97
|
+
"aria-busy": !isFinished,
|
|
97
98
|
"aria-invalid": isError,
|
|
98
99
|
"aria-labelledby": labelId,
|
|
99
|
-
"aria-describedby": helperText ? helperId : null,
|
|
100
100
|
"aria-valuemin": !indeterminate ? 0 : null,
|
|
101
101
|
"aria-valuemax": !indeterminate ? max : null,
|
|
102
102
|
"aria-valuenow": !indeterminate ? cappedValue : null
|
|
@@ -106,9 +106,12 @@ function ProgressBar(_ref) {
|
|
|
106
106
|
transform: "scaleX(".concat(percentage, ")")
|
|
107
107
|
} : null
|
|
108
108
|
})), helperText && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
109
|
-
id: helperId,
|
|
110
109
|
className: "".concat(prefix, "--progress-bar__helper-text")
|
|
111
|
-
}, helperText
|
|
110
|
+
}, helperText, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
111
|
+
className: "".concat(prefix, "--visually-hidden"),
|
|
112
|
+
"aria-live": "polite",
|
|
113
|
+
id: helperId
|
|
114
|
+
}, isFinished ? 'Done' : 'Loading')));
|
|
112
115
|
}
|
|
113
116
|
|
|
114
117
|
ProgressBar.propTypes = {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
11
|
|
|
12
|
+
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
12
13
|
var cx = require('classnames');
|
|
13
14
|
var PropTypes = require('prop-types');
|
|
14
15
|
var React = require('react');
|
|
@@ -20,15 +21,19 @@ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
|
20
21
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
21
22
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
23
|
|
|
24
|
+
var _excluded = ["children", "className", "title"];
|
|
25
|
+
|
|
23
26
|
var SideNavDetails = function SideNavDetails(_ref) {
|
|
24
27
|
var children = _ref.children,
|
|
25
28
|
customClassName = _ref.className,
|
|
26
|
-
title = _ref.title
|
|
29
|
+
title = _ref.title,
|
|
30
|
+
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
|
31
|
+
|
|
27
32
|
var prefix = usePrefix.usePrefix();
|
|
28
33
|
var className = cx__default["default"]("".concat(prefix, "--side-nav__details"), customClassName);
|
|
29
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
34
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({
|
|
30
35
|
className: className
|
|
31
|
-
}, /*#__PURE__*/React__default["default"].createElement("h2", {
|
|
36
|
+
}, rest), /*#__PURE__*/React__default["default"].createElement("h2", {
|
|
32
37
|
className: "".concat(prefix, "--side-nav__title"),
|
|
33
38
|
title: title
|
|
34
39
|
}, title), children);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/react",
|
|
3
3
|
"description": "React components for the Carbon Design System",
|
|
4
|
-
"version": "1.7.0
|
|
4
|
+
"version": "1.7.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@carbon/feature-flags": "^0.8.0",
|
|
47
47
|
"@carbon/icons-react": "^11.5.0",
|
|
48
48
|
"@carbon/layout": "^11.3.0",
|
|
49
|
-
"@carbon/styles": "^1.
|
|
49
|
+
"@carbon/styles": "^1.7.0",
|
|
50
50
|
"@carbon/telemetry": "0.1.0",
|
|
51
51
|
"classnames": "2.3.1",
|
|
52
52
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"rollup-plugin-strip-banner": "^2.0.0",
|
|
112
112
|
"rtlcss": "^3.5.0",
|
|
113
113
|
"sass": "^1.51.0",
|
|
114
|
-
"sass-loader": "^
|
|
114
|
+
"sass-loader": "^13.0.0",
|
|
115
115
|
"storybook-readme": "^5.0.9",
|
|
116
116
|
"stream-browserify": "^3.0.0",
|
|
117
117
|
"style-loader": "^3.3.1",
|
|
@@ -129,5 +129,5 @@
|
|
|
129
129
|
"**/*.scss",
|
|
130
130
|
"**/*.css"
|
|
131
131
|
],
|
|
132
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "65f0882c8fbf9f52f9acf8cf899b124f9cbab720"
|
|
133
133
|
}
|