@carbon/ibm-products 1.22.0 → 1.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. package/css/components/Datagrid/styles/datagrid.css +4 -0
  2. package/css/components/Datagrid/styles/datagrid.css.map +1 -1
  3. package/css/components/Datagrid/styles/index.css +15 -0
  4. package/css/components/Datagrid/styles/index.css.map +1 -1
  5. package/css/components/Datagrid/styles/useExpandedRow.css +12 -0
  6. package/css/components/Datagrid/styles/useExpandedRow.css.map +1 -0
  7. package/css/index-full-carbon.css +46 -143
  8. package/css/index-full-carbon.css.map +1 -1
  9. package/css/index-full-carbon.min.css +3 -3
  10. package/css/index-full-carbon.min.css.map +1 -1
  11. package/css/index-without-carbon-released-only.css +25 -16
  12. package/css/index-without-carbon-released-only.css.map +1 -1
  13. package/css/index-without-carbon-released-only.min.css +2 -2
  14. package/css/index-without-carbon-released-only.min.css.map +1 -1
  15. package/css/index-without-carbon.css +41 -16
  16. package/css/index-without-carbon.css.map +1 -1
  17. package/css/index-without-carbon.min.css +2 -2
  18. package/css/index-without-carbon.min.css.map +1 -1
  19. package/css/index.css +44 -139
  20. package/css/index.css.map +1 -1
  21. package/css/index.min.css +3 -3
  22. package/css/index.min.css.map +1 -1
  23. package/es/components/AddSelect/AddSelect.js +57 -422
  24. package/es/components/AddSelect/AddSelectBody.js +349 -0
  25. package/es/components/AddSelect/AddSelectBreadcrumbs.js +11 -31
  26. package/es/components/AddSelect/AddSelectColumn.js +91 -41
  27. package/es/components/AddSelect/AddSelectFilter.js +1 -2
  28. package/es/components/AddSelect/AddSelectList.js +10 -61
  29. package/es/components/AddSelect/AddSelectMetaPanel.js +1 -1
  30. package/es/components/AddSelect/AddSelectSidebar.js +20 -13
  31. package/es/components/AddSelect/AddSelectSort.js +2 -2
  32. package/es/components/AddSelect/add-select-utils.js +85 -59
  33. package/es/components/AddSelect/hooks/useParentSelect.js +16 -0
  34. package/es/components/AddSelect/hooks/usePath.js +66 -0
  35. package/es/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +1 -5
  36. package/es/components/CreateTearsheet/preview-components/MultiStepWithIntro.js +1 -5
  37. package/es/components/Datagrid/Datagrid/Datagrid.js +1 -1
  38. package/es/components/Datagrid/useExpandedRow.js +12 -4
  39. package/es/components/PageHeader/PageHeaderUtils.js +5 -0
  40. package/es/components/TagSet/TagSet.js +15 -5
  41. package/lib/components/AddSelect/AddSelect.js +54 -430
  42. package/lib/components/AddSelect/AddSelectBody.js +384 -0
  43. package/lib/components/AddSelect/AddSelectBreadcrumbs.js +11 -30
  44. package/lib/components/AddSelect/AddSelectColumn.js +90 -39
  45. package/lib/components/AddSelect/AddSelectFilter.js +1 -2
  46. package/lib/components/AddSelect/AddSelectList.js +11 -60
  47. package/lib/components/AddSelect/AddSelectMetaPanel.js +1 -1
  48. package/lib/components/AddSelect/AddSelectSidebar.js +20 -13
  49. package/lib/components/AddSelect/AddSelectSort.js +2 -2
  50. package/lib/components/AddSelect/add-select-utils.js +88 -64
  51. package/lib/components/AddSelect/hooks/useParentSelect.js +27 -0
  52. package/lib/components/AddSelect/hooks/usePath.js +75 -0
  53. package/lib/components/CreateTearsheet/preview-components/MultiStepTearsheet.js +1 -5
  54. package/lib/components/CreateTearsheet/preview-components/MultiStepWithIntro.js +1 -5
  55. package/lib/components/Datagrid/Datagrid/Datagrid.js +1 -1
  56. package/lib/components/Datagrid/useExpandedRow.js +20 -4
  57. package/lib/components/PageHeader/PageHeaderUtils.js +5 -0
  58. package/lib/components/TagSet/TagSet.js +15 -5
  59. package/package.json +16 -16
  60. package/scss/components/Cascade/_cascade.scss +2 -1
  61. package/scss/components/CreateInfluencer/_create-influencer.scss +0 -2
  62. package/scss/components/CreateTearsheet/_create-tearsheet.scss +1 -1
  63. package/scss/components/Datagrid/_storybook-styles.scss +4 -0
  64. package/scss/components/Datagrid/styles/datagrid.scss +4 -0
  65. package/scss/components/Datagrid/styles/index.scss +1 -0
  66. package/scss/components/Datagrid/styles/useExpandedRow.scss +13 -0
  67. package/scss/components/InlineEdit/_inline-edit.scss +2 -1
  68. package/scss/components/OptionsTile/_options-tile.scss +1 -0
  69. package/scss/components/PageHeader/_page-header.scss +9 -4
  70. package/scss/components/SidePanel/_side-panel.scss +1 -2
  71. package/scss/components/TagSet/_tag-set.scss +4 -0
@@ -39,7 +39,7 @@ var _propsHelper = require("../../global/js/utils/props-helper");
39
39
 
40
40
  var _settings = require("../../settings");
41
41
 
42
- var _excluded = ["align", "allTagsModalTarget", "className", "maxVisible", "overflowAlign", "overflowClassName", "overflowDirection", "allTagsModalTitle", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "showAllTagsLabel", "tags"],
42
+ var _excluded = ["align", "allTagsModalTarget", "className", "maxVisible", "multiline", "overflowAlign", "overflowClassName", "overflowDirection", "allTagsModalTitle", "allTagsModalSearchLabel", "allTagsModalSearchPlaceholderText", "showAllTagsLabel", "tags"],
43
43
  _excluded2 = ["label", "id"],
44
44
  _excluded3 = ["label"];
45
45
 
@@ -68,6 +68,7 @@ var TagSet = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
68
68
  allTagsModalTargetIn = _ref.allTagsModalTarget,
69
69
  className = _ref.className,
70
70
  maxVisible = _ref.maxVisible,
71
+ multiline = _ref.multiline,
71
72
  _ref$overflowAlign = _ref.overflowAlign,
72
73
  overflowAlign = _ref$overflowAlign === void 0 ? defaults.overflowAlign : _ref$overflowAlign,
73
74
  overflowClassName = _ref.overflowClassName,
@@ -184,7 +185,11 @@ var TagSet = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
184
185
  setDisplayedTags(newDisplayedTags);
185
186
  }, [displayCount, overflowAlign, overflowClassName, overflowDirection, showAllTagsLabel, tags]);
186
187
  var checkFullyVisibleTags = (0, _react.useCallback)(function () {
187
- // how many will fit?
188
+ if (multiline) {
189
+ return setDisplayCount(maxVisible);
190
+ } // how many will fit?
191
+
192
+
188
193
  var willFit = 0;
189
194
 
190
195
  if (sizingTags.length > 0) {
@@ -216,10 +221,10 @@ var TagSet = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
216
221
  } else {
217
222
  setDisplayCount(maxVisible ? Math.min(willFit, maxVisible) : willFit);
218
223
  }
219
- }, [maxVisible, sizingTags, tagSetRef]);
224
+ }, [maxVisible, multiline, sizingTags, tagSetRef]);
220
225
  (0, _react.useEffect)(function () {
221
226
  checkFullyVisibleTags();
222
- }, [checkFullyVisibleTags, maxVisible, sizingTags]);
227
+ }, [checkFullyVisibleTags, maxVisible, multiline, sizingTags]);
223
228
  /* don't know how to test resize */
224
229
 
225
230
  /* istanbul ignore next */
@@ -262,7 +267,7 @@ var TagSet = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
262
267
  "aria-hidden": true,
263
268
  ref: sizingContainerRef
264
269
  }, hiddenSizingTags), /*#__PURE__*/_react.default.createElement("div", {
265
- className: "".concat(blockClass, "__tag-container"),
270
+ className: (0, _classnames.default)(["".concat(blockClass, "__tag-container"), multiline && "".concat(blockClass, "__tag-container--multiline")]),
266
271
  ref: displayedArea
267
272
  }, displayedTags)), (allTagsModalTarget ? _reactDom.createPortal : function (children) {
268
273
  return children;
@@ -342,6 +347,11 @@ TagSet.propTypes = {
342
347
  */
343
348
  maxVisible: _propTypes.default.number,
344
349
 
350
+ /**
351
+ * display tags in multiple lines
352
+ */
353
+ multiline: _propTypes.default.bool,
354
+
345
355
  /**
346
356
  * overflowAlign from the standard tooltip. Default center.
347
357
  */
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": "1.22.0",
4
+ "version": "1.23.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -50,33 +50,33 @@
50
50
  "upgrade-dependencies": "npm-check-updates -u --dep dev,peer,prod --color --reject '/(carbon|^react$|^react-dom$|^chalk$|^react-dnd|^namor)/'"
51
51
  },
52
52
  "devDependencies": {
53
- "@babel/cli": "^7.17.10",
54
- "@babel/core": "^7.17.10",
55
- "babel-preset-ibm-cloud-cognitive": "^0.14.15",
53
+ "@babel/cli": "^7.18.6",
54
+ "@babel/core": "^7.18.6",
55
+ "babel-preset-ibm-cloud-cognitive": "^0.14.16",
56
56
  "chalk": "^4.1.2",
57
57
  "change-case": "^4.1.2",
58
58
  "copyfiles": "^2.4.1",
59
59
  "cross-env": "^7.0.3",
60
60
  "fs-extra": "^10.1.0",
61
61
  "glob": "^8.0.3",
62
- "jest": "^28.1.0",
63
- "jest-config-ibm-cloud-cognitive": "^0.24.0",
64
- "jest-environment-jsdom": "^28.1.0",
62
+ "jest": "^28.1.2",
63
+ "jest-config-ibm-cloud-cognitive": "^0.24.1",
64
+ "jest-environment-jsdom": "^28.1.2",
65
65
  "namor": "^1.1.2",
66
- "npm-check-updates": "^12.5.11",
66
+ "npm-check-updates": "^15.0.1",
67
67
  "npm-run-all": "^4.1.5",
68
68
  "rimraf": "^3.0.2",
69
- "sass": "^1.51.0",
70
- "yargs": "^17.5.0"
69
+ "sass": "^1.53.0",
70
+ "yargs": "^17.5.1"
71
71
  },
72
72
  "dependencies": {
73
- "@babel/runtime": "^7.17.9",
73
+ "@babel/runtime": "^7.18.6",
74
74
  "@carbon/telemetry": "^0.1.0",
75
75
  "immutability-helper": "^3.1.1",
76
76
  "react-dnd": "^15.1.2",
77
77
  "react-dnd-html5-backend": "^15.1.3",
78
- "react-resize-detector": "^7.0.0",
79
- "react-table": "^7.7.0",
78
+ "react-resize-detector": "^7.1.2",
79
+ "react-table": "^7.8.0",
80
80
  "react-window": "^1.8.7"
81
81
  },
82
82
  "peerDependencies": {
@@ -87,11 +87,11 @@
87
87
  "@carbon/motion": "^10.29.0",
88
88
  "@carbon/themes": "^10.54.0",
89
89
  "@carbon/type": "^10.44.0",
90
- "carbon-components": "^10.57.1",
91
- "carbon-components-react": "^7.57.1",
90
+ "carbon-components": "^10.57.2",
91
+ "carbon-components-react": "^7.57.2",
92
92
  "carbon-icons": "^7.0.7",
93
93
  "react": "^16.8.6 || ^17.0.1",
94
94
  "react-dom": "^16.8.6 || ^17.0.1"
95
95
  },
96
- "gitHead": "08c7c9d86e1242499004fc8f6bfcb59c5af9ea7b"
96
+ "gitHead": "106f29b7c8ca8bf729d0c08d12c3f818cebc7995"
97
97
  }
@@ -30,7 +30,8 @@
30
30
  .#{$block-class}__element,
31
31
  .#{$block-class}__col {
32
32
  @media (prefers-reduced-motion: no-preference) {
33
- animation: $animationProps fade;
33
+ // stylelint-disable-next-line carbon/motion-token-use
34
+ animation: $animationProps fade; // stylelint note animation duration declared in $animationProps
34
35
  animation-fill-mode: forwards;
35
36
  opacity: 0;
36
37
  }
@@ -61,7 +61,6 @@
61
61
  }
62
62
  .#{$block-class}__side-nav-opening,
63
63
  .#{$block-class}__progress-indicator-opening {
64
- // stylelint-disable-next-line carbon/motion-token-use
65
64
  animation: influencer-menu-entrance $duration--moderate-02 1;
66
65
  animation-fill-mode: forwards;
67
66
  @include carbon--motion(entrance, productive);
@@ -69,7 +68,6 @@
69
68
 
70
69
  .#{$block-class}__side-nav-closing,
71
70
  .#{$block-class}__progress-indicator-closing {
72
- // stylelint-disable-next-line carbon/motion-token-use
73
71
  animation: influencer-menu-exit $duration--moderate-02 1;
74
72
  animation-fill-mode: forwards;
75
73
  @include carbon--motion(exit, productive);
@@ -51,7 +51,7 @@
51
51
  }
52
52
 
53
53
  .#{$block-class} .#{$step-block-class}__step--visible-step {
54
- animation: $duration--slow-01 step-content-entrance;
54
+ animation: step-content-entrance $duration--slow-01;
55
55
  animation-fill-mode: forwards;
56
56
  animation-timing-function: $carbon--standard-easing;
57
57
  opacity: 0;
@@ -29,3 +29,7 @@ $block-class: #{$pkg-prefix}--datagrid;
29
29
  border-bottom: none;
30
30
  }
31
31
  }
32
+
33
+ .#{$block-class}__panelContent {
34
+ display: inline;
35
+ }
@@ -363,6 +363,10 @@
363
363
  background-color: $ui-01;
364
364
  }
365
365
 
366
+ .#{$block-class}__leftPanel-position {
367
+ display: inherit;
368
+ }
369
+
366
370
  .#{$block-class}__datagridWithPanel {
367
371
  position: relative;
368
372
  display: flex;
@@ -16,4 +16,5 @@
16
16
  @import './addons/CustomizeColumnsModal';
17
17
  @import './addons/RowSizeDropdown';
18
18
  @import './useSelectAllToggle';
19
+ @import './useExpandedRow';
19
20
  @import './draggableElement';
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Licensed Materials - Property of IBM
3
+ * 5724-Q36
4
+ * (c) Copyright IBM Corp. 2022
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}__expanded-row-content {
12
+ padding: $spacing-05 $spacing-05 $spacing-06 $spacing-10;
13
+ }
@@ -20,6 +20,7 @@
20
20
 
21
21
  // cut down version borrowed from 'carbon-components/scss/globals/scss/vendor/@carbon/styles/scss/utilities/focus-outline';
22
22
  @mixin input-outline($color: $focus) {
23
+ /* stylelint-disable-next-line carbon/theme-token-use */
23
24
  outline: $spacing-01 solid $color;
24
25
  outline-offset: calc(-1 * $spacing-01);
25
26
 
@@ -110,6 +111,7 @@
110
111
  100% - var(--#{$block-class}--toolbar-width) - $spacing-05
111
112
  );
112
113
  min-height: var(--#{$block-class}--size);
114
+ /* stylelint-disable-next-line carbon/layout-token-use */
113
115
  margin-right: var(--#{$block-class}--toolbar-width);
114
116
  // room for toolbar
115
117
  margin-left: $spacing-05;
@@ -277,7 +279,6 @@
277
279
  padding-left: 0;
278
280
  border-right: 0;
279
281
  border-left: 0;
280
- // stylelint-disable-next-line carbon/layout-token-use
281
282
  margin-right: calc(-1 * var(--#{$block-class}--size));
282
283
 
283
284
  svg {
@@ -112,6 +112,7 @@
112
112
  }
113
113
 
114
114
  .#{$block-class}__summary--warn svg path[fill='none'] {
115
+ /* stylelint-disable-next-line carbon/theme-token-use */
115
116
  fill: $carbon__black-100;
116
117
  }
117
118
 
@@ -39,21 +39,27 @@ $right-section-alt-width: 100% - $left-section-alt-width;
39
39
 
40
40
  @keyframes background-appear {
41
41
  from {
42
+ /* stylelint-disable-next-line carbon/theme-token-use */
42
43
  background-color: var(--from-color);
43
44
  }
44
45
 
45
46
  to {
47
+ /* stylelint-disable-next-line carbon/theme-token-use */
46
48
  background-color: var(--to-color);
47
49
  }
48
50
  }
49
51
  @keyframes background-and-shadow-appear {
50
52
  from {
53
+ /* stylelint-disable-next-line carbon/theme-token-use */
51
54
  background-color: var(--from-color);
55
+ /* stylelint-disable-next-line carbon/theme-token-use */
52
56
  box-shadow: 0 1px 0 var(--from-color);
53
57
  }
54
58
 
55
59
  to {
60
+ /* stylelint-disable-next-line carbon/theme-token-use */
56
61
  background-color: var(--to-color);
62
+ /* stylelint-disable-next-line carbon/theme-token-use */
57
63
  box-shadow: 0 1px 0 var(--to-color-shadow);
58
64
  }
59
65
  }
@@ -86,6 +92,7 @@ $right-section-alt-width: 100% - $left-section-alt-width;
86
92
  $animation: background-and-shadow-appear;
87
93
  }
88
94
 
95
+ /* stylelint-disable-next-line carbon/motion-token-use */
89
96
  animation: $animation $duration linear paused forwards;
90
97
  // Added separately for clarity
91
98
  animation-delay: calc(
@@ -102,6 +109,7 @@ $right-section-alt-width: 100% - $left-section-alt-width;
102
109
  /* z-index used to raise above any position relative content as per Carbon header */
103
110
  /* dropped 1 below Carbon header so as not to overlay the side panel */
104
111
  z-index: $z-index-header-minus;
112
+ /* stylelint-disable-next-line carbon/layout-token-use */
105
113
  top: var(--#{$block-class}--header-top);
106
114
  display: inline-block; /* cause top/bottom margin to reserve space */
107
115
  width: 100%;
@@ -329,10 +337,7 @@ $right-section-alt-width: 100% - $left-section-alt-width;
329
337
  &:not(.#{$block-class}__breadcrumb-title--pre-collapsed) {
330
338
  opacity: var(--#{$block-class}--breadcrumb-title-opacity);
331
339
 
332
- // stylelint-disable-next-line carbon/layout-token-use
333
- transform: translateY(
334
- var(--#{$block-class}--breadcrumb-title-top)
335
- ); /* token linter does not support this form */
340
+ transform: translateY(var(--#{$block-class}--breadcrumb-title-top));
336
341
 
337
342
  visibility: var(--#{$block-class}--breadcrumb-title-visibility);
338
343
  }
@@ -241,7 +241,6 @@ $action-set-block-class: #{$pkg-prefix}--action-set;
241
241
  z-index: 4;
242
242
  background-color: $ui-01;
243
243
  opacity: var(--#{$block-class}--subtitle-opacity);
244
- // stylelint-disable-next-line carbon/layout-token-use
245
244
  transform: translateY(var(--#{$block-class}--title-y-position));
246
245
  }
247
246
  .#{$block-class}__label-text {
@@ -251,7 +250,6 @@ $action-set-block-class: #{$pkg-prefix}--action-set;
251
250
  padding-right: $spacing-05;
252
251
  opacity: var(--#{$block-class}--subtitle-opacity);
253
252
  text-overflow: ellipsis;
254
- // stylelint-disable-next-line carbon/layout-token-use
255
253
  transform: translateY(var(--#{$block-class}--title-y-position));
256
254
  white-space: nowrap;
257
255
  }
@@ -377,6 +375,7 @@ $action-set-block-class: #{$pkg-prefix}--action-set;
377
375
  .#{$block-class}__action-toolbar {
378
376
  position: sticky;
379
377
  z-index: 4;
378
+ /* stylelint-disable-next-line carbon/layout-token-use */
380
379
  top: var(--#{$block-class}--title-height);
381
380
  display: flex;
382
381
  align-items: center;
@@ -48,6 +48,10 @@ $block-class-modal: #{$block-class}-modal;
48
48
  white-space: nowrap;
49
49
  }
50
50
 
51
+ .#{$block-class}__tag-container--multiline {
52
+ flex-wrap: wrap;
53
+ }
54
+
51
55
  .#{$block-class}__tag-container--hidden {
52
56
  // This tag container is used to measure the width of all displayable tags
53
57
  @include measuring-container;