@carbon/ibm-products 1.41.1 → 1.41.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,7 @@ var componentName = 'ButtonMenu';
27
27
 
28
28
  // Default values for props
29
29
  var defaults = {
30
- size: 'default',
30
+ size: 'lg',
31
31
  kind: 'primary'
32
32
  };
33
33
 
@@ -50,6 +50,7 @@ export var ButtonMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
50
50
  _ref$size = _ref.size,
51
51
  size = _ref$size === void 0 ? defaults.size : _ref$size,
52
52
  rest = _objectWithoutProperties(_ref, _excluded);
53
+ var buttonSize = size === 'lg' ? 'default' : size;
53
54
  return /*#__PURE__*/React.createElement(OverflowMenu, _extends({}, rest, {
54
55
  className: cx(blockClass,
55
56
  // Apply the block class to the main HTML element
@@ -57,9 +58,10 @@ export var ButtonMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
57
58
  ),
58
59
 
59
60
  menuOptionsClass: cx("".concat(blockClass, "__options"), menuOptionsClass),
61
+ size: size,
60
62
  renderIcon: function renderIcon() {
61
63
  return /*#__PURE__*/React.createElement("div", {
62
- className: cx(["".concat(blockClass, "__trigger"), "".concat(carbon.prefix, "--btn"), "".concat(carbon.prefix, "--btn--").concat(kind), "".concat(carbon.prefix, "--btn--").concat(size)])
64
+ className: cx(["".concat(blockClass, "__trigger"), "".concat(carbon.prefix, "--btn"), "".concat(carbon.prefix, "--btn--").concat(kind), "".concat(carbon.prefix, "--btn--").concat(buttonSize)])
63
65
  }, label, Icon && /*#__PURE__*/React.createElement(Icon, {
64
66
  "aria-hidden": "true",
65
67
  "aria-label": iconDescription,
@@ -360,18 +360,20 @@ export var InlineEditCell = function InlineEditCell(_ref) {
360
360
  return num.toString().padStart(2, '0');
361
361
  };
362
362
  var buildDate = function buildDate(value) {
363
+ var _config$inputProps2;
364
+ var dateFormat = config === null || config === void 0 ? void 0 : (_config$inputProps2 = config.inputProps) === null || _config$inputProps2 === void 0 ? void 0 : _config$inputProps2.dateFormat;
363
365
  if (value instanceof Date) {
364
- var _config$dateFormat = config.dateFormat,
365
- dateFormat = _config$dateFormat === void 0 ? 'm/d/Y' : _config$dateFormat;
366
366
  var maskedFullYear = value.getFullYear();
367
367
  var maskedMonth = padTo2Digits(value.getMonth() + 1);
368
368
  var maskedDay = padTo2Digits(value.getDate());
369
- if (dateFormat === 'm/d/Y' || dateFormat === 'm/d/y') {
369
+ if (dateFormat === 'm/d/Y' || value === 'm/d/y') {
370
370
  return [maskedMonth, maskedDay, maskedFullYear].join('/');
371
371
  }
372
- if (dateFormat === 'd/m/Y' || dateFormat === 'd/m/y') {
372
+ if (dateFormat === 'd/m/Y' || dateFormat === 'd/m/y' || dateFormat === undefined) {
373
373
  return [maskedDay, maskedMonth, maskedFullYear].join('/');
374
374
  }
375
+ } else {
376
+ return value;
375
377
  }
376
378
  return null;
377
379
  };
@@ -93,6 +93,7 @@ export var getInlineEditColumns = function getInlineEditColumns() {
93
93
  console.log(newDateObj, cell);
94
94
  },
95
95
  labelText: 'Change active since date',
96
+ dateFormat: 'd/m/Y',
96
97
  // optionally pass props here to be passed through to Carbon's DatePickerInput component
97
98
  datePickerInputProps: {
98
99
  labelText: 'Change active since date'
@@ -166,7 +166,7 @@ var newPerson = function newPerson() {
166
166
  numbers: 0
167
167
  }),
168
168
  chartType: initialChartTypeIndex === 0 ? inlineEditSelectItems[0] : initialChartTypeIndex === 1 ? inlineEditSelectItems[1] : inlineEditSelectItems[2],
169
- activeSince: activeChance > 0.66 ? activeSinceDate : activeChance > 0.33 ? yesterdayDate : twoDaysAgoDate,
169
+ activeSince: activeChance > 0.66 ? activeSinceDate : activeChance > 0.33 ? yesterdayDate : '23/05/2020',
170
170
  bonus: "$\r".concat(getRandomInteger(100, 500, 2)),
171
171
  passwordStrength: getPasswordStrength(),
172
172
  doc_link: renderDocLink()
@@ -44,7 +44,11 @@ export var TagSetOverflow = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
44
44
  var overflowTagContent = useRef(null);
45
45
  var handleChange = function handleChange(ev, _ref2) {
46
46
  var open = _ref2.open;
47
- setTipOpen(open);
47
+ if (ev.type === 'click') {
48
+ setTipOpen(function () {
49
+ return open;
50
+ });
51
+ }
48
52
  };
49
53
  var handleShowAllTagsClick = function handleShowAllTagsClick(ev) {
50
54
  ev.stopPropagation();
@@ -21,7 +21,7 @@ var componentName = 'ButtonMenu';
21
21
 
22
22
  // Default values for props
23
23
  var defaults = {
24
- size: 'default',
24
+ size: 'lg',
25
25
  kind: 'primary'
26
26
  };
27
27
 
@@ -44,6 +44,7 @@ var ButtonMenu = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
44
44
  _ref$size = _ref.size,
45
45
  size = _ref$size === void 0 ? defaults.size : _ref$size,
46
46
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
47
+ var buttonSize = size === 'lg' ? 'default' : size;
47
48
  return /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.OverflowMenu, (0, _extends2.default)({}, rest, {
48
49
  className: (0, _classnames.default)(blockClass,
49
50
  // Apply the block class to the main HTML element
@@ -51,9 +52,10 @@ var ButtonMenu = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
51
52
  ),
52
53
 
53
54
  menuOptionsClass: (0, _classnames.default)("".concat(blockClass, "__options"), menuOptionsClass),
55
+ size: size,
54
56
  renderIcon: function renderIcon() {
55
57
  return /*#__PURE__*/_react.default.createElement("div", {
56
- className: (0, _classnames.default)(["".concat(blockClass, "__trigger"), "".concat(_settings.carbon.prefix, "--btn"), "".concat(_settings.carbon.prefix, "--btn--").concat(kind), "".concat(_settings.carbon.prefix, "--btn--").concat(size)])
58
+ className: (0, _classnames.default)(["".concat(blockClass, "__trigger"), "".concat(_settings.carbon.prefix, "--btn"), "".concat(_settings.carbon.prefix, "--btn--").concat(kind), "".concat(_settings.carbon.prefix, "--btn--").concat(buttonSize)])
57
59
  }, label, Icon && /*#__PURE__*/_react.default.createElement(Icon, {
58
60
  "aria-hidden": "true",
59
61
  "aria-label": iconDescription,
@@ -363,18 +363,20 @@ var InlineEditCell = function InlineEditCell(_ref) {
363
363
  return num.toString().padStart(2, '0');
364
364
  };
365
365
  var buildDate = function buildDate(value) {
366
+ var _config$inputProps2;
367
+ var dateFormat = config === null || config === void 0 ? void 0 : (_config$inputProps2 = config.inputProps) === null || _config$inputProps2 === void 0 ? void 0 : _config$inputProps2.dateFormat;
366
368
  if (value instanceof Date) {
367
- var _config$dateFormat = config.dateFormat,
368
- dateFormat = _config$dateFormat === void 0 ? 'm/d/Y' : _config$dateFormat;
369
369
  var maskedFullYear = value.getFullYear();
370
370
  var maskedMonth = padTo2Digits(value.getMonth() + 1);
371
371
  var maskedDay = padTo2Digits(value.getDate());
372
- if (dateFormat === 'm/d/Y' || dateFormat === 'm/d/y') {
372
+ if (dateFormat === 'm/d/Y' || value === 'm/d/y') {
373
373
  return [maskedMonth, maskedDay, maskedFullYear].join('/');
374
374
  }
375
- if (dateFormat === 'd/m/Y' || dateFormat === 'd/m/y') {
375
+ if (dateFormat === 'd/m/Y' || dateFormat === 'd/m/y' || dateFormat === undefined) {
376
376
  return [maskedDay, maskedMonth, maskedFullYear].join('/');
377
377
  }
378
+ } else {
379
+ return value;
378
380
  }
379
381
  return null;
380
382
  };
@@ -100,6 +100,7 @@ var getInlineEditColumns = function getInlineEditColumns() {
100
100
  console.log(newDateObj, cell);
101
101
  },
102
102
  labelText: 'Change active since date',
103
+ dateFormat: 'd/m/Y',
103
104
  // optionally pass props here to be passed through to Carbon's DatePickerInput component
104
105
  datePickerInputProps: {
105
106
  labelText: 'Change active since date'
@@ -168,7 +168,7 @@ var newPerson = function newPerson() {
168
168
  numbers: 0
169
169
  }),
170
170
  chartType: initialChartTypeIndex === 0 ? _getInlineEditColumns.inlineEditSelectItems[0] : initialChartTypeIndex === 1 ? _getInlineEditColumns.inlineEditSelectItems[1] : _getInlineEditColumns.inlineEditSelectItems[2],
171
- activeSince: activeChance > 0.66 ? activeSinceDate : activeChance > 0.33 ? yesterdayDate : twoDaysAgoDate,
171
+ activeSince: activeChance > 0.66 ? activeSinceDate : activeChance > 0.33 ? yesterdayDate : '23/05/2020',
172
172
  bonus: "$\r".concat(getRandomInteger(100, 500, 2)),
173
173
  passwordStrength: getPasswordStrength(),
174
174
  doc_link: renderDocLink()
@@ -47,7 +47,11 @@ var TagSetOverflow = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref)
47
47
  var overflowTagContent = (0, _react.useRef)(null);
48
48
  var handleChange = function handleChange(ev, _ref2) {
49
49
  var open = _ref2.open;
50
- setTipOpen(open);
50
+ if (ev.type === 'click') {
51
+ setTipOpen(function () {
52
+ return open;
53
+ });
54
+ }
51
55
  };
52
56
  var handleShowAllTagsClick = function handleShowAllTagsClick(ev) {
53
57
  ev.stopPropagation();
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.41.1",
4
+ "version": "1.41.3",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -95,5 +95,5 @@
95
95
  "react": "^16.8.6 || ^17.0.1",
96
96
  "react-dom": "^16.8.6 || ^17.0.1"
97
97
  },
98
- "gitHead": "4e127c6006183ae079ce089691fb1ee45d85bf1a"
98
+ "gitHead": "f91a72b3d95231f9922efb221734248b45254fa5"
99
99
  }