@hi-ui/pop-confirm 4.0.6 → 4.1.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/CHANGELOG.md +12 -0
- package/lib/cjs/PopConfirm.js +1 -1
- package/lib/cjs/styles/index.scss.js +2 -2
- package/lib/esm/PopConfirm.js +1 -1
- package/lib/esm/styles/index.scss.js +2 -2
- package/lib/types/PopConfirm.d.ts +1 -1
- package/lib/types/use-pop-confirm.d.ts +4 -3
- package/package.json +4 -6
- package/LICENSE +0 -21
package/CHANGELOG.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# @hi-ui/pop-confirm
|
2
|
+
|
3
|
+
## 4.1.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- [#2643](https://github.com/XiaoMi/hiui/pull/2643) [`7742c022a`](https://github.com/XiaoMi/hiui/commit/7742c022a55f3908684d21e6e7d7bf07e3de1f5e) Thanks [@zyprepare](https://github.com/zyprepare)! - feat: add placement api (透传 Popper 参数)
|
8
|
+
|
9
|
+
### Patch Changes
|
10
|
+
|
11
|
+
- Updated dependencies [[`b477d91db`](https://github.com/XiaoMi/hiui/commit/b477d91db15bbc92c8712a9a771af5b332779315)]:
|
12
|
+
- @hi-ui/button@4.0.6
|
package/lib/cjs/PopConfirm.js
CHANGED
@@ -49,7 +49,7 @@ var Popper__default = /*#__PURE__*/_interopDefaultLegacy(Popper);
|
|
49
49
|
|
50
50
|
var POP_CONFIRM_PREFIX = classname.getPrefixCls('pop-confirm');
|
51
51
|
/**
|
52
|
-
*
|
52
|
+
* 气泡确认框
|
53
53
|
*/
|
54
54
|
|
55
55
|
var PopConfirm = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
@@ -12,9 +12,9 @@
|
|
12
12
|
Object.defineProperty(exports, '__esModule', {
|
13
13
|
value: true
|
14
14
|
});
|
15
|
-
var css_248z = ".hi-v4-pop-confirm {overflow-wrap: break-word;font-size: var(--hi-v4-text-size-md, 0.875rem);line-height: var(--hi-v4-text-lineheight-md, 1.375rem);position: relative;background: var(--hi-v4-color-static-white, #fff);white-space: nowrap;border-radius: var(--hi-v4-border-radius-lg, 6px);padding: var(--hi-v4-spacing-10, 20px);display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;
|
15
|
+
var css_248z = ".hi-v4-pop-confirm {overflow-wrap: break-word;font-size: var(--hi-v4-text-size-md, 0.875rem);line-height: var(--hi-v4-text-lineheight-md, 1.375rem);position: relative;background: var(--hi-v4-color-static-white, #fff);white-space: nowrap;border-radius: var(--hi-v4-border-radius-lg, 6px);padding: var(--hi-v4-spacing-10, 20px);display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;}.hi-v4-pop-confirm__content {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;}.hi-v4-pop-confirm__content-icon {margin-right: var(--hi-v4-spacing-4, 8px);color: var(--hi-v4-color-warning-500, var(--hi-v4-color-yellow-500, #fab007));font-size: var(--hi-v4-text-size-xxl, 1.5rem);}.hi-v4-pop-confirm__content-title {color: var(--hi-v4-color-gray-700, #1f2733);}.hi-v4-pop-confirm__footer {margin-top: var(--hi-v4-spacing-10, 20px);text-align: right;}";
|
16
16
|
|
17
|
-
var __styleInject__ = require('inject
|
17
|
+
var __styleInject__ = require('style-inject')["default"];
|
18
18
|
|
19
19
|
__styleInject__(css_248z);
|
20
20
|
|
package/lib/esm/PopConfirm.js
CHANGED
@@ -19,7 +19,7 @@ import { defaultTipIcon } from './icons/index.js';
|
|
19
19
|
import { isUndef } from '@hi-ui/type-assertion';
|
20
20
|
var POP_CONFIRM_PREFIX = getPrefixCls('pop-confirm');
|
21
21
|
/**
|
22
|
-
*
|
22
|
+
* 气泡确认框
|
23
23
|
*/
|
24
24
|
|
25
25
|
var PopConfirm = /*#__PURE__*/forwardRef(function (_a, ref) {
|
@@ -7,8 +7,8 @@
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
9
9
|
*/
|
10
|
-
import __styleInject__ from 'inject
|
11
|
-
var css_248z = ".hi-v4-pop-confirm {overflow-wrap: break-word;font-size: var(--hi-v4-text-size-md, 0.875rem);line-height: var(--hi-v4-text-lineheight-md, 1.375rem);position: relative;background: var(--hi-v4-color-static-white, #fff);white-space: nowrap;border-radius: var(--hi-v4-border-radius-lg, 6px);padding: var(--hi-v4-spacing-10, 20px);display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;
|
10
|
+
import __styleInject__ from 'style-inject';
|
11
|
+
var css_248z = ".hi-v4-pop-confirm {overflow-wrap: break-word;font-size: var(--hi-v4-text-size-md, 0.875rem);line-height: var(--hi-v4-text-lineheight-md, 1.375rem);position: relative;background: var(--hi-v4-color-static-white, #fff);white-space: nowrap;border-radius: var(--hi-v4-border-radius-lg, 6px);padding: var(--hi-v4-spacing-10, 20px);display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;}.hi-v4-pop-confirm__content {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;}.hi-v4-pop-confirm__content-icon {margin-right: var(--hi-v4-spacing-4, 8px);color: var(--hi-v4-color-warning-500, var(--hi-v4-color-yellow-500, #fab007));font-size: var(--hi-v4-text-size-xxl, 1.5rem);}.hi-v4-pop-confirm__content-title {color: var(--hi-v4-color-gray-700, #1f2733);}.hi-v4-pop-confirm__footer {margin-top: var(--hi-v4-spacing-10, 20px);text-align: right;}";
|
12
12
|
|
13
13
|
__styleInject__(css_248z);
|
14
14
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
2
2
|
import { HiBaseHTMLProps } from '@hi-ui/core';
|
3
3
|
import { UsePopConfirmProps } from './use-pop-confirm';
|
4
4
|
/**
|
5
|
-
*
|
5
|
+
* 气泡确认框
|
6
6
|
*/
|
7
7
|
export declare const PopConfirm: React.ForwardRefExoticComponent<PopConfirmProps & React.RefAttributes<HTMLDivElement | null>>;
|
8
8
|
export interface PopConfirmProps extends Omit<HiBaseHTMLProps<'div'>, 'title'>, UsePopConfirmProps {
|
@@ -1,4 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
+
import { PopperOverlayProps } from '@hi-ui/popper';
|
2
3
|
export declare const usePopConfirm: ({ visible: visibleProp, disabled, closeOnCancel, closeOnConfirm, onCancel: onCancelProp, onConfirm: onConfirmProp, onOpen, onClose, ...restProps }: UsePopConfirmProps) => {
|
3
4
|
rootProps: any;
|
4
5
|
getTriggerProps: (props: any, ref: any) => {
|
@@ -9,14 +10,14 @@ export declare const usePopConfirm: ({ visible: visibleProp, disabled, closeOnCa
|
|
9
10
|
visible: boolean;
|
10
11
|
attachEl: HTMLElement | null;
|
11
12
|
onClose: () => void;
|
12
|
-
gutterGap: any;
|
13
|
-
arrow: any;
|
14
13
|
placement: any;
|
14
|
+
arrow: any;
|
15
|
+
gutterGap: any;
|
15
16
|
};
|
16
17
|
onCancel: () => void;
|
17
18
|
onConfirm: () => void;
|
18
19
|
};
|
19
|
-
export interface UsePopConfirmProps {
|
20
|
+
export interface UsePopConfirmProps extends PopperOverlayProps {
|
20
21
|
/**
|
21
22
|
* 是否显示确认框
|
22
23
|
*/
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@hi-ui/pop-confirm",
|
3
|
-
"version": "4.0
|
3
|
+
"version": "4.1.0",
|
4
4
|
"description": "A sub-package for @hi-ui/hiui.",
|
5
5
|
"keywords": [],
|
6
6
|
"author": "HiUI <mi-hiui@xiaomi.com>",
|
@@ -43,7 +43,7 @@
|
|
43
43
|
"url": "https://github.com/XiaoMi/hiui/issues"
|
44
44
|
},
|
45
45
|
"dependencies": {
|
46
|
-
"@hi-ui/button": "^4.0.
|
46
|
+
"@hi-ui/button": "^4.0.6",
|
47
47
|
"@hi-ui/classname": "^4.0.1",
|
48
48
|
"@hi-ui/dom-utils": "^4.0.4",
|
49
49
|
"@hi-ui/env": "^4.0.1",
|
@@ -62,10 +62,8 @@
|
|
62
62
|
},
|
63
63
|
"devDependencies": {
|
64
64
|
"@hi-ui/core": "^4.0.4",
|
65
|
-
"@hi-ui/core-css": "^4.
|
66
|
-
"@hi-ui/hi-build": "^4.0.1",
|
65
|
+
"@hi-ui/core-css": "^4.1.2",
|
67
66
|
"react": "^17.0.1",
|
68
67
|
"react-dom": "^17.0.1"
|
69
|
-
}
|
70
|
-
"gitHead": "785078746d82c4082b1cf884f8e235166648ef98"
|
68
|
+
}
|
71
69
|
}
|
package/LICENSE
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c) 2018 Xiaomi
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|