@micromag/element-heading 0.3.311 → 0.3.322

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.
@@ -1 +1 @@
1
- .micromag-element-heading-container em,.micromag-element-heading-container i{font-style:italic}.micromag-element-heading-container b,.micromag-element-heading-container strong{font-weight:700}.micromag-element-heading-container p{margin-top:.5em;margin-bottom:.5em}.micromag-element-heading-container mark{padding:0;-webkit-box-decoration-break:clone;box-decoration-break:clone}.micromag-element-heading-container{line-height:1}.micromag-element-heading-container,.micromag-element-heading-container p{margin:0;padding:0}
1
+ .micromag-element-heading-container em,.micromag-element-heading-container i{font-style:italic}.micromag-element-heading-container b,.micromag-element-heading-container strong{font-weight:700}.micromag-element-heading-container p{margin-bottom:.5em;margin-top:.5em}.micromag-element-heading-container mark{-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0}.micromag-element-heading-container{line-height:1;margin:0;padding:0}.micromag-element-heading-container p{margin:0;padding:0}
package/es/index.js CHANGED
@@ -28,39 +28,32 @@ var defaultProps = {
28
28
  className: null,
29
29
  headingRef: null
30
30
  };
31
-
32
31
  var Heading = function Heading(_ref) {
33
32
  var size = _ref.size,
34
- body = _ref.body,
35
- textStyle = _ref.textStyle,
36
- linksStyle = _ref.linksStyle,
37
- margin = _ref.margin,
38
- className = _ref.className,
39
- headingRef = _ref.headingRef;
33
+ body = _ref.body,
34
+ textStyle = _ref.textStyle,
35
+ linksStyle = _ref.linksStyle,
36
+ margin = _ref.margin,
37
+ className = _ref.className,
38
+ headingRef = _ref.headingRef;
40
39
  var HeadingComponent = "h".concat(size);
41
-
42
40
  var _ref2 = textStyle || {},
43
- _ref2$link = _ref2.link,
44
- linkStyle = _ref2$link === void 0 ? null : _ref2$link,
45
- _ref2$highlight = _ref2.highlight,
46
- highlightStyle = _ref2$highlight === void 0 ? null : _ref2$highlight;
47
-
41
+ _ref2$link = _ref2.link,
42
+ linkStyle = _ref2$link === void 0 ? null : _ref2$link,
43
+ _ref2$highlight = _ref2.highlight,
44
+ highlightStyle = _ref2$highlight === void 0 ? null : _ref2$highlight;
48
45
  var finalStyle = null;
49
46
  var finalLinkStyle = linkStyle !== null ? getStyleFromLink(linkStyle) : null;
50
47
  var finalHighlightStyle = highlightStyle !== null ? getStyleFromHighlight(highlightStyle) : null;
51
-
52
48
  if (textStyle !== null) {
53
49
  finalStyle = _objectSpread(_objectSpread({}, finalStyle), getStyleFromText(textStyle));
54
50
  }
55
-
56
51
  if (margin !== null) {
57
52
  finalStyle = _objectSpread(_objectSpread({}, finalStyle), getStyleFromMargin(margin));
58
53
  }
59
-
60
54
  if (linksStyle !== null) {
61
55
  finalLinkStyle = _objectSpread(_objectSpread({}, finalLinkStyle), getStyleFromText(linksStyle));
62
56
  }
63
-
64
57
  var needsId = finalLinkStyle !== null || highlightStyle !== null;
65
58
  var id = useMemo(function () {
66
59
  return needsId ? "text-component-".concat(v1()) : null;
@@ -81,10 +74,10 @@ var Heading = function Heading(_ref) {
81
74
  ref: headingRef
82
75
  }));
83
76
  };
84
-
85
77
  Heading.propTypes = propTypes;
86
- Heading.defaultProps = defaultProps; // eslint-disable-next-line react/jsx-props-no-spreading
78
+ Heading.defaultProps = defaultProps;
87
79
 
80
+ // eslint-disable-next-line react/jsx-props-no-spreading
88
81
  var Heading$1 = /*#__PURE__*/React.forwardRef(function (props, ref) {
89
82
  return /*#__PURE__*/React.createElement(Heading, Object.assign({
90
83
  headingRef: ref
package/lib/index.js CHANGED
@@ -38,39 +38,32 @@ var defaultProps = {
38
38
  className: null,
39
39
  headingRef: null
40
40
  };
41
-
42
41
  var Heading = function Heading(_ref) {
43
42
  var size = _ref.size,
44
- body = _ref.body,
45
- textStyle = _ref.textStyle,
46
- linksStyle = _ref.linksStyle,
47
- margin = _ref.margin,
48
- className = _ref.className,
49
- headingRef = _ref.headingRef;
43
+ body = _ref.body,
44
+ textStyle = _ref.textStyle,
45
+ linksStyle = _ref.linksStyle,
46
+ margin = _ref.margin,
47
+ className = _ref.className,
48
+ headingRef = _ref.headingRef;
50
49
  var HeadingComponent = "h".concat(size);
51
-
52
50
  var _ref2 = textStyle || {},
53
- _ref2$link = _ref2.link,
54
- linkStyle = _ref2$link === void 0 ? null : _ref2$link,
55
- _ref2$highlight = _ref2.highlight,
56
- highlightStyle = _ref2$highlight === void 0 ? null : _ref2$highlight;
57
-
51
+ _ref2$link = _ref2.link,
52
+ linkStyle = _ref2$link === void 0 ? null : _ref2$link,
53
+ _ref2$highlight = _ref2.highlight,
54
+ highlightStyle = _ref2$highlight === void 0 ? null : _ref2$highlight;
58
55
  var finalStyle = null;
59
56
  var finalLinkStyle = linkStyle !== null ? utils.getStyleFromLink(linkStyle) : null;
60
57
  var finalHighlightStyle = highlightStyle !== null ? utils.getStyleFromHighlight(highlightStyle) : null;
61
-
62
58
  if (textStyle !== null) {
63
59
  finalStyle = _objectSpread__default["default"](_objectSpread__default["default"]({}, finalStyle), utils.getStyleFromText(textStyle));
64
60
  }
65
-
66
61
  if (margin !== null) {
67
62
  finalStyle = _objectSpread__default["default"](_objectSpread__default["default"]({}, finalStyle), utils.getStyleFromMargin(margin));
68
63
  }
69
-
70
64
  if (linksStyle !== null) {
71
65
  finalLinkStyle = _objectSpread__default["default"](_objectSpread__default["default"]({}, finalLinkStyle), utils.getStyleFromText(linksStyle));
72
66
  }
73
-
74
67
  var needsId = finalLinkStyle !== null || highlightStyle !== null;
75
68
  var id = React.useMemo(function () {
76
69
  return needsId ? "text-component-".concat(uuid.v1()) : null;
@@ -91,10 +84,10 @@ var Heading = function Heading(_ref) {
91
84
  ref: headingRef
92
85
  }));
93
86
  };
94
-
95
87
  Heading.propTypes = propTypes;
96
- Heading.defaultProps = defaultProps; // eslint-disable-next-line react/jsx-props-no-spreading
88
+ Heading.defaultProps = defaultProps;
97
89
 
90
+ // eslint-disable-next-line react/jsx-props-no-spreading
98
91
  var Heading$1 = /*#__PURE__*/React__default["default"].forwardRef(function (props, ref) {
99
92
  return /*#__PURE__*/React__default["default"].createElement(Heading, Object.assign({
100
93
  headingRef: ref
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-heading",
3
- "version": "0.3.311",
3
+ "version": "0.3.322",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -49,14 +49,14 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
52
- "@micromag/core": "^0.3.311",
52
+ "@micromag/core": "^0.3.322",
53
53
  "classnames": "^2.2.6",
54
54
  "prop-types": "^15.7.2",
55
55
  "react-intl": "^5.12.1",
56
- "uuid": "^8.3.2"
56
+ "uuid": "^9.0.0"
57
57
  },
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  },
61
- "gitHead": "fab297a7ad204611597c749b969f14d992d35d47"
61
+ "gitHead": "2dfe09ad5a9ac720e4bfbffcb6371fc31c24fa9f"
62
62
  }