@carbon/ibm-products 2.21.0 → 2.22.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.
Files changed (60) hide show
  1. package/README.md +8 -5
  2. package/css/index-full-carbon.css +531 -251
  3. package/css/index-full-carbon.css.map +1 -1
  4. package/css/index-full-carbon.min.css +1 -1
  5. package/css/index-full-carbon.min.css.map +1 -1
  6. package/css/index-without-carbon-released-only.css +199 -177
  7. package/css/index-without-carbon-released-only.css.map +1 -1
  8. package/css/index-without-carbon-released-only.min.css +1 -1
  9. package/css/index-without-carbon-released-only.min.css.map +1 -1
  10. package/css/index-without-carbon.css +243 -189
  11. package/css/index-without-carbon.css.map +1 -1
  12. package/css/index-without-carbon.min.css +1 -1
  13. package/css/index-without-carbon.min.css.map +1 -1
  14. package/css/index.css +223 -192
  15. package/css/index.css.map +1 -1
  16. package/css/index.min.css +1 -1
  17. package/css/index.min.css.map +1 -1
  18. package/es/components/Datagrid/Datagrid/DatagridContent.js +8 -3
  19. package/es/components/Datagrid/Datagrid/DatagridRow.js +6 -1
  20. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -3
  21. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +2 -2
  22. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +30 -72
  23. package/es/components/Datagrid/useRowIsMouseOver.js +3 -1
  24. package/es/components/DelimitedList/DelimitedList.docs-page.js +15 -0
  25. package/es/components/DelimitedList/DelimitedList.js +73 -0
  26. package/es/components/DelimitedList/index.js +8 -0
  27. package/es/components/SidePanel/SidePanel.js +145 -189
  28. package/es/components/TagSet/TagSet.js +21 -5
  29. package/es/components/TagSet/TagSetOverflow.js +13 -8
  30. package/es/components/index.js +2 -1
  31. package/es/global/js/hooks/useResizeObserver.js +5 -2
  32. package/es/global/js/package-settings.js +1 -0
  33. package/lib/components/Datagrid/Datagrid/DatagridContent.js +8 -3
  34. package/lib/components/Datagrid/Datagrid/DatagridRow.js +6 -1
  35. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -3
  36. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +2 -2
  37. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +30 -72
  38. package/lib/components/Datagrid/useRowIsMouseOver.js +3 -1
  39. package/lib/components/DelimitedList/DelimitedList.docs-page.js +25 -0
  40. package/lib/components/DelimitedList/DelimitedList.js +78 -0
  41. package/lib/components/DelimitedList/index.js +12 -0
  42. package/lib/components/SidePanel/SidePanel.js +145 -189
  43. package/lib/components/TagSet/TagSet.js +21 -5
  44. package/lib/components/TagSet/TagSetOverflow.js +12 -7
  45. package/lib/components/index.js +8 -1
  46. package/lib/global/js/hooks/useResizeObserver.js +5 -2
  47. package/lib/global/js/package-settings.js +1 -0
  48. package/package.json +9 -8
  49. package/scss/components/Datagrid/_datagrid.scss +4 -0
  50. package/scss/components/Datagrid/styles/_datagrid.scss +9 -1
  51. package/scss/components/Datagrid/styles/_useStickyColumn.scss +2 -0
  52. package/scss/components/DelimitedList/_carbon-imports.scss +9 -0
  53. package/scss/components/DelimitedList/_delimited-list.scss +27 -0
  54. package/scss/components/DelimitedList/_index-with-carbon.scss +9 -0
  55. package/scss/components/DelimitedList/_index.scss +8 -0
  56. package/scss/components/SidePanel/_side-panel-variables.scss +5 -1
  57. package/scss/components/SidePanel/_side-panel.scss +155 -187
  58. package/scss/components/_index-with-carbon.scss +1 -0
  59. package/scss/components/_index.scss +1 -0
  60. package/telemetry.yml +790 -0
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.useResizeObserver = void 0;
8
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
8
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
10
  var _react = require("react");
10
11
  /**
@@ -15,6 +16,7 @@ var _react = require("react");
15
16
  */
16
17
 
17
18
  var useResizeObserver = exports.useResizeObserver = function useResizeObserver(ref, callback) {
19
+ var deps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
18
20
  var _useState = (0, _react.useState)(-1),
19
21
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
20
22
  width = _useState2[0],
@@ -46,7 +48,8 @@ var useResizeObserver = exports.useResizeObserver = function useResizeObserver(r
46
48
  return;
47
49
  }
48
50
  getInitialSize();
49
- }, [width, height, ref]);
51
+ // eslint-disable-next-line react-hooks/exhaustive-deps
52
+ }, [width, height, ref].concat((0, _toConsumableArray2.default)(deps)));
50
53
  (0, _react.useLayoutEffect)(function () {
51
54
  if (!(ref !== null && ref !== void 0 && ref.current)) {
52
55
  return;
@@ -76,7 +79,7 @@ var useResizeObserver = exports.useResizeObserver = function useResizeObserver(r
76
79
  observer = null;
77
80
  };
78
81
  // eslint-disable-next-line react-hooks/exhaustive-deps
79
- }, [ref.current]);
82
+ }, [ref].concat((0, _toConsumableArray2.default)(deps)));
80
83
  return {
81
84
  width: width,
82
85
  height: height
@@ -74,6 +74,7 @@ var defaults = {
74
74
  EditTearsheetNarrow: false,
75
75
  EditFullPage: false,
76
76
  EditUpdateCards: false,
77
+ DelimitedList: false,
77
78
  /* new component flags here - comment used by generate CLI */
78
79
 
79
80
  // Novice to pro components not yet reviewed and released:
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.21.0",
4
+ "version": "2.22.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -24,7 +24,8 @@
24
24
  "es",
25
25
  "lib",
26
26
  "scss",
27
- "flags.js"
27
+ "flags.js",
28
+ "telemetry.yml"
28
29
  ],
29
30
  "keywords": [
30
31
  "carbon",
@@ -48,7 +49,7 @@
48
49
  "ci-check": "node scripts/import",
49
50
  "clean": "rimraf es lib css scss",
50
51
  "generate": "cross-env FORCE_COLOR=1 node scripts/generate",
51
- "postinstall": "carbon-telemetry collect --install",
52
+ "postinstall": "ibmtelemetry --config=telemetry.yml",
52
53
  "test": "jest --colors",
53
54
  "//upgrade-dependencies": "# don't upgrade carbon (done globally), react/react-dom (explicit range peer dependency), chalk (issue #1596)",
54
55
  "upgrade-dependencies": "npm-check-updates -u --dep dev,peer,prod --color --reject '/(carbon|^react$|^react-dom$|^chalk$|^namor)/'"
@@ -75,11 +76,11 @@
75
76
  },
76
77
  "dependencies": {
77
78
  "@babel/runtime": "^7.22.10",
78
- "@carbon/ibm-products-styles": "^2.20.1",
79
- "@carbon/telemetry": "^0.1.0",
79
+ "@carbon/ibm-products-styles": "^2.21.0",
80
80
  "@dnd-kit/core": "^6.0.8",
81
81
  "@dnd-kit/sortable": "^7.0.2",
82
82
  "@dnd-kit/utilities": "^3.2.1",
83
+ "@ibm/telemetry-js": "^1.2.0",
83
84
  "framer-motion": "^6.5.1 < 7",
84
85
  "immutability-helper": "^3.1.1",
85
86
  "lodash": "^4.17.21",
@@ -91,11 +92,11 @@
91
92
  "@carbon/grid": "^11.21.1",
92
93
  "@carbon/layout": "^11.20.1",
93
94
  "@carbon/motion": "^11.16.1",
94
- "@carbon/react": "^1.47.0",
95
- "@carbon/themes": "^11.28.0",
95
+ "@carbon/react": "^1.48.1",
96
+ "@carbon/themes": "^11.29.1",
96
97
  "@carbon/type": "^11.25.1",
97
98
  "react": "^16.8.6 || ^17.0.1 || ^18.2.0",
98
99
  "react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
99
100
  },
100
- "gitHead": "752821d664db5561979e60b06ad4d70ab644a250"
101
+ "gitHead": "cc3061b3debb02bbbe32a8981d1ff39e9bca0f4a"
101
102
  }
@@ -80,3 +80,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--datagrid;
80
80
  ) {
81
81
  min-width: auto;
82
82
  }
83
+
84
+ .#{$block-class} .#{c4p-settings.$carbon-prefix}--pagination {
85
+ background-color: $layer-02;
86
+ }
@@ -45,6 +45,7 @@
45
45
  position: sticky;
46
46
  z-index: 1;
47
47
  left: 0;
48
+ background-color: $layer-01;
48
49
  }
49
50
  }
50
51
 
@@ -68,6 +69,7 @@
68
69
  &.#{$block-class}__checkbox-cell-sticky-left {
69
70
  position: sticky;
70
71
  left: 0;
72
+ background-color: $layer-01;
71
73
  }
72
74
  }
73
75
 
@@ -183,6 +185,12 @@
183
185
  overflow-x: auto;
184
186
  }
185
187
 
188
+ .#{$block-class}-filter-panel
189
+ + .#{$block-class}__table-container-inner
190
+ .#{c4p-settings.$carbon-prefix}--data-table-content {
191
+ height: fit-content;
192
+ }
193
+
186
194
  table.#{$block-class}__table-simple {
187
195
  display: flex;
188
196
  overflow: auto;
@@ -346,7 +354,7 @@
346
354
  }
347
355
 
348
356
  .#{$block-class}__resizableColumn:hover {
349
- background-color: $background-selected-hover;
357
+ background-color: $layer-selected-hover;
350
358
 
351
359
  .#{$block-class}__resizer {
352
360
  border-right: $spacing-01 solid $border-strong-01;
@@ -17,6 +17,7 @@
17
17
  display: flex;
18
18
  align-items: center;
19
19
  border-left: 1px solid $layer-active-02;
20
+ background-color: $layer-01;
20
21
  }
21
22
 
22
23
  .#{variables.$block-class}__right-sticky-column-header {
@@ -32,6 +33,7 @@
32
33
  display: flex;
33
34
  align-items: center;
34
35
  border-right: 1px solid $layer-active-02;
36
+ background-color: $layer-01;
35
37
  }
36
38
 
37
39
  .#{variables.$block-class}__left-sticky-column-header {
@@ -0,0 +1,9 @@
1
+ //
2
+ // Copyright IBM Corp. 2024, 2024
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 any Carbon component styles used from DelimitedList in this file.
9
+ // DelimitedList uses the following Carbon components:
@@ -0,0 +1,27 @@
1
+ //
2
+ // Copyright IBM Corp. 2024, 2024
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
+ // Standard imports.
9
+ @use '../../global/styles/project-settings' as c4p-settings;
10
+ @use '../../global/styles/mixins';
11
+
12
+ // Other Carbon settings if needed
13
+ // TODO: @use '@carbon/styles/scss/grid';
14
+ // or
15
+ // TODO: @use '@carbon/react/scss/grid';
16
+
17
+ // DelimitedList uses the following Carbon for IBM Products components:
18
+ // TODO: @use(s) of IBM Products component styles used by DelimitedList
19
+
20
+ // The block part of our conventional BEM class names (blockClass__E--M).
21
+ $block-class: #{c4p-settings.$pkg-prefix}--delimited-list;
22
+
23
+ .#{$block-class}-truncate {
24
+ overflow: hidden;
25
+ text-overflow: ellipsis;
26
+ white-space: nowrap;
27
+ }
@@ -0,0 +1,9 @@
1
+ //
2
+ // Copyright IBM Corp. 2024, 2024
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-imports';
9
+ @use './delimited-list';
@@ -0,0 +1,8 @@
1
+ //
2
+ // Copyright IBM Corp. 2024, 2024
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 './delimited-list';
@@ -5,10 +5,14 @@
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
+ /* One or two values
9
+ * - width (first value)
10
+ * - min-width (optional second value)
11
+ */
8
12
  $side-panel-sizes: (
9
13
  xs: 16rem,
10
14
  sm: 20rem,
11
15
  md: 30rem,
12
16
  lg: 40rem,
13
- 2xl: 75%,
17
+ 2xl: 40rem 75%,
14
18
  );