@carbon/ibm-products 2.0.0-rc.22 → 2.0.0-rc.24

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/css/index-full-carbon.css +41 -49
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +4 -4
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +30 -43
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +3 -3
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +41 -49
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +4 -4
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +102 -43
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +4 -4
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/AddSelect/AddSelectBreadcrumbs.js +6 -4
  18. package/es/components/AddSelect/AddSelectFilter.js +1 -2
  19. package/es/components/AddSelect/AddSelectList.js +16 -34
  20. package/es/components/CreateFullPage/CreateFullPage.js +4 -2
  21. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +4 -2
  22. package/es/components/PageHeader/PageHeaderTitle.js +1 -0
  23. package/es/components/SidePanel/SidePanel.js +14 -5
  24. package/es/components/Tearsheet/Tearsheet.js +3 -3
  25. package/es/components/Tearsheet/TearsheetShell.js +11 -8
  26. package/lib/components/AddSelect/AddSelectBreadcrumbs.js +6 -4
  27. package/lib/components/AddSelect/AddSelectFilter.js +1 -2
  28. package/lib/components/AddSelect/AddSelectList.js +15 -33
  29. package/lib/components/CreateFullPage/CreateFullPage.js +3 -1
  30. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/CustomizeColumnsTearsheet.js +3 -1
  31. package/lib/components/PageHeader/PageHeaderTitle.js +1 -0
  32. package/lib/components/SidePanel/SidePanel.js +14 -5
  33. package/lib/components/Tearsheet/Tearsheet.js +2 -2
  34. package/lib/components/Tearsheet/TearsheetShell.js +9 -6
  35. package/package.json +2 -2
  36. package/scss/components/ActionSet/_action-set.scss +4 -1
  37. package/scss/components/AddSelect/_add-select.scss +0 -10
  38. package/scss/components/Datagrid/styles/_useInlineEdit.scss +4 -0
  39. package/scss/components/EmptyStates/_empty-state.scss +7 -4
  40. package/scss/components/HTTPErrors/_http-errors.scss +8 -4
  41. package/scss/components/InlineEditV1/_inline-edit-v1.scss +1 -3
  42. package/scss/components/Tearsheet/_carbon-imports.scss +2 -1
  43. package/scss/components/Tearsheet/_tearsheet.scss +8 -5
@@ -3,7 +3,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
5
  var _excluded = ["actionToolbarButtons", "actions", "animateTitle", "children", "className", "closeIconDescription", "condensedActions", "currentStep", "includeOverlay", "labelText", "navigationBackIconDescription", "onNavigationBack", "onRequestClose", "onUnmount", "open", "placement", "preventCloseOnClickOutside", "selectorPageContent", "selectorPrimaryFocus", "size", "slideIn", "subtitle", "title"],
6
- _excluded2 = ["label", "kind", "icon", "leading", "disabled", "className", "onClick"];
6
+ _excluded2 = ["label", "kind", "icon", "tooltipPosition", "tooltipAlignment", "leading", "disabled", "className", "onClick"];
7
7
 
8
8
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
9
 
@@ -433,6 +433,8 @@ export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
433
433
  var label = _ref5.label,
434
434
  kind = _ref5.kind,
435
435
  icon = _ref5.icon,
436
+ tooltipPosition = _ref5.tooltipPosition,
437
+ tooltipAlignment = _ref5.tooltipAlignment,
436
438
  leading = _ref5.leading,
437
439
  disabled = _ref5.disabled,
438
440
  className = _ref5.className,
@@ -445,8 +447,8 @@ export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
445
447
  size: "sm",
446
448
  renderIcon: icon,
447
449
  iconDescription: label,
448
- tooltipPosition: "bottom",
449
- tooltipAlignment: "center",
450
+ tooltipPosition: tooltipPosition || 'bottom',
451
+ tooltipAlignment: tooltipAlignment || 'center',
450
452
  hasIconOnly: !leading,
451
453
  disabled: disabled,
452
454
  className: cx(["".concat(blockClass, "__action-toolbar-button"), className, (_ref6 = {}, _defineProperty(_ref6, "".concat(blockClass, "__action-toolbar-icon-only-button"), icon && !leading), _defineProperty(_ref6, "".concat(blockClass, "__action-toolbar-leading-button"), leading), _ref6)]),
@@ -528,14 +530,19 @@ SidePanel.propTypes = {
528
530
  leading: PropTypes.bool,
529
531
  icon: PropTypes.oneOfType([PropTypes.object, PropTypes.func]),
530
532
  onClick: PropTypes.func,
531
- kind: PropTypes.oneOf(['ghost', 'tertiary', 'secondary', 'primary'])
533
+ kind: PropTypes.oneOf(['ghost', 'tertiary', 'secondary', 'primary']),
534
+ tooltipAlignment: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
535
+ tooltipPosition: PropTypes.oneOf(['start', 'center', 'end'])
532
536
  })),
533
537
 
534
538
  /**
535
539
  * The primary actions to be shown in the side panel. Each action is
536
540
  * specified as an object with optional fields: 'label' to supply the button
537
541
  * label, 'kind' to select the button kind (must be 'primary', 'secondary' or
538
- * 'ghost'), 'loading' to display a loading indicator, and 'onClick' to
542
+ * 'ghost'), 'tooltipPosition' to select where the tooltip is placed around
543
+ * the button (must be 'top', 'right', 'bottom', or 'left'), 'tooltipAlignment'
544
+ * to select how the tooltip is aligned with the button (must be 'start',
545
+ * 'center', or 'end', 'loading' to display a loading indicator, and 'onClick' to
539
546
  * receive notifications when the button is clicked. Additional fields in the
540
547
  * object will be passed to the Button component, and these can include
541
548
  * 'disabled', 'ref', 'className', and any other Button props. Any other
@@ -546,6 +553,8 @@ SidePanel.propTypes = {
546
553
  */
547
554
  actions: allPropTypes([ActionSet.validateActions(), PropTypes.arrayOf(PropTypes.shape(_objectSpread(_objectSpread({}, Button.propTypes), {}, {
548
555
  kind: PropTypes.oneOf(['ghost', 'danger--ghost', 'secondary', 'danger', 'primary']),
556
+ tooltipPosition: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
557
+ tooltipAlignment: PropTypes.oneOf(['start', 'center', 'end']),
549
558
  label: PropTypes.string,
550
559
  loading: PropTypes.bool,
551
560
  // we duplicate this Button prop to improve the DocGen here
@@ -7,7 +7,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
7
7
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
8
 
9
9
  /**
10
- * Copyright IBM Corp. 2020, 2021
10
+ * Copyright IBM Corp. 2020, 2023
11
11
  *
12
12
  * This source code is licensed under the Apache-2.0 license found in the
13
13
  * LICENSE file in the root directory of this source tree.
@@ -92,8 +92,8 @@ Tearsheet.propTypes = _objectSpread({
92
92
  * display a loading indicator, and 'onClick' to receive notifications when
93
93
  * the button is clicked. Additional fields in the object will be passed to
94
94
  * the Button component, and these can include 'disabled', 'ref', 'className',
95
- * and any other Button props. Any other fields in the object will be passed
96
- * through to the button element as HTML attributes.
95
+ * and any other Button props, except 'size'. Any other fields in the object will
96
+ * be passed through to the button element as HTML attributes.
97
97
  *
98
98
  * See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
99
99
  */
@@ -9,7 +9,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
9
9
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
10
 
11
11
  /**
12
- * Copyright IBM Corp. 2020, 2022
12
+ * Copyright IBM Corp. 2020, 2023
13
13
  *
14
14
  * This source code is licensed under the Apache-2.0 license found in the
15
15
  * LICENSE file in the root directory of this source tree.
@@ -24,7 +24,7 @@ import cx from 'classnames';
24
24
  import { pkg } from '../../settings';
25
25
  import pconsole from '../../global/js/utils/pconsole'; // Carbon and package components we use.
26
26
 
27
- import { Button, ComposedModal, ModalHeader, ModalBody, usePrefix } from '@carbon/react';
27
+ import { Button, ComposedModal, Layer, ModalHeader, ModalBody, usePrefix } from '@carbon/react';
28
28
  import { ActionSet } from '../ActionSet';
29
29
  import { Wrap } from '../../global/js/utils/Wrap'; // The block part of our conventional BEM class names (bc__E--M).
30
30
 
@@ -97,8 +97,9 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
97
97
  handleHeight: false
98
98
  }),
99
99
  width = _useResizeDetector.width,
100
- resizer = _useResizeDetector.ref; // Keep track of the stack depth and our position in it (1-based, 0=closed)
100
+ resizer = _useResizeDetector.ref;
101
101
 
102
+ var wide = size === 'wide'; // Keep track of the stack depth and our position in it (1-based, 0=closed)
102
103
 
103
104
  var _useState3 = useState(0),
104
105
  _useState4 = _slicedToArray(_useState3, 2),
@@ -199,7 +200,7 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
199
200
  })( /*#__PURE__*/React.createElement(ComposedModal, _extends({}, rest, {
200
201
  "aria-label": title,
201
202
  className: cx(bc, className, (_cx = {}, _defineProperty(_cx, "".concat(bc, "--stacked-").concat(position, "-of-").concat(depth), // Don't apply this on the initial open of a single tearsheet.
202
- depth > 1 || depth === 1 && prevDepth.current > 1), _defineProperty(_cx, "".concat(bc, "--wide"), size === 'wide'), _defineProperty(_cx, "".concat(bc, "--narrow"), size !== 'wide'), _cx)),
203
+ depth > 1 || depth === 1 && prevDepth.current > 1), _defineProperty(_cx, "".concat(bc, "--wide"), wide), _defineProperty(_cx, "".concat(bc, "--narrow"), !wide), _cx)),
203
204
  style: (_ref2 = {}, _defineProperty(_ref2, "--".concat(bc, "--stacking-scale-factor-single"), (width - 32) / width), _defineProperty(_ref2, "--".concat(bc, "--stacking-scale-factor-double"), (width - 64) / width), _ref2),
204
205
  containerClassName: cx("".concat(bc, "__container"), _defineProperty({}, "".concat(bc, "__container--lower"), verticalPosition === 'lower')),
205
206
  onClose: onClose,
@@ -240,11 +241,13 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
240
241
  }, influencer), /*#__PURE__*/React.createElement(Wrap, {
241
242
  className: "".concat(bc, "__right")
242
243
  }, /*#__PURE__*/React.createElement(Wrap, {
244
+ className: "".concat(bc, "__main"),
243
245
  alwaysRender: includeActions,
244
- className: "".concat(bc, "__main")
246
+ element: wide ? Layer : undefined
245
247
  }, /*#__PURE__*/React.createElement(Wrap, {
248
+ className: "".concat(bc, "__content"),
246
249
  alwaysRender: influencer && influencerPosition === 'right',
247
- className: "".concat(bc, "__content")
250
+ element: wide ? Layer : undefined
248
251
  }, children), /*#__PURE__*/React.createElement(Wrap, {
249
252
  className: cx((_cx6 = {}, _defineProperty(_cx6, "".concat(bc, "__influencer"), true), _defineProperty(_cx6, "".concat(bc, "__influencer--wide"), influencerWidth === 'wide'), _cx6)),
250
253
  neverRender: influencerPosition !== 'right'
@@ -252,9 +255,9 @@ export var TearsheetShell = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
252
255
  className: "".concat(bc, "__button-container")
253
256
  }, /*#__PURE__*/React.createElement(ActionSet, {
254
257
  actions: actions,
255
- buttonSize: size === 'wide' ? 'xl' : null,
258
+ buttonSize: wide ? '2xl' : null,
256
259
  className: "".concat(bc, "__buttons"),
257
- size: size === 'wide' ? '2xl' : 'lg'
260
+ size: wide ? '2xl' : 'lg'
258
261
  })))), /*#__PURE__*/React.createElement("div", {
259
262
  className: "".concat(bc, "__resize-detector"),
260
263
  ref: resizer
@@ -33,7 +33,8 @@ var AddSelectBreadcrumbs = function AddSelectBreadcrumbs(_ref) {
33
33
  onClick = _ref.onClick,
34
34
  path = _ref.path;
35
35
 
36
- var clickHandler = function clickHandler(idx) {
36
+ var clickHandler = function clickHandler(e, idx) {
37
+ e.preventDefault();
37
38
  onClick(idx);
38
39
  };
39
40
 
@@ -46,9 +47,10 @@ var AddSelectBreadcrumbs = function AddSelectBreadcrumbs(_ref) {
46
47
  return /*#__PURE__*/_react.default.createElement(_react2.BreadcrumbItem, {
47
48
  key: entry.id,
48
49
  isCurrentPage: isCurrentPage,
49
- onClick: function onClick() {
50
- return clickHandler(idx);
51
- }
50
+ onClick: function onClick(e) {
51
+ return clickHandler(e, idx);
52
+ },
53
+ href: "#"
52
54
  }, entry.title);
53
55
  }));
54
56
  };
@@ -132,7 +132,7 @@ var AddSelectFilter = function AddSelectFilter(_ref) {
132
132
  },
133
133
  iconDescription: iconDescription,
134
134
  className: filterBtnClassnames,
135
- size: "lg",
135
+ size: "md",
136
136
  tooltipPosition: "left"
137
137
  }), open && /*#__PURE__*/_react.default.createElement("div", {
138
138
  className: blockClass
@@ -146,7 +146,6 @@ var AddSelectFilter = function AddSelectFilter(_ref) {
146
146
  key: filterOpts.id,
147
147
  titleText: filterOpts.label,
148
148
  items: filterOpts.opts,
149
- light: true,
150
149
  onChange: function onChange(value) {
151
150
  return onchangeHandler(value, filterOpts.id);
152
151
  },
@@ -135,41 +135,23 @@ var AddSelectList = function AddSelectList(_ref) {
135
135
 
136
136
  return /*#__PURE__*/_react.default.createElement("div", {
137
137
  className: (0, _classnames.default)("".concat(blockClass, "-wrapper"), (0, _defineProperty2.default)({}, "".concat(blockClass, "-wrapper-multi"), multi))
138
- }, /*#__PURE__*/_react.default.createElement(_react2.StructuredListWrapper, {
139
- selection: true,
138
+ }, /*#__PURE__*/_react.default.createElement("div", {
140
139
  className: "".concat(blockClass)
141
- }, /*#__PURE__*/_react.default.createElement(_react2.StructuredListBody, null, filteredItems.map(function (item) {
140
+ }, /*#__PURE__*/_react.default.createElement("div", {
141
+ className: "".concat(blockClass, "-body")
142
+ }, filteredItems.map(function (item) {
142
143
  var _cx2;
143
144
 
144
- return /*#__PURE__*/_react.default.createElement(_react2.StructuredListRow, {
145
+ return /*#__PURE__*/_react.default.createElement("div", {
145
146
  key: item.id,
146
- className: (0, _classnames.default)("".concat(blockClass, "-row"), (_cx2 = {}, (0, _defineProperty2.default)(_cx2, "".concat(blockClass, "-row--selected"), isSelected(item.id)), (0, _defineProperty2.default)(_cx2, "".concat(blockClass, "-row-meta--selected"), isInMetaPanel(item.id)), _cx2)),
147
- onClick: function onClick(evt) {
148
- return metaPanelHandler(item, evt);
149
- }
147
+ className: (0, _classnames.default)("".concat(blockClass, "-row"), (_cx2 = {}, (0, _defineProperty2.default)(_cx2, "".concat(blockClass, "-row--selected"), isSelected(item.id)), (0, _defineProperty2.default)(_cx2, "".concat(blockClass, "-row-meta--selected"), isInMetaPanel(item.id)), _cx2))
150
148
  }, /*#__PURE__*/_react.default.createElement("div", {
151
- className: "".concat(blockClass, "-cell"),
152
- onClick: function onClick() {
153
- metaPanelHandler(item);
154
- },
155
- onKeyDown: function onKeyDown() {
156
- metaPanelHandler(item);
157
- },
158
- role: "button",
159
- tabIndex: "0"
149
+ className: "".concat(blockClass, "-cell")
160
150
  }, /*#__PURE__*/_react.default.createElement("div", {
161
151
  className: "".concat(blockClass, "-cell-wrapper")
162
152
  }, multi ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
163
153
  className: "".concat(blockClass, "-checkbox")
164
- },
165
- /*#__PURE__*/
166
- // hacky way to prevent checkbox from triggering the meta onclick handler
167
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
168
- _react.default.createElement("div", {
169
- onClick: function onClick(event) {
170
- return event.stopPropagation();
171
- }
172
- }, /*#__PURE__*/_react.default.createElement(_react2.Checkbox, {
154
+ }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_react2.Checkbox, {
173
155
  onChange: handleMultiSelection,
174
156
  labelText: item.title,
175
157
  id: item.id,
@@ -189,10 +171,9 @@ var AddSelectList = function AddSelectList(_ref) {
189
171
  id: "add-select-modifier-".concat(item.id),
190
172
  type: "inline",
191
173
  items: modifiers.options,
192
- light: true,
193
174
  label: modifiers.label,
194
175
  disabled: !isSelected(item.id),
195
- className: "".concat(blockClass, "-dropdown ").concat(blockClass, "-hidden-hover"),
176
+ className: "".concat(blockClass, "-dropdown"),
196
177
  initialSelectedItem: item[modifiers.id],
197
178
  onChange: function onChange(_ref6) {
198
179
  var selectedItem = _ref6.selectedItem;
@@ -224,9 +205,7 @@ var AddSelectList = function AddSelectList(_ref) {
224
205
  },
225
206
  kind: "ghost",
226
207
  size: "sm"
227
- }), item.meta && /*#__PURE__*/_react.default.createElement("div", {
228
- className: "".concat(blockClass, "-hidden-hover")
229
- }, /*#__PURE__*/_react.default.createElement(_react2.Button, {
208
+ }), item.meta && /*#__PURE__*/_react.default.createElement(_react2.Button, {
230
209
  className: "".concat(blockClass, "-view-meta"),
231
210
  renderIcon: function renderIcon(props) {
232
211
  return /*#__PURE__*/_react.default.createElement(_icons.View, (0, _extends2.default)({
@@ -238,8 +217,11 @@ var AddSelectList = function AddSelectList(_ref) {
238
217
  tooltipAlignment: "center",
239
218
  hasIconOnly: true,
240
219
  kind: "ghost",
241
- size: "sm"
242
- })))));
220
+ size: "sm",
221
+ onClick: function onClick() {
222
+ return metaPanelHandler(item);
223
+ }
224
+ }))));
243
225
  }))));
244
226
  };
245
227
 
@@ -217,6 +217,7 @@ var CreateFullPage = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref)
217
217
  })))), /*#__PURE__*/_react.default.createElement(_ActionSet.ActionSet, {
218
218
  className: "".concat(blockClass, "__buttons"),
219
219
  actions: createFullPageActions,
220
+ buttonSize: "2xl",
220
221
  size: "2xl"
221
222
  }))), /*#__PURE__*/_react.default.createElement(_react2.ComposedModal, {
222
223
  className: "".concat(blockClass, "__modal"),
@@ -233,7 +234,8 @@ var CreateFullPage = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref)
233
234
  kind: "secondary",
234
235
  onClick: function onClick() {
235
236
  setModalIsOpen(!modalIsOpen);
236
- }
237
+ },
238
+ "data-modal-primary-focus": true
237
239
  }, modalSecondaryButtonText), /*#__PURE__*/_react.default.createElement(_react2.Button, {
238
240
  type: "button",
239
241
  kind: "danger",
@@ -79,7 +79,9 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
79
79
 
80
80
  var _useState7 = (0, _react.useState)(columnDefinitions // hide the columns without Header, e.g the sticky actions, spacer
81
81
  .filter(function (colDef) {
82
- return !!colDef.Header.props && !colDef.isAction;
82
+ return !!colDef.Header.props && !!colDef.Header.props.title;
83
+ }).filter(function (colDef) {
84
+ return !colDef.isAction;
83
85
  }) // only sort the hidden column to the end when modal reopen
84
86
  .sort(function (defA, defB) {
85
87
  var isVisibleA = (0, _common.isColumnVisible)(defA);
@@ -64,6 +64,7 @@ var PageHeaderTitle = function PageHeaderTitle(_ref) {
64
64
  }) : null, loading ? /*#__PURE__*/_react.default.createElement(_react2.SkeletonText, {
65
65
  className: "".concat(blockClass, "__title-skeleton")
66
66
  }) : isEditable ? /*#__PURE__*/_react.default.createElement(_.InlineEdit, (0, _extends2.default)({
67
+ v1: true,
67
68
  hideLabel: true,
68
69
  value: text,
69
70
  editDescription: editDescription,
@@ -50,7 +50,7 @@ var _ActionSet = require("../ActionSet");
50
50
  var _variants = require("./motion/variants");
51
51
 
52
52
  var _excluded = ["actionToolbarButtons", "actions", "animateTitle", "children", "className", "closeIconDescription", "condensedActions", "currentStep", "includeOverlay", "labelText", "navigationBackIconDescription", "onNavigationBack", "onRequestClose", "onUnmount", "open", "placement", "preventCloseOnClickOutside", "selectorPageContent", "selectorPrimaryFocus", "size", "slideIn", "subtitle", "title"],
53
- _excluded2 = ["label", "kind", "icon", "leading", "disabled", "className", "onClick"];
53
+ _excluded2 = ["label", "kind", "icon", "tooltipPosition", "tooltipAlignment", "leading", "disabled", "className", "onClick"];
54
54
 
55
55
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
56
56
 
@@ -459,6 +459,8 @@ var SidePanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
459
459
  var label = _ref5.label,
460
460
  kind = _ref5.kind,
461
461
  icon = _ref5.icon,
462
+ tooltipPosition = _ref5.tooltipPosition,
463
+ tooltipAlignment = _ref5.tooltipAlignment,
462
464
  leading = _ref5.leading,
463
465
  disabled = _ref5.disabled,
464
466
  className = _ref5.className,
@@ -470,8 +472,8 @@ var SidePanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
470
472
  size: "sm",
471
473
  renderIcon: icon,
472
474
  iconDescription: label,
473
- tooltipPosition: "bottom",
474
- tooltipAlignment: "center",
475
+ tooltipPosition: tooltipPosition || 'bottom',
476
+ tooltipAlignment: tooltipAlignment || 'center',
475
477
  hasIconOnly: !leading,
476
478
  disabled: disabled,
477
479
  className: (0, _classnames.default)(["".concat(blockClass, "__action-toolbar-button"), className, (_ref6 = {}, (0, _defineProperty2.default)(_ref6, "".concat(blockClass, "__action-toolbar-icon-only-button"), icon && !leading), (0, _defineProperty2.default)(_ref6, "".concat(blockClass, "__action-toolbar-leading-button"), leading), _ref6)]),
@@ -555,14 +557,19 @@ SidePanel.propTypes = {
555
557
  leading: _propTypes.default.bool,
556
558
  icon: _propTypes.default.oneOfType([_propTypes.default.object, _propTypes.default.func]),
557
559
  onClick: _propTypes.default.func,
558
- kind: _propTypes.default.oneOf(['ghost', 'tertiary', 'secondary', 'primary'])
560
+ kind: _propTypes.default.oneOf(['ghost', 'tertiary', 'secondary', 'primary']),
561
+ tooltipAlignment: _propTypes.default.oneOf(['top', 'right', 'bottom', 'left']),
562
+ tooltipPosition: _propTypes.default.oneOf(['start', 'center', 'end'])
559
563
  })),
560
564
 
561
565
  /**
562
566
  * The primary actions to be shown in the side panel. Each action is
563
567
  * specified as an object with optional fields: 'label' to supply the button
564
568
  * label, 'kind' to select the button kind (must be 'primary', 'secondary' or
565
- * 'ghost'), 'loading' to display a loading indicator, and 'onClick' to
569
+ * 'ghost'), 'tooltipPosition' to select where the tooltip is placed around
570
+ * the button (must be 'top', 'right', 'bottom', or 'left'), 'tooltipAlignment'
571
+ * to select how the tooltip is aligned with the button (must be 'start',
572
+ * 'center', or 'end', 'loading' to display a loading indicator, and 'onClick' to
566
573
  * receive notifications when the button is clicked. Additional fields in the
567
574
  * object will be passed to the Button component, and these can include
568
575
  * 'disabled', 'ref', 'className', and any other Button props. Any other
@@ -573,6 +580,8 @@ SidePanel.propTypes = {
573
580
  */
574
581
  actions: (0, _propsHelper.allPropTypes)([_ActionSet.ActionSet.validateActions(), _propTypes.default.arrayOf(_propTypes.default.shape(_objectSpread(_objectSpread({}, _react2.Button.propTypes), {}, {
575
582
  kind: _propTypes.default.oneOf(['ghost', 'danger--ghost', 'secondary', 'danger', 'primary']),
583
+ tooltipPosition: _propTypes.default.oneOf(['top', 'right', 'bottom', 'left']),
584
+ tooltipAlignment: _propTypes.default.oneOf(['start', 'center', 'end']),
576
585
  label: _propTypes.default.string,
577
586
  loading: _propTypes.default.bool,
578
587
  // we duplicate this Button prop to improve the DocGen here
@@ -104,8 +104,8 @@ Tearsheet.propTypes = _objectSpread({
104
104
  * display a loading indicator, and 'onClick' to receive notifications when
105
105
  * the button is clicked. Additional fields in the object will be passed to
106
106
  * the Button component, and these can include 'disabled', 'ref', 'className',
107
- * and any other Button props. Any other fields in the object will be passed
108
- * through to the button element as HTML attributes.
107
+ * and any other Button props, except 'size'. Any other fields in the object will
108
+ * be passed through to the button element as HTML attributes.
109
109
  *
110
110
  * See https://react.carbondesignsystem.com/?path=/docs/components-button--default#component-api
111
111
  */
@@ -124,8 +124,9 @@ var TearsheetShell = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref)
124
124
  handleHeight: false
125
125
  }),
126
126
  width = _useResizeDetector.width,
127
- resizer = _useResizeDetector.ref; // Keep track of the stack depth and our position in it (1-based, 0=closed)
127
+ resizer = _useResizeDetector.ref;
128
128
 
129
+ var wide = size === 'wide'; // Keep track of the stack depth and our position in it (1-based, 0=closed)
129
130
 
130
131
  var _useState3 = (0, _react.useState)(0),
131
132
  _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
@@ -226,7 +227,7 @@ var TearsheetShell = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref)
226
227
  })( /*#__PURE__*/_react.default.createElement(_react2.ComposedModal, (0, _extends2.default)({}, rest, {
227
228
  "aria-label": title,
228
229
  className: (0, _classnames.default)(bc, className, (_cx = {}, (0, _defineProperty2.default)(_cx, "".concat(bc, "--stacked-").concat(position, "-of-").concat(depth), // Don't apply this on the initial open of a single tearsheet.
229
- depth > 1 || depth === 1 && prevDepth.current > 1), (0, _defineProperty2.default)(_cx, "".concat(bc, "--wide"), size === 'wide'), (0, _defineProperty2.default)(_cx, "".concat(bc, "--narrow"), size !== 'wide'), _cx)),
230
+ depth > 1 || depth === 1 && prevDepth.current > 1), (0, _defineProperty2.default)(_cx, "".concat(bc, "--wide"), wide), (0, _defineProperty2.default)(_cx, "".concat(bc, "--narrow"), !wide), _cx)),
230
231
  style: (_ref2 = {}, (0, _defineProperty2.default)(_ref2, "--".concat(bc, "--stacking-scale-factor-single"), (width - 32) / width), (0, _defineProperty2.default)(_ref2, "--".concat(bc, "--stacking-scale-factor-double"), (width - 64) / width), _ref2),
231
232
  containerClassName: (0, _classnames.default)("".concat(bc, "__container"), (0, _defineProperty2.default)({}, "".concat(bc, "__container--lower"), verticalPosition === 'lower')),
232
233
  onClose: onClose,
@@ -267,11 +268,13 @@ var TearsheetShell = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref)
267
268
  }, influencer), /*#__PURE__*/_react.default.createElement(_Wrap.Wrap, {
268
269
  className: "".concat(bc, "__right")
269
270
  }, /*#__PURE__*/_react.default.createElement(_Wrap.Wrap, {
271
+ className: "".concat(bc, "__main"),
270
272
  alwaysRender: includeActions,
271
- className: "".concat(bc, "__main")
273
+ element: wide ? _react2.Layer : undefined
272
274
  }, /*#__PURE__*/_react.default.createElement(_Wrap.Wrap, {
275
+ className: "".concat(bc, "__content"),
273
276
  alwaysRender: influencer && influencerPosition === 'right',
274
- className: "".concat(bc, "__content")
277
+ element: wide ? _react2.Layer : undefined
275
278
  }, children), /*#__PURE__*/_react.default.createElement(_Wrap.Wrap, {
276
279
  className: (0, _classnames.default)((_cx6 = {}, (0, _defineProperty2.default)(_cx6, "".concat(bc, "__influencer"), true), (0, _defineProperty2.default)(_cx6, "".concat(bc, "__influencer--wide"), influencerWidth === 'wide'), _cx6)),
277
280
  neverRender: influencerPosition !== 'right'
@@ -279,9 +282,9 @@ var TearsheetShell = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref)
279
282
  className: "".concat(bc, "__button-container")
280
283
  }, /*#__PURE__*/_react.default.createElement(_ActionSet.ActionSet, {
281
284
  actions: actions,
282
- buttonSize: size === 'wide' ? 'xl' : null,
285
+ buttonSize: wide ? '2xl' : null,
283
286
  className: "".concat(bc, "__buttons"),
284
- size: size === 'wide' ? '2xl' : 'lg'
287
+ size: wide ? '2xl' : 'lg'
285
288
  })))), /*#__PURE__*/_react.default.createElement("div", {
286
289
  className: "".concat(bc, "__resize-detector"),
287
290
  ref: resizer
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.0.0-rc.22",
4
+ "version": "2.0.0-rc.24",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -94,5 +94,5 @@
94
94
  "react": "^16.8.6 || ^17.0.1",
95
95
  "react-dom": "^16.8.6 || ^17.0.1"
96
96
  },
97
- "gitHead": "e8bca836f1a602f6288a9d3bcb29cd524a497000"
97
+ "gitHead": "00afe9a823d141de55b2f2590429a1bcf4a637d8"
98
98
  }
@@ -1,13 +1,16 @@
1
1
  //
2
- // Copyright IBM Corp. 2021, 2021
2
+ // Copyright IBM Corp. 2021, 2023
3
3
  //
4
4
  // This source code is licensed under the Apache-2.0 license found in the
5
5
  // LICENSE file in the root directory of this source tree.
6
6
  //
7
7
 
8
+ @use '@carbon/layout/scss/convert' as *;
9
+
8
10
  @use '@carbon/styles/scss/theme' as *;
9
11
  @use '@carbon/styles/scss/type';
10
12
  @use '@carbon/styles/scss/spacing' as *;
13
+
11
14
  @use '../../global/styles/project-settings' as c4p-settings;
12
15
 
13
16
  // The block part of our conventional BEM class names (blockClass__E--M).
@@ -64,16 +64,6 @@ $tearsheet-class: #{$pkg-prefix}--tearsheet;
64
64
  justify-content: center;
65
65
  }
66
66
 
67
- &-cell:hover .#{$block-class}__selections-hidden-hover,
68
- .#{$carbon-prefix}--structured-list-row:focus-within
69
- .#{$block-class}__selections-hidden-hover {
70
- visibility: visible;
71
- }
72
-
73
- &-hidden-hover {
74
- visibility: hidden;
75
- }
76
-
77
67
  &-row--selected.#{$carbon-prefix}--structured-list-row {
78
68
  border-bottom: 1px solid $layer-selected-01;
79
69
  background-color: $layer-selected-01;
@@ -409,6 +409,10 @@ $row-heights: (
409
409
  outline-color: $support-error;
410
410
  }
411
411
 
412
+ .#{variables.$block-class} .#{c4p-settings.$carbon-prefix}--text-input:focus {
413
+ background: $field-01;
414
+ }
415
+
412
416
  .#{variables.$block-class}
413
417
  .#{variables.$block-class}__inline-edit--outer-cell-button--invalid
414
418
  .#{c4p-settings.$carbon-prefix}--number
@@ -1,5 +1,5 @@
1
1
  //
2
- // Copyright IBM Corp. 2020, 2021
2
+ // Copyright IBM Corp. 2020, 2023
3
3
  //
4
4
  // This source code is licensed under the Apache-2.0 license found in the
5
5
  // LICENSE file in the root directory of this source tree.
@@ -17,21 +17,24 @@ $block-class: #{c4p-settings.$pkg-prefix}--empty-state;
17
17
  color: $text-primary;
18
18
 
19
19
  .#{$block-class}__header {
20
- @include type.type-style('productive-heading-03');
20
+ @include type.type-style('heading-03');
21
21
  // stylelint-disable-next-line carbon/layout-token-use
22
22
  padding-bottom: calc($spacing-01 + $spacing-02);
23
23
  margin: 0;
24
24
  }
25
+
25
26
  .#{$block-class}__subtitle {
26
- @include type.type-style('body-long-01');
27
+ @include type.type-style('body-01');
27
28
 
28
29
  padding-bottom: $spacing-05;
29
30
  }
31
+
30
32
  .#{$block-class}__header--small {
31
- @include type.type-style('body-short-02');
33
+ @include type.type-style('body-compact-02');
32
34
 
33
35
  padding-bottom: $spacing-03;
34
36
  }
37
+
35
38
  .#{$block-class}__subtitle--small {
36
39
  @include type.type-style('label-01');
37
40
  }
@@ -1,5 +1,5 @@
1
1
  //
2
- // Copyright IBM Corp. 2021, 2022
2
+ // Copyright IBM Corp. 2021, 2023
3
3
  //
4
4
  // This source code is licensed under the Apache-2.0 license found in the
5
5
  // LICENSE file in the root directory of this source tree.
@@ -27,21 +27,25 @@ $block-class: #{c4p-settings.$pkg-prefix}--http-errors;
27
27
  transform: translate(-50%, -50%);
28
28
  }
29
29
  }
30
+
30
31
  .#{$block-class} .#{$block-class}__error-code-label {
31
- @include type.type-style('productive-heading-02');
32
+ @include type.type-style('heading-compact-02');
32
33
 
33
34
  margin-bottom: $spacing-02;
34
35
  }
36
+
35
37
  .#{$block-class} .#{$block-class}__title {
36
- @include type.type-style('productive-heading-05');
38
+ @include type.type-style('heading-05');
37
39
 
38
40
  margin-bottom: $spacing-04;
39
41
  }
42
+
40
43
  .#{$block-class} .#{$block-class}__description {
41
- @include type.type-style('body-short-01');
44
+ @include type.type-style('body-compact-01');
42
45
 
43
46
  margin-bottom: $spacing-06;
44
47
  }
48
+
45
49
  .#{$block-class} .#{$block-class}__error-code-label,
46
50
  .#{$block-class} .#{$block-class}__title,
47
51
  .#{$block-class} .#{$block-class}__description {
@@ -34,8 +34,6 @@
34
34
 
35
35
  @mixin input-button-defaults($block-class) {
36
36
  display: inline-flex;
37
- width: var(--#{$block-class}--size);
38
- max-width: var(--#{$block-class}--size);
39
37
  height: 100%;
40
38
  min-height: initial;
41
39
  max-height: var(--#{$block-class}--size);
@@ -194,7 +192,7 @@ $block-class: #{c4p-settings.$pkg-prefix}--inline-edit;
194
192
  right: 0;
195
193
  display: flex;
196
194
  // width: room for validation, and two buttons
197
- width: var(--#{$block-class}--toolbar-width);
195
+ // width: var(--#{$block-class}--toolbar-width);
198
196
  height: 100%;
199
197
  justify-content: space-between;
200
198
  cursor: text;
@@ -1,5 +1,5 @@
1
1
  //
2
- // Copyright IBM Corp. 2022, 2022
2
+ // Copyright IBM Corp. 2022, 2023
3
3
  //
4
4
  // This source code is licensed under the Apache-2.0 license found in the
5
5
  // LICENSE file in the root directory of this source tree.
@@ -8,3 +8,4 @@
8
8
  // Tearsheets use the following Carbon components:
9
9
  // Button, ComposedModal, ModalHeader, ModalBody,
10
10
  @use '@carbon/react/scss/components/modal';
11
+ @use '@carbon/react/scss/layer';