@micromag/element-badge 0.3.824 → 0.4.4
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 +12 -0
- package/es/index.js +9 -21
- package/es/styles.css +1 -0
- package/package.json +13 -12
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.container{border:1px solid var(--mm-gray-500);border-radius:100px;color:var(--mm-gray-500);display:inline-block;line-height:1;padding:4px 10px}.container .label{display:-ms-inline-flexbox;display:inline-flex}.container .label *{display:inline}.container .label style{display:none!important}
|
package/es/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { TextElement, BoxStyle } from '@micromag/core';
|
|
3
|
+
|
|
4
|
+
interface BadgeProps {
|
|
5
|
+
label?: TextElement | null;
|
|
6
|
+
boxStyle?: BoxStyle | null;
|
|
7
|
+
className?: string | null;
|
|
8
|
+
labelClassName?: string | null;
|
|
9
|
+
}
|
|
10
|
+
declare function Badge({ label, boxStyle, className, labelClassName, }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { Badge as default };
|
package/es/index.js
CHANGED
|
@@ -1,31 +1,21 @@
|
|
|
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 PropTypes from 'prop-types';
|
|
5
4
|
import React from 'react';
|
|
6
|
-
import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
7
5
|
import { getStyleFromBox } from '@micromag/core/utils';
|
|
8
6
|
import Text from '@micromag/element-text';
|
|
9
7
|
|
|
10
|
-
var styles = {"container":"
|
|
8
|
+
var styles = {"container":"container","label":"label"};
|
|
11
9
|
|
|
12
|
-
var propTypes = {
|
|
13
|
-
label: PropTypes$1.textElement,
|
|
14
|
-
boxStyle: PropTypes$1.boxStyle,
|
|
15
|
-
className: PropTypes.string,
|
|
16
|
-
labelClassName: PropTypes.string
|
|
17
|
-
};
|
|
18
|
-
var defaultProps = {
|
|
19
|
-
label: null,
|
|
20
|
-
boxStyle: null,
|
|
21
|
-
className: null,
|
|
22
|
-
labelClassName: null
|
|
23
|
-
};
|
|
24
10
|
function Badge(_ref) {
|
|
25
|
-
var label = _ref.label,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
11
|
+
var _ref$label = _ref.label,
|
|
12
|
+
label = _ref$label === void 0 ? null : _ref$label,
|
|
13
|
+
_ref$boxStyle = _ref.boxStyle,
|
|
14
|
+
boxStyle = _ref$boxStyle === void 0 ? null : _ref$boxStyle,
|
|
15
|
+
_ref$className = _ref.className,
|
|
16
|
+
className = _ref$className === void 0 ? null : _ref$className,
|
|
17
|
+
_ref$labelClassName = _ref.labelClassName,
|
|
18
|
+
labelClassName = _ref$labelClassName === void 0 ? null : _ref$labelClassName;
|
|
29
19
|
var _ref2 = label || {},
|
|
30
20
|
_ref2$textStyle = _ref2.textStyle,
|
|
31
21
|
textStyle = _ref2$textStyle === void 0 ? null : _ref2$textStyle;
|
|
@@ -48,7 +38,5 @@ function Badge(_ref) {
|
|
|
48
38
|
inline: true
|
|
49
39
|
}))));
|
|
50
40
|
}
|
|
51
|
-
Badge.propTypes = propTypes;
|
|
52
|
-
Badge.defaultProps = defaultProps;
|
|
53
41
|
|
|
54
42
|
export { Badge as default };
|
package/es/styles.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.container{border:1px solid var(--mm-gray-500);border-radius:100px;color:var(--mm-gray-500);display:inline-block;line-height:1;padding:4px 10px}.container .label{display:-ms-inline-flexbox;display:inline-flex}.container .label *{display:inline}.container .label style{display:none!important}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-badge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"module": "es/index.js",
|
|
31
31
|
"exports": {
|
|
32
32
|
".": {
|
|
33
|
+
"types": "./es/index.d.ts",
|
|
33
34
|
"import": "./es/index.js"
|
|
34
35
|
},
|
|
35
36
|
"./assets/css/styles": "./assets/css/styles.css",
|
|
@@ -43,29 +44,29 @@
|
|
|
43
44
|
"scripts": {
|
|
44
45
|
"clean": "rm -rf es && rm -rf lib && rm -rf assets",
|
|
45
46
|
"prepublishOnly": "npm run build",
|
|
46
|
-
"build": "../../scripts/prepare-package.sh"
|
|
47
|
+
"build": "../../scripts/prepare-package.sh --types"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
|
-
"react": "^
|
|
50
|
-
"react-dom": "^
|
|
50
|
+
"react": "^19.2.0",
|
|
51
|
+
"react-dom": "^18.3.0 || ^19.0.0"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
|
-
"react": "^
|
|
54
|
-
"react-dom": "^
|
|
54
|
+
"react": "^19.2.0",
|
|
55
|
+
"react-dom": "^18.3.0 || ^19.0.0"
|
|
55
56
|
},
|
|
56
57
|
"dependencies": {
|
|
57
58
|
"@babel/runtime": "^7.13.10",
|
|
58
|
-
"@micromag/core": "^0.
|
|
59
|
-
"@micromag/element-text": "^0.
|
|
59
|
+
"@micromag/core": "^0.4.4",
|
|
60
|
+
"@micromag/element-text": "^0.4.4",
|
|
60
61
|
"classnames": "^2.2.6",
|
|
61
|
-
"lodash": "^4.17.
|
|
62
|
-
"
|
|
63
|
-
"react-intl": "^6.6.4",
|
|
62
|
+
"lodash": "^4.17.23",
|
|
63
|
+
"react-intl": "^8.1.3",
|
|
64
64
|
"uuid": "^9.0.0"
|
|
65
65
|
},
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public",
|
|
68
68
|
"registry": "https://registry.npmjs.org/"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "04b8519c3a3ddace5a21497e22faa11865d57f6d",
|
|
71
|
+
"types": "es/index.d.ts"
|
|
71
72
|
}
|