@carbon/ibm-products 2.0.0-rc.11 → 2.0.0-rc.13
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 +29 -74
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +2 -2
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +1 -0
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +29 -74
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +2 -2
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +28 -74
- package/css/index.css.map +1 -1
- package/css/index.min.css +2 -2
- package/css/index.min.css.map +1 -1
- package/es/components/AddSelect/AddSelectBody.js +1 -1
- package/es/components/AddSelect/hooks/usePath.js +8 -1
- package/es/components/CreateFullPage/CreateFullPage.js +9 -2
- package/es/components/CreateTearsheet/CreateTearsheet.js +9 -2
- package/es/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +3 -1
- package/es/components/Datagrid/Datagrid/DatagridContent.js +10 -3
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +7 -10
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +11 -13
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +28 -27
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/{CustomizeColumnsModal.js → CustomizeColumnsTearsheet.js} +31 -31
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +56 -0
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/index.js +1 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +8 -4
- package/es/components/Datagrid/useCustomizeColumns.js +8 -8
- package/es/components/Datagrid/utils/getInlineEditColumns.js +1 -0
- package/es/components/Datagrid/utils/makeData.js +1 -1
- package/es/components/index.js +1 -1
- package/es/global/js/hooks/useCreateComponentFocus.js +38 -10
- package/lib/components/AddSelect/AddSelectBody.js +1 -1
- package/lib/components/AddSelect/hooks/usePath.js +7 -0
- package/lib/components/CreateFullPage/CreateFullPage.js +9 -2
- package/lib/components/CreateTearsheet/CreateTearsheet.js +9 -2
- package/lib/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +3 -1
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +9 -3
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +7 -10
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +6 -6
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +30 -28
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/{CustomizeColumnsModal.js → CustomizeColumnsTearsheet.js} +27 -25
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/{ModalWrapper.js → TearsheetWrapper.js} +31 -36
- package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/index.js +3 -3
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +8 -4
- package/lib/components/Datagrid/useCustomizeColumns.js +7 -7
- package/lib/components/Datagrid/utils/getInlineEditColumns.js +1 -0
- package/lib/components/Datagrid/utils/makeData.js +1 -1
- package/lib/components/index.js +6 -0
- package/lib/global/js/hooks/useCreateComponentFocus.js +42 -11
- package/package.json +2 -2
- package/scss/components/Datagrid/styles/_datagrid.scss +5 -0
- package/scss/components/Datagrid/styles/_draggableElement.scss +9 -8
- package/scss/components/Datagrid/styles/_index.scss +7 -8
- package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +65 -0
- package/scss/components/Tearsheet/_tearsheet.scss +2 -0
- package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ModalWrapper.js +0 -63
- package/scss/components/Datagrid/styles/addons/_CustomizeColumnsModal.scss +0 -93
@@ -1,10 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
//
|
2
|
+
// Copyright IBM Corp. 2022, 2022
|
3
|
+
//
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
6
|
+
//
|
7
|
+
|
8
8
|
@use '@carbon/styles/scss/theme' as *;
|
9
9
|
@use '@carbon/styles/scss/spacing' as *;
|
10
10
|
@use './variables';
|
@@ -20,7 +20,7 @@
|
|
20
20
|
pointer-events: none;
|
21
21
|
}
|
22
22
|
|
23
|
-
|
23
|
+
.#{variables.$block-class}__draggable-handleStyle.disabled svg {
|
24
24
|
fill: $icon-disabled;
|
25
25
|
}
|
26
26
|
|
@@ -56,6 +56,7 @@ svg.#{variables.$block-class}__draggable-handleStyle.disable {
|
|
56
56
|
.#{variables.$block-class}__draggable-handleHolder-droppable {
|
57
57
|
display: flex;
|
58
58
|
width: 100%;
|
59
|
+
align-items: center;
|
59
60
|
}
|
60
61
|
|
61
62
|
.#{variables.$block-class}__draggable-handleHolder-grabbed {
|
@@ -1,10 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
*/
|
1
|
+
//
|
2
|
+
// Copyright IBM Corp. 2022, 2022
|
3
|
+
//
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
6
|
+
//
|
8
7
|
@use './datagrid';
|
9
8
|
@use './useNestedRows';
|
10
9
|
@use './useNestedTable';
|
@@ -13,7 +12,7 @@
|
|
13
12
|
@use './useColumnCenterAlign';
|
14
13
|
@use './useStickyColumn';
|
15
14
|
@use './useActionsColumn';
|
16
|
-
@use './addons/
|
15
|
+
@use './addons/CustomizeColumnsTearsheet';
|
17
16
|
@use './addons/RowSizeDropdown';
|
18
17
|
@use './addons/FilterFlyout';
|
19
18
|
@use './useSelectAllToggle';
|
@@ -0,0 +1,65 @@
|
|
1
|
+
//
|
2
|
+
// Copyright IBM Corp. 2022, 2022
|
3
|
+
//
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
6
|
+
//
|
7
|
+
|
8
|
+
@use '@carbon/styles/scss/theme' as *;
|
9
|
+
@use '@carbon/styles/scss/spacing' as *;
|
10
|
+
@use '@carbon/styles/scss/type' as *;
|
11
|
+
@use '@carbon/type/scss/font-family';
|
12
|
+
@use '@carbon/layout' as *;
|
13
|
+
|
14
|
+
@use '../../../../global/styles/project-settings' as c4p-settings;
|
15
|
+
@use '../variables';
|
16
|
+
|
17
|
+
.#{variables.$block-class}__customize-columns-tearsheet {
|
18
|
+
.#{c4p-settings.$pkg-prefix}--tearsheet__content {
|
19
|
+
display: flex;
|
20
|
+
flex-flow: column;
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
.#{variables.$block-class}__customize-columns-tearsheet--actions
|
25
|
+
input[role='searchbox'] {
|
26
|
+
height: $spacing-09;
|
27
|
+
padding-left: $spacing-09;
|
28
|
+
border-bottom: 1px solid $background-active;
|
29
|
+
}
|
30
|
+
|
31
|
+
.#{variables.$block-class}__customize-columns-checkbox-wrapper {
|
32
|
+
display: flex;
|
33
|
+
justify-content: center;
|
34
|
+
padding-left: $spacing-03;
|
35
|
+
margin-bottom: 0;
|
36
|
+
}
|
37
|
+
|
38
|
+
.#{variables.$block-class}__customize-columns-column-list {
|
39
|
+
position: relative; // needed for the react-dnd, otherwise the drag preview will not work correctly
|
40
|
+
overflow: auto;
|
41
|
+
}
|
42
|
+
|
43
|
+
.#{variables.$block-class}__customize-columns-select-all,
|
44
|
+
.#{variables.$block-class}__customize-columns-select-all--selected {
|
45
|
+
position: sticky;
|
46
|
+
z-index: 1;
|
47
|
+
top: 0;
|
48
|
+
display: flex;
|
49
|
+
height: $spacing-09;
|
50
|
+
padding-left: $spacing-08;
|
51
|
+
border-bottom: 1px solid $layer-active;
|
52
|
+
background-color: $layer;
|
53
|
+
|
54
|
+
.#{c4p-settings.$carbon-prefix}--checkbox-label-text {
|
55
|
+
@include font-family.font-weight('semibold');
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
.#{variables.$block-class}__customize-columns-select-all:hover {
|
60
|
+
background-color: $layer-hover;
|
61
|
+
}
|
62
|
+
|
63
|
+
.#{variables.$block-class}__customize-columns-select-all--selected {
|
64
|
+
background-color: $layer-selected;
|
65
|
+
}
|
@@ -1,63 +0,0 @@
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
2
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
|
-
var _excluded = ["onSaveColumnPrefs", "isModalOpen", "setIsModalOpen", "labels"];
|
4
|
-
// @flow
|
5
|
-
|
6
|
-
/*
|
7
|
-
* Licensed Materials - Property of IBM
|
8
|
-
* 5724-Q36
|
9
|
-
* (c) Copyright IBM Corp. 2021
|
10
|
-
* US Government Users Restricted Rights - Use, duplication or disclosure
|
11
|
-
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
12
|
-
*/
|
13
|
-
import * as React from 'react';
|
14
|
-
import PropTypes from 'prop-types';
|
15
|
-
import CustomizeColumnsModal from './CustomizeColumnsModal';
|
16
|
-
|
17
|
-
var ModalWrapper = function ModalWrapper(_ref) {
|
18
|
-
var instance = _ref.instance;
|
19
|
-
|
20
|
-
var _instance$customizeCo = instance.customizeColumnsProps,
|
21
|
-
_onSaveColumnPrefs = _instance$customizeCo.onSaveColumnPrefs,
|
22
|
-
isModalOpen = _instance$customizeCo.isModalOpen,
|
23
|
-
setIsModalOpen = _instance$customizeCo.setIsModalOpen,
|
24
|
-
labels = _instance$customizeCo.labels,
|
25
|
-
rest = _objectWithoutProperties(_instance$customizeCo, _excluded);
|
26
|
-
|
27
|
-
if (isModalOpen) {
|
28
|
-
return /*#__PURE__*/React.createElement(CustomizeColumnsModal, _extends({}, rest, labels, {
|
29
|
-
isOpen: isModalOpen,
|
30
|
-
setIsModalOpen: setIsModalOpen,
|
31
|
-
columnDefinitions: instance.allColumns,
|
32
|
-
originalColumnDefinitions: instance.columns,
|
33
|
-
onSaveColumnPrefs: function onSaveColumnPrefs(updatedColDefs) {
|
34
|
-
var hiddenIds = updatedColDefs.filter(function (colDef) {
|
35
|
-
return !colDef.isVisible;
|
36
|
-
}).map(function (colDef) {
|
37
|
-
return colDef.id;
|
38
|
-
});
|
39
|
-
instance.setHiddenColumns(hiddenIds);
|
40
|
-
|
41
|
-
if (typeof instance.setColumnOrder === 'function') {
|
42
|
-
instance.setColumnOrder(updatedColDefs.map(function (colDef) {
|
43
|
-
return colDef.id;
|
44
|
-
}));
|
45
|
-
} else {
|
46
|
-
// eslint-disable-next-line no-console
|
47
|
-
console.warn("Column order can not be updated. Did you forget to add 'useColumnOrder' in 'useDatagrid'");
|
48
|
-
}
|
49
|
-
|
50
|
-
if (typeof _onSaveColumnPrefs === 'function') {
|
51
|
-
_onSaveColumnPrefs(updatedColDefs);
|
52
|
-
}
|
53
|
-
}
|
54
|
-
}));
|
55
|
-
}
|
56
|
-
|
57
|
-
return null;
|
58
|
-
};
|
59
|
-
|
60
|
-
ModalWrapper.propTypes = {
|
61
|
-
instance: PropTypes.object.isRequired
|
62
|
-
};
|
63
|
-
export default ModalWrapper;
|
@@ -1,93 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Licensed Materials - Property of IBM
|
3
|
-
* 5724-Q36
|
4
|
-
* (c) Copyright IBM Corp. 2021, 2022
|
5
|
-
* US Government Users Restricted Rights - Use, duplication or disclosure
|
6
|
-
* restricted by GSA ADP Schedule Contract with IBM Corp.
|
7
|
-
*/
|
8
|
-
|
9
|
-
@use '@carbon/styles/scss/theme' as *;
|
10
|
-
@use '@carbon/styles/scss/spacing' as *;
|
11
|
-
@use '@carbon/styles/scss/type';
|
12
|
-
@use '../../../../global/styles/project-settings' as c4p-settings;
|
13
|
-
@use '../variables';
|
14
|
-
|
15
|
-
.#{variables.$block-class}__customize-columns-modal {
|
16
|
-
.#{c4p-settings.$carbon-prefix}--modal-content {
|
17
|
-
position: inherit;
|
18
|
-
display: flex;
|
19
|
-
flex-flow: column;
|
20
|
-
padding: 0;
|
21
|
-
margin: 0;
|
22
|
-
}
|
23
|
-
}
|
24
|
-
|
25
|
-
.#{variables.$block-class}__customize-columns-checkbox-wrapper {
|
26
|
-
margin-bottom: 0;
|
27
|
-
}
|
28
|
-
.#{variables.$block-class}__customize-columns-checkbox-wrapper {
|
29
|
-
display: flex;
|
30
|
-
justify-content: center;
|
31
|
-
}
|
32
|
-
|
33
|
-
.#{variables.$block-class}__customize-columns-modal--actions {
|
34
|
-
display: flex;
|
35
|
-
height: $spacing-09;
|
36
|
-
flex-flow: row;
|
37
|
-
background-color: $field-02;
|
38
|
-
}
|
39
|
-
|
40
|
-
.#{variables.$block-class}__customize-columns-modal--actions
|
41
|
-
input[role='searchbox'] {
|
42
|
-
height: $spacing-09;
|
43
|
-
padding-left: $spacing-08;
|
44
|
-
border-bottom: none;
|
45
|
-
}
|
46
|
-
|
47
|
-
.#{variables.$block-class}__customize-columns-modal--actions > button {
|
48
|
-
margin-left: $spacing-05;
|
49
|
-
}
|
50
|
-
|
51
|
-
.#{variables.$block-class}__customize-columns-instructions {
|
52
|
-
padding-left: $spacing-05;
|
53
|
-
margin-bottom: $spacing-06;
|
54
|
-
|
55
|
-
@include type.type-style('body-long-01');
|
56
|
-
|
57
|
-
color: $text-primary;
|
58
|
-
}
|
59
|
-
|
60
|
-
.#{variables.$block-class}__customize-columns-column-list {
|
61
|
-
position: relative; // needed for the react-dnd, otherwise the drag preview will not work correctly
|
62
|
-
overflow: auto;
|
63
|
-
}
|
64
|
-
|
65
|
-
.#{variables.$block-class}__customize-columns-select-all {
|
66
|
-
display: flex;
|
67
|
-
height: $spacing-09;
|
68
|
-
align-items: center;
|
69
|
-
padding-left: $spacing-08;
|
70
|
-
border-bottom: 1px solid $layer-active;
|
71
|
-
background-color: $layer-01;
|
72
|
-
}
|
73
|
-
.#{variables.$block-class}__customize-columns-select-all:hover {
|
74
|
-
background-color: $layer-hover-01;
|
75
|
-
}
|
76
|
-
.#{variables.$block-class}__customize-columns-select-all-selected {
|
77
|
-
display: flex;
|
78
|
-
height: $spacing-09;
|
79
|
-
align-items: center;
|
80
|
-
padding-left: $spacing-08;
|
81
|
-
border-bottom: 1px solid $layer-active;
|
82
|
-
background-color: $layer-selected-01;
|
83
|
-
}
|
84
|
-
|
85
|
-
.#{variables.$block-class}__customize-columns-select-all-selected:hover {
|
86
|
-
background-color: $background-selected-hover;
|
87
|
-
}
|
88
|
-
|
89
|
-
.#{variables.$block-class}
|
90
|
-
.#{variables.$block-class}__customize-columns-modal
|
91
|
-
.#{c4p-settings.$carbon-prefix}--modal-content {
|
92
|
-
margin-bottom: 0;
|
93
|
-
}
|