@micromag/element-heading 0.3.832 → 0.4.6
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/assets/css/styles.css +1 -1
- package/es/index.d.ts +3 -0
- package/es/index.js +18 -34
- package/es/styles.css +1 -0
- package/package.json +12 -11
package/assets/css/styles.css
CHANGED
|
@@ -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
|
|
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:0;padding:0}.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}
|
package/es/index.d.ts
ADDED
package/es/index.js
CHANGED
|
@@ -1,42 +1,28 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
3
|
import React, { useId } from 'react';
|
|
5
|
-
import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
6
4
|
import { LinkStyle, HighlightStyle } from '@micromag/core/components';
|
|
7
5
|
import { getStyleFromLink, getStyleFromHighlight, getStyleFromText, getStyleFromMargin, addNonBreakingSpaces } from '@micromag/core/utils';
|
|
8
6
|
|
|
9
7
|
var styles = {"container":"micromag-element-heading-container"};
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
size
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
className: null,
|
|
29
|
-
headingRef: null
|
|
30
|
-
};
|
|
31
|
-
var Heading = function Heading(_ref) {
|
|
32
|
-
var size = _ref.size,
|
|
33
|
-
body = _ref.body,
|
|
34
|
-
textStyle = _ref.textStyle,
|
|
35
|
-
linksStyle = _ref.linksStyle,
|
|
36
|
-
margin = _ref.margin,
|
|
37
|
-
withoutNonBreakingSpaces = _ref.withoutNonBreakingSpaces,
|
|
38
|
-
className = _ref.className,
|
|
39
|
-
headingRef = _ref.headingRef;
|
|
9
|
+
function Heading(_ref) {
|
|
10
|
+
var _ref$size = _ref.size,
|
|
11
|
+
size = _ref$size === void 0 ? 1 : _ref$size,
|
|
12
|
+
_ref$body = _ref.body,
|
|
13
|
+
body = _ref$body === void 0 ? null : _ref$body,
|
|
14
|
+
_ref$textStyle = _ref.textStyle,
|
|
15
|
+
textStyle = _ref$textStyle === void 0 ? null : _ref$textStyle,
|
|
16
|
+
_ref$linksStyle = _ref.linksStyle,
|
|
17
|
+
linksStyle = _ref$linksStyle === void 0 ? null : _ref$linksStyle,
|
|
18
|
+
_ref$margin = _ref.margin,
|
|
19
|
+
margin = _ref$margin === void 0 ? null : _ref$margin,
|
|
20
|
+
_ref$withoutNonBreaki = _ref.withoutNonBreakingSpaces,
|
|
21
|
+
withoutNonBreakingSpaces = _ref$withoutNonBreaki === void 0 ? false : _ref$withoutNonBreaki,
|
|
22
|
+
_ref$className = _ref.className,
|
|
23
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
24
|
+
_ref$headingRef = _ref.headingRef,
|
|
25
|
+
headingRef = _ref$headingRef === void 0 ? null : _ref$headingRef;
|
|
40
26
|
var HeadingComponent = "h".concat(size);
|
|
41
27
|
var _ref2 = textStyle || {},
|
|
42
28
|
_ref2$link = _ref2.link,
|
|
@@ -73,9 +59,7 @@ var Heading = function Heading(_ref) {
|
|
|
73
59
|
},
|
|
74
60
|
ref: headingRef
|
|
75
61
|
}));
|
|
76
|
-
}
|
|
77
|
-
Heading.propTypes = propTypes;
|
|
78
|
-
Heading.defaultProps = defaultProps;
|
|
62
|
+
}
|
|
79
63
|
|
|
80
64
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
81
65
|
var Heading_default = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
package/es/styles.css
ADDED
|
@@ -0,0 +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:0;padding:0}.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}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-heading",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"module": "es/index.js",
|
|
35
35
|
"exports": {
|
|
36
36
|
".": {
|
|
37
|
+
"types": "./es/index.d.ts",
|
|
37
38
|
"import": "./es/index.js"
|
|
38
39
|
},
|
|
39
40
|
"./assets/css/styles": "./assets/css/styles.css",
|
|
@@ -47,27 +48,27 @@
|
|
|
47
48
|
"scripts": {
|
|
48
49
|
"clean": "rm -rf es && rm -rf lib && rm -rf assets",
|
|
49
50
|
"prepublishOnly": "npm run build",
|
|
50
|
-
"build": "../../scripts/prepare-package.sh"
|
|
51
|
+
"build": "../../scripts/prepare-package.sh --types"
|
|
51
52
|
},
|
|
52
53
|
"devDependencies": {
|
|
53
|
-
"react": "^
|
|
54
|
-
"react-dom": "^
|
|
54
|
+
"react": "^19.2.0",
|
|
55
|
+
"react-dom": "^18.3.0 || ^19.0.0"
|
|
55
56
|
},
|
|
56
57
|
"peerDependencies": {
|
|
57
|
-
"react": "^
|
|
58
|
-
"react-dom": "^
|
|
58
|
+
"react": "^19.2.0",
|
|
59
|
+
"react-dom": "^18.3.0 || ^19.0.0"
|
|
59
60
|
},
|
|
60
61
|
"dependencies": {
|
|
61
|
-
"@babel/runtime": "^7.
|
|
62
|
-
"@micromag/core": "^0.
|
|
62
|
+
"@babel/runtime": "^7.28.6",
|
|
63
|
+
"@micromag/core": "^0.4.6",
|
|
63
64
|
"classnames": "^2.2.6",
|
|
64
|
-
"
|
|
65
|
-
"react-intl": "^6.6.4",
|
|
65
|
+
"react-intl": "^8.1.3",
|
|
66
66
|
"uuid": "^9.0.0"
|
|
67
67
|
},
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public",
|
|
70
70
|
"registry": "https://registry.npmjs.org/"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "cf8440c2851b864167a1f545aa56551d55473263",
|
|
73
|
+
"types": "es/index.d.ts"
|
|
73
74
|
}
|