@douyinfe/semi-ui 2.55.0-beta.0 → 2.55.1
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/dist/css/semi.css +40 -40
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +79 -23
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/lib/cjs/_base/base.css +40 -40
- package/lib/cjs/button/splitButtonGroup.d.ts +2 -0
- package/lib/cjs/button/splitButtonGroup.js +29 -3
- package/lib/cjs/collapse/collapse-context.d.ts +1 -0
- package/lib/cjs/collapse/index.d.ts +2 -0
- package/lib/cjs/collapse/index.js +9 -5
- package/lib/cjs/collapse/item.js +3 -1
- package/lib/cjs/collapsible/index.d.ts +1 -0
- package/lib/cjs/collapsible/index.js +6 -2
- package/lib/cjs/descriptions/index.js +19 -2
- package/lib/cjs/descriptions/item.js +1 -1
- package/lib/es/_base/base.css +40 -40
- package/lib/es/button/splitButtonGroup.d.ts +2 -0
- package/lib/es/button/splitButtonGroup.js +29 -3
- package/lib/es/collapse/collapse-context.d.ts +1 -0
- package/lib/es/collapse/index.d.ts +2 -0
- package/lib/es/collapse/index.js +10 -6
- package/lib/es/collapse/item.js +3 -1
- package/lib/es/collapsible/index.d.ts +1 -0
- package/lib/es/collapsible/index.js +6 -2
- package/lib/es/descriptions/index.js +17 -2
- package/lib/es/descriptions/item.js +1 -1
- package/package.json +8 -8
|
@@ -7,7 +7,7 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
7
7
|
}
|
|
8
8
|
return t;
|
|
9
9
|
};
|
|
10
|
-
import React from 'react';
|
|
10
|
+
import React, { isValidElement } from 'react';
|
|
11
11
|
import cls from 'classnames';
|
|
12
12
|
import PropTypes from 'prop-types';
|
|
13
13
|
import { strings, cssClasses } from '@douyinfe/semi-foundation/lib/es/descriptions/constants';
|
|
@@ -50,7 +50,22 @@ class Descriptions extends BaseComponent {
|
|
|
50
50
|
this.foundation = new DescriptionsFoundation(this.adapter);
|
|
51
51
|
}
|
|
52
52
|
get adapter() {
|
|
53
|
-
return Object.assign({}, super.adapter)
|
|
53
|
+
return Object.assign(Object.assign({}, super.adapter), {
|
|
54
|
+
getColumns: () => {
|
|
55
|
+
var _a, _b;
|
|
56
|
+
if ((_a = this.props.data) === null || _a === void 0 ? void 0 : _a.length) {
|
|
57
|
+
return this.props.data;
|
|
58
|
+
}
|
|
59
|
+
if (this.props.children) {
|
|
60
|
+
return (_b = React.Children.toArray(this.props.children)) === null || _b === void 0 ? void 0 : _b.map(item => {
|
|
61
|
+
return /*#__PURE__*/isValidElement(item) ? Object.assign({
|
|
62
|
+
value: item.props.children
|
|
63
|
+
}, item.props) : [];
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return [];
|
|
67
|
+
}
|
|
68
|
+
});
|
|
54
69
|
}
|
|
55
70
|
render() {
|
|
56
71
|
const _a = this.props,
|
|
@@ -48,7 +48,7 @@ export default class Item extends PureComponent {
|
|
|
48
48
|
className: keyCls
|
|
49
49
|
}, itemKey)), /*#__PURE__*/React.createElement("td", {
|
|
50
50
|
className: `${prefixCls}-item ${prefixCls}-item-td`,
|
|
51
|
-
colSpan: span
|
|
51
|
+
colSpan: span ? span * 2 - 1 : 1
|
|
52
52
|
}, /*#__PURE__*/React.createElement("span", {
|
|
53
53
|
className: valCls
|
|
54
54
|
}, typeof children === 'function' ? children() : children)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.55.
|
|
3
|
+
"version": "2.55.1",
|
|
4
4
|
"description": "A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es/index.js",
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
"@dnd-kit/core": "^6.0.8",
|
|
21
21
|
"@dnd-kit/sortable": "^7.0.2",
|
|
22
22
|
"@dnd-kit/utilities": "^3.2.1",
|
|
23
|
-
"@douyinfe/semi-animation": "2.55.
|
|
24
|
-
"@douyinfe/semi-animation-react": "2.55.
|
|
25
|
-
"@douyinfe/semi-foundation": "2.55.
|
|
26
|
-
"@douyinfe/semi-icons": "2.55.
|
|
27
|
-
"@douyinfe/semi-illustrations": "2.55.
|
|
28
|
-
"@douyinfe/semi-theme-default": "2.55.
|
|
23
|
+
"@douyinfe/semi-animation": "2.55.1",
|
|
24
|
+
"@douyinfe/semi-animation-react": "2.55.1",
|
|
25
|
+
"@douyinfe/semi-foundation": "2.55.1",
|
|
26
|
+
"@douyinfe/semi-icons": "2.55.1",
|
|
27
|
+
"@douyinfe/semi-illustrations": "2.55.1",
|
|
28
|
+
"@douyinfe/semi-theme-default": "2.55.1",
|
|
29
29
|
"async-validator": "^3.5.0",
|
|
30
30
|
"classnames": "^2.2.6",
|
|
31
31
|
"copy-text-to-clipboard": "^2.1.1",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
],
|
|
76
76
|
"author": "",
|
|
77
77
|
"license": "MIT",
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "d74bd5368afc88bc49abc4ba432be9dd74fa707b",
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
81
81
|
"@babel/plugin-transform-runtime": "^7.15.8",
|