@para-ui/core 3.0.28 → 3.0.30
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/AutoBox/index.js +48 -88
- package/AutoTips/index.js +25 -32
- package/Breadcrumbs/index.js +43 -63
- package/Button/SplitButton.d.ts +1 -1
- package/Button/index.d.ts +1 -1
- package/Button/index.js +88 -118
- package/ButtonGroup/index.js +27 -36
- package/Carousel/index.d.ts +2 -2
- package/Carousel/index.js +27 -28
- package/Cascader/index.js +52 -64
- package/Checkbox/index.js +23 -39
- package/CheckboxGroup/index.js +31 -48
- package/Collapse/collapsePanel.d.ts +1 -1
- package/Collapse/index.d.ts +1 -1
- package/Collapse/index.js +9 -29
- package/Collapse/util.d.ts +2 -2
- package/CollapseBox/index.js +45 -56
- package/CollapseLayout/index.js +35 -54
- package/ComboSelect/index.js +222 -349
- package/ComboSelect/interface.d.ts +3 -3
- package/Container/index.js +17 -20
- package/DatePicker/generatePicker/index.d.ts +17 -17
- package/DatePicker/index.d.ts +4 -4
- package/DatePicker/index.js +111 -167
- package/Desktop/index.js +62 -173
- package/Drawer/index.js +65 -58
- package/Drawer/interface.d.ts +7 -3
- package/Dropdown/index.d.ts +1 -1
- package/Dropdown/index.js +3 -3
- package/Empty/index.js +17 -22
- package/Form/index.d.ts +1 -1
- package/Form/index.js +38 -80
- package/FormItem/index.d.ts +1 -1
- package/FormItem/index.js +11 -11
- package/FormItem/validateFunction.d.ts +1 -1
- package/FunctionModal/index.js +11 -11
- package/GlobalContext/index.js +3 -3
- package/GlobalContext/usePopupContainer.d.ts +1 -1
- package/Help/index.js +11 -11
- package/HelperText/index.js +11 -12
- package/InputLang/index.js +47 -80
- package/InputNumber/index.js +65 -100
- package/Label/index.js +15 -16
- package/Loading/index.js +6 -7
- package/Menu/index.js +148 -328
- package/Menu/interface.d.ts +2 -2
- package/Menu/verticalMenuList.d.ts +1 -1
- package/Message/index.d.ts +1 -1
- package/Message/index.js +45 -64
- package/Modal/Confirm/index.d.ts +2 -2
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +119 -152
- package/MultiBox/index.js +44 -76
- package/Notification/index.d.ts +2 -2
- package/Notification/index.js +51 -72
- package/OperateBtn/index.js +42 -70
- package/PageHeader/index.js +120 -286
- package/PageHeader/interface.d.ts +1 -1
- package/Pagination/index.d.ts +2 -2
- package/Pagination/index.js +79 -131
- package/ParauiProvider/index.js +2 -3
- package/PasswordRules/index.js +12 -30
- package/PopConfirm/index.d.ts +1 -1
- package/PopConfirm/index.js +52 -59
- package/Popover/index.js +8 -9
- package/Progress/index.d.ts +6 -6
- package/Progress/index.js +50 -89
- package/Querying/index.js +14 -17
- package/README.md +813 -800
- package/Radio/index.js +21 -33
- package/RadioGroup/index.js +32 -47
- package/Search/index.js +44 -66
- package/Select/index.js +176 -343
- package/SelectInput/index.js +8 -9
- package/Selector/index.js +285 -681
- package/SelectorPicker/index.js +62 -97
- package/SingleBox/index.js +30 -55
- package/Slider/index.d.ts +1 -1
- package/Slider/index.js +29 -41
- package/Slider/interface.d.ts +2 -2
- package/Split/index.js +10 -23
- package/Status/index.js +8 -7
- package/Stepper/index.d.ts +1 -1
- package/Stepper/index.js +20 -25
- package/Styles/form.scss +5 -5
- package/Styles/index.scss +37 -37
- package/Styles/normalize.scss +348 -348
- package/Styles/scrollbar.scss +223 -223
- package/Styles/theme.scss +74 -74
- package/Switch/index.d.ts +2 -2
- package/Switch/index.js +19 -20
- package/Table/index.js +568 -1019
- package/Table/interface.d.ts +5 -5
- package/Tabs/index.d.ts +3 -3
- package/Tabs/index.js +47 -65
- package/Tag/TagGroup.d.ts +1 -1
- package/Tag/index.d.ts +2 -2
- package/Tag/index.js +72 -107
- package/TextEditor/index.d.ts +2 -2
- package/TextEditor/index.js +81 -105
- package/TextField/index.js +141 -220
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +12 -15
- package/Timeline/index.js +42 -52
- package/Title/index.js +10 -9
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButton/index.js +50 -70
- package/Tooltip/index.js +64 -98
- package/Tooltip/interface.d.ts +1 -1
- package/Transfer/index.d.ts +1 -1
- package/Transfer/index.js +114 -137
- package/Transfer/useClick.d.ts +1 -1
- package/Tree/index.js +10 -10
- package/Tree/interface.d.ts +6 -6
- package/Upload/Dragger/index.d.ts +1 -1
- package/Upload/ImageUpload/index.d.ts +1 -1
- package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
- package/Upload/index.d.ts +1 -1
- package/Upload/index.js +283 -475
- package/Upload/interface.d.ts +2 -2
- package/_verture/{constant-bf34e6fa.js → constant-66aa48a1.js} +0 -1
- package/_verture/defineProperty-62acccfc.js +34 -0
- package/_verture/{index-342379c6.js → index-06fea29b.js} +79 -124
- package/_verture/{index-48875ffd.js → index-131f8fe5.js} +80 -181
- package/_verture/{index-31ce5a11.js → index-92144ad3.js} +238 -445
- package/_verture/{index-bbed73a3.js → index-be4faaee.js} +19 -61
- package/_verture/{intl-336570e4.js → intl-5cbb940c.js} +4 -12
- package/_verture/{modalContext-d646d9db.js → modalContext-c749e1c6.js} +18 -43
- package/_verture/{slicedToArray-d7722f4b.js → slicedToArray-77980792.js} +23 -25
- package/_verture/{toConsumableArray-f8047a75.js → toConsumableArray-87c7d895.js} +1 -1
- package/_verture/{useFormatMessage-f4452258.js → useFormatMessage-703f8b20.js} +1 -3
- package/_verture/{useGlobalProps-af9a2af6.js → useGlobalProps-1b846a65.js} +1 -2
- package/_verture/{usePopupContainer-b8ab7cab.js → usePopupContainer-87febeb9.js} +10 -25
- package/_verture/{util-a77b261e.js → util-7e1fb1e2.js} +2 -3
- package/index.d.ts +2 -4
- package/index.js +15 -16
- package/package.json +167 -168
- package/Test/index.d.ts +0 -3
- package/Test/index.js +0 -9
- package/_verture/defineProperty-0590dc61.js +0 -16
package/Drawer/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-77980792.js';
|
|
2
2
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
3
3
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import RcDrawer from 'rc-drawer';
|
|
6
|
-
import clsx from 'clsx';
|
|
7
6
|
import { Button } from '../Button/index.js';
|
|
8
|
-
import { u as useFormatMessage } from '../_verture/useFormatMessage-
|
|
9
|
-
import {
|
|
7
|
+
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
8
|
+
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
10
9
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
11
10
|
import '../_verture/typeof-498dd2b1.js';
|
|
11
|
+
import 'clsx';
|
|
12
12
|
import '@para-ui/icons/LoadingF';
|
|
13
13
|
import '@para-ui/icons/Forbid';
|
|
14
14
|
import '../Tooltip/index.js';
|
|
15
15
|
import 'rc-tooltip';
|
|
16
16
|
import 'rc-tooltip/lib/placements';
|
|
17
17
|
import '@para-ui/icons/Down';
|
|
18
|
-
import '../_verture/index-
|
|
18
|
+
import '../_verture/index-be4faaee.js';
|
|
19
19
|
import 'rc-dropdown';
|
|
20
|
-
import '../_verture/usePopupContainer-
|
|
20
|
+
import '../_verture/usePopupContainer-87febeb9.js';
|
|
21
21
|
import 'dayjs';
|
|
22
22
|
import '@paraview/lib';
|
|
23
23
|
import '@para-ui/core/GlobalContext';
|
|
@@ -37,84 +37,76 @@ var localeJson = {
|
|
|
37
37
|
en: en
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/8 下午2:51\n* @description
|
|
40
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/8 下午2:51\n* @description drawer样式\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-drawer {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n pointer-events: none;\n}\n\n.paraui-v3-drawer-inline {\n position: absolute;\n}\n\n.paraui-v3-drawer-mask {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1000;\n background: rgba(0, 0, 0, 0.45);\n pointer-events: auto;\n}\n\n.paraui-v3-drawer-content-wrapper {\n position: absolute;\n z-index: 1000;\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-content-wrapper-hidden {\n display: none;\n}\n\n.paraui-v3-drawer-left > .paraui-v3-drawer-content-wrapper {\n top: 0;\n bottom: 0;\n left: 0;\n box-shadow: 6px 0 16px -8px rgba(0, 0, 0, 0.08), 9px 0 28px 0 rgba(0, 0, 0, 0.05), 12px 0 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-right > .paraui-v3-drawer-content-wrapper {\n top: 0;\n right: 0;\n bottom: 0;\n box-shadow: -6px 0 16px -8px rgba(0, 0, 0, 0.08), -9px 0 28px 0 rgba(0, 0, 0, 0.05), -12px 0 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-top > .paraui-v3-drawer-content-wrapper {\n top: 0;\n right: 0;\n left: 0;\n box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.08), 0 9px 28px 0 rgba(0, 0, 0, 0.05), 0 12px 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-bottom > .paraui-v3-drawer-content-wrapper {\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 0 -6px 16px -8px rgba(0, 0, 0, 0.08), 0 -9px 28px 0 rgba(0, 0, 0, 0.05), 0 -12px 48px 16px rgba(0, 0, 0, 0.03);\n}\n\n.paraui-v3-drawer-content {\n width: 100%;\n height: 100%;\n overflow: auto;\n background: rgb(255, 255, 255);\n pointer-events: auto;\n}\n.paraui-v3-drawer-content .drawer-content-body {\n display: flex;\n flex-flow: column nowrap;\n width: 100%;\n height: 100%;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex: none;\n height: 60px;\n padding: 0 24px;\n font-size: 16px;\n font-weight: 700;\n color: rgb(46, 55, 67);\n border-bottom: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header .drawer-header-title {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-header .drawer-header-extra button + button {\n margin-left: 16px;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-content {\n flex: 1;\n padding: 24px;\n overflow: auto;\n word-wrap: break-word;\n}\n.paraui-v3-drawer-content .drawer-content-body .drawer-body-footer {\n display: flex;\n align-items: center;\n flex: none;\n padding: 16px 24px;\n font-size: 16px;\n color: rgb(46, 55, 67);\n border-top: 1px solid rgba(171, 176, 185, 0.2);\n}\n\n.panel-motion-enter-start,\n.panel-motion-appear-start,\n.panel-motion-leave-start {\n transition: none;\n}\n\n.panel-motion-enter-active,\n.panel-motion-appear-active,\n.panel-motion-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-mask-motion-enter-active,\n.paraui-v3-drawer-mask-motion-appear-active,\n.paraui-v3-drawer-mask-motion-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-mask-motion-enter,\n.paraui-v3-drawer-mask-motion-appear {\n opacity: 0;\n}\n\n.paraui-v3-drawer-mask-motion-enter-active,\n.paraui-v3-drawer-mask-motion-appear-active {\n opacity: 1;\n}\n\n.paraui-v3-drawer-mask-motion-leave {\n opacity: 1;\n}\n\n.paraui-v3-drawer-mask-motion-leave-active {\n opacity: 0;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-start,\n.paraui-v3-drawer-panel-motion-left-appear-start,\n.paraui-v3-drawer-panel-motion-left-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-active,\n.paraui-v3-drawer-panel-motion-left-appear-active,\n.paraui-v3-drawer-panel-motion-left-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-start,\n.paraui-v3-drawer-panel-motion-left-appear-start {\n transform: translateX(-100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-left-enter-active,\n.paraui-v3-drawer-panel-motion-left-appear-active {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-left-leave {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-left-leave-active {\n transform: translateX(-100%);\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-start,\n.paraui-v3-drawer-panel-motion-right-appear-start,\n.paraui-v3-drawer-panel-motion-right-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-active,\n.paraui-v3-drawer-panel-motion-right-appear-active,\n.paraui-v3-drawer-panel-motion-right-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-start,\n.paraui-v3-drawer-panel-motion-right-appear-start {\n transform: translateX(100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-right-enter-active,\n.paraui-v3-drawer-panel-motion-right-appear-active {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-right-leave {\n transform: translateX(0);\n}\n\n.paraui-v3-drawer-panel-motion-right-leave-active {\n transform: translateX(100%);\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-start,\n.paraui-v3-drawer-panel-motion-top-appear-start,\n.paraui-v3-drawer-panel-motion-top-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-active,\n.paraui-v3-drawer-panel-motion-top-appear-active,\n.paraui-v3-drawer-panel-motion-top-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-start,\n.paraui-v3-drawer-panel-motion-top-appear-start {\n transform: translateY(-100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-top-enter-active,\n.paraui-v3-drawer-panel-motion-top-appear-active {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-top-leave {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-top-leave-active {\n transform: translateY(-100%);\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-start,\n.paraui-v3-drawer-panel-motion-bottom-appear-start,\n.paraui-v3-drawer-panel-motion-bottom-leave-start {\n transition: none;\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-active,\n.paraui-v3-drawer-panel-motion-bottom-appear-active,\n.paraui-v3-drawer-panel-motion-bottom-leave-active {\n transition: all 0.3s;\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-start,\n.paraui-v3-drawer-panel-motion-bottom-appear-start {\n transform: translateY(100%) !important;\n}\n\n.paraui-v3-drawer-panel-motion-bottom-enter-active,\n.paraui-v3-drawer-panel-motion-bottom-appear-active {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-bottom-leave {\n transform: translateY(0);\n}\n\n.paraui-v3-drawer-panel-motion-bottom-leave-active {\n transform: translateY(100%);\n}";
|
|
41
41
|
styleInject(css_248z);
|
|
42
42
|
|
|
43
|
+
//drawer 抽屉
|
|
43
44
|
var Drawer = function Drawer(props) {
|
|
44
45
|
props.className;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
46
|
+
var onClose = props.onClose,
|
|
47
|
+
_props$destroyOnClose = props.destroyOnClose,
|
|
48
|
+
destroyOnClose = _props$destroyOnClose === void 0 ? false : _props$destroyOnClose,
|
|
49
|
+
style = props.style,
|
|
50
|
+
title = props.title,
|
|
51
|
+
extra = props.extra,
|
|
52
|
+
_props$showExtra = props.showExtra,
|
|
53
|
+
showExtra = _props$showExtra === void 0 ? true : _props$showExtra,
|
|
54
|
+
footer = props.footer,
|
|
55
|
+
children = props.children,
|
|
56
|
+
_props$size = props.size,
|
|
57
|
+
size = _props$size === void 0 ? 'large' : _props$size,
|
|
58
|
+
onOk = props.onOk,
|
|
59
|
+
onCancel = props.onCancel,
|
|
60
|
+
afterVisibleChange = props.afterVisibleChange,
|
|
61
|
+
okButtonProps = props.okButtonProps,
|
|
62
|
+
cancelButtonProps = props.cancelButtonProps,
|
|
63
|
+
_props$push = props.push,
|
|
64
|
+
push = _props$push === void 0 ? {
|
|
65
|
+
distance: 180
|
|
66
|
+
} : _props$push,
|
|
67
|
+
restProps = __rest(props, ["className", "onClose", "destroyOnClose", "style", "title", "extra", "showExtra", "footer", "children", "size", "onOk", "onCancel", "afterVisibleChange", "okButtonProps", "cancelButtonProps", "push"]);
|
|
64
68
|
var intl = useFormatMessage('Drawer', localeJson);
|
|
65
|
-
|
|
66
69
|
var _React$useState = React__default.useState(0),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
71
|
+
setRefresh = _React$useState2[1];
|
|
70
72
|
var destroyCloseRef = React__default.useRef(false); //销毁标识
|
|
71
73
|
//设置drawer width、height
|
|
72
|
-
|
|
73
74
|
var getOffsetStyle = function getOffsetStyle() {
|
|
74
75
|
if (!props.open) {
|
|
75
76
|
return {};
|
|
76
77
|
}
|
|
77
|
-
|
|
78
78
|
var sizeMap = {
|
|
79
79
|
large: '1008px',
|
|
80
80
|
medium: '608px',
|
|
81
81
|
small: '400px'
|
|
82
82
|
};
|
|
83
83
|
var offsetStyle = {};
|
|
84
|
-
|
|
85
84
|
if (props.placement === 'left' || props.placement === 'right') {
|
|
86
85
|
var defaultWidth = sizeMap[size];
|
|
87
|
-
|
|
88
86
|
if (size !== 'auto') {
|
|
89
87
|
offsetStyle.width = props.width === undefined ? defaultWidth : props.width;
|
|
90
88
|
}
|
|
91
89
|
} else {
|
|
92
90
|
var defaultHeight = size === 'large' ? 736 : 378;
|
|
93
|
-
|
|
94
91
|
if (size !== 'auto') {
|
|
95
92
|
offsetStyle.height = props.height === undefined ? defaultHeight : props.height;
|
|
96
93
|
}
|
|
97
94
|
}
|
|
98
|
-
|
|
99
95
|
return offsetStyle;
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
};
|
|
97
|
+
//关闭回调
|
|
103
98
|
var handleClose = function handleClose(e) {
|
|
104
99
|
onClose === null || onClose === void 0 ? void 0 : onClose(e);
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
|
|
100
|
+
};
|
|
101
|
+
//确定回调
|
|
108
102
|
var handleOk = function handleOk() {
|
|
109
103
|
onOk === null || onOk === void 0 ? void 0 : onOk();
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
|
|
104
|
+
};
|
|
105
|
+
//取消回调
|
|
113
106
|
var handleCancel = function handleCancel() {
|
|
114
107
|
onCancel === null || onCancel === void 0 ? void 0 : onCancel();
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
|
|
108
|
+
};
|
|
109
|
+
//标题节点
|
|
118
110
|
var titleNode = jsxs("div", Object.assign({
|
|
119
111
|
className: 'drawer-body-header'
|
|
120
112
|
}, {
|
|
@@ -147,9 +139,8 @@ var Drawer = function Drawer(props) {
|
|
|
147
139
|
})
|
|
148
140
|
}))
|
|
149
141
|
})]
|
|
150
|
-
}));
|
|
151
|
-
|
|
152
|
-
|
|
142
|
+
}));
|
|
143
|
+
//渲染内容
|
|
153
144
|
var renderContent = function renderContent() {
|
|
154
145
|
if (!title && !footer) return children;
|
|
155
146
|
return jsxs("div", Object.assign({
|
|
@@ -166,26 +157,42 @@ var Drawer = function Drawer(props) {
|
|
|
166
157
|
}))]
|
|
167
158
|
}));
|
|
168
159
|
};
|
|
169
|
-
|
|
170
160
|
if (destroyCloseRef.current) {
|
|
171
161
|
destroyCloseRef.current = false;
|
|
172
162
|
return null;
|
|
173
163
|
}
|
|
174
|
-
|
|
164
|
+
var maskMotion = {
|
|
165
|
+
motionName: $prefixCls + '-drawer-mask-motion',
|
|
166
|
+
motionAppear: true,
|
|
167
|
+
motionEnter: true,
|
|
168
|
+
motionLeave: true,
|
|
169
|
+
motionDeadline: 500
|
|
170
|
+
};
|
|
171
|
+
var panelMotion = function panelMotion(motionPlacement) {
|
|
172
|
+
return {
|
|
173
|
+
motionName: $prefixCls + "-drawer-panel-motion-".concat(motionPlacement),
|
|
174
|
+
motionAppear: true,
|
|
175
|
+
motionEnter: true,
|
|
176
|
+
motionLeave: true,
|
|
177
|
+
motionDeadline: 500
|
|
178
|
+
};
|
|
179
|
+
};
|
|
175
180
|
return jsx(RcDrawer, Object.assign({}, restProps, getOffsetStyle(), {
|
|
176
181
|
style: style,
|
|
177
|
-
|
|
178
|
-
|
|
182
|
+
maskMotion: maskMotion,
|
|
183
|
+
motion: panelMotion,
|
|
184
|
+
push: push,
|
|
185
|
+
prefixCls: "".concat($prefixCls, "-drawer"),
|
|
186
|
+
rootClassName: props.className,
|
|
179
187
|
onClose: handleClose,
|
|
180
|
-
|
|
188
|
+
afterOpenChange: function afterOpenChange(open) {
|
|
181
189
|
if (open) {
|
|
182
190
|
destroyCloseRef.current = false;
|
|
183
191
|
} else if (destroyOnClose) {
|
|
184
192
|
destroyCloseRef.current = true;
|
|
185
193
|
setRefresh(Math.random());
|
|
186
194
|
}
|
|
187
|
-
|
|
188
|
-
_afterVisibleChange === null || _afterVisibleChange === void 0 ? void 0 : _afterVisibleChange(open);
|
|
195
|
+
afterVisibleChange === null || afterVisibleChange === void 0 ? void 0 : afterVisibleChange(open);
|
|
189
196
|
}
|
|
190
197
|
}, {
|
|
191
198
|
children: renderContent()
|
package/Drawer/interface.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ import { ButtonProps } from "../Button";
|
|
|
5
5
|
* @date 2021/11/8 下午3:07
|
|
6
6
|
* @description
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
type GetContainer = string | HTMLElement | (() => HTMLElement) | false;
|
|
9
|
+
type ILevelMove = number | [number, number];
|
|
10
|
+
type IPlacement = 'left' | 'top' | 'right' | 'bottom';
|
|
11
11
|
export interface DrawerProps {
|
|
12
12
|
/** 类名 */
|
|
13
13
|
className?: string;
|
|
@@ -83,6 +83,10 @@ export interface DrawerProps {
|
|
|
83
83
|
okButtonProps?: ButtonProps;
|
|
84
84
|
/** 取消按钮属性*/
|
|
85
85
|
cancelButtonProps?: ButtonProps;
|
|
86
|
+
/** 设置多层抽屉的推动行为 默认值 { distance: 180 }*/
|
|
87
|
+
push?: boolean | {
|
|
88
|
+
distance: string | number;
|
|
89
|
+
};
|
|
86
90
|
[name: string]: any;
|
|
87
91
|
}
|
|
88
92
|
export {};
|
package/Dropdown/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { FC } from 'react';
|
|
7
7
|
import './index.scss';
|
|
8
|
-
export
|
|
8
|
+
export type Placement = "top" | "topLeft" | "topRight" | "bottom" | "bottomLeft" | "bottomRight";
|
|
9
9
|
export interface DropdownProps {
|
|
10
10
|
/** 触发下拉的行为 */
|
|
11
11
|
trigger?: ('click' | 'hover' | 'contextMenu')[];
|
package/Dropdown/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'rc-dropdown';
|
|
4
|
-
import '../_verture/constant-
|
|
5
|
-
import '../_verture/usePopupContainer-
|
|
4
|
+
import '../_verture/constant-66aa48a1.js';
|
|
5
|
+
import '../_verture/usePopupContainer-87febeb9.js';
|
|
6
6
|
import 'clsx';
|
|
7
|
-
export { D as Dropdown, D as default } from '../_verture/index-
|
|
7
|
+
export { D as Dropdown, D as default } from '../_verture/index-be4faaee.js';
|
|
8
8
|
import '@paraview/lib';
|
|
9
9
|
import 'dayjs';
|
|
10
10
|
import '../_verture/style-inject.es-300983ab.js';
|
package/Empty/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import { u as useFormatMessage } from '../_verture/useFormatMessage-
|
|
4
|
-
import { u as useGlobalProps } from '../_verture/useGlobalProps-
|
|
5
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
3
|
+
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
4
|
+
import { u as useGlobalProps } from '../_verture/useGlobalProps-1b846a65.js';
|
|
5
|
+
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
6
6
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
7
7
|
import 'react';
|
|
8
8
|
import '@para-ui/core/GlobalContext';
|
|
@@ -572,29 +572,26 @@ styleInject(css_248z);
|
|
|
572
572
|
var imageMap = {
|
|
573
573
|
'large': jsx(LargeNull, {}),
|
|
574
574
|
'small': jsx(SmallNull, {})
|
|
575
|
-
};
|
|
576
|
-
|
|
575
|
+
};
|
|
576
|
+
//empty空状态
|
|
577
577
|
var Empty = function Empty(props) {
|
|
578
578
|
var _useGlobalProps = useGlobalProps(props, 'Empty'),
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
579
|
+
className = _useGlobalProps.className,
|
|
580
|
+
style = _useGlobalProps.style,
|
|
581
|
+
_useGlobalProps$size = _useGlobalProps.size,
|
|
582
|
+
size = _useGlobalProps$size === void 0 ? 'large' : _useGlobalProps$size,
|
|
583
|
+
imageStyle = _useGlobalProps.imageStyle,
|
|
584
|
+
_useGlobalProps$image = _useGlobalProps.image,
|
|
585
|
+
image = _useGlobalProps$image === void 0 ? imageMap[size] : _useGlobalProps$image,
|
|
586
|
+
description = _useGlobalProps.description,
|
|
587
|
+
_useGlobalProps$showR = _useGlobalProps.showRefresh,
|
|
588
|
+
showRefresh = _useGlobalProps$showR === void 0 ? false : _useGlobalProps$showR,
|
|
589
|
+
onRefresh = _useGlobalProps.onRefresh,
|
|
590
|
+
customEmpty = _useGlobalProps.customEmpty;
|
|
592
591
|
var intl = useFormatMessage('Empty', localeJson);
|
|
593
|
-
|
|
594
592
|
var handleClick = function handleClick(e) {
|
|
595
593
|
onRefresh === null || onRefresh === void 0 ? void 0 : onRefresh(e);
|
|
596
594
|
};
|
|
597
|
-
|
|
598
595
|
var des = typeof description !== 'undefined' ? description : intl({
|
|
599
596
|
id: 'noData'
|
|
600
597
|
});
|
|
@@ -613,7 +610,6 @@ var Empty = function Empty(props) {
|
|
|
613
610
|
})
|
|
614
611
|
}))]
|
|
615
612
|
})) : null;
|
|
616
|
-
|
|
617
613
|
if (typeof image === 'string') {
|
|
618
614
|
imageNode = jsx("img", {
|
|
619
615
|
src: image,
|
|
@@ -622,7 +618,6 @@ var Empty = function Empty(props) {
|
|
|
622
618
|
} else {
|
|
623
619
|
imageNode = image;
|
|
624
620
|
}
|
|
625
|
-
|
|
626
621
|
return jsx("div", Object.assign({
|
|
627
622
|
className: clsx("".concat($prefixCls, "-empty"), className, "".concat($prefixCls, "-empty-").concat(size)),
|
|
628
623
|
style: style
|
package/Form/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ interface FormHtmlProps extends FormHTMLAttributes<HTMLFormElement> {
|
|
|
11
11
|
/**
|
|
12
12
|
* 配置项项类型
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export type configListProps = Array<FormItemProps>;
|
|
15
15
|
/**
|
|
16
16
|
* form 表单组件属性
|
|
17
17
|
* @typedef {object} FormProps
|