@carbon/ibm-products 1.59.1 → 1.60.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +42 -21
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon.css +42 -21
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +42 -21
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/components/Datagrid/Datagrid/Datagrid.js +2 -1
- package/es/components/Datagrid/Datagrid/DatagridContent.js +7 -1
- package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -4
- package/es/components/Datagrid/Datagrid/DatagridSelectAll.js +13 -1
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +3 -15
- package/es/components/Datagrid/Datagrid/DraggableElement.js +32 -135
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +14 -38
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -0
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +128 -40
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +7 -6
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +104 -18
- package/es/components/Datagrid/Datagrid/addons/Filtering/constants.js +1 -0
- package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +37 -4
- package/es/components/Datagrid/useFiltering.js +4 -1
- package/es/components/Datagrid/useNestedRowExpander.js +22 -9
- package/es/components/Datagrid/useRowExpander.js +22 -9
- package/es/components/Datagrid/utils/getArgTypes.js +12 -0
- package/es/components/EmptyStates/EmptyState.js +1 -1
- package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
- package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
- package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
- package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
- package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
- package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
- package/es/components/EmptyStates/assets/ErrorIllustration.js +6 -11
- package/es/components/EmptyStates/assets/NoDataIllustration.js +6 -11
- package/es/components/EmptyStates/assets/NoTagsIllustration.js +6 -12
- package/es/components/EmptyStates/assets/NotFoundIllustration.js +6 -12
- package/es/components/EmptyStates/assets/NotificationsIllustration.js +6 -12
- package/es/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -12
- package/es/components/FilterSummary/FilterSummary.js +9 -3
- package/es/components/TagSet/TagSet.js +3 -7
- package/es/global/js/hooks/useWindowScroll.js +5 -0
- package/lib/components/Datagrid/Datagrid/Datagrid.js +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +6 -0
- package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +3 -3
- package/lib/components/Datagrid/Datagrid/DatagridSelectAll.js +13 -1
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +3 -15
- package/lib/components/Datagrid/Datagrid/DraggableElement.js +34 -140
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +17 -38
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +1 -0
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +128 -47
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +7 -6
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterProvider.js +104 -24
- package/lib/components/Datagrid/Datagrid/addons/Filtering/constants.js +4 -2
- package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +36 -3
- package/lib/components/Datagrid/useFiltering.js +4 -1
- package/lib/components/Datagrid/useNestedRowExpander.js +24 -9
- package/lib/components/Datagrid/useRowExpander.js +24 -9
- package/lib/components/Datagrid/utils/getArgTypes.js +12 -0
- package/lib/components/EmptyStates/EmptyState.js +1 -1
- package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -1
- package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -1
- package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +1 -1
- package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -1
- package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -1
- package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +1 -1
- package/lib/components/EmptyStates/assets/ErrorIllustration.js +6 -11
- package/lib/components/EmptyStates/assets/NoDataIllustration.js +6 -11
- package/lib/components/EmptyStates/assets/NoTagsIllustration.js +6 -12
- package/lib/components/EmptyStates/assets/NotFoundIllustration.js +6 -12
- package/lib/components/EmptyStates/assets/NotificationsIllustration.js +6 -12
- package/lib/components/EmptyStates/assets/UnauthorizedIllustration.js +6 -12
- package/lib/components/FilterSummary/FilterSummary.js +9 -10
- package/lib/components/TagSet/TagSet.js +2 -6
- package/lib/global/js/hooks/useWindowScroll.js +6 -0
- package/package.json +6 -5
- package/scss/components/Datagrid/_datagrid.scss +1 -1
- package/scss/components/Datagrid/styles/_draggableElement.scss +44 -20
- package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +0 -1
@@ -5,19 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
6
6
|
});
|
7
7
|
exports.default = void 0;
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
8
10
|
var _carbonComponentsReact = require("carbon-components-react");
|
9
11
|
var _react = _interopRequireDefault(require("react"));
|
10
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
11
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
12
14
|
var _TagSet = require("../TagSet");
|
13
15
|
var _settings = require("../../settings");
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
18
|
-
* LICENSE file in the root directory of this source tree.
|
19
|
-
*/
|
20
|
-
|
16
|
+
var _excluded = ["key", "value"];
|
17
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
18
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
21
19
|
var blockClass = "".concat(_settings.pkg.prefix, "--filter-summary");
|
22
20
|
var FilterSummary = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
23
21
|
var _ref$className = _ref.className,
|
@@ -33,11 +31,12 @@ var FilterSummary = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref)
|
|
33
31
|
var tagFilters = filters.map(function (_ref2) {
|
34
32
|
var _renderLabel;
|
35
33
|
var key = _ref2.key,
|
36
|
-
value = _ref2.value
|
37
|
-
|
34
|
+
value = _ref2.value,
|
35
|
+
rest = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
36
|
+
return _objectSpread(_objectSpread({}, rest), {}, {
|
38
37
|
type: 'gray',
|
39
38
|
label: (_renderLabel = renderLabel === null || renderLabel === void 0 ? void 0 : renderLabel(key, value)) !== null && _renderLabel !== void 0 ? _renderLabel : "".concat(key, ": ").concat(value)
|
40
|
-
};
|
39
|
+
});
|
41
40
|
});
|
42
41
|
return /*#__PURE__*/_react.default.createElement("div", {
|
43
42
|
ref: ref,
|
@@ -113,8 +113,7 @@ var TagSet = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
113
113
|
}
|
114
114
|
}, /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.Tag, (0, _extends2.default)({}, other, {
|
115
115
|
// ensure id is not duplicated
|
116
|
-
"data-original-id": id
|
117
|
-
filter: false
|
116
|
+
"data-original-id": id
|
118
117
|
}), label));
|
119
118
|
}) : []);
|
120
119
|
setSizingTags(newSizingTags);
|
@@ -125,7 +124,6 @@ var TagSet = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
125
124
|
var label = _ref3.label,
|
126
125
|
other = (0, _objectWithoutProperties2.default)(_ref3, _excluded3);
|
127
126
|
return /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.Tag, (0, _extends2.default)({}, other, {
|
128
|
-
filter: false,
|
129
127
|
key: "displayed-tag-".concat(index)
|
130
128
|
}), label);
|
131
129
|
}) : [];
|
@@ -318,12 +316,10 @@ TagSet.propTypes = {
|
|
318
316
|
* with properties: **label**\* (required) to supply the tag content, and
|
319
317
|
* other properties will be passed to the Carbon Tag component, such as
|
320
318
|
* **type**, **disabled**, **ref**, **className** , and any other Tag props.
|
321
|
-
* NOTE: **filter** is not supported. Any other fields in the object will be passed through to the HTML element
|
322
|
-
* as HTML attributes.
|
323
319
|
*
|
324
320
|
* See https://react.carbondesignsystem.com/?path=/docs/components-tag--default
|
325
321
|
*/
|
326
|
-
tags: _propTypes.default.arrayOf(_propTypes.default.shape(_objectSpread(_objectSpread({},
|
322
|
+
tags: _propTypes.default.arrayOf(_propTypes.default.shape(_objectSpread(_objectSpread({}, _carbonComponentsReact.Tag.propTypes), {}, {
|
327
323
|
label: _propTypes.default.string.isRequired,
|
328
324
|
// we duplicate this prop to improve the DocGen
|
329
325
|
type: _propTypes.default.oneOf(tagTypes)
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
6
6
|
});
|
7
7
|
exports.useNearestScroll = useNearestScroll;
|
8
|
+
exports.useScroll = useScroll;
|
8
9
|
exports.useWindowScroll = useWindowScroll;
|
9
10
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
10
11
|
var _react = require("react");
|
@@ -76,4 +77,9 @@ function useNearestScroll(ref, effect, deps) {
|
|
76
77
|
scrollableTarget = window;
|
77
78
|
}
|
78
79
|
return useTargetScroll(scrollableTarget, effect, deps, throttle);
|
80
|
+
}
|
81
|
+
function useScroll(ref, effect, deps) {
|
82
|
+
var _ref$current;
|
83
|
+
var throttle = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
|
84
|
+
return useTargetScroll((_ref$current = ref === null || ref === void 0 ? void 0 : ref.current) !== null && _ref$current !== void 0 ? _ref$current : null, effect, deps, throttle);
|
79
85
|
}
|
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": "1.
|
4
|
+
"version": "1.60.0",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -48,7 +48,7 @@
|
|
48
48
|
"postinstall": "carbon-telemetry collect --install",
|
49
49
|
"test": "jest --colors",
|
50
50
|
"//upgrade-dependencies": "# don't upgrade carbon (done globally), react/react-dom (explicit range peer dependency), chalk (issue #1596)",
|
51
|
-
"upgrade-dependencies": "npm-check-updates -u --dep dev,peer,prod --color --reject '/(carbon|^react$|^react-dom$|^chalk$|^
|
51
|
+
"upgrade-dependencies": "npm-check-updates -u --dep dev,peer,prod --color --reject '/(carbon|^react$|^react-dom$|^chalk$|^namor)/'"
|
52
52
|
},
|
53
53
|
"devDependencies": {
|
54
54
|
"@babel/cli": "^7.20.7",
|
@@ -73,12 +73,13 @@
|
|
73
73
|
"dependencies": {
|
74
74
|
"@babel/runtime": "^7.20.13",
|
75
75
|
"@carbon/telemetry": "^0.1.0",
|
76
|
+
"@dnd-kit/core": "^6.0.8",
|
77
|
+
"@dnd-kit/sortable": "^7.0.2",
|
78
|
+
"@dnd-kit/utilities": "^3.2.1",
|
76
79
|
"framer-motion": "^6.5.1 <7",
|
77
80
|
"immutability-helper": "^3.1.1",
|
78
81
|
"lodash": "^4.17.21",
|
79
82
|
"lottie-web": "^5.11.0",
|
80
|
-
"react-dnd": "^15.1.2",
|
81
|
-
"react-dnd-html5-backend": "^15.1.3",
|
82
83
|
"react-table": "^7.8.0",
|
83
84
|
"react-window": "^1.8.8"
|
84
85
|
},
|
@@ -96,5 +97,5 @@
|
|
96
97
|
"react": "^16.8.6 || ^17.0.1",
|
97
98
|
"react-dom": "^16.8.6 || ^17.0.1"
|
98
99
|
},
|
99
|
-
"gitHead": "
|
100
|
+
"gitHead": "60db5711e16835785348a1fc148a7c346bad5bde"
|
100
101
|
}
|
@@ -11,7 +11,6 @@
|
|
11
11
|
display: flex;
|
12
12
|
align-items: center;
|
13
13
|
margin-right: $spacing-03;
|
14
|
-
cursor: grab;
|
15
14
|
}
|
16
15
|
|
17
16
|
.#{$block-class}__draggable-handleStyle.disabled {
|
@@ -22,32 +21,56 @@
|
|
22
21
|
fill: $disabled-03;
|
23
22
|
}
|
24
23
|
|
24
|
+
.#{$block-class}__draggable-underlay {
|
25
|
+
position: absolute;
|
26
|
+
width: 100%;
|
27
|
+
}
|
28
|
+
|
29
|
+
.#{$block-class}__draggable-underlay-item {
|
30
|
+
// must match draggable item size
|
31
|
+
width: 100%;
|
32
|
+
height: $spacing-09;
|
33
|
+
border: 2px dashed $focus;
|
34
|
+
/* stylelint-disable-next-line carbon/theme-token-use */
|
35
|
+
background-color: $blue-10; // not good in dark mode
|
36
|
+
}
|
37
|
+
|
25
38
|
.#{$block-class}__draggable-handleHolder {
|
39
|
+
position: relative;
|
26
40
|
display: flex;
|
27
41
|
height: $spacing-09;
|
28
|
-
border-bottom: 1px solid $
|
29
|
-
background-color: $
|
42
|
+
border-bottom: 1px solid $active-ui;
|
43
|
+
background-color: $ui-01;
|
44
|
+
cursor: grab;
|
30
45
|
}
|
31
46
|
|
32
47
|
.#{$block-class}__draggable-handleHolder:hover {
|
33
|
-
background-color: $
|
48
|
+
background-color: $hover-ui;
|
34
49
|
}
|
35
50
|
|
36
|
-
.#{$block-class}__draggable-handleHolder
|
37
|
-
|
38
|
-
|
39
|
-
border-bottom: 1px solid $layer-active;
|
40
|
-
background-color: $layer-selected;
|
51
|
+
.#{$block-class}__draggable-handleHolder:focus {
|
52
|
+
box-shadow: inset 0 0 0 1px $focus;
|
53
|
+
outline: none;
|
41
54
|
}
|
42
55
|
|
43
|
-
.#{$block-class}__draggable-handleHolder
|
44
|
-
background-color: $
|
56
|
+
.#{$block-class}__draggable-handleHolder--selected {
|
57
|
+
background-color: $selected-ui;
|
45
58
|
}
|
46
59
|
|
47
|
-
.#{$block-class}__draggable-handleHolder
|
48
|
-
|
49
|
-
|
50
|
-
|
60
|
+
.#{$block-class}__draggable-handleHolder--dragging {
|
61
|
+
z-index: 2; // raise above other items in draggable list
|
62
|
+
background-color: $highlight;
|
63
|
+
color: $text-01;
|
64
|
+
outline: none;
|
65
|
+
}
|
66
|
+
|
67
|
+
.#{$block-class}__draggable-handleHolder:active,
|
68
|
+
.#{$block-class}__draggable-handleHolder--dragging {
|
69
|
+
cursor: grabbing;
|
70
|
+
}
|
71
|
+
|
72
|
+
.#{$block-class}__draggable-handleHolder-selected:hover {
|
73
|
+
background-color: $hover-selected-ui;
|
51
74
|
}
|
52
75
|
|
53
76
|
.#{$block-class}__draggable-handleHolder-droppable {
|
@@ -65,11 +88,6 @@
|
|
65
88
|
transition: opacity $duration--moderate-01 motion(entrance, productive);
|
66
89
|
}
|
67
90
|
|
68
|
-
.#{$block-class}__draggable-handleHolder-grabbed {
|
69
|
-
background-color: $highlight;
|
70
|
-
color: $text-01;
|
71
|
-
}
|
72
|
-
|
73
91
|
.#{$block-class}__draggable-handleHolder--sticky {
|
74
92
|
color: $disabled-03;
|
75
93
|
}
|
@@ -86,3 +104,9 @@
|
|
86
104
|
text-transform: none;
|
87
105
|
white-space: nowrap;
|
88
106
|
}
|
107
|
+
|
108
|
+
.#{$block-class}__draggable-item
|
109
|
+
.#{$carbon-prefix}--form-item.#{$carbon-prefix}--checkbox-wrapper {
|
110
|
+
max-width: $spacing-06;
|
111
|
+
margin-bottom: 0;
|
112
|
+
}
|