@hi-ui/pop-confirm 4.2.0 → 4.2.2
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/CHANGELOG.md +41 -0
- package/lib/cjs/PopConfirm.js +22 -10
- package/lib/cjs/icons/index.js +11 -1
- package/lib/cjs/use-pop-confirm.js +3 -0
- package/lib/esm/PopConfirm.js +4 -4
- package/lib/types/PopConfirm.d.ts +1 -1
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,46 @@
|
|
1
1
|
# @hi-ui/pop-confirm
|
2
2
|
|
3
|
+
## 4.2.2
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- fix: 修复 rollup3 打包 cjs 模块问题
|
8
|
+
- Updated dependencies
|
9
|
+
- @hi-ui/env@4.0.3
|
10
|
+
- @hi-ui/core@4.0.7
|
11
|
+
- @hi-ui/use-latest@4.0.3
|
12
|
+
- @hi-ui/use-toggle@4.0.3
|
13
|
+
- @hi-ui/use-uncontrolled-state@4.0.3
|
14
|
+
- @hi-ui/icons@4.0.17
|
15
|
+
- @hi-ui/button@4.0.8
|
16
|
+
- @hi-ui/popper@4.1.2
|
17
|
+
- @hi-ui/classname@4.0.3
|
18
|
+
- @hi-ui/dom-utils@4.0.6
|
19
|
+
- @hi-ui/react-utils@4.0.3
|
20
|
+
- @hi-ui/type-assertion@4.0.3
|
21
|
+
|
22
|
+
## 4.2.1
|
23
|
+
|
24
|
+
### Patch Changes
|
25
|
+
|
26
|
+
- [#2672](https://github.com/XiaoMi/hiui/pull/2672) [`1ebe27830`](https://github.com/XiaoMi/hiui/commit/1ebe2783098b3a8cd980bd10076d67635463800e) Thanks [@zyprepare](https://github.com/zyprepare)! - build: 升级到 rollup3,重新构建发布组件
|
27
|
+
|
28
|
+
- [#2671](https://github.com/XiaoMi/hiui/pull/2671) [`6d7909444`](https://github.com/XiaoMi/hiui/commit/6d790944418f36689b34805f858a1268530864b9) Thanks [@zyprepare](https://github.com/zyprepare)! - fix: 修复组件参数类型错误
|
29
|
+
|
30
|
+
- Updated dependencies [[`1ebe27830`](https://github.com/XiaoMi/hiui/commit/1ebe2783098b3a8cd980bd10076d67635463800e)]:
|
31
|
+
- @hi-ui/core@4.0.6
|
32
|
+
- @hi-ui/use-latest@4.0.2
|
33
|
+
- @hi-ui/use-toggle@4.0.2
|
34
|
+
- @hi-ui/use-uncontrolled-state@4.0.2
|
35
|
+
- @hi-ui/icons@4.0.16
|
36
|
+
- @hi-ui/button@4.0.7
|
37
|
+
- @hi-ui/popper@4.1.1
|
38
|
+
- @hi-ui/classname@4.0.2
|
39
|
+
- @hi-ui/dom-utils@4.0.5
|
40
|
+
- @hi-ui/env@4.0.2
|
41
|
+
- @hi-ui/react-utils@4.0.2
|
42
|
+
- @hi-ui/type-assertion@4.0.2
|
43
|
+
|
3
44
|
## 4.2.0
|
4
45
|
|
5
46
|
### Minor Changes
|
package/lib/cjs/PopConfirm.js
CHANGED
@@ -9,6 +9,10 @@
|
|
9
9
|
*/
|
10
10
|
'use strict';
|
11
11
|
|
12
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
13
|
+
Object.defineProperty(exports, '__esModule', {
|
14
|
+
value: true
|
15
|
+
});
|
12
16
|
var tslib = require('tslib');
|
13
17
|
var React = require('react');
|
14
18
|
var classname = require('@hi-ui/classname');
|
@@ -19,6 +23,14 @@ var Button = require('@hi-ui/button');
|
|
19
23
|
var Popper = require('@hi-ui/popper');
|
20
24
|
var index = require('./icons/index.js');
|
21
25
|
var typeAssertion = require('@hi-ui/type-assertion');
|
26
|
+
function _interopDefaultCompat(e) {
|
27
|
+
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
28
|
+
'default': e
|
29
|
+
};
|
30
|
+
}
|
31
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
32
|
+
var Button__default = /*#__PURE__*/_interopDefaultCompat(Button);
|
33
|
+
var Popper__default = /*#__PURE__*/_interopDefaultCompat(Popper);
|
22
34
|
var POP_CONFIRM_PREFIX = classname.getPrefixCls('pop-confirm');
|
23
35
|
/**
|
24
36
|
* 气泡确认框
|
@@ -49,34 +61,34 @@ var PopConfirm = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
49
61
|
var hasConfirm = confirmText !== null;
|
50
62
|
var hasCancel = cancelText !== null;
|
51
63
|
var hasFooter = hasConfirm || hasCancel || footer !== null;
|
52
|
-
return /*#__PURE__*/
|
64
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].isValidElement(children) ? /*#__PURE__*/React__default["default"].cloneElement(children,
|
53
65
|
// @ts-ignore
|
54
|
-
getTriggerProps(children.props, children.ref)) : null, /*#__PURE__*/
|
66
|
+
getTriggerProps(children.props, children.ref)) : null, /*#__PURE__*/React__default["default"].createElement(Popper__default["default"], Object.assign({}, getPopperProps()), /*#__PURE__*/React__default["default"].createElement("div", Object.assign({
|
55
67
|
ref: ref,
|
56
68
|
className: cls
|
57
|
-
}, rootProps), /*#__PURE__*/
|
69
|
+
}, rootProps), /*#__PURE__*/React__default["default"].createElement("section", {
|
58
70
|
className: prefixCls + "__content"
|
59
|
-
}, icon ? /*#__PURE__*/
|
71
|
+
}, icon ? /*#__PURE__*/React__default["default"].createElement("span", {
|
60
72
|
className: prefixCls + "__content-icon"
|
61
|
-
}, icon) : null, /*#__PURE__*/
|
73
|
+
}, icon) : null, /*#__PURE__*/React__default["default"].createElement("div", {
|
62
74
|
className: prefixCls + "__content-title"
|
63
|
-
}, title)), content ? /*#__PURE__*/
|
75
|
+
}, title)), content ? /*#__PURE__*/React__default["default"].createElement("div", {
|
64
76
|
className: prefixCls + "__body"
|
65
|
-
}, content) : null, hasFooter ? /*#__PURE__*/
|
77
|
+
}, content) : null, hasFooter ? ( /*#__PURE__*/React__default["default"].createElement("footer", {
|
66
78
|
className: prefixCls + "__footer"
|
67
|
-
}, footer === undefined ? [hasCancel ? /*#__PURE__*/
|
79
|
+
}, footer === undefined ? [hasCancel ? ( /*#__PURE__*/React__default["default"].createElement(Button__default["default"], {
|
68
80
|
key: "1",
|
69
81
|
className: prefixCls + "__btn-cancel",
|
70
82
|
type: "default",
|
71
83
|
size: "md",
|
72
84
|
onClick: onCancel
|
73
|
-
}, cancelText) : null, hasConfirm ? /*#__PURE__*/
|
85
|
+
}, cancelText)) : null, hasConfirm ? ( /*#__PURE__*/React__default["default"].createElement(Button__default["default"], {
|
74
86
|
key: "2",
|
75
87
|
className: prefixCls + "__btn-confirm",
|
76
88
|
type: "primary",
|
77
89
|
size: "md",
|
78
90
|
onClick: onConfirm
|
79
|
-
}, confirmText) : null] : footer) : null)));
|
91
|
+
}, confirmText)) : null] : footer)) : null)));
|
80
92
|
});
|
81
93
|
if (env.__DEV__) {
|
82
94
|
PopConfirm.displayName = 'PopConfirm';
|
package/lib/cjs/icons/index.js
CHANGED
@@ -9,7 +9,17 @@
|
|
9
9
|
*/
|
10
10
|
'use strict';
|
11
11
|
|
12
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
13
|
+
Object.defineProperty(exports, '__esModule', {
|
14
|
+
value: true
|
15
|
+
});
|
12
16
|
var React = require('react');
|
13
17
|
var icons = require('@hi-ui/icons');
|
14
|
-
|
18
|
+
function _interopDefaultCompat(e) {
|
19
|
+
return e && _typeof(e) === 'object' && 'default' in e ? e : {
|
20
|
+
'default': e
|
21
|
+
};
|
22
|
+
}
|
23
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
24
|
+
var defaultTipIcon = /*#__PURE__*/React__default["default"].createElement(icons.ExclamationCircleFilled, null);
|
15
25
|
exports.defaultTipIcon = defaultTipIcon;
|
package/lib/esm/PopConfirm.js
CHANGED
@@ -60,21 +60,21 @@ var PopConfirm = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
60
60
|
className: prefixCls + "__content-title"
|
61
61
|
}, title)), content ? /*#__PURE__*/React.createElement("div", {
|
62
62
|
className: prefixCls + "__body"
|
63
|
-
}, content) : null, hasFooter ? /*#__PURE__*/React.createElement("footer", {
|
63
|
+
}, content) : null, hasFooter ? ( /*#__PURE__*/React.createElement("footer", {
|
64
64
|
className: prefixCls + "__footer"
|
65
|
-
}, footer === undefined ? [hasCancel ? /*#__PURE__*/React.createElement(Button, {
|
65
|
+
}, footer === undefined ? [hasCancel ? ( /*#__PURE__*/React.createElement(Button, {
|
66
66
|
key: "1",
|
67
67
|
className: prefixCls + "__btn-cancel",
|
68
68
|
type: "default",
|
69
69
|
size: "md",
|
70
70
|
onClick: onCancel
|
71
|
-
}, cancelText) : null, hasConfirm ? /*#__PURE__*/React.createElement(Button, {
|
71
|
+
}, cancelText)) : null, hasConfirm ? ( /*#__PURE__*/React.createElement(Button, {
|
72
72
|
key: "2",
|
73
73
|
className: prefixCls + "__btn-confirm",
|
74
74
|
type: "primary",
|
75
75
|
size: "md",
|
76
76
|
onClick: onConfirm
|
77
|
-
}, confirmText) : null] : footer) : null)));
|
77
|
+
}, confirmText)) : null] : footer)) : null)));
|
78
78
|
});
|
79
79
|
if (__DEV__) {
|
80
80
|
PopConfirm.displayName = 'PopConfirm';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@hi-ui/pop-confirm",
|
3
|
-
"version": "4.2.
|
3
|
+
"version": "4.2.2",
|
4
4
|
"description": "A sub-package for @hi-ui/hiui.",
|
5
5
|
"keywords": [],
|
6
6
|
"author": "HiUI <mi-hiui@xiaomi.com>",
|
@@ -43,26 +43,26 @@
|
|
43
43
|
"url": "https://github.com/XiaoMi/hiui/issues"
|
44
44
|
},
|
45
45
|
"dependencies": {
|
46
|
-
"@hi-ui/button": "^4.0.
|
47
|
-
"@hi-ui/classname": "^4.0.
|
48
|
-
"@hi-ui/dom-utils": "^4.0.
|
49
|
-
"@hi-ui/env": "^4.0.
|
50
|
-
"@hi-ui/icons": "^4.0.
|
51
|
-
"@hi-ui/popper": "^4.
|
52
|
-
"@hi-ui/react-utils": "^4.0.
|
53
|
-
"@hi-ui/type-assertion": "^4.0.
|
54
|
-
"@hi-ui/use-latest": "^4.0.
|
55
|
-
"@hi-ui/use-toggle": "^4.0.
|
56
|
-
"@hi-ui/use-uncontrolled-state": "^4.0.
|
46
|
+
"@hi-ui/button": "^4.0.8",
|
47
|
+
"@hi-ui/classname": "^4.0.3",
|
48
|
+
"@hi-ui/dom-utils": "^4.0.6",
|
49
|
+
"@hi-ui/env": "^4.0.3",
|
50
|
+
"@hi-ui/icons": "^4.0.17",
|
51
|
+
"@hi-ui/popper": "^4.1.2",
|
52
|
+
"@hi-ui/react-utils": "^4.0.3",
|
53
|
+
"@hi-ui/type-assertion": "^4.0.3",
|
54
|
+
"@hi-ui/use-latest": "^4.0.3",
|
55
|
+
"@hi-ui/use-toggle": "^4.0.3",
|
56
|
+
"@hi-ui/use-uncontrolled-state": "^4.0.3"
|
57
57
|
},
|
58
58
|
"peerDependencies": {
|
59
|
-
"@hi-ui/core": ">=4.0.
|
59
|
+
"@hi-ui/core": ">=4.0.7",
|
60
60
|
"react": ">=16.8.6",
|
61
61
|
"react-dom": ">=16.8.6"
|
62
62
|
},
|
63
63
|
"devDependencies": {
|
64
|
-
"@hi-ui/core": "^4.0.
|
65
|
-
"@hi-ui/core-css": "^4.1.
|
64
|
+
"@hi-ui/core": "^4.0.7",
|
65
|
+
"@hi-ui/core-css": "^4.1.4",
|
66
66
|
"react": "^17.0.1",
|
67
67
|
"react-dom": "^17.0.1"
|
68
68
|
}
|