@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.
Files changed (140) hide show
  1. package/AutoBox/index.js +48 -88
  2. package/AutoTips/index.js +25 -32
  3. package/Breadcrumbs/index.js +43 -63
  4. package/Button/SplitButton.d.ts +1 -1
  5. package/Button/index.d.ts +1 -1
  6. package/Button/index.js +88 -118
  7. package/ButtonGroup/index.js +27 -36
  8. package/Carousel/index.d.ts +2 -2
  9. package/Carousel/index.js +27 -28
  10. package/Cascader/index.js +52 -64
  11. package/Checkbox/index.js +23 -39
  12. package/CheckboxGroup/index.js +31 -48
  13. package/Collapse/collapsePanel.d.ts +1 -1
  14. package/Collapse/index.d.ts +1 -1
  15. package/Collapse/index.js +9 -29
  16. package/Collapse/util.d.ts +2 -2
  17. package/CollapseBox/index.js +45 -56
  18. package/CollapseLayout/index.js +35 -54
  19. package/ComboSelect/index.js +222 -349
  20. package/ComboSelect/interface.d.ts +3 -3
  21. package/Container/index.js +17 -20
  22. package/DatePicker/generatePicker/index.d.ts +17 -17
  23. package/DatePicker/index.d.ts +4 -4
  24. package/DatePicker/index.js +111 -167
  25. package/Desktop/index.js +62 -173
  26. package/Drawer/index.js +65 -58
  27. package/Drawer/interface.d.ts +7 -3
  28. package/Dropdown/index.d.ts +1 -1
  29. package/Dropdown/index.js +3 -3
  30. package/Empty/index.js +17 -22
  31. package/Form/index.d.ts +1 -1
  32. package/Form/index.js +38 -80
  33. package/FormItem/index.d.ts +1 -1
  34. package/FormItem/index.js +11 -11
  35. package/FormItem/validateFunction.d.ts +1 -1
  36. package/FunctionModal/index.js +11 -11
  37. package/GlobalContext/index.js +3 -3
  38. package/GlobalContext/usePopupContainer.d.ts +1 -1
  39. package/Help/index.js +11 -11
  40. package/HelperText/index.js +11 -12
  41. package/InputLang/index.js +47 -80
  42. package/InputNumber/index.js +65 -100
  43. package/Label/index.js +15 -16
  44. package/Loading/index.js +6 -7
  45. package/Menu/index.js +148 -328
  46. package/Menu/interface.d.ts +2 -2
  47. package/Menu/verticalMenuList.d.ts +1 -1
  48. package/Message/index.d.ts +1 -1
  49. package/Message/index.js +45 -64
  50. package/Modal/Confirm/index.d.ts +2 -2
  51. package/Modal/index.d.ts +1 -1
  52. package/Modal/index.js +119 -152
  53. package/MultiBox/index.js +44 -76
  54. package/Notification/index.d.ts +2 -2
  55. package/Notification/index.js +51 -72
  56. package/OperateBtn/index.js +42 -70
  57. package/PageHeader/index.js +120 -286
  58. package/PageHeader/interface.d.ts +1 -1
  59. package/Pagination/index.d.ts +2 -2
  60. package/Pagination/index.js +79 -131
  61. package/ParauiProvider/index.js +2 -3
  62. package/PasswordRules/index.js +12 -30
  63. package/PopConfirm/index.d.ts +1 -1
  64. package/PopConfirm/index.js +52 -59
  65. package/Popover/index.js +8 -9
  66. package/Progress/index.d.ts +6 -6
  67. package/Progress/index.js +50 -89
  68. package/Querying/index.js +14 -17
  69. package/README.md +813 -800
  70. package/Radio/index.js +21 -33
  71. package/RadioGroup/index.js +32 -47
  72. package/Search/index.js +44 -66
  73. package/Select/index.js +176 -343
  74. package/SelectInput/index.js +8 -9
  75. package/Selector/index.js +285 -681
  76. package/SelectorPicker/index.js +62 -97
  77. package/SingleBox/index.js +30 -55
  78. package/Slider/index.d.ts +1 -1
  79. package/Slider/index.js +29 -41
  80. package/Slider/interface.d.ts +2 -2
  81. package/Split/index.js +10 -23
  82. package/Status/index.js +8 -7
  83. package/Stepper/index.d.ts +1 -1
  84. package/Stepper/index.js +20 -25
  85. package/Styles/form.scss +5 -5
  86. package/Styles/index.scss +37 -37
  87. package/Styles/normalize.scss +348 -348
  88. package/Styles/scrollbar.scss +223 -223
  89. package/Styles/theme.scss +74 -74
  90. package/Switch/index.d.ts +2 -2
  91. package/Switch/index.js +19 -20
  92. package/Table/index.js +568 -1019
  93. package/Table/interface.d.ts +5 -5
  94. package/Tabs/index.d.ts +3 -3
  95. package/Tabs/index.js +47 -65
  96. package/Tag/TagGroup.d.ts +1 -1
  97. package/Tag/index.d.ts +2 -2
  98. package/Tag/index.js +72 -107
  99. package/TextEditor/index.d.ts +2 -2
  100. package/TextEditor/index.js +81 -105
  101. package/TextField/index.js +141 -220
  102. package/TimePicker/index.d.ts +1 -1
  103. package/TimePicker/index.js +12 -15
  104. package/Timeline/index.js +42 -52
  105. package/Title/index.js +10 -9
  106. package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
  107. package/ToggleButton/index.js +50 -70
  108. package/Tooltip/index.js +64 -98
  109. package/Tooltip/interface.d.ts +1 -1
  110. package/Transfer/index.d.ts +1 -1
  111. package/Transfer/index.js +114 -137
  112. package/Transfer/useClick.d.ts +1 -1
  113. package/Tree/index.js +10 -10
  114. package/Tree/interface.d.ts +6 -6
  115. package/Upload/Dragger/index.d.ts +1 -1
  116. package/Upload/ImageUpload/index.d.ts +1 -1
  117. package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
  118. package/Upload/index.d.ts +1 -1
  119. package/Upload/index.js +283 -475
  120. package/Upload/interface.d.ts +2 -2
  121. package/_verture/{constant-bf34e6fa.js → constant-66aa48a1.js} +0 -1
  122. package/_verture/defineProperty-62acccfc.js +34 -0
  123. package/_verture/{index-342379c6.js → index-06fea29b.js} +79 -124
  124. package/_verture/{index-48875ffd.js → index-131f8fe5.js} +80 -181
  125. package/_verture/{index-31ce5a11.js → index-92144ad3.js} +238 -445
  126. package/_verture/{index-bbed73a3.js → index-be4faaee.js} +19 -61
  127. package/_verture/{intl-336570e4.js → intl-5cbb940c.js} +4 -12
  128. package/_verture/{modalContext-d646d9db.js → modalContext-c749e1c6.js} +18 -43
  129. package/_verture/{slicedToArray-d7722f4b.js → slicedToArray-77980792.js} +23 -25
  130. package/_verture/{toConsumableArray-f8047a75.js → toConsumableArray-87c7d895.js} +1 -1
  131. package/_verture/{useFormatMessage-f4452258.js → useFormatMessage-703f8b20.js} +1 -3
  132. package/_verture/{useGlobalProps-af9a2af6.js → useGlobalProps-1b846a65.js} +1 -2
  133. package/_verture/{usePopupContainer-b8ab7cab.js → usePopupContainer-87febeb9.js} +10 -25
  134. package/_verture/{util-a77b261e.js → util-7e1fb1e2.js} +2 -3
  135. package/index.d.ts +2 -4
  136. package/index.js +15 -16
  137. package/package.json +167 -168
  138. package/Test/index.d.ts +0 -3
  139. package/Test/index.js +0 -9
  140. package/_verture/defineProperty-0590dc61.js +0 -16
package/Modal/index.js CHANGED
@@ -1,15 +1,15 @@
1
- import { _ as _defineProperty } from '../_verture/defineProperty-0590dc61.js';
1
+ import { _ as _defineProperty } from '../_verture/defineProperty-62acccfc.js';
2
2
  import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
  import React__default from 'react';
5
5
  import Dialog from 'rc-dialog';
6
6
  import { Button } from '../Button/index.js';
7
7
  import CloseIcon from '@para-ui/icons/Close';
8
- import { u as useFormatMessage } from '../_verture/useFormatMessage-f4452258.js';
8
+ import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
9
9
  import { d as defaultModalLocale } from '../_verture/index-e2881a53.js';
10
10
  import ReactDOM from 'react-dom';
11
11
  import clsx from 'clsx';
12
- import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
12
+ import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
13
13
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
14
14
  import CompleteIcon from '@para-ui/icons/CheckCircleF';
15
15
  import CloseCircleFilled from '@para-ui/icons/CloseCircleF';
@@ -18,74 +18,71 @@ import WarningCircleF from '@para-ui/icons/WarningCircleF';
18
18
  import { UUID } from '@paraview/lib';
19
19
  import { getConfirmLocale } from '@para-ui/core/GlobalContext';
20
20
  import '../_verture/typeof-498dd2b1.js';
21
- import '../_verture/slicedToArray-d7722f4b.js';
21
+ import '../_verture/slicedToArray-77980792.js';
22
22
  import '@para-ui/icons/LoadingF';
23
23
  import '@para-ui/icons/Forbid';
24
24
  import '../Tooltip/index.js';
25
25
  import 'rc-tooltip';
26
26
  import 'rc-tooltip/lib/placements';
27
27
  import '@para-ui/icons/Down';
28
- import '../_verture/index-bbed73a3.js';
28
+ import '../_verture/index-be4faaee.js';
29
29
  import 'rc-dropdown';
30
- import '../_verture/usePopupContainer-b8ab7cab.js';
30
+ import '../_verture/usePopupContainer-87febeb9.js';
31
31
  import 'dayjs';
32
32
 
33
33
  var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/2 下午7:00\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-confirm.paraui-v3-modal .paraui-v3-modal-body {\n padding: 0;\n}\n.paraui-v3-confirm .confirm-wrapper {\n width: 416px;\n outline: none;\n}\n.paraui-v3-confirm .confirm-content {\n position: relative;\n padding: 32px 32px 24px;\n}\n.paraui-v3-confirm .confirm-content-close {\n position: absolute;\n right: 16px;\n top: 16px;\n border: none;\n}\n.paraui-v3-confirm .confirm-content-close svg {\n font-size: 18px;\n}\n.paraui-v3-confirm .confirm-content-icon {\n float: left;\n margin-top: 2px;\n color: rgb(255, 161, 80);\n}\n.paraui-v3-confirm .confirm-content-icon svg {\n color: inherit;\n font-size: 16px;\n}\n.paraui-v3-confirm .confirm-content-icon--warn, .paraui-v3-confirm .confirm-content-icon-warning {\n color: rgb(255, 161, 80);\n}\n.paraui-v3-confirm .confirm-content-icon--error {\n color: rgb(235, 96, 84);\n}\n.paraui-v3-confirm .confirm-content-icon--success {\n color: rgb(83, 195, 27);\n}\n.paraui-v3-confirm .confirm-content-icon--info {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-confirm .confirm-content-body {\n margin: 0 16px 0 30px;\n color: rgb(46, 55, 67);\n font-size: 14px;\n}\n.paraui-v3-confirm .confirm-content-body .confirm-body-title {\n display: block;\n margin-bottom: 8px;\n font-weight: 700;\n font-size: 16px;\n}\n.paraui-v3-confirm .confirm-content-actions {\n margin-top: 24px;\n text-align: right;\n}\n.paraui-v3-confirm .confirm-content-actions > button + button {\n margin-left: 16px;\n}";
34
34
  styleInject(css_248z$1);
35
35
 
36
+ //图标
36
37
  var iconMap = {
37
38
  "success": jsx(CompleteIcon, {}),
38
39
  "warn": jsx(WarningCircleF, {}),
39
40
  "warning": jsx(WarningCircleF, {}),
40
41
  "error": jsx(CloseCircleFilled, {}),
41
42
  "info": jsx(InfoOutlined, {})
42
- }; //confirm modal
43
-
43
+ };
44
+ //confirm modal
44
45
  var ConfirmDialog = function ConfirmDialog(props) {
45
46
  var _props$type = props.type,
46
- type = _props$type === void 0 ? 'warning' : _props$type,
47
- title = props.title,
48
- content = props.content,
49
- icon = props.icon,
50
- okText = props.okText,
51
- cancelText = props.cancelText,
52
- onOk = props.onOk,
53
- onCancel = props.onCancel,
54
- className = props.className,
55
- _props$showCancel = props.showCancel,
56
- showCancel = _props$showCancel === void 0 ? true : _props$showCancel,
57
- _props$closable = props.closable,
58
- closable = _props$closable === void 0 ? false : _props$closable,
59
- okButtonProps = props.okButtonProps,
60
- cancelButtonProps = props.cancelButtonProps,
61
- resolveFn = props.resolveFn,
62
- callback = props.callback,
63
- destroy = props.destroy,
64
- actions = props.actions,
65
- _props$showActions = props.showActions,
66
- showActions = _props$showActions === void 0 ? true : _props$showActions,
67
- restProps = __rest(props, ["type", "title", "content", "icon", "okText", "cancelText", "onOk", "onCancel", "className", "showCancel", "closable", "okButtonProps", "cancelButtonProps", "resolveFn", "callback", "destroy", "actions", "showActions"]);
68
-
69
- var prefixCls = "".concat($prefixCls, "-confirm"); //取消
70
-
47
+ type = _props$type === void 0 ? 'warning' : _props$type,
48
+ title = props.title,
49
+ content = props.content,
50
+ icon = props.icon,
51
+ okText = props.okText,
52
+ cancelText = props.cancelText,
53
+ onOk = props.onOk,
54
+ onCancel = props.onCancel,
55
+ className = props.className,
56
+ _props$showCancel = props.showCancel,
57
+ showCancel = _props$showCancel === void 0 ? true : _props$showCancel,
58
+ _props$closable = props.closable,
59
+ closable = _props$closable === void 0 ? false : _props$closable,
60
+ okButtonProps = props.okButtonProps,
61
+ cancelButtonProps = props.cancelButtonProps,
62
+ resolveFn = props.resolveFn,
63
+ callback = props.callback,
64
+ destroy = props.destroy,
65
+ actions = props.actions,
66
+ _props$showActions = props.showActions,
67
+ showActions = _props$showActions === void 0 ? true : _props$showActions,
68
+ restProps = __rest(props, ["type", "title", "content", "icon", "okText", "cancelText", "onOk", "onCancel", "className", "showCancel", "closable", "okButtonProps", "cancelButtonProps", "resolveFn", "callback", "destroy", "actions", "showActions"]);
69
+ var prefixCls = "".concat($prefixCls, "-confirm");
70
+ //取消
71
71
  var handleCancel = function handleCancel() {
72
72
  onCancel === null || onCancel === void 0 ? void 0 : onCancel();
73
73
  resolveFn === null || resolveFn === void 0 ? void 0 : resolveFn(false);
74
74
  destroy === null || destroy === void 0 ? void 0 : destroy();
75
- }; //确认
76
-
77
-
75
+ };
76
+ //确认
78
77
  var handleOk = function handleOk() {
79
78
  onOk === null || onOk === void 0 ? void 0 : onOk();
80
79
  resolveFn === null || resolveFn === void 0 ? void 0 : resolveFn(true);
81
80
  callback === null || callback === void 0 ? void 0 : callback();
82
81
  destroy === null || destroy === void 0 ? void 0 : destroy();
83
- }; //render actions
84
-
85
-
82
+ };
83
+ //render actions
86
84
  var renderActions = function renderActions() {
87
85
  if (!showActions) return null;
88
-
89
86
  if (actions) {
90
87
  return jsx("div", Object.assign({
91
88
  className: 'confirm-content-actions'
@@ -93,7 +90,6 @@ var ConfirmDialog = function ConfirmDialog(props) {
93
90
  children: actions
94
91
  }));
95
92
  }
96
-
97
93
  return jsxs("div", Object.assign({
98
94
  className: 'confirm-content-actions'
99
95
  }, {
@@ -112,7 +108,6 @@ var ConfirmDialog = function ConfirmDialog(props) {
112
108
  }))]
113
109
  }));
114
110
  };
115
-
116
111
  return jsx(Modal, Object.assign({}, restProps, {
117
112
  onOk: handleOk,
118
113
  onCancel: handleCancel,
@@ -156,32 +151,27 @@ var ConfirmDialog = function ConfirmDialog(props) {
156
151
  }))
157
152
  }))
158
153
  }));
159
- }; //销毁方法map
160
-
161
-
162
- var $destroyFnsMap = new Map(); //confirm
163
-
154
+ };
155
+ //销毁方法map
156
+ var $destroyFnsMap = new Map();
157
+ //confirm
164
158
  var confirm = function confirm(props, resolveFn, callback) {
165
159
  var box = document.createElement('div');
166
160
  var uuid = props.uuid || UUID();
167
161
  if (props.uuid) box.setAttribute('data-confirm-cid', props.uuid);
168
- document.body.appendChild(box); //销毁组件
169
-
162
+ document.body.appendChild(box);
163
+ //销毁组件
170
164
  var destroy = function destroy() {
171
165
  var unmountResult = ReactDOM.unmountComponentAtNode(box);
172
-
173
166
  if (unmountResult && box.parentNode) {
174
167
  box.parentNode.removeChild(box);
175
168
  }
176
-
177
169
  $destroyFnsMap.delete(uuid);
178
170
  };
179
-
180
- $destroyFnsMap.set(uuid, destroy); //渲染组件
181
-
171
+ $destroyFnsMap.set(uuid, destroy);
172
+ //渲染组件
182
173
  setTimeout(function () {
183
174
  var _a, _b;
184
-
185
175
  var runtimeLocale = getConfirmLocale();
186
176
  ReactDOM.render(jsx(ConfirmDialog, Object.assign({}, props, {
187
177
  okText: (_a = props.okText) !== null && _a !== void 0 ? _a : runtimeLocale.ok,
@@ -192,9 +182,8 @@ var confirm = function confirm(props, resolveFn, callback) {
192
182
  destroy: destroy
193
183
  })), box);
194
184
  });
195
- }; //promise factory
196
-
197
-
185
+ };
186
+ //promise factory
198
187
  var promiseFactory = function promiseFactory(config, type, callback) {
199
188
  var opts = {
200
189
  type: type
@@ -205,9 +194,8 @@ var promiseFactory = function promiseFactory(config, type, callback) {
205
194
  return new Promise(function (resolve) {
206
195
  confirm(opts, resolve, callback);
207
196
  });
208
- }; //销毁弹框
209
-
210
-
197
+ };
198
+ //销毁弹框
211
199
  var destroyAllConfirm = function destroyAllConfirm(uuid) {
212
200
  if (uuid) {
213
201
  var close = $destroyFnsMap.get(uuid);
@@ -215,14 +203,12 @@ var destroyAllConfirm = function destroyAllConfirm(uuid) {
215
203
  $destroyFnsMap.delete(uuid);
216
204
  return;
217
205
  }
218
-
219
206
  $destroyFnsMap.forEach(function (close) {
220
207
  if (close) close();
221
208
  });
222
209
  $destroyFnsMap.clear();
223
- }; //confirm 方法对象
224
-
225
-
210
+ };
211
+ //confirm 方法对象
226
212
  var Confirm = {
227
213
  info: function info(config, callback) {
228
214
  return promiseFactory(config, 'info', callback);
@@ -242,8 +228,8 @@ var Confirm = {
242
228
  var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/6/13 下午6:54\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-modal {\n color: rgb(46, 55, 67);\n font-size: 14px;\n line-height: 1.5715;\n pointer-events: none;\n position: relative;\n top: 100px;\n width: auto;\n max-width: calc(100vw - 32px);\n margin: 0 auto;\n padding-bottom: 24px;\n}\n.paraui-v3-modal.paraui-v3-modal-sm .paraui-v3-modal-content {\n width: 430px;\n max-height: 250px;\n}\n.paraui-v3-modal.paraui-v3-modal-md .paraui-v3-modal-content {\n width: 486px;\n max-height: 610px;\n}\n.paraui-v3-modal.paraui-v3-modal-lg .paraui-v3-modal-content {\n width: 948px;\n max-height: 610px;\n}\n.paraui-v3-modal.paraui-v3-modal-fullscreen {\n max-width: 100%;\n width: 100%;\n height: 100%;\n}\n.paraui-v3-modal.paraui-v3-modal-zoom-enter, .paraui-v3-modal.paraui-v3-modal-zoom-appear {\n transform: none;\n opacity: 0;\n animation-duration: 0.3s;\n user-select: none;\n}\n.paraui-v3-modal-mask {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1500;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.45);\n}\n.paraui-v3-modal-mask-hidden {\n display: none;\n}\n.paraui-v3-modal-wrap {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n overflow: auto;\n outline: 0;\n z-index: 1500;\n -webkit-overflow-scrolling: touch;\n}\n.paraui-v3-modal .paraui-v3-modal-content {\n display: flex;\n height: 100%;\n flex-direction: column;\n position: relative;\n border-radius: 4px;\n background-color: rgb(255, 255, 255);\n box-shadow: 0px 2px 8px 0px rgba(171, 176, 185, 0.4);\n pointer-events: auto;\n overflow-y: auto;\n}\n.paraui-v3-modal .paraui-v3-modal-title {\n position: relative;\n height: 44px;\n padding: 12px 24px;\n font-size: 14px;\n color: rgb(46, 55, 67);\n font-weight: 700;\n line-height: 20px;\n border-bottom: 1px solid rgba(171, 176, 185, 0.2);\n overflow-wrap: break-word;\n}\n.paraui-v3-modal .paraui-v3-modal-title .paraui-v3-modal-close {\n position: absolute;\n top: 8px;\n right: 14px;\n z-index: 10;\n border: 0;\n}\n.paraui-v3-modal .paraui-v3-modal-title .paraui-v3-modal-close .paraui-v3-modal-close-icon {\n font-size: 20px;\n}\n.paraui-v3-modal .paraui-v3-modal-body {\n flex: auto;\n padding: 16px 24px;\n overflow-y: auto;\n overflow-wrap: break-word;\n}\n.paraui-v3-modal .paraui-v3-modal-footer {\n padding: 8px 24px 24px;\n text-align: right;\n}\n.paraui-v3-modal .paraui-v3-modal-footer > button + button {\n margin-left: 16px;\n}\n.paraui-v3-modal-open {\n overflow: hidden;\n}\n.paraui-v3-modal-centered {\n text-align: center;\n}\n.paraui-v3-modal-centered::before {\n display: inline-block;\n width: 0;\n height: 100%;\n vertical-align: middle;\n content: \"\";\n}\n.paraui-v3-modal-centered .paraui-v3-modal {\n top: 0;\n display: inline-block;\n padding-bottom: 0;\n text-align: left;\n vertical-align: middle;\n}\n@media (max-width: 767px) {\n .paraui-v3-modal .paraui-v3-modal {\n max-width: calc(100vw - 16px);\n margin: 8px auto;\n }\n .paraui-v3-modal .paraui-v3-modal-centered .paraui-v3-modal {\n flex: 1;\n }\n}\n\n.paraui-v3-modal-zoom-enter,\n.paraui-v3-modal-zoom-appear {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-play-state: paused;\n transform: scale(0);\n opacity: 0;\n animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);\n}\n\n.paraui-v3-modal-zoom-leave {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-play-state: paused;\n}\n\n.paraui-v3-modal-zoom-enter.paraui-v3-modal-zoom-enter-active,\n.paraui-v3-modal-zoom-appear.paraui-v3-modal-zoom-appear-active {\n animation-name: paraui-v3ModalZoomIn;\n animation-play-state: running;\n}\n\n.paraui-v3-modal-zoom-leave.paraui-v3-modal-zoom-leave-active {\n animation-name: paraui-v3ModalZoomOut;\n animation-play-state: running;\n pointer-events: none;\n}\n\n.paraui-v3-modal-zoom-enter-prepare,\n.paraui-v3-modal-zoom-appear-prepare {\n transform: none;\n}\n\n.paraui-v3-modal-zoom-leave {\n animation-timing-function: cubic-bezier(0.78, 0.14, 0.15, 0.86);\n}\n\n.paraui-v3-modal-fade-enter,\n.paraui-v3-modal-fade-appear {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-play-state: paused;\n}\n\n.paraui-v3-modal-fade-leave {\n animation-duration: 0.2s;\n animation-fill-mode: both;\n animation-play-state: paused;\n}\n\n.paraui-v3-modal-fade-enter.paraui-v3-modal-fade-enter-active,\n.paraui-v3-modal-fade-appear.paraui-v3-modal-fade-appear-active {\n animation-name: paraui-v3ModalFadeIn;\n animation-play-state: running;\n}\n\n.paraui-v3-modal-fade-leave.paraui-v3-modal-fade-leave-active {\n animation-name: paraui-v3ModalFadeOut;\n animation-play-state: running;\n pointer-events: none;\n}\n\n.paraui-v3-modal-fade-enter,\n.paraui-v3-modal-fade-appear {\n opacity: 0;\n animation-timing-function: linear;\n}\n\n.paraui-v3-modal-fade-leave {\n animation-timing-function: linear;\n}\n\n@keyframes paraui-v3ModalZoomIn {\n 0% {\n transform: scale(0.2);\n opacity: 0;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n}\n@keyframes paraui-v3ModalZoomOut {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0.2);\n opacity: 0;\n }\n}\n@keyframes paraui-v3ModalFadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes paraui-v3ModalFadeOut {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}";
243
229
  styleInject(css_248z);
244
230
 
231
+ //鼠标位置内部使用
245
232
  var mousePosition;
246
-
247
233
  var getClickPosition = function getClickPosition(e) {
248
234
  mousePosition = {
249
235
  x: e.pageX,
@@ -252,74 +238,66 @@ var getClickPosition = function getClickPosition(e) {
252
238
  setTimeout(function () {
253
239
  mousePosition = null;
254
240
  }, 100);
255
- }; // 只有点击事件支持从鼠标位置动画展开
256
-
257
-
241
+ };
242
+ // 只有点击事件支持从鼠标位置动画展开
258
243
  if (window.document.documentElement) {
259
244
  document.documentElement.addEventListener('click', getClickPosition, true);
260
- } //Modal
261
-
262
-
245
+ }
246
+ //Modal
263
247
  var Modal = function Modal(props) {
264
248
  var open = props.open,
265
- _props$visible = props.visible,
266
- visible = _props$visible === void 0 ? false : _props$visible,
267
- closeIcon = props.closeIcon,
268
- _props$centered = props.centered,
269
- centered = _props$centered === void 0 ? true : _props$centered,
270
- _props$focusTriggerAf = props.focusTriggerAfterClose,
271
- focusTriggerAfterClose = _props$focusTriggerAf === void 0 ? true : _props$focusTriggerAf,
272
- title = props.title,
273
- footer = props.footer,
274
- _props$showActions = props.showActions,
275
- showActions = _props$showActions === void 0 ? true : _props$showActions,
276
- actions = props.actions,
277
- header = props.header,
278
- _props$hideHeader = props.hideHeader,
279
- hideHeader = _props$hideHeader === void 0 ? false : _props$hideHeader,
280
- _props$showCancel = props.showCancel,
281
- showCancel = _props$showCancel === void 0 ? true : _props$showCancel,
282
- _props$maskClosable = props.maskClosable,
283
- maskClosable = _props$maskClosable === void 0 ? false : _props$maskClosable,
284
- _props$disableBackdro = props.disableBackdropClick,
285
- disableBackdropClick = _props$disableBackdro === void 0 ? true : _props$disableBackdro,
286
- _props$keyboard = props.keyboard,
287
- keyboard = _props$keyboard === void 0 ? false : _props$keyboard,
288
- _props$disableEscapeK = props.disableEscapeKeyDown,
289
- disableEscapeKeyDown = _props$disableEscapeK === void 0 ? true : _props$disableEscapeK,
290
- fullScreen = props.fullScreen,
291
- customizeSize = props.customizeSize,
292
- style = props.style,
293
- bodyStyle = props.bodyStyle,
294
- contentWidth = props.contentWidth,
295
- contentHeight = props.contentHeight,
296
- contentStyle = props.contentStyle,
297
- _props$size = props.size,
298
- size = _props$size === void 0 ? 'md' : _props$size,
299
- children = props.children,
300
- _props$closable = props.closable,
301
- closable = _props$closable === void 0 ? true : _props$closable,
302
- restProps = __rest(props, ["open", "visible", "closeIcon", "centered", "focusTriggerAfterClose", "title", "footer", "showActions", "actions", "header", "hideHeader", "showCancel", "maskClosable", "disableBackdropClick", "keyboard", "disableEscapeKeyDown", "fullScreen", "customizeSize", "style", "bodyStyle", "contentWidth", "contentHeight", "contentStyle", "size", "children", "closable"]);
303
-
249
+ _props$visible = props.visible,
250
+ visible = _props$visible === void 0 ? false : _props$visible,
251
+ closeIcon = props.closeIcon,
252
+ _props$centered = props.centered,
253
+ centered = _props$centered === void 0 ? true : _props$centered,
254
+ _props$focusTriggerAf = props.focusTriggerAfterClose,
255
+ focusTriggerAfterClose = _props$focusTriggerAf === void 0 ? true : _props$focusTriggerAf,
256
+ title = props.title,
257
+ footer = props.footer,
258
+ _props$showActions = props.showActions,
259
+ showActions = _props$showActions === void 0 ? true : _props$showActions,
260
+ actions = props.actions,
261
+ header = props.header,
262
+ _props$hideHeader = props.hideHeader,
263
+ hideHeader = _props$hideHeader === void 0 ? false : _props$hideHeader,
264
+ _props$showCancel = props.showCancel,
265
+ showCancel = _props$showCancel === void 0 ? true : _props$showCancel,
266
+ _props$maskClosable = props.maskClosable,
267
+ maskClosable = _props$maskClosable === void 0 ? false : _props$maskClosable,
268
+ _props$disableBackdro = props.disableBackdropClick,
269
+ disableBackdropClick = _props$disableBackdro === void 0 ? true : _props$disableBackdro,
270
+ _props$keyboard = props.keyboard,
271
+ keyboard = _props$keyboard === void 0 ? false : _props$keyboard,
272
+ _props$disableEscapeK = props.disableEscapeKeyDown,
273
+ disableEscapeKeyDown = _props$disableEscapeK === void 0 ? true : _props$disableEscapeK,
274
+ fullScreen = props.fullScreen,
275
+ customizeSize = props.customizeSize,
276
+ style = props.style,
277
+ bodyStyle = props.bodyStyle,
278
+ contentWidth = props.contentWidth,
279
+ contentHeight = props.contentHeight,
280
+ contentStyle = props.contentStyle,
281
+ _props$size = props.size,
282
+ size = _props$size === void 0 ? 'md' : _props$size,
283
+ children = props.children,
284
+ _props$closable = props.closable,
285
+ closable = _props$closable === void 0 ? true : _props$closable,
286
+ restProps = __rest(props, ["open", "visible", "closeIcon", "centered", "focusTriggerAfterClose", "title", "footer", "showActions", "actions", "header", "hideHeader", "showCancel", "maskClosable", "disableBackdropClick", "keyboard", "disableEscapeKeyDown", "fullScreen", "customizeSize", "style", "bodyStyle", "contentWidth", "contentHeight", "contentStyle", "size", "children", "closable"]);
304
287
  var isFullScreen = fullScreen || size === 'fullScreen'; //是否全屏
305
-
306
288
  var intl = useFormatMessage('Modal', defaultModalLocale);
307
- var prefixCls = "".concat($prefixCls, "-modal"); //关闭回调
308
-
289
+ var prefixCls = "".concat($prefixCls, "-modal");
290
+ //关闭回调
309
291
  var handleCancel = function handleCancel(e) {
310
292
  var _a;
311
-
312
293
  (_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(props, e);
313
- }; //确定回调
314
-
315
-
294
+ };
295
+ //确定回调
316
296
  var handleOk = function handleOk(e) {
317
297
  var _a;
318
-
319
298
  (_a = props.onOk) === null || _a === void 0 ? void 0 : _a.call(props, e);
320
- }; //modal size class
321
-
322
-
299
+ };
300
+ //modal size class
323
301
  var makeSizeCls = function makeSizeCls() {
324
302
  var sizeMap = {
325
303
  sm: "".concat(prefixCls, "-sm"),
@@ -331,26 +309,23 @@ var Modal = function Modal(props) {
331
309
  if (contentWidth || contentHeight || contentStyle) return;
332
310
  if (isFullScreen) return sizeMap['fullScreen'];
333
311
  return sizeMap[size];
334
- }; //自定义样式
335
-
336
-
312
+ };
313
+ //自定义样式
337
314
  var getCStyle = function getCStyle() {
338
315
  return Object.assign(Object.assign({}, customizeSize), style);
339
- }; //自定义内容样式
340
-
341
-
316
+ };
317
+ //自定义内容样式
342
318
  var getContentStyle = function getContentStyle() {
343
319
  return Object.assign(Object.assign(Object.assign({}, bodyStyle), {
344
320
  width: contentWidth,
345
321
  height: contentHeight
346
322
  }), contentStyle);
347
- }; //header
348
-
349
-
323
+ };
324
+ //header
350
325
  var renderHeader = function renderHeader() {
351
326
  if (hideHeader) return null;
352
- if (header) return header; //
353
-
327
+ if (header) return header;
328
+ //
354
329
  var closeNode = closable && jsx(Button.IconButton, Object.assign({
355
330
  onClick: handleCancel,
356
331
  className: "".concat(prefixCls, "-close"),
@@ -361,22 +336,19 @@ var Modal = function Modal(props) {
361
336
  className: "".concat(prefixCls, "-close-icon")
362
337
  })
363
338
  }));
364
-
365
339
  return jsxs(Fragment, {
366
340
  children: [title, closeNode]
367
341
  });
368
- }; //footer
369
-
370
-
342
+ };
343
+ //footer
371
344
  var renderFooter = function renderFooter() {
372
345
  if (!showActions) return null;
373
346
  var okText = props.okText,
374
- cancelText = props.cancelText,
375
- okButtonProps = props.okButtonProps,
376
- cancelButtonProps = props.cancelButtonProps,
377
- _props$confirmLoading = props.confirmLoading,
378
- confirmLoading = _props$confirmLoading === void 0 ? false : _props$confirmLoading;
379
-
347
+ cancelText = props.cancelText,
348
+ okButtonProps = props.okButtonProps,
349
+ cancelButtonProps = props.cancelButtonProps,
350
+ _props$confirmLoading = props.confirmLoading,
351
+ confirmLoading = _props$confirmLoading === void 0 ? false : _props$confirmLoading;
380
352
  var okBtn = jsx(Button, Object.assign({
381
353
  variant: "contained",
382
354
  size: "medium",
@@ -387,7 +359,6 @@ var Modal = function Modal(props) {
387
359
  id: 'ok'
388
360
  })
389
361
  }));
390
-
391
362
  var cancelBtn = showCancel && jsx(Button, Object.assign({
392
363
  variant: "outlined",
393
364
  size: "medium",
@@ -397,10 +368,8 @@ var Modal = function Modal(props) {
397
368
  id: 'cancel'
398
369
  })
399
370
  }));
400
-
401
371
  var buttons = [cancelBtn, okBtn];
402
372
  var tActions = actions !== null && actions !== void 0 ? actions : footer;
403
-
404
373
  if (typeof tActions === 'function') {
405
374
  var btns = tActions(buttons);
406
375
  return jsx(Fragment, {
@@ -413,7 +382,6 @@ var Modal = function Modal(props) {
413
382
  } else if (tActions) {
414
383
  return tActions;
415
384
  }
416
-
417
385
  return jsx(Fragment, {
418
386
  children: buttons.map(function (btn, idx) {
419
387
  return jsx(React__default.Fragment, {
@@ -421,11 +389,10 @@ var Modal = function Modal(props) {
421
389
  }, idx);
422
390
  })
423
391
  });
424
- }; //wrap cls
425
-
426
-
427
- var makeWrapClassName = clsx(props.wrapClassName, _defineProperty({}, "".concat(prefixCls, "-centered"), centered)); //modal cls
428
-
392
+ };
393
+ //wrap cls
394
+ var makeWrapClassName = clsx(props.wrapClassName, _defineProperty({}, "".concat(prefixCls, "-centered"), centered));
395
+ //modal cls
429
396
  var makeModalClassName = clsx(props.className, "".concat($prefixCls, "-scrollbar-small"), makeSizeCls());
430
397
  return jsx(Dialog, Object.assign({}, restProps, {
431
398
  visible: open !== null && open !== void 0 ? open : visible,