@arcblock/ux 2.5.35 → 2.5.36
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/lib/Tag/index.js +18 -2
- package/package.json +4 -4
- package/src/Tag/index.js +18 -1
package/lib/Tag/index.js
CHANGED
@@ -59,6 +59,21 @@ const types = {
|
|
59
59
|
backgroundColor: '#222'
|
60
60
|
}
|
61
61
|
};
|
62
|
+
/**
|
63
|
+
* @typedef {{
|
64
|
+
* type: 'error' | 'warning' | 'success' | 'primary' | 'reverse',
|
65
|
+
* content: string,
|
66
|
+
* className: string;
|
67
|
+
* children: import('react').ReactNode,
|
68
|
+
* style: import('react').CSSProperties
|
69
|
+
* }} TagProps
|
70
|
+
*/
|
71
|
+
|
72
|
+
/**
|
73
|
+
* @description
|
74
|
+
* @param {TagProps} props
|
75
|
+
* @return {import('react').ReactNode}
|
76
|
+
*/
|
62
77
|
|
63
78
|
function Tag(props) {
|
64
79
|
const newProps = (0, _Util.mergeProps)(props, Tag, ['style']);
|
@@ -108,10 +123,11 @@ Tag.defaultProps = {
|
|
108
123
|
className: '',
|
109
124
|
style: {}
|
110
125
|
};
|
126
|
+
/** @type {React.ForwardRefExoticComponent<React.PropsWithoutRef<TagProps> & React.RefAttributes<HTMLSpanElement>>} */
|
111
127
|
|
112
|
-
|
128
|
+
const TagComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Tag, _objectSpread(_objectSpread({}, props), {}, {
|
113
129
|
forwardedRef: ref
|
114
130
|
})));
|
115
|
-
|
131
|
+
var _default = TagComponent;
|
116
132
|
exports.default = _default;
|
117
133
|
const Span = (0, _Theme.styled)(_Typography.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n && {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n padding: 2px 10px;\n height: 20px;\n line-height: 20px;\n font-size: 12px;\n font-weight: 500;\n border-radius: 4px;\n }\n"])));
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arcblock/ux",
|
3
|
-
"version": "2.5.
|
3
|
+
"version": "2.5.36",
|
4
4
|
"description": "Common used react components for arcblock products",
|
5
5
|
"keywords": [
|
6
6
|
"react",
|
@@ -45,11 +45,11 @@
|
|
45
45
|
"peerDependencies": {
|
46
46
|
"react": ">=18.1.0"
|
47
47
|
},
|
48
|
-
"gitHead": "
|
48
|
+
"gitHead": "e48a6bcadaeabac677011d738aa52b51cba74cdc",
|
49
49
|
"dependencies": {
|
50
50
|
"@arcblock/did-motif": "^1.1.10",
|
51
|
-
"@arcblock/icons": "^2.5.
|
52
|
-
"@arcblock/react-hooks": "^2.5.
|
51
|
+
"@arcblock/icons": "^2.5.36",
|
52
|
+
"@arcblock/react-hooks": "^2.5.36",
|
53
53
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
54
54
|
"@emotion/react": "^11.10.4",
|
55
55
|
"@emotion/styled": "^11.10.4",
|
package/src/Tag/index.js
CHANGED
@@ -29,6 +29,21 @@ const types = {
|
|
29
29
|
},
|
30
30
|
};
|
31
31
|
|
32
|
+
/**
|
33
|
+
* @typedef {{
|
34
|
+
* type: 'error' | 'warning' | 'success' | 'primary' | 'reverse',
|
35
|
+
* content: string,
|
36
|
+
* className: string;
|
37
|
+
* children: import('react').ReactNode,
|
38
|
+
* style: import('react').CSSProperties
|
39
|
+
* }} TagProps
|
40
|
+
*/
|
41
|
+
|
42
|
+
/**
|
43
|
+
* @description
|
44
|
+
* @param {TagProps} props
|
45
|
+
* @return {import('react').ReactNode}
|
46
|
+
*/
|
32
47
|
function Tag(props) {
|
33
48
|
const newProps = mergeProps(props, Tag, ['style']);
|
34
49
|
const { type, content, children, style, className, forwardedRef, ...rest } = newProps;
|
@@ -66,7 +81,9 @@ Tag.defaultProps = {
|
|
66
81
|
style: {},
|
67
82
|
};
|
68
83
|
|
69
|
-
|
84
|
+
/** @type {React.ForwardRefExoticComponent<React.PropsWithoutRef<TagProps> & React.RefAttributes<HTMLSpanElement>>} */
|
85
|
+
const TagComponent = forwardRef((props, ref) => <Tag {...props} forwardedRef={ref} />);
|
86
|
+
export default TagComponent;
|
70
87
|
|
71
88
|
const Span = styled(Typography)`
|
72
89
|
&& {
|