@carbon/ibm-products 2.8.1 → 2.9.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/css/index-full-carbon.css +196 -173
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +4 -2
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon.css +148 -148
- 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 +59 -43
- 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/DatagridToolbar.js +8 -2
- package/es/components/Datagrid/Datagrid/DraggableElement.js +61 -68
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +23 -15
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +5 -5
- package/es/components/OptionsTile/OptionsTile.js +1 -1
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +8 -2
- package/lib/components/Datagrid/Datagrid/DraggableElement.js +62 -68
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +23 -15
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/DraggableItemsList.js +5 -5
- package/lib/components/OptionsTile/OptionsTile.js +1 -1
- package/package.json +13 -15
- package/scss/components/Datagrid/_storybook-styles.scss +5 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
3
3
|
/**
|
4
|
-
* Copyright IBM Corp. 2022,
|
4
|
+
* Copyright IBM Corp. 2022, 2023
|
5
5
|
*
|
6
6
|
* This source code is licensed under the Apache-2.0 license found in the
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
@@ -9,10 +9,10 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
9
9
|
|
10
10
|
import React from 'react';
|
11
11
|
import PropTypes from 'prop-types';
|
12
|
-
import { DndProvider } from 'react-dnd';
|
13
|
-
import { HTML5Backend } from 'react-dnd-html5-backend';
|
12
|
+
// import { DndProvider } from 'react-dnd';
|
13
|
+
// import { HTML5Backend } from 'react-dnd-html5-backend';
|
14
14
|
import { Checkbox } from '@carbon/react';
|
15
|
-
import update from 'immutability-helper';
|
15
|
+
// import update from 'immutability-helper';
|
16
16
|
import { pkg } from '../../../../../settings';
|
17
17
|
import cx from 'classnames';
|
18
18
|
import { DraggableItemsList } from './DraggableItemsList';
|
@@ -44,16 +44,23 @@ var Columns = function Columns(_ref) {
|
|
44
44
|
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
45
45
|
focusIndex = _React$useState4[0],
|
46
46
|
setFocusIndex = _React$useState4[1];
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
47
|
+
// const moveElement = React.useCallback(
|
48
|
+
// (dragIndex, hoverIndex) => {
|
49
|
+
// const dragCard = columns[dragIndex];
|
50
|
+
// setColumnsObject(
|
51
|
+
// update(columns, {
|
52
|
+
// $splice: [
|
53
|
+
// [dragIndex, 1],
|
54
|
+
// [hoverIndex, 0, dragCard],
|
55
|
+
// ],
|
56
|
+
// })
|
57
|
+
// );
|
58
|
+
// },
|
59
|
+
// [columns, setColumnsObject]
|
60
|
+
// );
|
61
|
+
|
53
62
|
return /*#__PURE__*/React.createElement("div", {
|
54
63
|
className: "".concat(blockClass, "__customize-columns-column-list")
|
55
|
-
}, /*#__PURE__*/React.createElement(DndProvider, {
|
56
|
-
backend: HTML5Backend
|
57
64
|
}, /*#__PURE__*/React.createElement("ol", {
|
58
65
|
className: "".concat(blockClass, "__customize-columns-column-list--focus"),
|
59
66
|
role: "listbox",
|
@@ -90,13 +97,14 @@ var Columns = function Columns(_ref) {
|
|
90
97
|
columns: columns,
|
91
98
|
filterString: filterString,
|
92
99
|
focusIndex: focusIndex,
|
93
|
-
getNextIndex: getNextIndex
|
94
|
-
|
100
|
+
getNextIndex: getNextIndex
|
101
|
+
// moveElement={moveElement}
|
102
|
+
,
|
95
103
|
onSelectColumn: onSelectColumn,
|
96
104
|
setAriaRegionText: setAriaRegionText,
|
97
105
|
setColumnsObject: setColumnsObject,
|
98
106
|
setFocusIndex: setFocusIndex
|
99
|
-
})))
|
107
|
+
})));
|
100
108
|
};
|
101
109
|
Columns.propTypes = {
|
102
110
|
assistiveTextDisabledInstructionsLabel: PropTypes.string,
|
@@ -18,7 +18,6 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
18
18
|
filterString = _ref.filterString,
|
19
19
|
focusIndex = _ref.focusIndex,
|
20
20
|
getNextIndex = _ref.getNextIndex,
|
21
|
-
moveElement = _ref.moveElement,
|
22
21
|
onSelectColumn = _ref.onSelectColumn,
|
23
22
|
setAriaRegionText = _ref.setAriaRegionText,
|
24
23
|
setColumnsObject = _ref.setColumnsObject,
|
@@ -68,8 +67,9 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
68
67
|
disabled: filterString.length > 0 || isFrozenColumn,
|
69
68
|
ariaLabel: colHeaderTitle,
|
70
69
|
onGrab: setAriaRegionText,
|
71
|
-
isFocused: focusIndex === i
|
72
|
-
|
70
|
+
isFocused: focusIndex === i
|
71
|
+
// moveElement={moveElement}
|
72
|
+
,
|
73
73
|
onArrowKeyDown: function onArrowKeyDown(e, isGrabbed, currentIndex) {
|
74
74
|
if (isGrabbed) {
|
75
75
|
var _columns$nextIndex;
|
@@ -78,7 +78,7 @@ export var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
78
78
|
e.stopPropagation();
|
79
79
|
if (nextIndex >= 0 && !((_columns$nextIndex = columns[nextIndex]) !== null && _columns$nextIndex !== void 0 && _columns$nextIndex.sticky)) {
|
80
80
|
setFocusIndex(nextIndex);
|
81
|
-
moveElement(currentIndex, nextIndex);
|
81
|
+
// moveElement(currentIndex, nextIndex);
|
82
82
|
e.target.scrollIntoView({
|
83
83
|
block: 'center'
|
84
84
|
});
|
@@ -95,7 +95,7 @@ DraggableItemsList.propTypes = {
|
|
95
95
|
filterString: PropTypes.string.isRequired,
|
96
96
|
focusIndex: PropTypes.number.isRequired,
|
97
97
|
getNextIndex: PropTypes.func.isRequired,
|
98
|
-
moveElement: PropTypes.func.isRequired,
|
98
|
+
// moveElement: PropTypes.func.isRequired,
|
99
99
|
onSelectColumn: PropTypes.func.isRequired,
|
100
100
|
setAriaRegionText: PropTypes.func.isRequired,
|
101
101
|
setColumnsObject: PropTypes.func.isRequired,
|
@@ -214,7 +214,7 @@ export var OptionsTile = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
214
214
|
}, getDevtoolsProps(componentName)), enabled !== undefined && /*#__PURE__*/React.createElement("div", {
|
215
215
|
className: "".concat(blockClass, "__toggle-container")
|
216
216
|
}, /*#__PURE__*/React.createElement(Toggle, {
|
217
|
-
id: "".concat(
|
217
|
+
id: "".concat(titleId, "-toggle"),
|
218
218
|
className: "".concat(blockClass, "__toggle"),
|
219
219
|
toggled: enabled,
|
220
220
|
"aria-labelledby": titleId,
|
@@ -37,7 +37,8 @@ var DatagridBatchActionsToolbar = function DatagridBatchActionsToolbar(datagridS
|
|
37
37
|
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
38
38
|
receivedInitialWidth = _useState6[0],
|
39
39
|
setReceivedInitialWidth = _useState6[1];
|
40
|
-
var
|
40
|
+
var onSelectAllRows = datagridState.onSelectAllRows,
|
41
|
+
selectedRowIds = datagridState.state.selectedRowIds,
|
41
42
|
toggleAllRowsSelected = datagridState.toggleAllRowsSelected,
|
42
43
|
toolbarBatchActions = datagridState.toolbarBatchActions,
|
43
44
|
setGlobalFilter = datagridState.setGlobalFilter,
|
@@ -125,7 +126,12 @@ var DatagridBatchActionsToolbar = function DatagridBatchActionsToolbar(datagridS
|
|
125
126
|
onCancel: function onCancel() {
|
126
127
|
toggleAllRowsSelected(false);
|
127
128
|
setGlobalFilter(null);
|
128
|
-
}
|
129
|
+
},
|
130
|
+
onSelectAll: function onSelectAll() {
|
131
|
+
toggleAllRowsSelected(true);
|
132
|
+
onSelectAllRows === null || onSelectAllRows === void 0 ? void 0 : onSelectAllRows(true);
|
133
|
+
},
|
134
|
+
totalCount: rows && rows.length
|
129
135
|
}, !displayAllInMenu && toolbarBatchActions && (toolbarBatchActions === null || toolbarBatchActions === void 0 ? void 0 : toolbarBatchActions.map(function (batchAction, index) {
|
130
136
|
if (index < 2 && toolbarBatchActions.length > 3 || index < 3 && toolbarBatchActions.length <= 3) {
|
131
137
|
return /*#__PURE__*/_react.default.createElement(_react2.TableBatchAction, {
|
@@ -11,7 +11,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
13
13
|
var _icons = require("@carbon/react/icons");
|
14
|
-
var _reactDnd = require("react-dnd");
|
15
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
16
15
|
var _settings = require("../../../settings");
|
17
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
@@ -25,25 +24,26 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
25
24
|
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
26
25
|
*/
|
27
26
|
|
27
|
+
// import { useDrag, useDrop } from 'react-dnd';
|
28
|
+
|
28
29
|
var useEffect = React.useEffect,
|
29
30
|
useRef = React.useRef,
|
30
31
|
useState = React.useState;
|
31
32
|
var blockClass = "".concat(_settings.pkg.prefix, "--datagrid");
|
32
|
-
|
33
|
+
|
34
|
+
// const DRAG_TYPE = `${blockClass}__shared-ui-draggable-element`;
|
35
|
+
|
33
36
|
var DraggableElement = function DraggableElement(_ref) {
|
34
37
|
var _cx;
|
35
|
-
var
|
36
|
-
index = _ref.index,
|
38
|
+
var index = _ref.index,
|
37
39
|
listData = _ref.listData,
|
38
40
|
children = _ref.children,
|
39
|
-
type = _ref.type,
|
40
41
|
disabled = _ref.disabled,
|
41
42
|
ariaLabel = _ref.ariaLabel,
|
42
43
|
onGrab = _ref.onGrab,
|
43
44
|
onArrowKeyDown = _ref.onArrowKeyDown,
|
44
45
|
isFocused = _ref.isFocused,
|
45
46
|
isSticky = _ref.isSticky,
|
46
|
-
moveElement = _ref.moveElement,
|
47
47
|
selected = _ref.selected,
|
48
48
|
_ref$positionLabel = _ref.positionLabel,
|
49
49
|
positionLabel = _ref$positionLabel === void 0 ? 'Current position {index} of {total}' : _ref$positionLabel,
|
@@ -52,72 +52,66 @@ var DraggableElement = function DraggableElement(_ref) {
|
|
52
52
|
_ref$droppedLabel = _ref.droppedLabel,
|
53
53
|
droppedLabel = _ref$droppedLabel === void 0 ? '{itemName} dropped.' : _ref$droppedLabel;
|
54
54
|
var ref = useRef();
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
}
|
102
|
-
}),
|
103
|
-
_useDrag2 = (0, _slicedToArray2.default)(_useDrag, 3),
|
104
|
-
isDragging = _useDrag2[0].isDragging,
|
105
|
-
drag = _useDrag2[1],
|
106
|
-
preview = _useDrag2[2];
|
55
|
+
|
56
|
+
// const [{ isOver }, drop] = useDrop({
|
57
|
+
// accept: DRAG_TYPE + type,
|
58
|
+
// collect: (monitor) => ({
|
59
|
+
// isOver: !!monitor.isOver(),
|
60
|
+
// }),
|
61
|
+
// drop: (item) => {
|
62
|
+
// moveElement(item.index, index);
|
63
|
+
// },
|
64
|
+
// canDrop: () => !disabled,
|
65
|
+
// hover(item) {
|
66
|
+
// const dragIndex = item.index;
|
67
|
+
// const hoverIndex = index;
|
68
|
+
// // Don't replace items with themselves
|
69
|
+
// if (dragIndex === hoverIndex || disabled) {
|
70
|
+
// return;
|
71
|
+
// }
|
72
|
+
// // moveElement(dragIndex, hoverIndex);
|
73
|
+
// // Time to actually perform the action
|
74
|
+
// // Note: we're mutating the monitor item here!
|
75
|
+
// // Generally it's better to avoid mutations,
|
76
|
+
// // but it's good here for the sake of performance
|
77
|
+
// // to avoid expensive index searches.
|
78
|
+
// // eslint-disable-next-line no-param-reassign
|
79
|
+
// item.index = hoverIndex;
|
80
|
+
// },
|
81
|
+
// });
|
82
|
+
|
83
|
+
// const [{ isDragging }, drag, preview] = useDrag({
|
84
|
+
// type: DRAG_TYPE + type,
|
85
|
+
// item: { id, index },
|
86
|
+
// canDrag: () => !disabled,
|
87
|
+
// collect: (monitor) => ({
|
88
|
+
// isDragging: monitor.isDragging(),
|
89
|
+
// }),
|
90
|
+
// });
|
91
|
+
|
92
|
+
// Temporarily disable drag support because of commonjs support/issues with react-dnd in latest version
|
93
|
+
var _useState = useState(false),
|
94
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 1),
|
95
|
+
isDragging = _useState2[0];
|
96
|
+
var _useState3 = useState(false),
|
97
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 1),
|
98
|
+
isOver = _useState4[0];
|
99
|
+
var preview = useRef();
|
100
|
+
var drag = useRef();
|
107
101
|
useEffect(function () {
|
108
102
|
if (isFocused && ref && ref.current) {
|
109
103
|
ref.current.focus();
|
110
104
|
}
|
111
105
|
}, [isFocused]);
|
112
|
-
var
|
113
|
-
|
114
|
-
isGrabbed =
|
115
|
-
setIsGrabbed =
|
116
|
-
var
|
117
|
-
|
118
|
-
isFocusedOnItem =
|
119
|
-
setIsFocusedOnItem =
|
120
|
-
drop(ref);
|
106
|
+
var _useState5 = useState(false),
|
107
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
108
|
+
isGrabbed = _useState6[0],
|
109
|
+
setIsGrabbed = _useState6[1];
|
110
|
+
var _useState7 = useState(isFocused),
|
111
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
112
|
+
isFocusedOnItem = _useState8[0],
|
113
|
+
setIsFocusedOnItem = _useState8[1];
|
114
|
+
// drop(ref);
|
121
115
|
var content = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
122
116
|
className: (0, _classnames.default)({
|
123
117
|
disabled: disabled
|
@@ -178,7 +172,7 @@ DraggableElement.propTypes = {
|
|
178
172
|
isFocused: _propTypes.default.bool.isRequired,
|
179
173
|
isSticky: _propTypes.default.bool,
|
180
174
|
listData: _propTypes.default.array.isRequired,
|
181
|
-
moveElement:
|
175
|
+
// moveElement: PropTypes.func.isRequired,
|
182
176
|
onArrowKeyDown: _propTypes.default.func.isRequired,
|
183
177
|
onGrab: _propTypes.default.func.isRequired,
|
184
178
|
positionLabel: _propTypes.default.string,
|
@@ -9,20 +9,20 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
9
9
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
12
|
-
var _reactDnd = require("react-dnd");
|
13
|
-
var _reactDndHtml5Backend = require("react-dnd-html5-backend");
|
14
12
|
var _react2 = require("@carbon/react");
|
15
|
-
var _immutabilityHelper = _interopRequireDefault(require("immutability-helper"));
|
16
13
|
var _settings = require("../../../../../settings");
|
17
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
18
15
|
var _DraggableItemsList = require("./DraggableItemsList");
|
19
16
|
/**
|
20
|
-
* Copyright IBM Corp. 2022,
|
17
|
+
* Copyright IBM Corp. 2022, 2023
|
21
18
|
*
|
22
19
|
* This source code is licensed under the Apache-2.0 license found in the
|
23
20
|
* LICENSE file in the root directory of this source tree.
|
24
21
|
*/
|
25
22
|
|
23
|
+
// import { DndProvider } from 'react-dnd';
|
24
|
+
// import { HTML5Backend } from 'react-dnd-html5-backend';
|
25
|
+
// import update from 'immutability-helper';
|
26
26
|
var blockClass = "".concat(_settings.pkg.prefix, "--datagrid");
|
27
27
|
var getNextIndex = function getNextIndex(array, currentIndex, key) {
|
28
28
|
var newIndex = -1;
|
@@ -51,16 +51,23 @@ var Columns = function Columns(_ref) {
|
|
51
51
|
_React$useState4 = (0, _slicedToArray2.default)(_React$useState3, 2),
|
52
52
|
focusIndex = _React$useState4[0],
|
53
53
|
setFocusIndex = _React$useState4[1];
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
54
|
+
// const moveElement = React.useCallback(
|
55
|
+
// (dragIndex, hoverIndex) => {
|
56
|
+
// const dragCard = columns[dragIndex];
|
57
|
+
// setColumnsObject(
|
58
|
+
// update(columns, {
|
59
|
+
// $splice: [
|
60
|
+
// [dragIndex, 1],
|
61
|
+
// [hoverIndex, 0, dragCard],
|
62
|
+
// ],
|
63
|
+
// })
|
64
|
+
// );
|
65
|
+
// },
|
66
|
+
// [columns, setColumnsObject]
|
67
|
+
// );
|
68
|
+
|
60
69
|
return /*#__PURE__*/_react.default.createElement("div", {
|
61
70
|
className: "".concat(blockClass, "__customize-columns-column-list")
|
62
|
-
}, /*#__PURE__*/_react.default.createElement(_reactDnd.DndProvider, {
|
63
|
-
backend: _reactDndHtml5Backend.HTML5Backend
|
64
71
|
}, /*#__PURE__*/_react.default.createElement("ol", {
|
65
72
|
className: "".concat(blockClass, "__customize-columns-column-list--focus"),
|
66
73
|
role: "listbox",
|
@@ -97,13 +104,14 @@ var Columns = function Columns(_ref) {
|
|
97
104
|
columns: columns,
|
98
105
|
filterString: filterString,
|
99
106
|
focusIndex: focusIndex,
|
100
|
-
getNextIndex: getNextIndex
|
101
|
-
|
107
|
+
getNextIndex: getNextIndex
|
108
|
+
// moveElement={moveElement}
|
109
|
+
,
|
102
110
|
onSelectColumn: onSelectColumn,
|
103
111
|
setAriaRegionText: setAriaRegionText,
|
104
112
|
setColumnsObject: setColumnsObject,
|
105
113
|
setFocusIndex: setFocusIndex
|
106
|
-
})))
|
114
|
+
})));
|
107
115
|
};
|
108
116
|
Columns.propTypes = {
|
109
117
|
assistiveTextDisabledInstructionsLabel: _propTypes.default.string,
|
@@ -25,7 +25,6 @@ var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
25
25
|
filterString = _ref.filterString,
|
26
26
|
focusIndex = _ref.focusIndex,
|
27
27
|
getNextIndex = _ref.getNextIndex,
|
28
|
-
moveElement = _ref.moveElement,
|
29
28
|
onSelectColumn = _ref.onSelectColumn,
|
30
29
|
setAriaRegionText = _ref.setAriaRegionText,
|
31
30
|
setColumnsObject = _ref.setColumnsObject,
|
@@ -75,8 +74,9 @@ var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
75
74
|
disabled: filterString.length > 0 || isFrozenColumn,
|
76
75
|
ariaLabel: colHeaderTitle,
|
77
76
|
onGrab: setAriaRegionText,
|
78
|
-
isFocused: focusIndex === i
|
79
|
-
|
77
|
+
isFocused: focusIndex === i
|
78
|
+
// moveElement={moveElement}
|
79
|
+
,
|
80
80
|
onArrowKeyDown: function onArrowKeyDown(e, isGrabbed, currentIndex) {
|
81
81
|
if (isGrabbed) {
|
82
82
|
var _columns$nextIndex;
|
@@ -85,7 +85,7 @@ var DraggableItemsList = function DraggableItemsList(_ref) {
|
|
85
85
|
e.stopPropagation();
|
86
86
|
if (nextIndex >= 0 && !((_columns$nextIndex = columns[nextIndex]) !== null && _columns$nextIndex !== void 0 && _columns$nextIndex.sticky)) {
|
87
87
|
setFocusIndex(nextIndex);
|
88
|
-
moveElement(currentIndex, nextIndex);
|
88
|
+
// moveElement(currentIndex, nextIndex);
|
89
89
|
e.target.scrollIntoView({
|
90
90
|
block: 'center'
|
91
91
|
});
|
@@ -103,7 +103,7 @@ DraggableItemsList.propTypes = {
|
|
103
103
|
filterString: _propTypes.PropTypes.string.isRequired,
|
104
104
|
focusIndex: _propTypes.PropTypes.number.isRequired,
|
105
105
|
getNextIndex: _propTypes.PropTypes.func.isRequired,
|
106
|
-
moveElement:
|
106
|
+
// moveElement: PropTypes.func.isRequired,
|
107
107
|
onSelectColumn: _propTypes.PropTypes.func.isRequired,
|
108
108
|
setAriaRegionText: _propTypes.PropTypes.func.isRequired,
|
109
109
|
setColumnsObject: _propTypes.PropTypes.func.isRequired,
|
@@ -220,7 +220,7 @@ var OptionsTile = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
220
220
|
}, (0, _devtools.getDevtoolsProps)(componentName)), enabled !== undefined && /*#__PURE__*/_react.default.createElement("div", {
|
221
221
|
className: "".concat(blockClass, "__toggle-container")
|
222
222
|
}, /*#__PURE__*/_react.default.createElement(_react2.Toggle, {
|
223
|
-
id: "".concat(
|
223
|
+
id: "".concat(titleId, "-toggle"),
|
224
224
|
className: "".concat(blockClass, "__toggle"),
|
225
225
|
toggled: enabled,
|
226
226
|
"aria-labelledby": titleId,
|
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.
|
4
|
+
"version": "2.9.0",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -51,36 +51,34 @@
|
|
51
51
|
"postinstall": "carbon-telemetry collect --install",
|
52
52
|
"test": "jest --colors",
|
53
53
|
"//upgrade-dependencies": "# don't upgrade carbon (done globally), react/react-dom (explicit range peer dependency), chalk (issue #1596)",
|
54
|
-
"upgrade-dependencies": "npm-check-updates -u --dep dev,peer,prod --color --reject '/(carbon|^react$|^react-dom$|^chalk$|^
|
54
|
+
"upgrade-dependencies": "npm-check-updates -u --dep dev,peer,prod --color --reject '/(carbon|^react$|^react-dom$|^chalk$|^namor)/'"
|
55
55
|
},
|
56
56
|
"devDependencies": {
|
57
|
-
"@babel/cli": "^7.22.
|
58
|
-
"@babel/core": "^7.22.
|
59
|
-
"babel-preset-ibm-cloud-cognitive": "^0.14.
|
57
|
+
"@babel/cli": "^7.22.10",
|
58
|
+
"@babel/core": "^7.22.10",
|
59
|
+
"babel-preset-ibm-cloud-cognitive": "^0.14.39",
|
60
60
|
"chalk": "^4.1.2",
|
61
61
|
"change-case": "^4.1.2",
|
62
62
|
"copyfiles": "^2.4.1",
|
63
63
|
"cross-env": "^7.0.3",
|
64
64
|
"fs-extra": "^11.1.1",
|
65
65
|
"glob": "^10.3.3",
|
66
|
-
"jest": "^29.6.
|
67
|
-
"jest-config-ibm-cloud-cognitive": "^1.1.
|
68
|
-
"jest-environment-jsdom": "^29.6.
|
66
|
+
"jest": "^29.6.2",
|
67
|
+
"jest-config-ibm-cloud-cognitive": "^1.1.1",
|
68
|
+
"jest-environment-jsdom": "^29.6.2",
|
69
69
|
"namor": "^1.1.2",
|
70
|
-
"npm-check-updates": "^16.
|
70
|
+
"npm-check-updates": "^16.11.1",
|
71
71
|
"npm-run-all": "^4.1.5",
|
72
72
|
"rimraf": "^5.0.1",
|
73
|
-
"sass": "1.
|
73
|
+
"sass": "^1.64.2",
|
74
74
|
"yargs": "^17.7.2"
|
75
75
|
},
|
76
76
|
"dependencies": {
|
77
|
-
"@babel/runtime": "^7.22.
|
77
|
+
"@babel/runtime": "^7.22.10",
|
78
78
|
"@carbon/telemetry": "^0.1.0",
|
79
79
|
"framer-motion": "^6.5.1 < 7",
|
80
80
|
"immutability-helper": "^3.1.1",
|
81
81
|
"lodash": "^4.17.21",
|
82
|
-
"react-dnd": "^16.0.1",
|
83
|
-
"react-dnd-html5-backend": "^16.0.1",
|
84
82
|
"react-table": "^7.8.0",
|
85
83
|
"react-window": "^1.8.9"
|
86
84
|
},
|
@@ -88,11 +86,11 @@
|
|
88
86
|
"@carbon/grid": "^11.18.0",
|
89
87
|
"@carbon/layout": "^11.18.0",
|
90
88
|
"@carbon/motion": "^11.15.0",
|
91
|
-
"@carbon/react": "^1.
|
89
|
+
"@carbon/react": "^1.37.0",
|
92
90
|
"@carbon/themes": "^11.23.0",
|
93
91
|
"@carbon/type": "^11.22.0",
|
94
92
|
"react": "^16.8.6 || ^17.0.1 || ^18.2.0",
|
95
93
|
"react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
|
96
94
|
},
|
97
|
-
"gitHead": "
|
95
|
+
"gitHead": "d16309a4cb6cc8d75c12335695015fc272752f36"
|
98
96
|
}
|
@@ -26,6 +26,11 @@ $block-class: #{c4p-settings.$pkg-prefix}--datagrid;
|
|
26
26
|
padding: $spacing-07;
|
27
27
|
}
|
28
28
|
|
29
|
+
#storybook-root
|
30
|
+
.#{c4p-settings.$carbon-prefix}--actionable-notification__content {
|
31
|
+
white-space: pre-wrap;
|
32
|
+
}
|
33
|
+
|
29
34
|
.carbon-nested-table {
|
30
35
|
border-bottom: 1px solid $border-subtle-01;
|
31
36
|
|