@arcblock/ux 2.5.34 → 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 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
- var _default = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Tag, _objectSpread(_objectSpread({}, props), {}, {
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.34",
3
+ "version": "2.5.36",
4
4
  "description": "Common used react components for arcblock products",
5
5
  "keywords": [
6
6
  "react",
@@ -43,15 +43,13 @@
43
43
  "moment-timezone": "^0.5.37"
44
44
  },
45
45
  "peerDependencies": {
46
- "@sentry/browser": "^5.0.8",
47
- "react": ">=18.1.0",
48
- "react-ga": "^2.7.0"
46
+ "react": ">=18.1.0"
49
47
  },
50
- "gitHead": "52708854a1de603bf6c1be156cfea723046e2308",
48
+ "gitHead": "e48a6bcadaeabac677011d738aa52b51cba74cdc",
51
49
  "dependencies": {
52
50
  "@arcblock/did-motif": "^1.1.10",
53
- "@arcblock/icons": "^2.5.34",
54
- "@arcblock/react-hooks": "^2.5.34",
51
+ "@arcblock/icons": "^2.5.36",
52
+ "@arcblock/react-hooks": "^2.5.36",
55
53
  "@babel/plugin-syntax-dynamic-import": "^7.8.3",
56
54
  "@emotion/react": "^11.10.4",
57
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
- export default forwardRef((props, ref) => <Tag {...props} forwardedRef={ref} />);
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
  && {