@micromag/element-text 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-text-container{font-family:Helvetica,Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.1}.micromag-element-text-container em,.micromag-element-text-container i{font-style:italic}.micromag-element-text-container b,.micromag-element-text-container strong{font-weight:700}.micromag-element-text-container p{margin-top:.5em;margin-bottom:.5em}.micromag-element-text-container mark{padding:0;-webkit-box-decoration-break:clone;box-decoration-break:clone}.micromag-element-text-container{line-height:1.3}.micromag-element-text-container h2{font-size:2em}.micromag-element-text-container h3{font-size:1.75em}.micromag-element-text-container h4{font-size:1.5em}.micromag-element-text-container blockquote{padding:0 0 0 1em}.micromag-element-text-container{margin:0;padding:0}.micromag-element-text-container.micromag-element-text-showEmpty{display:inline-block;width:300px;height:80px;border:2px dashed #343434;color:#343434}.micromag-element-text-container.micromag-element-text-withLineClamp{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden}
1
+ .micromag-element-text-container{font-family:Helvetica,Arial,sans-serif;font-size:16px;font-weight:400;line-height:1.1}.micromag-element-text-container em,.micromag-element-text-container i{font-style:italic}.micromag-element-text-container b,.micromag-element-text-container strong{font-weight:700}.micromag-element-text-container p{margin-bottom:.5em;margin-top:.5em}.micromag-element-text-container mark{-webkit-box-decoration-break:clone;box-decoration-break:clone;padding:0}.micromag-element-text-container{line-height:1.3}.micromag-element-text-container h2{font-size:2em}.micromag-element-text-container h3{font-size:1.75em}.micromag-element-text-container h4{font-size:1.5em}.micromag-element-text-container blockquote{padding:0 0 0 1em}.micromag-element-text-container{margin:0;padding:0}.micromag-element-text-container.micromag-element-text-showEmpty{border:2px dashed #343434;color:#343434;display:inline-block;height:80px;width:300px}.micromag-element-text-container.micromag-element-text-withLineClamp{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}
package/es/index.js CHANGED
@@ -22,9 +22,9 @@ var propTypes = {
22
22
  inline: PropTypes.bool,
23
23
  refText: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
24
24
  current: PropTypes.any // eslint-disable-line
25
-
26
25
  })])
27
26
  };
27
+
28
28
  var defaultProps = {
29
29
  body: null,
30
30
  textStyle: null,
@@ -37,47 +37,38 @@ var defaultProps = {
37
37
  inline: false,
38
38
  refText: null
39
39
  };
40
-
41
40
  var Text = function Text(_ref) {
42
41
  var _ref3;
43
-
44
42
  var body = _ref.body,
45
- textStyle = _ref.textStyle,
46
- linksStyle = _ref.linksStyle,
47
- margin = _ref.margin,
48
- lineClamp = _ref.lineClamp,
49
- showEmpty = _ref.showEmpty,
50
- className = _ref.className,
51
- emptyClassName = _ref.emptyClassName,
52
- inline = _ref.inline,
53
- refText = _ref.refText;
54
-
43
+ textStyle = _ref.textStyle,
44
+ linksStyle = _ref.linksStyle,
45
+ margin = _ref.margin,
46
+ lineClamp = _ref.lineClamp,
47
+ showEmpty = _ref.showEmpty,
48
+ className = _ref.className,
49
+ emptyClassName = _ref.emptyClassName,
50
+ inline = _ref.inline,
51
+ refText = _ref.refText;
55
52
  var _ref2 = textStyle || {},
56
- _ref2$link = _ref2.link,
57
- linkStyle = _ref2$link === void 0 ? null : _ref2$link,
58
- _ref2$highlight = _ref2.highlight,
59
- highlightStyle = _ref2$highlight === void 0 ? null : _ref2$highlight;
60
-
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;
61
57
  var finalStyle = {};
62
58
  var finalLinkStyle = linkStyle !== null ? getStyleFromLink(linkStyle) : null;
63
59
  var finalHighlightStyle = highlightStyle !== null ? getStyleFromHighlight(highlightStyle) : null;
64
-
65
60
  if (textStyle !== null) {
66
61
  finalStyle = _objectSpread(_objectSpread({}, finalStyle), getStyleFromText(textStyle));
67
62
  }
68
-
69
63
  if (lineClamp !== null) {
70
64
  finalStyle.WebkitLineClamp = lineClamp;
71
65
  }
72
-
73
66
  if (margin !== null) {
74
67
  finalStyle = _objectSpread(_objectSpread({}, finalStyle), getStyleFromMargin(margin));
75
68
  }
76
-
77
69
  if (linksStyle !== null) {
78
70
  finalLinkStyle = _objectSpread(_objectSpread({}, finalLinkStyle), getStyleFromText(linksStyle));
79
71
  }
80
-
81
72
  var needsId = finalLinkStyle !== null || highlightStyle !== null;
82
73
  var id = useMemo(function () {
83
74
  return needsId ? "text-component-".concat(v1()) : null;
@@ -100,7 +91,6 @@ var Text = function Text(_ref) {
100
91
  style: finalHighlightStyle
101
92
  }) : null, /*#__PURE__*/React.createElement(Tag, tagProps));
102
93
  };
103
-
104
94
  Text.propTypes = propTypes;
105
95
  Text.defaultProps = defaultProps;
106
96
 
package/lib/index.js CHANGED
@@ -32,9 +32,9 @@ var propTypes = {
32
32
  inline: PropTypes__default["default"].bool,
33
33
  refText: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].shape({
34
34
  current: PropTypes__default["default"].any // eslint-disable-line
35
-
36
35
  })])
37
36
  };
37
+
38
38
  var defaultProps = {
39
39
  body: null,
40
40
  textStyle: null,
@@ -47,47 +47,38 @@ var defaultProps = {
47
47
  inline: false,
48
48
  refText: null
49
49
  };
50
-
51
50
  var Text = function Text(_ref) {
52
51
  var _ref3;
53
-
54
52
  var body = _ref.body,
55
- textStyle = _ref.textStyle,
56
- linksStyle = _ref.linksStyle,
57
- margin = _ref.margin,
58
- lineClamp = _ref.lineClamp,
59
- showEmpty = _ref.showEmpty,
60
- className = _ref.className,
61
- emptyClassName = _ref.emptyClassName,
62
- inline = _ref.inline,
63
- refText = _ref.refText;
64
-
53
+ textStyle = _ref.textStyle,
54
+ linksStyle = _ref.linksStyle,
55
+ margin = _ref.margin,
56
+ lineClamp = _ref.lineClamp,
57
+ showEmpty = _ref.showEmpty,
58
+ className = _ref.className,
59
+ emptyClassName = _ref.emptyClassName,
60
+ inline = _ref.inline,
61
+ refText = _ref.refText;
65
62
  var _ref2 = textStyle || {},
66
- _ref2$link = _ref2.link,
67
- linkStyle = _ref2$link === void 0 ? null : _ref2$link,
68
- _ref2$highlight = _ref2.highlight,
69
- highlightStyle = _ref2$highlight === void 0 ? null : _ref2$highlight;
70
-
63
+ _ref2$link = _ref2.link,
64
+ linkStyle = _ref2$link === void 0 ? null : _ref2$link,
65
+ _ref2$highlight = _ref2.highlight,
66
+ highlightStyle = _ref2$highlight === void 0 ? null : _ref2$highlight;
71
67
  var finalStyle = {};
72
68
  var finalLinkStyle = linkStyle !== null ? utils.getStyleFromLink(linkStyle) : null;
73
69
  var finalHighlightStyle = highlightStyle !== null ? utils.getStyleFromHighlight(highlightStyle) : null;
74
-
75
70
  if (textStyle !== null) {
76
71
  finalStyle = _objectSpread__default["default"](_objectSpread__default["default"]({}, finalStyle), utils.getStyleFromText(textStyle));
77
72
  }
78
-
79
73
  if (lineClamp !== null) {
80
74
  finalStyle.WebkitLineClamp = lineClamp;
81
75
  }
82
-
83
76
  if (margin !== null) {
84
77
  finalStyle = _objectSpread__default["default"](_objectSpread__default["default"]({}, finalStyle), utils.getStyleFromMargin(margin));
85
78
  }
86
-
87
79
  if (linksStyle !== null) {
88
80
  finalLinkStyle = _objectSpread__default["default"](_objectSpread__default["default"]({}, finalLinkStyle), utils.getStyleFromText(linksStyle));
89
81
  }
90
-
91
82
  var needsId = finalLinkStyle !== null || highlightStyle !== null;
92
83
  var id = React.useMemo(function () {
93
84
  return needsId ? "text-component-".concat(uuid.v1()) : null;
@@ -110,7 +101,6 @@ var Text = function Text(_ref) {
110
101
  style: finalHighlightStyle
111
102
  }) : null, /*#__PURE__*/React__default["default"].createElement(Tag, tagProps));
112
103
  };
113
-
114
104
  Text.propTypes = propTypes;
115
105
  Text.defaultProps = defaultProps;
116
106
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-text",
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
  }