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