@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.
Files changed (78) hide show
  1. package/css/index-full-carbon.css +21 -65
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +2 -2
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +1 -0
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +21 -65
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +2 -2
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +21 -65
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +2 -2
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/APIKeyModal/APIKeyDownloader.js +21 -23
  18. package/es/components/APIKeyModal/APIKeyModal.js +43 -45
  19. package/es/components/AddSelect/AddSelectBody.js +1 -1
  20. package/es/components/AddSelect/hooks/usePath.js +7 -1
  21. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +1 -1
  22. package/es/components/ButtonMenu/ButtonMenu.js +4 -2
  23. package/es/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +1 -1
  24. package/es/components/CreateFullPage/CreateFullPage.js +8 -2
  25. package/es/components/CreateTearsheet/CreateTearsheet.js +8 -2
  26. package/es/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +4 -2
  27. package/es/components/Datagrid/Datagrid/DatagridContent.js +10 -3
  28. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +7 -9
  29. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +11 -13
  30. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +26 -24
  31. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/{CustomizeColumnsModal.js → CustomizeColumnsTearsheet.js} +32 -32
  32. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/TearsheetWrapper.js +51 -0
  33. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/index.js +6 -7
  34. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +6 -4
  35. package/es/components/Datagrid/useCustomizeColumns.js +13 -15
  36. package/es/components/Datagrid/utils/getInlineEditColumns.js +1 -0
  37. package/es/components/Datagrid/utils/makeData.js +1 -1
  38. package/es/components/ImportModal/ImportModal.js +42 -44
  39. package/es/components/index.js +1 -1
  40. package/es/global/js/hooks/useCreateComponentFocus.js +31 -10
  41. package/es/global/js/hooks/useCreateComponentStepChange.js +73 -79
  42. package/es/global/js/utils/test-helper.js +12 -14
  43. package/es/global/js/utils/unwrap-if-fragment.js +1 -1
  44. package/lib/components/APIKeyModal/APIKeyDownloader.js +21 -23
  45. package/lib/components/APIKeyModal/APIKeyModal.js +43 -45
  46. package/lib/components/AddSelect/AddSelectBody.js +1 -1
  47. package/lib/components/AddSelect/hooks/usePath.js +6 -0
  48. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +1 -1
  49. package/lib/components/ButtonMenu/ButtonMenu.js +4 -2
  50. package/lib/components/ButtonSetWithOverflow/ButtonSetWithOverflow.js +1 -1
  51. package/lib/components/CreateFullPage/CreateFullPage.js +8 -2
  52. package/lib/components/CreateTearsheet/CreateTearsheet.js +8 -2
  53. package/lib/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +4 -2
  54. package/lib/components/Datagrid/Datagrid/DatagridContent.js +10 -3
  55. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Actions.js +7 -9
  56. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/ButtonWrapper.js +6 -6
  57. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.js +26 -24
  58. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/{CustomizeColumnsModal.js → CustomizeColumnsTearsheet.js} +26 -25
  59. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/{ModalWrapper.js → TearsheetWrapper.js} +30 -33
  60. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/index.js +3 -3
  61. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +6 -4
  62. package/lib/components/Datagrid/useCustomizeColumns.js +7 -7
  63. package/lib/components/Datagrid/utils/getInlineEditColumns.js +1 -0
  64. package/lib/components/Datagrid/utils/makeData.js +1 -1
  65. package/lib/components/ImportModal/ImportModal.js +42 -44
  66. package/lib/components/index.js +6 -0
  67. package/lib/global/js/hooks/useCreateComponentFocus.js +32 -10
  68. package/lib/global/js/hooks/useCreateComponentStepChange.js +73 -79
  69. package/lib/global/js/utils/test-helper.js +12 -14
  70. package/lib/global/js/utils/unwrap-if-fragment.js +1 -1
  71. package/package.json +10 -10
  72. package/scss/components/Datagrid/styles/_datagrid.scss +5 -0
  73. package/scss/components/Datagrid/styles/_draggableElement.scss +9 -8
  74. package/scss/components/Datagrid/styles/_index.scss +8 -8
  75. package/scss/components/Datagrid/styles/addons/_CustomizeColumnsTearsheet.scss +60 -0
  76. package/scss/components/Tearsheet/_tearsheet.scss +2 -0
  77. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/ModalWrapper.js +0 -56
  78. package/scss/components/Datagrid/styles/addons/_CustomizeColumnsModal.scss +0 -86
@@ -1,10 +1,10 @@
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
- */
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
- svg.#{$block-class}__draggable-handleStyle.disable {
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
- * Licensed Materials - Property of IBM
3
- * 5724-Q36
4
- * (c) Copyright IBM Corp. 2020, 2021
5
- * US Government Users Restricted Rights - Use, duplication or disclosure
6
- * restricted by GSA ADP Schedule Contract with IBM Corp.
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/CustomizeColumnsModal';
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
+ }
@@ -202,6 +202,8 @@
202
202
  @include carbon--breakpoint-up('md') {
203
203
  max-width: 60%;
204
204
  }
205
+
206
+ word-break: break-all;
205
207
  }
206
208
 
207
209
  &.#{$block-class}--wide .#{$block-class}__header-description {
@@ -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
- }