@micromag/core 0.3.508 → 0.3.512

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.
package/es/index.js CHANGED
@@ -206,10 +206,11 @@ var customFont = PropTypes$1.shape({
206
206
  var font = PropTypes$1.oneOfType([PropTypes$1.object, PropTypes$1.string]);
207
207
  var fonts = PropTypes$1.arrayOf(font);
208
208
  var textAlign = PropTypes$1.oneOf(['left', 'right', 'center']);
209
- var color = PropTypes$1.shape({
209
+ var colorObject = PropTypes$1.shape({
210
210
  color: PropTypes$1.string,
211
211
  alpha: PropTypes$1.number
212
212
  });
213
+ var color = PropTypes$1.oneOfType([colorObject, PropTypes$1.string]);
213
214
  var textStyle = PropTypes$1.shape({
214
215
  fontFamily: font,
215
216
  fontSize: PropTypes$1.number,
@@ -653,7 +654,7 @@ var PropTypes = /*#__PURE__*/Object.freeze({
653
654
  closedCaptions: closedCaptions,
654
655
  closedCaptionsElement: closedCaptionsElement,
655
656
  closedCaptionsMedia: closedCaptionsMedia,
656
- color: color,
657
+ colorObject: colorObject,
657
658
  component: component,
658
659
  componentNames: componentNames,
659
660
  components: components,
package/es/utils.js CHANGED
@@ -2,7 +2,7 @@ import _regeneratorRuntime from '@babel/runtime/helpers/regeneratorRuntime';
2
2
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
3
3
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
4
4
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
5
- import { paramCase, pascalCase, snakeCase } from 'change-case';
5
+ import { kebabCase, pascalCase, snakeCase } from 'change-case';
6
6
  export { camelCase, pascalCase, snakeCase } from 'change-case';
7
7
  import isNumber from 'lodash/isNumber';
8
8
  import isObject from 'lodash/isObject';
@@ -17,7 +17,7 @@ import slugify from 'slugify';
17
17
 
18
18
  var convertStyleToString = function convertStyleToString(style) {
19
19
  return style !== null ? Object.keys(style).map(function (key) {
20
- return "".concat(paramCase(key), ":").concat(isNumber(style[key]) ? "".concat(style[key], "px") : style[key], ";");
20
+ return "".concat(kebabCase(key), ":").concat(isNumber(style[key]) ? "".concat(style[key], "px") : style[key], ";");
21
21
  }).join('\n') : '';
22
22
  };
23
23
  var convertStyleToString$1 = convertStyleToString;
@@ -1165,7 +1165,7 @@ var slug = function slug(str) {
1165
1165
  var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
1166
1166
  var toSlug;
1167
1167
  if (separator === '-') {
1168
- toSlug = paramCase(str);
1168
+ toSlug = kebabCase(str);
1169
1169
  } else {
1170
1170
  toSlug = snakeCase(str);
1171
1171
  }