@carbon/ibm-products 2.21.0 → 2.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. package/README.md +8 -4
  2. package/css/index-full-carbon.css +559 -357
  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 +227 -267
  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 +271 -295
  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 +251 -298
  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/DatagridHeaderRow.js +14 -4
  20. package/es/components/Datagrid/Datagrid/DatagridRow.js +6 -1
  21. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -3
  22. package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +2 -2
  23. package/es/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +30 -72
  24. package/es/components/Datagrid/Datagrid/addons/Slug/ColumnHeaderSlug.js +26 -0
  25. package/es/components/Datagrid/useDefaultStringRenderer.js +3 -3
  26. package/es/components/Datagrid/useRowIsMouseOver.js +3 -1
  27. package/es/components/Datagrid/useSortableColumns.js +15 -5
  28. package/es/components/DelimitedList/DelimitedList.docs-page.js +15 -0
  29. package/es/components/DelimitedList/DelimitedList.js +73 -0
  30. package/es/components/DelimitedList/index.js +8 -0
  31. package/es/components/FilterSummary/FilterSummary.js +100 -19
  32. package/es/components/SidePanel/SidePanel.js +145 -189
  33. package/es/components/TagSet/TagSet.js +31 -7
  34. package/es/components/TagSet/TagSetOverflow.js +13 -8
  35. package/es/components/index.js +2 -1
  36. package/es/global/js/hooks/useResizeObserver.js +5 -2
  37. package/es/global/js/package-settings.js +1 -0
  38. package/lib/components/Datagrid/Datagrid/DatagridContent.js +8 -3
  39. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +14 -4
  40. package/lib/components/Datagrid/Datagrid/DatagridRow.js +6 -1
  41. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterFlyout.js +6 -3
  42. package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +2 -2
  43. package/lib/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilters.js +30 -72
  44. package/lib/components/Datagrid/Datagrid/addons/Slug/ColumnHeaderSlug.js +36 -0
  45. package/lib/components/Datagrid/useDefaultStringRenderer.js +3 -3
  46. package/lib/components/Datagrid/useRowIsMouseOver.js +3 -1
  47. package/lib/components/Datagrid/useSortableColumns.js +15 -5
  48. package/lib/components/DelimitedList/DelimitedList.docs-page.js +25 -0
  49. package/lib/components/DelimitedList/DelimitedList.js +78 -0
  50. package/lib/components/DelimitedList/index.js +12 -0
  51. package/lib/components/FilterSummary/FilterSummary.js +103 -23
  52. package/lib/components/SidePanel/SidePanel.js +145 -189
  53. package/lib/components/TagSet/TagSet.js +31 -7
  54. package/lib/components/TagSet/TagSetOverflow.js +12 -7
  55. package/lib/components/index.js +8 -1
  56. package/lib/global/js/hooks/useResizeObserver.js +5 -2
  57. package/lib/global/js/package-settings.js +1 -0
  58. package/package.json +9 -8
  59. package/scss/components/CreateSidePanel/_create-side-panel.scss +1 -38
  60. package/scss/components/Datagrid/_datagrid.scss +4 -0
  61. package/scss/components/Datagrid/styles/_datagrid.scss +24 -1
  62. package/scss/components/Datagrid/styles/_useStickyColumn.scss +2 -0
  63. package/scss/components/DelimitedList/_carbon-imports.scss +9 -0
  64. package/scss/components/DelimitedList/_delimited-list.scss +27 -0
  65. package/scss/components/DelimitedList/_index-with-carbon.scss +9 -0
  66. package/scss/components/DelimitedList/_index.scss +8 -0
  67. package/scss/components/EditSidePanel/_edit-side-panel.scss +0 -18
  68. package/scss/components/FilterSummary/_filter-summary.scss +22 -1
  69. package/scss/components/SidePanel/_side-panel-variables.scss +5 -1
  70. package/scss/components/SidePanel/_side-panel.scss +155 -187
  71. package/scss/components/_index-with-carbon.scss +1 -0
  72. package/scss/components/_index.scss +1 -0
  73. package/telemetry.yml +790 -0
@@ -99,6 +99,12 @@ Object.defineProperty(exports, "Datagrid", {
99
99
  return _Datagrid.Datagrid;
100
100
  }
101
101
  });
102
+ Object.defineProperty(exports, "DelimitedList", {
103
+ enumerable: true,
104
+ get: function get() {
105
+ return _DelimitedList.DelimitedList;
106
+ }
107
+ });
102
108
  Object.defineProperty(exports, "EditFullPage", {
103
109
  enumerable: true,
104
110
  get: function get() {
@@ -553,4 +559,5 @@ var _EditUpdateCards = require("./EditUpdateCards");
553
559
  var _Checklist = require("./Checklist");
554
560
  var _Guidebanner = require("./Guidebanner");
555
561
  var _InlineTip = require("./InlineTip");
556
- var _NonLinearReading = require("./NonLinearReading");
562
+ var _NonLinearReading = require("./NonLinearReading");
563
+ var _DelimitedList = require("./DelimitedList");
@@ -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.current].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.current].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.23.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.22.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": "53994e2a9217f53da099f5599541618fbfbc7790"
101
102
  }
@@ -24,25 +24,6 @@ $side-panel-block-class: #{c4p-settings.$pkg-prefix}--side-panel;
24
24
  padding-right: calc(20% - #{$spacing-05});
25
25
  }
26
26
 
27
- @each $size, $value in side-panel-vars.$side-panel-sizes {
28
- .#{$create-side-panel-block-class}.#{$side-panel-block-class}__container--#{$size}
29
- .#{$side-panel-block-class}__title-text {
30
- width: calc(#{$value} - #{$spacing-05});
31
- // stylelint-disable-next-line carbon/layout-token-use
32
- padding-right: calc((#{$value} * 0.2) - #{$spacing-05});
33
- margin-bottom: $spacing-02;
34
- }
35
- .#{$create-side-panel-block-class}.#{$side-panel-block-class}__container--#{$size}
36
- .#{$side-panel-block-class}__subtitle-text {
37
- width: calc(#{$value} - #{$spacing-05});
38
- // stylelint-disable-next-line carbon/layout-token-use
39
- padding-right: calc((#{$value} * 0.2) - #{$spacing-05});
40
- padding-bottom: $spacing-05;
41
- border-bottom: 1px solid $layer-accent-01;
42
- color: $text-secondary;
43
- }
44
- }
45
-
46
27
  .#{c4p-settings.$carbon-prefix}--form.#{$create-side-panel-block-class}__form {
47
28
  padding-top: $spacing-05;
48
29
  }
@@ -70,24 +51,6 @@ $side-panel-block-class: #{c4p-settings.$pkg-prefix}--side-panel;
70
51
  display: none;
71
52
  }
72
53
 
73
- .#{$create-side-panel-block-class}__title {
74
- @include type.type-style('heading-03');
75
-
76
- margin-bottom: $spacing-02;
77
- }
78
-
79
- .#{$create-side-panel-block-class}__subtitle {
80
- @include type.type-style('body-compact-01');
81
-
82
- margin-bottom: $spacing-03;
54
+ .#{$create-side-panel-block-class} .#{$side-panel-block-class}__subtitle-text {
83
55
  color: $text-secondary;
84
56
  }
85
- .#{$side-panel-block-class}
86
- .#{$create-side-panel-block-class}__actions-container {
87
- position: absolute;
88
- z-index: 4;
89
- right: 0;
90
- bottom: 0;
91
- width: 100%;
92
- margin-bottom: 0;
93
- }
@@ -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
+ }
@@ -6,6 +6,7 @@
6
6
  //
7
7
 
8
8
  @use '@carbon/styles/scss/theme' as *;
9
+ @use '@carbon/styles/scss/utilities' as *;
9
10
  @use '@carbon/layout/scss/convert' as *;
10
11
  @use '@carbon/styles/scss/spacing' as *;
11
12
  @use '@carbon/react/scss/components/button/tokens' as *;
@@ -45,6 +46,7 @@
45
46
  position: sticky;
46
47
  z-index: 1;
47
48
  left: 0;
49
+ background-color: $layer-01;
48
50
  }
49
51
  }
50
52
 
@@ -68,6 +70,7 @@
68
70
  &.#{$block-class}__checkbox-cell-sticky-left {
69
71
  position: sticky;
70
72
  left: 0;
73
+ background-color: $layer-01;
71
74
  }
72
75
  }
73
76
 
@@ -155,6 +158,16 @@
155
158
  background-color: $background;
156
159
  }
157
160
 
161
+ .#{$block-class} th.#{$block-class}__with-slug {
162
+ @include ai-gradient('top', 100%);
163
+ }
164
+
165
+ .#{$block-class}
166
+ th.#{$block-class}__with-slug
167
+ .#{c4p-settings.$carbon-prefix}--slug {
168
+ margin-left: $spacing-03;
169
+ }
170
+
158
171
  .#{$block-class}__grid-container {
159
172
  display: block;
160
173
  width: 100%;
@@ -183,6 +196,12 @@
183
196
  overflow-x: auto;
184
197
  }
185
198
 
199
+ .#{$block-class}-filter-panel
200
+ + .#{$block-class}__table-container-inner
201
+ .#{c4p-settings.$carbon-prefix}--data-table-content {
202
+ height: fit-content;
203
+ }
204
+
186
205
  table.#{$block-class}__table-simple {
187
206
  display: flex;
188
207
  overflow: auto;
@@ -235,6 +254,10 @@
235
254
  white-space: initial;
236
255
  }
237
256
 
257
+ .#{$block-class}__defaultStringRenderer.#{$block-class}__defaultStringRenderer--slug {
258
+ width: fit-content;
259
+ }
260
+
238
261
  .#{$block-class}__expanded-row {
239
262
  display: flex;
240
263
  overflow: hidden;
@@ -346,7 +369,7 @@
346
369
  }
347
370
 
348
371
  .#{$block-class}__resizableColumn:hover {
349
- background-color: $background-selected-hover;
372
+ background-color: $layer-selected-hover;
350
373
 
351
374
  .#{$block-class}__resizer {
352
375
  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';
@@ -45,22 +45,4 @@ $side-panel-block-class: #{c4p-settings.$pkg-prefix}--side-panel;
45
45
  .#{c4p-settings.$carbon-prefix}--btn.#{$side-panel-block-class}__close-button {
46
46
  display: none;
47
47
  }
48
-
49
- .#{$side-panel-block-class} .#{$block-class}__actions-container {
50
- position: absolute;
51
- z-index: 4;
52
- bottom: 0;
53
- left: 0;
54
- width: 100%;
55
- margin-bottom: 0;
56
- }
57
-
58
- .#{$block-class}__actions-container {
59
- position: absolute;
60
- z-index: 4;
61
- right: 0;
62
- bottom: 0;
63
- width: 100%;
64
- margin-bottom: 0;
65
- }
66
48
  }
@@ -8,6 +8,7 @@
8
8
  @use '@carbon/layout/scss/convert' as *;
9
9
  @use '@carbon/styles/scss/spacing' as *;
10
10
  @use '@carbon/styles/scss/theme' as *;
11
+ @use '@carbon/styles/scss/motion' as *;
11
12
 
12
13
  $block-class: #{$pkg-prefix}--filter-summary;
13
14
 
@@ -16,13 +17,33 @@ $block-class: #{$pkg-prefix}--filter-summary;
16
17
  width: 100%;
17
18
  /* stylelint-disable-next-line -- to-rem carbon replacement for rem */
18
19
  height: to-rem(48px);
19
- align-items: center;
20
+ align-items: start;
20
21
  padding: $spacing-03;
21
22
  border-top: 1px solid $border-subtle-01;
22
23
  background: $layer-01;
24
+ &.#{$block-class}__expanded {
25
+ height: fit-content;
26
+ }
23
27
  }
24
28
 
25
29
  .#{$block-class}
26
30
  .#{$pkg-prefix}--tag-set.#{$pkg-prefix}--tag-set.#{$block-class}__clear-button-inline {
27
31
  width: auto;
28
32
  }
33
+
34
+ .#{$block-class}__view-all--wrapper {
35
+ position: absolute;
36
+ top: $spacing-03;
37
+ right: 0;
38
+ }
39
+
40
+ .#{$block-class}__expanded
41
+ .#{$block-class}__clear-all-button.#{$carbon-prefix}--btn {
42
+ margin-right: $spacing-07;
43
+ }
44
+
45
+ .#{$block-class}__view-all--wrapper
46
+ .#{$block-class}__view-all--chevron-multiline {
47
+ transform: rotate(180deg);
48
+ transition: transform $duration-fast-01 motion(standard);
49
+ }
@@ -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
  );