@carbon/ibm-products 1.11.2 → 1.12.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 (50) hide show
  1. package/README.md +0 -3
  2. package/css/index-full-carbon.css +1387 -358
  3. package/css/index-full-carbon.css.map +1 -1
  4. package/css/index-full-carbon.min.css +2 -2
  5. package/css/index-full-carbon.min.css.map +1 -1
  6. package/css/index-without-carbon-released-only.css +1 -0
  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 +51 -5
  11. package/css/index-without-carbon.css.map +1 -1
  12. package/css/index-without-carbon.min.css +2 -2
  13. package/css/index-without-carbon.min.css.map +1 -1
  14. package/css/index.css +51 -5
  15. package/css/index.css.map +1 -1
  16. package/css/index.min.css +2 -2
  17. package/css/index.min.css.map +1 -1
  18. package/es/components/AddSelect/AddSelect.js +63 -12
  19. package/es/components/AddSelect/AddSelectColumn.js +0 -1
  20. package/es/components/AddSelect/AddSelectList.js +33 -13
  21. package/es/components/DataSpreadsheet/DataSpreadsheet.js +107 -89
  22. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +93 -20
  23. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +50 -2
  24. package/es/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +3 -1
  25. package/es/components/ImportModal/ImportModal.js +2 -2
  26. package/es/components/UserProfileImage/UserProfileImage.js +1 -1
  27. package/lib/components/AddSelect/AddSelect.js +63 -12
  28. package/lib/components/AddSelect/AddSelectColumn.js +0 -1
  29. package/lib/components/AddSelect/AddSelectList.js +34 -12
  30. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +108 -91
  31. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +94 -20
  32. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +52 -7
  33. package/lib/components/DataSpreadsheet/utils/handleHeaderCellSelection.js +3 -1
  34. package/lib/components/ImportModal/ImportModal.js +1 -1
  35. package/lib/components/UserProfileImage/UserProfileImage.js +1 -1
  36. package/package.json +13 -13
  37. package/scss/components/AboutModal/_about-modal.scss +2 -2
  38. package/scss/components/ActionSet/_action-set.scss +3 -1
  39. package/scss/components/AddSelect/_add-select.scss +37 -2
  40. package/scss/components/CreateModal/_create-modal.scss +7 -5
  41. package/scss/components/CreateModal/_storybook-styles.scss +8 -7
  42. package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +21 -3
  43. package/scss/components/ExportModal/_export-modal.scss +3 -3
  44. package/scss/components/InlineEdit/_inline-edit.scss +0 -1
  45. package/scss/components/ModifiedTabs/_modified-tabs.scss +0 -10
  46. package/scss/components/NotificationsPanel/_notifications-panel.scss +3 -3
  47. package/scss/components/OptionsTile/_options-tile.scss +0 -1
  48. package/scss/components/RemoveModal/_remove-modal.scss +3 -3
  49. package/scss/components/TagSet/_tag-set.scss +2 -1
  50. package/scss/components/Tearsheet/_tearsheet.scss +1 -2
@@ -27,7 +27,9 @@ var handleHeaderCellSelection = function handleHeaderCellSelection(_ref) {
27
27
  setSelectionAreas = _ref.setSelectionAreas,
28
28
  spreadsheetRef = _ref.spreadsheetRef,
29
29
  index = _ref.index,
30
- isKeyboard = _ref.isKeyboard;
30
+ isKeyboard = _ref.isKeyboard,
31
+ setSelectionAreaData = _ref.setSelectionAreaData;
32
+ setSelectionAreaData([]);
31
33
  var rowValue = isKeyboard ? activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.row : index;
32
34
  var columnValue = isKeyboard ? activeCellCoordinates === null || activeCellCoordinates === void 0 ? void 0 : activeCellCoordinates.column : index;
33
35
  var point1 = {
@@ -275,7 +275,7 @@ var ImportModal = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
275
275
  size: "sm",
276
276
  disabled: importButtonDisabled
277
277
  }, inputButtonText)), /*#__PURE__*/_react.default.createElement("div", {
278
- className: "bx--file-container ".concat(blockClass, "__file-container")
278
+ className: "".concat(_settings.carbon.prefix, "--file-container ").concat(blockClass, "__file-container")
279
279
  }, hasFiles && /*#__PURE__*/_react.default.createElement("p", {
280
280
  className: "".concat(blockClass, "__helper-text")
281
281
  }, fileStatusString), files.map(function (file) {
@@ -117,7 +117,7 @@ UserProfileImage.propTypes = {
117
117
  */
118
118
  imageDescription: _propTypes.default.string.isRequired.if(function (_ref2) {
119
119
  var image = _ref2.image;
120
- return image;
120
+ return !!image;
121
121
  }),
122
122
 
123
123
  /**
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.11.2",
4
+ "version": "1.12.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -51,8 +51,8 @@
51
51
  },
52
52
  "devDependencies": {
53
53
  "@babel/cli": "^7.17.6",
54
- "@babel/core": "^7.17.7",
55
- "babel-preset-ibm-cloud-cognitive": "^0.14.11",
54
+ "@babel/core": "^7.17.8",
55
+ "babel-preset-ibm-cloud-cognitive": "^0.14.12",
56
56
  "chalk": "^4.1.2",
57
57
  "change-case": "^4.1.2",
58
58
  "copyfiles": "^2.4.1",
@@ -60,33 +60,33 @@
60
60
  "fs-extra": "^10.0.1",
61
61
  "glob": "^7.2.0",
62
62
  "jest": "^27.5.1",
63
- "jest-config-ibm-cloud-cognitive": "^0.23.12",
63
+ "jest-config-ibm-cloud-cognitive": "^0.23.13",
64
64
  "npm-check-updates": "^12.5.4",
65
65
  "npm-run-all": "^4.1.5",
66
66
  "rimraf": "^3.0.2",
67
67
  "sass": "^1.49.9",
68
- "yargs": "^17.3.1"
68
+ "yargs": "^17.4.0"
69
69
  },
70
70
  "dependencies": {
71
- "@babel/runtime": "^7.17.7",
71
+ "@babel/runtime": "^7.17.8",
72
72
  "@carbon/telemetry": "^0.1.0",
73
73
  "react-resize-detector": "^7.0.0",
74
74
  "react-table": "^7.7.0",
75
75
  "react-window": "^1.8.6"
76
76
  },
77
77
  "peerDependencies": {
78
- "@carbon/colors": "^10.37.0",
78
+ "@carbon/colors": "^10.37.1",
79
79
  "@carbon/icons-react": "^10.48.0",
80
80
  "@carbon/import-once": "^10.7.0",
81
- "@carbon/layout": "^10.37.0",
81
+ "@carbon/layout": "^10.37.1",
82
82
  "@carbon/motion": "^10.29.0",
83
- "@carbon/themes": "^10.53.1",
84
- "@carbon/type": "^10.43.1",
85
- "carbon-components": "^10.55.1",
86
- "carbon-components-react": "^7.55.1",
83
+ "@carbon/themes": "^10.53.2",
84
+ "@carbon/type": "^10.43.2",
85
+ "carbon-components": "^10.55.2",
86
+ "carbon-components-react": "^7.55.2",
87
87
  "carbon-icons": "^7.0.7",
88
88
  "react": "^16.8.6 || ^17.0.1",
89
89
  "react-dom": "^16.8.6 || ^17.0.1"
90
90
  },
91
- "gitHead": "1327941f8527f6ea940253307039bc99ba0a43f2"
91
+ "gitHead": "85ac9b35afdba4e7e2d63c29cf4150347028e00d"
92
92
  }
@@ -19,7 +19,7 @@
19
19
  // The block part of our conventional BEM class names (blockClass__E--M).
20
20
  $block-class: #{$pkg-prefix}--about-modal;
21
21
 
22
- .#{$block-class} .bx--modal-container {
22
+ .#{$block-class} .#{$carbon-prefix}--modal-container {
23
23
  grid-template-rows: auto auto 1fr auto;
24
24
  }
25
25
 
@@ -56,7 +56,7 @@
56
56
  }
57
57
 
58
58
  .#{$block-class}.#{$block-class}--with-tabs
59
- .bx--modal-content--overflow-indicator {
59
+ .#{$carbon-prefix}--modal-content--overflow-indicator {
60
60
  // stylelint-disable-next-line carbon/layout-token-use
61
61
  bottom: calc(#{$spacing-09} + #{$spacing-08});
62
62
  }
@@ -101,7 +101,9 @@
101
101
  flex: 1 1 25%;
102
102
  }
103
103
 
104
- .#{$block-class} .#{$block-class}__action-button .bx--inline-loading {
104
+ .#{$block-class}
105
+ .#{$block-class}__action-button
106
+ .#{$carbon-prefix}--inline-loading {
105
107
  position: absolute;
106
108
  top: 0;
107
109
  right: 0;
@@ -51,6 +51,41 @@
51
51
  display: block;
52
52
  color: $text-02;
53
53
  }
54
+
55
+ &-cell:hover .#{$block-class}__selections-dropdown {
56
+ visibility: visible;
57
+ }
58
+
59
+ &-dropdown {
60
+ visibility: hidden;
61
+ }
62
+
63
+ &-row-selected {
64
+ background: #e5e5e5;
65
+ }
66
+
67
+ &-row-selected .#{$block-class}__selections-dropdown {
68
+ visibility: visible;
69
+ }
70
+
71
+ &-checkbox {
72
+ display: flex;
73
+ align-items: center;
74
+ }
75
+
76
+ &-checkbox-label-text {
77
+ display: flex;
78
+ flex-direction: column;
79
+ padding-left: $spacing-05;
80
+ }
81
+
82
+ &-checkbox-wrapper.#{$carbon-prefix}--form-item {
83
+ flex: 0;
84
+ }
85
+
86
+ &-checkbox-wrapper .#{$carbon-prefix}--checkbox-label-text {
87
+ display: none;
88
+ }
54
89
  }
55
90
 
56
91
  // sidebar
@@ -141,7 +176,7 @@
141
176
  display: flex;
142
177
  }
143
178
 
144
- .bx--overflow-menu {
179
+ .#{$carbon-prefix}--overflow-menu {
145
180
  border-bottom: 1px solid $ui-04;
146
181
  }
147
182
  }
@@ -184,7 +219,7 @@
184
219
 
185
220
  .#{$block-class}
186
221
  .#{$carbon-prefix}--modal-container--sm
187
- .bx--modal-content
222
+ .#{$carbon-prefix}--modal-content
188
223
  p {
189
224
  padding-right: 0;
190
225
  }
@@ -19,11 +19,11 @@
19
19
  background-color: $ui-background;
20
20
  }
21
21
 
22
- .#{$pkg-prefix}--create-modal .bx--modal-close {
22
+ .#{$pkg-prefix}--create-modal .#{$carbon-prefix}--modal-close {
23
23
  display: none;
24
24
  }
25
25
 
26
- .#{$pkg-prefix}--create-modal .bx--modal-container {
26
+ .#{$pkg-prefix}--create-modal .#{$carbon-prefix}--modal-container {
27
27
  @include carbon--breakpoint(md) {
28
28
  max-height: 95%;
29
29
  }
@@ -32,14 +32,16 @@
32
32
  }
33
33
  }
34
34
 
35
- .#{$pkg-prefix}--create-modal .bx--modal-header {
35
+ .#{$pkg-prefix}--create-modal .#{$carbon-prefix}--modal-header {
36
36
  padding-right: 20%;
37
37
  padding-bottom: $spacing-03;
38
38
  border-bottom: 1px solid $ui-03;
39
39
  margin-bottom: 0;
40
40
  }
41
41
 
42
- .#{$pkg-prefix}--create-modal .bx--modal-footer .bx--btn {
42
+ .#{$pkg-prefix}--create-modal
43
+ .#{$carbon-prefix}--modal-footer
44
+ .#{$carbon-prefix}--btn {
43
45
  max-width: none;
44
46
  }
45
47
 
@@ -63,7 +65,7 @@
63
65
  margin: $spacing-03 0 $spacing-05 0;
64
66
  }
65
67
 
66
- .#{$pkg-prefix}--create-modal__form .bx--fieldset {
68
+ .#{$pkg-prefix}--create-modal__form .#{$carbon-prefix}--fieldset {
67
69
  min-width: 100%;
68
70
  margin-bottom: 0;
69
71
  }
@@ -15,31 +15,32 @@
15
15
  @import 'carbon-components/scss/components/tooltip/tooltip';
16
16
  @import 'carbon-components/scss/components/modal/modal';
17
17
 
18
- .bx--number {
18
+ .#{$carbon-prefix}--number {
19
19
  min-width: 100%;
20
20
  }
21
21
 
22
- .bx--number__control-btn::before {
22
+ .#{$carbon-prefix}--number__control-btn::before {
23
23
  background-color: transparent;
24
24
  }
25
25
 
26
- .bx--number__control-btn::after {
26
+ .#{$carbon-prefix}--number__control-btn::after {
27
27
  background-color: transparent;
28
28
  }
29
29
 
30
- .bx--date-picker {
30
+ .#{$carbon-prefix}--date-picker {
31
31
  min-width: 100%;
32
32
  }
33
33
 
34
- .bx--date-picker-container {
34
+ .#{$carbon-prefix}--date-picker-container {
35
35
  min-width: 100%;
36
36
  }
37
37
 
38
- .bx--date-picker.bx--date-picker--single .bx--date-picker__input {
38
+ .#{$carbon-prefix}--date-picker.#{$carbon-prefix}--date-picker--single
39
+ .#{$carbon-prefix}--date-picker__input {
39
40
  min-width: 100%;
40
41
  }
41
42
 
42
- .bx--list-box__menu-icon {
43
+ .#{$carbon-prefix}--list-box__menu-icon {
43
44
  top: $spacing-03;
44
45
  }
45
46
 
@@ -45,7 +45,8 @@
45
45
 
46
46
  .#{$block-class}__th,
47
47
  .#{$block-class}__td {
48
- // height: 2.25rem; // update to be controlled by cellSize prop later
48
+ @include carbon--type-style('body-short-01');
49
+
49
50
  padding: 0 $spacing-03;
50
51
  border: 0;
51
52
  margin: 0;
@@ -85,10 +86,13 @@
85
86
  text-align: left;
86
87
  }
87
88
  .#{$block-class}__cell-editor {
89
+ @include carbon--type-style('body-short-01');
90
+
88
91
  position: absolute;
89
92
  z-index: 4;
90
93
  display: none;
91
- padding: 0 $spacing-03;
94
+ /* stylelint-disable-next-line carbon/layout-token-use */
95
+ padding: 0 calc(#{$spacing-03} + 1px) 0 $spacing-03;
92
96
  background-color: $ui-background;
93
97
  resize: none;
94
98
  &.#{$carbon-prefix}--text-area {
@@ -97,11 +101,25 @@
97
101
  }
98
102
  }
99
103
  .#{$block-class}__active-cell--highlight {
104
+ @include carbon--type-style('body-short-01');
105
+ @include set-body-borders();
106
+
100
107
  position: absolute;
101
108
  z-index: 3;
102
109
  display: none;
110
+ // Could be fixed by using border-right but the fact that
111
+ // this element is positioned absolute prevents that from working
112
+ /* stylelint-disable-next-line carbon/layout-token-use */
113
+ padding-right: calc(#{$spacing-03} - 1px);
114
+ padding-bottom: $spacing-01;
103
115
  border: $spacing-01 solid $interactive-01;
104
- background-color: transparent;
116
+ background-color: $ui-background;
117
+ text-align: left;
118
+
119
+ &[data-active-row-index='header'],
120
+ &[data-active-column-index='header'] {
121
+ background-color: transparent;
122
+ }
105
123
 
106
124
  &:focus {
107
125
  border: $spacing-01 solid $interactive-01;
@@ -21,15 +21,15 @@
21
21
  @mixin export-modal {
22
22
  $block-class: #{$pkg-prefix}--export-modal;
23
23
 
24
- .#{$block-class} .bx--modal-footer .bx--btn {
24
+ .#{$block-class} .#{$carbon-prefix}--modal-footer .#{$carbon-prefix}--btn {
25
25
  max-width: none;
26
26
  }
27
27
 
28
- .#{$block-class}.#{$carbon-prefix}--modal .bx--modal-content {
28
+ .#{$block-class}.#{$carbon-prefix}--modal .#{$carbon-prefix}--modal-content {
29
29
  padding-right: $spacing-05;
30
30
  }
31
31
 
32
- .#{$block-class} .bx--modal-close {
32
+ .#{$block-class} .#{$carbon-prefix}--modal-close {
33
33
  display: none;
34
34
  }
35
35
 
@@ -265,7 +265,6 @@
265
265
  svg {
266
266
  transition: width $duration--moderate-02 motion(standard, productive);
267
267
  @media (prefers-reduced-motion: reduce) {
268
- // stylelint-disable-next-line carbon/motion-token-use
269
268
  transition: none;
270
269
  }
271
270
  }
@@ -13,15 +13,6 @@
13
13
  justify-content: space-between;
14
14
  }
15
15
 
16
- .modified-tabs .modified-tabs__tab .bx--btn {
17
- // transform: translateY(8px);
18
- }
19
-
20
- .modified-tabs .bx--tabs__nav {
21
- /* overflow cannot be tweaked to fix tooltip */
22
- // overflow: visible;
23
- }
24
-
25
16
  .modified-tabs__tab-new,
26
17
  .modified-tabs__tab {
27
18
  position: relative;
@@ -47,7 +38,6 @@
47
38
  transition: background-color $duration--fast-02 motion(standard, productive);
48
39
  // stylelint-disable-next-line max-nesting-depth
49
40
  @media (prefers-reduced-motion: reduce) {
50
- // stylelint-disable-next-line carbon/motion-token-use
51
41
  transition: none;
52
42
  }
53
43
  }
@@ -75,7 +75,8 @@
75
75
  align-items: center;
76
76
  justify-content: space-between;
77
77
  }
78
- .#{$block-class}__do-not-disturb-toggle .bx--toggle__switch {
78
+ .#{$block-class}__do-not-disturb-toggle
79
+ .#{$carbon-prefix}--toggle__switch {
79
80
  margin-top: $spacing-02;
80
81
  }
81
82
  .#{$block-class}__dismiss-button {
@@ -186,7 +187,6 @@
186
187
  .#{$carbon-prefix}--btn__icon {
187
188
  transition: transform $duration--moderate-02 ease;
188
189
  @media (prefers-reduced-motion: reduce) {
189
- // stylelint-disable-next-line carbon/motion-token-use
190
190
  transition: none;
191
191
  }
192
192
  }
@@ -280,7 +280,7 @@
280
280
  padding: 0;
281
281
  color: $text-01;
282
282
  }
283
- .#{$block-class}__settings-button .bx--btn__icon {
283
+ .#{$block-class}__settings-button .#{$carbon-prefix}--btn__icon {
284
284
  margin: 0;
285
285
  }
286
286
  }
@@ -210,7 +210,6 @@
210
210
  @media (prefers-reduced-motion: reduce) {
211
211
  .#{$block-class}__summary,
212
212
  .#{$block-class}__chevron {
213
- // stylelint-disable-next-line carbon/motion-token-use
214
213
  transition: none;
215
214
  }
216
215
  }
@@ -17,15 +17,15 @@
17
17
  @mixin remove-modal {
18
18
  $block-class: #{$pkg-prefix}--remove-modal;
19
19
 
20
- .#{$block-class} .bx--modal-footer .bx--btn {
20
+ .#{$block-class} .#{$carbon-prefix}--modal-footer .#{$carbon-prefix}--btn {
21
21
  max-width: none;
22
22
  }
23
23
 
24
- .#{$block-class} .bx--modal-content {
24
+ .#{$block-class} .#{$carbon-prefix}--modal-content {
25
25
  padding-right: $spacing-05;
26
26
  }
27
27
 
28
- .#{$block-class} .bx--modal-close {
28
+ .#{$block-class} .#{$carbon-prefix}--modal-close {
29
29
  display: none;
30
30
  }
31
31
 
@@ -114,6 +114,7 @@ $block-class-modal: #{$block-class}-modal;
114
114
  &.#{$block-class-overflow}__tooltip {
115
115
  // removes the min width in Carbon
116
116
  min-width: initial;
117
+ text-align: left;
117
118
  }
118
119
 
119
120
  .#{$block-class-overflow}__show-all-tags-link {
@@ -138,7 +139,7 @@ $block-class-modal: #{$block-class}-modal;
138
139
  }
139
140
 
140
141
  .#{$block-class-overflow}__tag .#{$carbon-prefix}--tag__close-icon {
141
- // undo override by .bx--tooltip button
142
+ // undo override by .#{$carbon-prefix}--tooltip button
142
143
  padding: 0;
143
144
  }
144
145
 
@@ -48,7 +48,6 @@
48
48
  background-color $motion-duration motion(entrance, expressive),
49
49
  opacity $motion-duration motion(entrance, expressive);
50
50
  @media (prefers-reduced-motion: reduce) {
51
- // stylelint-disable-next-line carbon/motion-token-use
52
51
  transition: none;
53
52
  }
54
53
  }
@@ -267,7 +266,7 @@
267
266
  &.#{$block-class}--wide .#{$block-class}__content {
268
267
  background: $ui-background;
269
268
 
270
- // revert the background colour overridden by bx--modal styles
269
+ // revert the background color overridden by #{$carbon-prefix}--modal styles
271
270
  .#{$prefix}--pagination,
272
271
  .#{$prefix}--pagination__control-buttons,
273
272
  .#{$prefix}--text-input,