@douyinfe/semi-ui 2.48.0 → 2.49.0-beta.0
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 +4 -0
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +71 -44
- 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/banner/index.d.ts +2 -2
- package/lib/cjs/banner/index.js +2 -2
- package/lib/cjs/breadcrumb/item.d.ts +1 -1
- package/lib/cjs/breadcrumb/item.js +1 -1
- package/lib/cjs/calendar/dayCalendar.d.ts +1 -0
- package/lib/cjs/calendar/dayCalendar.js +4 -1
- package/lib/cjs/calendar/dayCol.d.ts +2 -0
- package/lib/cjs/calendar/dayCol.js +6 -6
- package/lib/cjs/calendar/index.d.ts +1 -0
- package/lib/cjs/calendar/index.js +1 -0
- package/lib/cjs/calendar/interface.d.ts +2 -1
- package/lib/cjs/calendar/rangeCalendar.js +4 -2
- package/lib/cjs/calendar/weekCalendar.js +4 -2
- package/lib/cjs/modal/Modal.d.ts +1 -1
- package/lib/cjs/modal/Modal.js +1 -1
- package/lib/cjs/navigation/SubNav.d.ts +1 -1
- package/lib/cjs/navigation/SubNav.js +1 -1
- package/lib/cjs/popconfirm/index.d.ts +1 -1
- package/lib/cjs/popconfirm/index.js +1 -1
- package/lib/cjs/sideSheet/SideSheetContent.d.ts +3 -1
- package/lib/cjs/sideSheet/SideSheetContent.js +6 -3
- package/lib/cjs/table/Body/BaseRow.d.ts +3 -0
- package/lib/cjs/table/Body/BaseRow.js +4 -1
- package/lib/cjs/table/Body/ExpandedRow.d.ts +1 -0
- package/lib/cjs/table/Body/ExpandedRow.js +4 -2
- package/lib/cjs/table/Body/index.d.ts +3 -0
- package/lib/cjs/table/Body/index.js +18 -10
- package/lib/cjs/table/interface.d.ts +1 -0
- package/lib/cjs/timePicker/TimePicker.d.ts +3 -0
- package/lib/cjs/timePicker/TimePicker.js +7 -3
- package/lib/cjs/timePicker/index.d.ts +2 -0
- package/lib/cjs/toast/toast.d.ts +1 -1
- package/lib/cjs/toast/toast.js +1 -1
- package/lib/cjs/typography/util.js +5 -6
- package/lib/es/banner/index.d.ts +2 -2
- package/lib/es/banner/index.js +2 -2
- package/lib/es/breadcrumb/item.d.ts +1 -1
- package/lib/es/breadcrumb/item.js +1 -1
- package/lib/es/calendar/dayCalendar.d.ts +1 -0
- package/lib/es/calendar/dayCalendar.js +4 -1
- package/lib/es/calendar/dayCol.d.ts +2 -0
- package/lib/es/calendar/dayCol.js +6 -6
- package/lib/es/calendar/index.d.ts +1 -0
- package/lib/es/calendar/index.js +1 -0
- package/lib/es/calendar/interface.d.ts +2 -1
- package/lib/es/calendar/rangeCalendar.js +4 -2
- package/lib/es/calendar/weekCalendar.js +4 -2
- package/lib/es/modal/Modal.d.ts +1 -1
- package/lib/es/modal/Modal.js +1 -1
- package/lib/es/navigation/SubNav.d.ts +1 -1
- package/lib/es/navigation/SubNav.js +1 -1
- package/lib/es/popconfirm/index.d.ts +1 -1
- package/lib/es/popconfirm/index.js +1 -1
- package/lib/es/sideSheet/SideSheetContent.d.ts +3 -1
- package/lib/es/sideSheet/SideSheetContent.js +6 -3
- package/lib/es/table/Body/BaseRow.d.ts +3 -0
- package/lib/es/table/Body/BaseRow.js +4 -1
- package/lib/es/table/Body/ExpandedRow.d.ts +1 -0
- package/lib/es/table/Body/ExpandedRow.js +4 -2
- package/lib/es/table/Body/index.d.ts +3 -0
- package/lib/es/table/Body/index.js +18 -10
- package/lib/es/table/interface.d.ts +1 -0
- package/lib/es/timePicker/TimePicker.d.ts +3 -0
- package/lib/es/timePicker/TimePicker.js +7 -3
- package/lib/es/timePicker/index.d.ts +2 -0
- package/lib/es/toast/toast.d.ts +1 -1
- package/lib/es/toast/toast.js +1 -1
- package/lib/es/typography/util.js +5 -6
- package/package.json +8 -8
package/lib/es/toast/toast.js
CHANGED
|
@@ -150,7 +150,7 @@ Toast.propTypes = {
|
|
|
150
150
|
showClose: PropTypes.bool,
|
|
151
151
|
stack: PropTypes.bool,
|
|
152
152
|
stackExpanded: PropTypes.bool,
|
|
153
|
-
icon: PropTypes.
|
|
153
|
+
icon: PropTypes.node,
|
|
154
154
|
direction: PropTypes.oneOf(strings.directions)
|
|
155
155
|
};
|
|
156
156
|
Toast.defaultProps = {
|
|
@@ -42,7 +42,6 @@ const getRenderText = function (originEle, rows) {
|
|
|
42
42
|
const lineHeight = pxToNumber(originStyle.lineHeight);
|
|
43
43
|
const maxHeight = Math.round(lineHeight * (rows + 1) + pxToNumber(originStyle.paddingTop) + pxToNumber(originStyle.paddingBottom));
|
|
44
44
|
// Set shadow
|
|
45
|
-
const maxWidth = parseInt(originStyle.width);
|
|
46
45
|
ellipsisContainer.setAttribute('style', originCSS);
|
|
47
46
|
ellipsisContainer.style.position = 'fixed';
|
|
48
47
|
ellipsisContainer.style.left = '0';
|
|
@@ -54,12 +53,12 @@ const getRenderText = function (originEle, rows) {
|
|
|
54
53
|
ellipsisContainer.style.webkitLineClamp = 'none';
|
|
55
54
|
// Render fake container
|
|
56
55
|
ReactDOM.render( /*#__PURE__*/React.createElement(React.Fragment, null), ellipsisContainer);
|
|
57
|
-
// Check if ellipsis in measure div is
|
|
56
|
+
// Check if ellipsis in measure div is enough for content
|
|
58
57
|
function inRange() {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return
|
|
58
|
+
// If content does not wrap due to line break strategy, width should be judged to determine whether it's in range
|
|
59
|
+
const widthInRange = ellipsisContainer.scrollWidth <= ellipsisContainer.offsetWidth;
|
|
60
|
+
const heightInRange = ellipsisContainer.scrollHeight < maxHeight;
|
|
61
|
+
return rows === 1 ? widthInRange && heightInRange : heightInRange;
|
|
63
62
|
}
|
|
64
63
|
// ========================= Find match ellipsis content =========================
|
|
65
64
|
// Create origin content holder
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.49.0-beta.0",
|
|
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.
|
|
24
|
-
"@douyinfe/semi-animation-react": "2.
|
|
25
|
-
"@douyinfe/semi-foundation": "2.
|
|
26
|
-
"@douyinfe/semi-icons": "2.
|
|
27
|
-
"@douyinfe/semi-illustrations": "2.
|
|
28
|
-
"@douyinfe/semi-theme-default": "2.
|
|
23
|
+
"@douyinfe/semi-animation": "2.49.0-beta.0",
|
|
24
|
+
"@douyinfe/semi-animation-react": "2.49.0-beta.0",
|
|
25
|
+
"@douyinfe/semi-foundation": "2.49.0-beta.0",
|
|
26
|
+
"@douyinfe/semi-icons": "2.49.0-beta.0",
|
|
27
|
+
"@douyinfe/semi-illustrations": "2.49.0-beta.0",
|
|
28
|
+
"@douyinfe/semi-theme-default": "2.49.0-beta.0",
|
|
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": "aa959f0cd22894b27c019eb78254ba9b991f80b3",
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
81
81
|
"@babel/plugin-transform-runtime": "^7.15.8",
|