@carbon/react 1.5.0-rc.0 → 1.5.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/DataTable/TableActionList.js +3 -1
- package/es/components/DataTable/TableToolbarContent.js +3 -1
- package/es/components/Search/next/Search.js +1 -0
- package/es/components/UIShell/HeaderGlobalBar.js +3 -1
- package/es/tools/wrapComponent.js +6 -4
- package/lib/components/DataTable/TableActionList.js +3 -1
- package/lib/components/DataTable/TableToolbarContent.js +3 -1
- package/lib/components/Search/next/Search.js +1 -0
- package/lib/components/UIShell/HeaderGlobalBar.js +3 -1
- package/lib/tools/wrapComponent.js +6 -4
- package/package.json +18 -18
|
@@ -10,7 +10,9 @@ import wrapComponent from '../../tools/wrapComponent.js';
|
|
|
10
10
|
var TableActionList = wrapComponent({
|
|
11
11
|
name: 'TableActionList',
|
|
12
12
|
type: 'div',
|
|
13
|
-
className:
|
|
13
|
+
className: function className(prefix) {
|
|
14
|
+
return "".concat(prefix, "--action-list");
|
|
15
|
+
}
|
|
14
16
|
});
|
|
15
17
|
var TableActionList$1 = TableActionList;
|
|
16
18
|
|
|
@@ -10,7 +10,9 @@ import wrapComponent from '../../tools/wrapComponent.js';
|
|
|
10
10
|
var TableToolbarContent = wrapComponent({
|
|
11
11
|
name: 'TableToolbarContent',
|
|
12
12
|
type: 'div',
|
|
13
|
-
className:
|
|
13
|
+
className: function className(prefix) {
|
|
14
|
+
return "".concat(prefix, "--toolbar-content");
|
|
15
|
+
}
|
|
14
16
|
});
|
|
15
17
|
var TableToolbarContent$1 = TableToolbarContent;
|
|
16
18
|
|
|
@@ -143,6 +143,7 @@ var Search = /*#__PURE__*/React__default.forwardRef(function Search(_ref, forwar
|
|
|
143
143
|
className: clearClasses,
|
|
144
144
|
disabled: disabled,
|
|
145
145
|
onClick: clearInput,
|
|
146
|
+
title: closeButtonLabelText,
|
|
146
147
|
type: "button"
|
|
147
148
|
}, _Close || (_Close = /*#__PURE__*/React__default.createElement(Close, null))));
|
|
148
149
|
});
|
|
@@ -13,7 +13,9 @@ import wrapComponent from '../../tools/wrapComponent.js';
|
|
|
13
13
|
|
|
14
14
|
var HeaderGlobalBar = wrapComponent({
|
|
15
15
|
name: 'HeaderGlobalBar',
|
|
16
|
-
className:
|
|
16
|
+
className: function className(prefix) {
|
|
17
|
+
return "".concat(prefix, "--header__global");
|
|
18
|
+
},
|
|
17
19
|
type: 'div'
|
|
18
20
|
});
|
|
19
21
|
|
|
@@ -9,26 +9,28 @@ import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _
|
|
|
9
9
|
import React__default from 'react';
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import cx from 'classnames';
|
|
12
|
+
import { usePrefix } from '../internal/usePrefix.js';
|
|
12
13
|
|
|
13
14
|
var _excluded = ["className"];
|
|
14
15
|
|
|
15
16
|
var wrapComponent = function wrapComponent(_ref) {
|
|
16
17
|
var name = _ref.name,
|
|
17
|
-
|
|
18
|
+
getClassName = _ref.className,
|
|
18
19
|
type = _ref.type;
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
function Component(_ref2) {
|
|
21
22
|
var baseClassName = _ref2.className,
|
|
22
23
|
other = _objectWithoutProperties(_ref2, _excluded);
|
|
23
24
|
|
|
24
|
-
var
|
|
25
|
+
var prefix = usePrefix();
|
|
26
|
+
var componentClass = cx(typeof getClassName === 'function' ? getClassName(prefix) : getClassName, baseClassName);
|
|
25
27
|
return /*#__PURE__*/React__default.createElement(type, _objectSpread2(_objectSpread2({}, other), {}, {
|
|
26
28
|
// Prevent Weird quirk where `cx` will evaluate to an empty string, '',
|
|
27
29
|
// and so we have empty `class` attributes in the resulting markup
|
|
28
30
|
// eslint-disable-next-line no-extra-boolean-cast
|
|
29
31
|
className: !!componentClass ? componentClass : undefined
|
|
30
32
|
}));
|
|
31
|
-
}
|
|
33
|
+
}
|
|
32
34
|
|
|
33
35
|
Component.displayName = name;
|
|
34
36
|
Component.propTypes = {
|
|
@@ -14,7 +14,9 @@ var wrapComponent = require('../../tools/wrapComponent.js');
|
|
|
14
14
|
var TableActionList = wrapComponent["default"]({
|
|
15
15
|
name: 'TableActionList',
|
|
16
16
|
type: 'div',
|
|
17
|
-
className:
|
|
17
|
+
className: function className(prefix) {
|
|
18
|
+
return "".concat(prefix, "--action-list");
|
|
19
|
+
}
|
|
18
20
|
});
|
|
19
21
|
var TableActionList$1 = TableActionList;
|
|
20
22
|
|
|
@@ -14,7 +14,9 @@ var wrapComponent = require('../../tools/wrapComponent.js');
|
|
|
14
14
|
var TableToolbarContent = wrapComponent["default"]({
|
|
15
15
|
name: 'TableToolbarContent',
|
|
16
16
|
type: 'div',
|
|
17
|
-
className:
|
|
17
|
+
className: function className(prefix) {
|
|
18
|
+
return "".concat(prefix, "--toolbar-content");
|
|
19
|
+
}
|
|
18
20
|
});
|
|
19
21
|
var TableToolbarContent$1 = TableToolbarContent;
|
|
20
22
|
|
|
@@ -153,6 +153,7 @@ var Search = /*#__PURE__*/React__default["default"].forwardRef(function Search(_
|
|
|
153
153
|
className: clearClasses,
|
|
154
154
|
disabled: disabled,
|
|
155
155
|
onClick: clearInput,
|
|
156
|
+
title: closeButtonLabelText,
|
|
156
157
|
type: "button"
|
|
157
158
|
}, _Close || (_Close = /*#__PURE__*/React__default["default"].createElement(iconsReact.Close, null))));
|
|
158
159
|
});
|
|
@@ -17,7 +17,9 @@ var wrapComponent = require('../../tools/wrapComponent.js');
|
|
|
17
17
|
|
|
18
18
|
var HeaderGlobalBar = wrapComponent["default"]({
|
|
19
19
|
name: 'HeaderGlobalBar',
|
|
20
|
-
className:
|
|
20
|
+
className: function className(prefix) {
|
|
21
|
+
return "".concat(prefix, "--header__global");
|
|
22
|
+
},
|
|
21
23
|
type: 'div'
|
|
22
24
|
});
|
|
23
25
|
|
|
@@ -13,6 +13,7 @@ var _rollupPluginBabelHelpers = require('../_virtual/_rollupPluginBabelHelpers.j
|
|
|
13
13
|
var React = require('react');
|
|
14
14
|
var PropTypes = require('prop-types');
|
|
15
15
|
var cx = require('classnames');
|
|
16
|
+
var usePrefix = require('../internal/usePrefix.js');
|
|
16
17
|
|
|
17
18
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
18
19
|
|
|
@@ -24,21 +25,22 @@ var _excluded = ["className"];
|
|
|
24
25
|
|
|
25
26
|
var wrapComponent = function wrapComponent(_ref) {
|
|
26
27
|
var name = _ref.name,
|
|
27
|
-
|
|
28
|
+
getClassName = _ref.className,
|
|
28
29
|
type = _ref.type;
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
function Component(_ref2) {
|
|
31
32
|
var baseClassName = _ref2.className,
|
|
32
33
|
other = _rollupPluginBabelHelpers.objectWithoutProperties(_ref2, _excluded);
|
|
33
34
|
|
|
34
|
-
var
|
|
35
|
+
var prefix = usePrefix.usePrefix();
|
|
36
|
+
var componentClass = cx__default["default"](typeof getClassName === 'function' ? getClassName(prefix) : getClassName, baseClassName);
|
|
35
37
|
return /*#__PURE__*/React__default["default"].createElement(type, _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, other), {}, {
|
|
36
38
|
// Prevent Weird quirk where `cx` will evaluate to an empty string, '',
|
|
37
39
|
// and so we have empty `class` attributes in the resulting markup
|
|
38
40
|
// eslint-disable-next-line no-extra-boolean-cast
|
|
39
41
|
className: !!componentClass ? componentClass : undefined
|
|
40
42
|
}));
|
|
41
|
-
}
|
|
43
|
+
}
|
|
42
44
|
|
|
43
45
|
Component.displayName = name;
|
|
44
46
|
Component.propTypes = {
|
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.5.0
|
|
4
|
+
"version": "1.5.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@babel/runtime": "^7.18.3",
|
|
46
|
-
"@carbon/feature-flags": "^0.8.0
|
|
47
|
-
"@carbon/icons-react": "^11.5.0
|
|
48
|
-
"@carbon/layout": "^11.3.0
|
|
49
|
-
"@carbon/styles": "^1.5.0
|
|
46
|
+
"@carbon/feature-flags": "^0.8.0",
|
|
47
|
+
"@carbon/icons-react": "^11.5.0",
|
|
48
|
+
"@carbon/layout": "^11.3.0",
|
|
49
|
+
"@carbon/styles": "^1.5.0",
|
|
50
50
|
"@carbon/telemetry": "0.1.0",
|
|
51
51
|
"classnames": "2.3.1",
|
|
52
52
|
"copy-to-clipboard": "^3.3.1",
|
|
@@ -72,26 +72,26 @@
|
|
|
72
72
|
"@babel/plugin-transform-react-constant-elements": "^7.17.12",
|
|
73
73
|
"@babel/preset-env": "^7.18.2",
|
|
74
74
|
"@babel/preset-react": "^7.17.12",
|
|
75
|
-
"@carbon/test-utils": "^10.25.0
|
|
76
|
-
"@carbon/themes": "^11.4.0
|
|
75
|
+
"@carbon/test-utils": "^10.25.0",
|
|
76
|
+
"@carbon/themes": "^11.4.0",
|
|
77
77
|
"@rollup/plugin-babel": "^5.3.0",
|
|
78
78
|
"@rollup/plugin-commonjs": "^21.0.0",
|
|
79
79
|
"@rollup/plugin-node-resolve": "^13.0.0",
|
|
80
|
-
"@storybook/addon-a11y": "^6.
|
|
81
|
-
"@storybook/addon-actions": "^6.
|
|
82
|
-
"@storybook/addon-docs": "^6.
|
|
83
|
-
"@storybook/addon-essentials": "^6.
|
|
80
|
+
"@storybook/addon-a11y": "^6.5.6",
|
|
81
|
+
"@storybook/addon-actions": "^6.5.6",
|
|
82
|
+
"@storybook/addon-docs": "^6.5.6",
|
|
83
|
+
"@storybook/addon-essentials": "^6.5.6",
|
|
84
84
|
"@storybook/addon-knobs": "^6.4.0",
|
|
85
85
|
"@storybook/addon-notes": "^5.3.21",
|
|
86
|
-
"@storybook/addon-storysource": "^6.
|
|
87
|
-
"@storybook/builder-webpack5": "^6.
|
|
88
|
-
"@storybook/manager-webpack5": "^6.
|
|
89
|
-
"@storybook/react": "^6.
|
|
90
|
-
"@storybook/theming": "^6.
|
|
86
|
+
"@storybook/addon-storysource": "^6.5.6",
|
|
87
|
+
"@storybook/builder-webpack5": "^6.5.6",
|
|
88
|
+
"@storybook/manager-webpack5": "^6.5.6",
|
|
89
|
+
"@storybook/react": "^6.5.6",
|
|
90
|
+
"@storybook/theming": "^6.5.6",
|
|
91
91
|
"autoprefixer": "^10.4.0",
|
|
92
92
|
"babel-loader": "^8.2.3",
|
|
93
93
|
"babel-plugin-dev-expression": "^0.2.3",
|
|
94
|
-
"babel-preset-carbon": "^0.3.0
|
|
94
|
+
"babel-preset-carbon": "^0.3.0",
|
|
95
95
|
"browserify-zlib": "^0.2.0",
|
|
96
96
|
"browserslist-config-carbon": "^11.0.0",
|
|
97
97
|
"css-loader": "^6.5.1",
|
|
@@ -129,5 +129,5 @@
|
|
|
129
129
|
"**/*.scss",
|
|
130
130
|
"**/*.css"
|
|
131
131
|
],
|
|
132
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "b9bfd3eceeda13379b974831fb860ff6bd8064c5"
|
|
133
133
|
}
|