@carbon/ibm-products 1.46.2 → 1.47.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
  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; }
8
8
  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; }
9
9
  /**
@@ -402,6 +402,8 @@ export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
402
402
  var label = _ref5.label,
403
403
  kind = _ref5.kind,
404
404
  icon = _ref5.icon,
405
+ tooltipPosition = _ref5.tooltipPosition,
406
+ tooltipAlignment = _ref5.tooltipAlignment,
405
407
  leading = _ref5.leading,
406
408
  disabled = _ref5.disabled,
407
409
  className = _ref5.className,
@@ -413,8 +415,8 @@ export var SidePanel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
413
415
  size: "small",
414
416
  renderIcon: icon,
415
417
  iconDescription: label,
416
- tooltipPosition: "bottom",
417
- tooltipAlignment: "center",
418
+ tooltipPosition: tooltipPosition || 'bottom',
419
+ tooltipAlignment: tooltipAlignment || 'center',
418
420
  hasIconOnly: !leading,
419
421
  disabled: disabled,
420
422
  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)]),
@@ -495,13 +497,18 @@ SidePanel.propTypes = {
495
497
  leading: PropTypes.bool,
496
498
  icon: PropTypes.object,
497
499
  onClick: PropTypes.func,
498
- kind: PropTypes.oneOf(['ghost', 'tertiary', 'secondary', 'primary'])
500
+ kind: PropTypes.oneOf(['ghost', 'tertiary', 'secondary', 'primary']),
501
+ tooltipAlignment: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
502
+ tooltipPosition: PropTypes.oneOf(['start', 'center', 'end'])
499
503
  })),
500
504
  /**
501
505
  * The primary actions to be shown in the side panel. Each action is
502
506
  * specified as an object with optional fields: 'label' to supply the button
503
507
  * label, 'kind' to select the button kind (must be 'primary', 'secondary' or
504
- * 'ghost'), 'loading' to display a loading indicator, and 'onClick' to
508
+ * 'ghost'), 'tooltipPosition' to select where the tooltip is placed around
509
+ * the button (must be 'top', 'right', 'bottom', or 'left'), 'tooltipAlignment'
510
+ * to select how the tooltip is aligned with the button (must be 'start',
511
+ * 'center', or 'end', 'loading' to display a loading indicator, and 'onClick' to
505
512
  * receive notifications when the button is clicked. Additional fields in the
506
513
  * object will be passed to the Button component, and these can include
507
514
  * 'disabled', 'ref', 'className', and any other Button props. Any other
@@ -512,6 +519,8 @@ SidePanel.propTypes = {
512
519
  */
513
520
  actions: allPropTypes([ActionSet.validateActions(), PropTypes.arrayOf(PropTypes.shape(_objectSpread(_objectSpread({}, Button.propTypes), {}, {
514
521
  kind: PropTypes.oneOf(['ghost', 'danger--ghost', 'secondary', 'danger', 'primary']),
522
+ tooltipPosition: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
523
+ tooltipAlignment: PropTypes.oneOf(['start', 'center', 'end']),
515
524
  label: PropTypes.string,
516
525
  loading: PropTypes.bool,
517
526
  // we duplicate this Button prop to improve the DocGen here
@@ -59,7 +59,9 @@ var CustomizeColumnsTearsheet = function CustomizeColumnsTearsheet(_ref) {
59
59
  var _useState7 = (0, _react.useState)(columnDefinitions
60
60
  // hide the columns without Header, e.g the sticky actions, spacer
61
61
  .filter(function (colDef) {
62
- return !!colDef.Header.props && !colDef.isAction;
62
+ return !!colDef.Header.props && !!colDef.Header.props.title;
63
+ }).filter(function (colDef) {
64
+ return !colDef.isAction;
63
65
  })
64
66
  // only sort the hidden column to the end when modal reopen
65
67
  .sort(function (defA, defB) {
@@ -101,6 +101,11 @@ var ARG_TYPES = {
101
101
  name: 'Filter props',
102
102
  control: 'object',
103
103
  description: 'This is an object for all the props passed into the filter flyout and filter panel'
104
+ },
105
+ expandedContentAlign: {
106
+ control: 'select',
107
+ options: ['flex-start', 'space-between'],
108
+ description: 'This sets the alignment of content inside expanded row.'
104
109
  }
105
110
  };
106
111
  exports.ARG_TYPES = ARG_TYPES;
@@ -27,7 +27,7 @@ var _iconsReact = require("@carbon/icons-react");
27
27
  var _ActionSet = require("../ActionSet");
28
28
  var _variants = require("./motion/variants");
29
29
  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"],
30
- _excluded2 = ["label", "kind", "icon", "leading", "disabled", "className", "onClick"];
30
+ _excluded2 = ["label", "kind", "icon", "tooltipPosition", "tooltipAlignment", "leading", "disabled", "className", "onClick"];
31
31
  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); }
32
32
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
33
33
  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; }
@@ -400,6 +400,8 @@ var SidePanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
400
400
  var label = _ref5.label,
401
401
  kind = _ref5.kind,
402
402
  icon = _ref5.icon,
403
+ tooltipPosition = _ref5.tooltipPosition,
404
+ tooltipAlignment = _ref5.tooltipAlignment,
403
405
  leading = _ref5.leading,
404
406
  disabled = _ref5.disabled,
405
407
  className = _ref5.className,
@@ -411,8 +413,8 @@ var SidePanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
411
413
  size: "small",
412
414
  renderIcon: icon,
413
415
  iconDescription: label,
414
- tooltipPosition: "bottom",
415
- tooltipAlignment: "center",
416
+ tooltipPosition: tooltipPosition || 'bottom',
417
+ tooltipAlignment: tooltipAlignment || 'center',
416
418
  hasIconOnly: !leading,
417
419
  disabled: disabled,
418
420
  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)]),
@@ -494,13 +496,18 @@ SidePanel.propTypes = {
494
496
  leading: _propTypes.default.bool,
495
497
  icon: _propTypes.default.object,
496
498
  onClick: _propTypes.default.func,
497
- kind: _propTypes.default.oneOf(['ghost', 'tertiary', 'secondary', 'primary'])
499
+ kind: _propTypes.default.oneOf(['ghost', 'tertiary', 'secondary', 'primary']),
500
+ tooltipAlignment: _propTypes.default.oneOf(['top', 'right', 'bottom', 'left']),
501
+ tooltipPosition: _propTypes.default.oneOf(['start', 'center', 'end'])
498
502
  })),
499
503
  /**
500
504
  * The primary actions to be shown in the side panel. Each action is
501
505
  * specified as an object with optional fields: 'label' to supply the button
502
506
  * label, 'kind' to select the button kind (must be 'primary', 'secondary' or
503
- * 'ghost'), 'loading' to display a loading indicator, and 'onClick' to
507
+ * 'ghost'), 'tooltipPosition' to select where the tooltip is placed around
508
+ * the button (must be 'top', 'right', 'bottom', or 'left'), 'tooltipAlignment'
509
+ * to select how the tooltip is aligned with the button (must be 'start',
510
+ * 'center', or 'end', 'loading' to display a loading indicator, and 'onClick' to
504
511
  * receive notifications when the button is clicked. Additional fields in the
505
512
  * object will be passed to the Button component, and these can include
506
513
  * 'disabled', 'ref', 'className', and any other Button props. Any other
@@ -511,6 +518,8 @@ SidePanel.propTypes = {
511
518
  */
512
519
  actions: (0, _propsHelper.allPropTypes)([_ActionSet.ActionSet.validateActions(), _propTypes.default.arrayOf(_propTypes.default.shape(_objectSpread(_objectSpread({}, _carbonComponentsReact.Button.propTypes), {}, {
513
520
  kind: _propTypes.default.oneOf(['ghost', 'danger--ghost', 'secondary', 'danger', 'primary']),
521
+ tooltipPosition: _propTypes.default.oneOf(['top', 'right', 'bottom', 'left']),
522
+ tooltipAlignment: _propTypes.default.oneOf(['start', 'center', 'end']),
514
523
  label: _propTypes.default.string,
515
524
  loading: _propTypes.default.bool,
516
525
  // we duplicate this Button prop to improve the DocGen here
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.46.2",
4
+ "version": "1.47.0",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -61,7 +61,7 @@
61
61
  "fs-extra": "^11.1.0",
62
62
  "glob": "^8.1.0",
63
63
  "jest": "^29.4.2",
64
- "jest-config-ibm-cloud-cognitive": "^0.24.13",
64
+ "jest-config-ibm-cloud-cognitive": "^0.24.14",
65
65
  "jest-environment-jsdom": "^29.4.2",
66
66
  "namor": "^1.1.2",
67
67
  "npm-check-updates": "^16.7.4",
@@ -89,11 +89,11 @@
89
89
  "@carbon/motion": "^10.29.0",
90
90
  "@carbon/themes": "^10.55.1",
91
91
  "@carbon/type": "^10.45.1",
92
- "carbon-components": "^10.58.5",
93
- "carbon-components-react": "^7.59.5",
92
+ "carbon-components": "^10.58.6",
93
+ "carbon-components-react": "^7.59.6",
94
94
  "carbon-icons": "^7.0.7",
95
95
  "react": "^16.8.6 || ^17.0.1",
96
96
  "react-dom": "^16.8.6 || ^17.0.1"
97
97
  },
98
- "gitHead": "3ea7d485b3cc004a95bf621a26727847329391a3"
98
+ "gitHead": "fa80a91ae0247e4a7be80e31fe13dc43dcff0ba0"
99
99
  }
@@ -108,3 +108,29 @@ $block-class: #{$pkg-prefix}--datagrid;
108
108
  // stylelint-disable-next-line carbon/type-token-use
109
109
  font-size: 0;
110
110
  }
111
+
112
+ .#{$block-class} .expanded-content {
113
+ display: flex;
114
+ }
115
+
116
+ .expanded-content__title {
117
+ padding-bottom: $spacing-05;
118
+ }
119
+
120
+ .expanded-content__row {
121
+ display: flex;
122
+ }
123
+
124
+ .expanded-content__row span {
125
+ flex: 0 1 50%;
126
+ }
127
+
128
+ .expanded-content__row span:first-child:not(:last-child) {
129
+ margin-right: $spacing-05;
130
+ color: $text-secondary;
131
+ }
132
+
133
+ .expanded-content__child:not(:last-child) {
134
+ flex: 0 1 calc($spacing-05 * 30);
135
+ margin-right: $spacing-07;
136
+ }
@@ -392,6 +392,10 @@ $row-heights: (
392
392
  outline-color: $support-01;
393
393
  }
394
394
 
395
+ .#{$block-class} .#{$carbon-prefix}--text-input:focus {
396
+ background: $field-01;
397
+ }
398
+
395
399
  .#{$block-class}
396
400
  .#{$block-class}__inline-edit--outer-cell-button--invalid
397
401
  .#{$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.
@@ -23,10 +23,11 @@
23
23
 
24
24
  .#{$block-class}__header {
25
25
  @include carbon--type-style('productive-heading-03');
26
- // stylelint-disable-next-line carbon/layout-token-use
27
- padding-bottom: calc($spacing-01 + $spacing-02);
26
+
27
+ padding-bottom: $spacing-03;
28
28
  margin: 0;
29
29
  }
30
+
30
31
  .#{$block-class}__subtitle {
31
32
  @include carbon--type-style('body-long-01');
32
33
 
@@ -155,6 +155,10 @@
155
155
  margin: 0;
156
156
  }
157
157
 
158
+ &.#{$block-class}--narrow .#{$block-class}__header-description {
159
+ max-width: 80%;
160
+ }
161
+
158
162
  &.#{$block-class}--wide .#{$block-class}__header--with-close-icon {
159
163
  padding-right: $spacing-10;
160
164
  }