@micromag/element-text 0.4.49 → 0.4.51

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.
Files changed (2) hide show
  1. package/es/index.js +11 -8
  2. package/package.json +3 -3
package/es/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import _defineProperty from '@babel/runtime/helpers/defineProperty';
2
2
  import _objectSpread from '@babel/runtime/helpers/objectSpread2';
3
3
  import classNames from 'classnames';
4
- import React, { useId } from 'react';
4
+ import { useId } from 'react';
5
5
  import { LinkStyle, HighlightStyle } from '@micromag/core/components';
6
6
  import { getStyleFromLink, getStyleFromHighlight, getStyleFromText, getStyleFromBox, getStyleFromMargin, cssEscape } from '@micromag/core/utils';
7
+ import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
7
8
 
8
9
  var styles = {"container":"micromag-element-text-container","showEmpty":"micromag-element-text-showEmpty","withLineClamp":"micromag-element-text-withLineClamp"};
9
10
 
@@ -71,13 +72,15 @@ function Text(_ref) {
71
72
  ref: refText
72
73
  };
73
74
  var Tag = "".concat(inline ? 'span' : 'div');
74
- return /*#__PURE__*/React.createElement(React.Fragment, null, finalLinkStyle !== null ? /*#__PURE__*/React.createElement(LinkStyle, {
75
- selector: "#".concat(cssEscape(id)),
76
- style: finalLinkStyle
77
- }) : null, finalHighlightStyle !== null ? /*#__PURE__*/React.createElement(HighlightStyle, {
78
- selector: "#".concat(cssEscape(id)),
79
- style: finalHighlightStyle
80
- }) : null, /*#__PURE__*/React.createElement(Tag, tagProps));
75
+ return /*#__PURE__*/jsxs(Fragment, {
76
+ children: [finalLinkStyle !== null ? /*#__PURE__*/jsx(LinkStyle, {
77
+ selector: "#".concat(cssEscape(id)),
78
+ style: finalLinkStyle
79
+ }) : null, finalHighlightStyle !== null ? /*#__PURE__*/jsx(HighlightStyle, {
80
+ selector: "#".concat(cssEscape(id)),
81
+ style: finalHighlightStyle
82
+ }) : null, /*#__PURE__*/jsx(Tag, _objectSpread({}, tagProps))]
83
+ });
81
84
  }
82
85
 
83
86
  export { Text as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-text",
3
- "version": "0.4.49",
3
+ "version": "0.4.51",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -60,7 +60,7 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@babel/runtime": "^7.28.6",
63
- "@micromag/core": "^0.4.49",
63
+ "@micromag/core": "^0.4.51",
64
64
  "classnames": "^2.2.6",
65
65
  "react-intl": "^8.1.3 || ^10.0.0",
66
66
  "uuid": "^9.0.0"
@@ -69,6 +69,6 @@
69
69
  "access": "public",
70
70
  "registry": "https://registry.npmjs.org/"
71
71
  },
72
- "gitHead": "0a225ff29387217cccb0fcc5a731e23c74bd202e",
72
+ "gitHead": "985a2370829c9ac8901ea97bf20bfc98ab158439",
73
73
  "types": "es/index.d.ts"
74
74
  }