@para-ui/core 4.0.54 → 4.0.56

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 (72) hide show
  1. package/Argv/index.js +5 -4
  2. package/AutoButton/index.d.ts +3 -0
  3. package/AutoButton/index.js +30 -14
  4. package/Button/SplitButton.d.ts +5 -0
  5. package/Button/index.d.ts +4 -0
  6. package/Button/index.js +17 -352
  7. package/ButtonGroup/index.js +5 -1
  8. package/ComboSelect/index.js +9 -9
  9. package/CycleSelector/index.js +3 -1
  10. package/DatePicker/index.js +6 -3
  11. package/Descriptions/index.js +5 -1
  12. package/Desktop/index.js +4 -1
  13. package/Drawer/index.js +5 -1
  14. package/DynamicMultiBox/index.js +8 -8
  15. package/FieldForm/FieldFormItem/index.d.ts +1 -0
  16. package/FieldForm/FormItemInput.d.ts +2 -0
  17. package/FieldForm/index.js +15 -7
  18. package/Form/index.js +8 -8
  19. package/FormItem/index.js +8 -8
  20. package/FunctionModal/index.js +7 -6
  21. package/InputCode/index.js +4 -1
  22. package/Modal/index.js +2 -1
  23. package/OperateBtn/index.js +5 -6
  24. package/PageHeader/index.js +5 -1
  25. package/Pagination/index.js +4 -1
  26. package/PopConfirm/index.js +14 -213
  27. package/QuickReply/index.js +6 -7
  28. package/README.md +14 -0
  29. package/Selector/index.js +3 -2
  30. package/Stepper/index.js +1 -1
  31. package/Table/index.js +502 -488
  32. package/Tabs/index.js +6 -7
  33. package/TimePicker/index.js +5 -2
  34. package/ToggleButton/index.js +5 -1
  35. package/Transfer/index.js +5 -2
  36. package/Upload/index.js +3 -4
  37. package/_verture/{index-43c653bb.js → index-7558fb61.js} +1 -1
  38. package/_verture/index-cd9ede02.js +596 -0
  39. package/_verture/useResizeObserver-960e470e.js +54 -0
  40. package/index.js +9 -9
  41. package/package.json +1 -1
  42. package/umd/Argv.js +4 -4
  43. package/umd/AutoButton.js +7 -7
  44. package/umd/Button.js +7 -7
  45. package/umd/ButtonGroup.js +7 -7
  46. package/umd/ComboSelect.js +1 -1
  47. package/umd/CycleSelector.js +5 -5
  48. package/umd/DatePicker.js +5 -5
  49. package/umd/Descriptions.js +7 -7
  50. package/umd/Desktop.js +5 -5
  51. package/umd/Drawer.js +7 -7
  52. package/umd/DynamicMultiBox.js +1 -1
  53. package/umd/FieldForm.js +2 -2
  54. package/umd/Form.js +1 -1
  55. package/umd/FormItem.js +1 -1
  56. package/umd/FunctionModal.js +7 -7
  57. package/umd/InputCode.js +6 -6
  58. package/umd/Modal.js +5 -5
  59. package/umd/OperateBtn.js +6 -6
  60. package/umd/PageHeader.js +7 -7
  61. package/umd/Pagination.js +5 -5
  62. package/umd/PopConfirm.js +2 -2
  63. package/umd/QuickReply.js +1 -1
  64. package/umd/Selector.js +1 -1
  65. package/umd/SelectorPicker.js +1 -1
  66. package/umd/Table.js +1 -1
  67. package/umd/Tabs.js +1 -1
  68. package/umd/TimePicker.js +5 -5
  69. package/umd/ToggleButton.js +7 -7
  70. package/umd/Transfer.js +8 -8
  71. package/umd/Upload.js +1 -1
  72. /package/_verture/{modalContext-6ac2e323.js → modalContext-ce07f2de.js} +0 -0
@@ -1,19 +1,19 @@
1
- import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
2
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
- import { useRef, useState, useMemo, useEffect } from 'react';
4
- import CheckCircleF from '@para-ui/icons/CheckCircleF';
5
- import InfoOutlined from '@para-ui/icons/WarningCircle';
6
- import CloseCircleF from '@para-ui/icons/CloseCircleF';
7
- import WarningCircleF from '@para-ui/icons/WarningCircleF';
8
- import { Button } from '../Button/index.js';
9
- import { Tooltip } from '../Tooltip/index.js';
10
- import clsx from 'clsx';
11
- import { u as useFormatMessage } from '../_verture/useFormatMessage-1fc7c957.js';
12
- import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
13
- import { u as usePopupContainer } from '../_verture/usePopupContainer-635f66f4.js';
14
- import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
1
+ import '../_verture/tslib.es6-55ed4bd2.js';
2
+ import 'react/jsx-runtime';
3
+ import 'react';
4
+ import '@para-ui/icons/CheckCircleF';
5
+ import '@para-ui/icons/WarningCircle';
6
+ import '@para-ui/icons/CloseCircleF';
7
+ import '@para-ui/icons/WarningCircleF';
8
+ export { P as PopConfirm, P as default } from '../_verture/index-cd9ede02.js';
9
+ import '../Tooltip/index.js';
10
+ import 'clsx';
11
+ import '../_verture/useFormatMessage-1fc7c957.js';
12
+ import '../_verture/constant-5317fc89.js';
13
+ import '../_verture/usePopupContainer-635f66f4.js';
15
14
  import '@para-ui/icons/LoadingF';
16
15
  import '@para-ui/icons/Down';
16
+ import '../_verture/style-inject.es-300983ab.js';
17
17
  import '../_verture/index-bde7aabe.js';
18
18
  import 'rc-dropdown';
19
19
  import 'dayjs';
@@ -23,202 +23,3 @@ import 'rc-tooltip';
23
23
  import 'rc-tooltip/lib/placements';
24
24
  import '@para-ui/icons/Forbid';
25
25
  import '../_verture/index-ca413216.js';
26
-
27
- var en = {
28
- cancel: 'Cancel',
29
- ok: 'Ok'
30
- };
31
-
32
- var zh = {
33
- cancel: '取 消',
34
- ok: '确 认'
35
- };
36
-
37
- var localeJson = {
38
- zh,
39
- en
40
- };
41
-
42
- var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/2 下午1:44\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-popconfirm.paraui-v4-tooltip {\n position: absolute;\n width: 440px;\n padding: 0;\n font-size: 14px;\n color: initial;\n background-color: rgb(255, 255, 255);\n box-shadow: 1px 1px 10px 2px rgba(212, 218, 227, 0.4);\n border-radius: 8px;\n border: 1px solid rgba(212, 218, 227, 0.4);\n}\n.paraui-v4-popconfirm.component-tooltip-hidden.paraui-v4-tooltip {\n border: none;\n}\n.paraui-v4-popconfirm.paraui-v4-tooltip .component-tooltip-inner {\n padding: 0;\n color: initial;\n background-color: transparent;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper {\n padding: 16px;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message {\n position: relative;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-icon {\n position: absolute;\n top: 1px;\n color: rgb(255, 147, 38);\n line-height: 0;\n font-size: 18px;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-icon svg {\n color: inherit;\n font-size: inherit;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-body {\n padding-left: 24px;\n line-height: 20px;\n font-size: 14px;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-title {\n font-weight: 600;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-content {\n font-weight: 400;\n margin-top: 8px;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-content.without-title {\n margin-top: 0;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-description {\n margin-top: 4px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-message-description.without-title-or-content {\n margin-top: 0;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-btns {\n margin-top: 12px;\n text-align: right;\n}\n.paraui-v4-popconfirm .popconfirm-wrapper .popconfirm-btns > button + button {\n margin-left: 12px;\n}\n.paraui-v4-popconfirm .paraui-v4-popconfirm-btn {\n min-width: 54px;\n}";
43
- styleInject(css_248z);
44
-
45
- //图标
46
- const iconMapping = {
47
- success: jsx(CheckCircleF, {}),
48
- warning: jsx(WarningCircleF, {}),
49
- error: jsx(CloseCircleF, {}),
50
- info: jsx(InfoOutlined, {})
51
- };
52
- //popConfirm
53
- const PopConfirm = props => {
54
- const {
55
- trigger = 'click',
56
- type = 'warning',
57
- title,
58
- content,
59
- description,
60
- icon,
61
- okText,
62
- cancelText,
63
- onOk,
64
- onCancel,
65
- okButtonProps,
66
- cancelButtonProps,
67
- placement = 'top-start',
68
- className,
69
- overlayClassName,
70
- style,
71
- children,
72
- open = false,
73
- controllable = false,
74
- showCancel = true,
75
- bubble = true,
76
- okButtonDanger,
77
- countdown,
78
- countdownTime = 5,
79
- actions,
80
- onClose,
81
- onCountdownFinish,
82
- getPopupContainer: customizeContainer
83
- } = props,
84
- restProps = __rest(props, ["trigger", "type", "title", "content", "description", "icon", "okText", "cancelText", "onOk", "onCancel", "okButtonProps", "cancelButtonProps", "placement", "className", "overlayClassName", "style", "children", "open", "controllable", "showCancel", "bubble", "okButtonDanger", "countdown", "countdownTime", "actions", "onClose", "onCountdownFinish", "getPopupContainer"]);
85
- const intl = useFormatMessage('PopConfirm', localeJson);
86
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
87
- const wrapRef = useRef();
88
- const getPopupContainer = usePopupContainer(wrapRef, customizeContainer);
89
- //打开
90
- const [inOpen, setInOpen] = useState(false);
91
- const countdownTimer = useRef();
92
- const [inCountdownTime, setInCountdownTime] = useState(countdownTime);
93
- const isCountting = useMemo(() => countdown && inCountdownTime >= 1, [countdown, inCountdownTime]);
94
- useEffect(() => {
95
- if (countdown) {
96
- if (inOpen) {
97
- setInCountdownTime(countdownTime);
98
- countdownTimer.current = setInterval(() => {
99
- setInCountdownTime(pre => {
100
- if (pre <= 1) {
101
- onCountdownFinish === null || onCountdownFinish === void 0 ? void 0 : onCountdownFinish();
102
- clearInterval(countdownTimer.current);
103
- return 0;
104
- }
105
- return pre - 1;
106
- });
107
- }, 1000);
108
- } else {
109
- clearInterval(countdownTimer.current);
110
- }
111
- }
112
- return () => {
113
- clearInterval(countdownTimer.current);
114
- };
115
- }, [inOpen, countdown]);
116
- //取消
117
- const handleCancel = () => {
118
- onCancel === null || onCancel === void 0 ? void 0 : onCancel();
119
- handleClose();
120
- };
121
- //确认
122
- const handleOk = () => {
123
- onOk === null || onOk === void 0 ? void 0 : onOk();
124
- handleClose();
125
- };
126
- //关闭
127
- const handleClose = () => {
128
- if (!controllable) {
129
- setInOpen(false);
130
- onClose === null || onClose === void 0 ? void 0 : onClose();
131
- }
132
- };
133
- //tooltip vis
134
- const onVisibleChange = vis => {
135
- if (!controllable) {
136
- setInOpen(vis);
137
- if (!vis) onClose === null || onClose === void 0 ? void 0 : onClose();
138
- } else {
139
- if (open) onClose === null || onClose === void 0 ? void 0 : onClose();
140
- }
141
- };
142
- useEffect(() => {
143
- controllable && setInOpen(open);
144
- }, [open]);
145
- //渲染内容
146
- const renderOverlay = () => {
147
- const btns = jsxs(Fragment, {
148
- children: [showCancel && jsx(Button, Object.assign({
149
- className: "".concat($prefixCls, "-popconfirm-btn"),
150
- onClick: handleCancel,
151
- variant: 'outlined',
152
- size: 'small'
153
- }, cancelButtonProps, {
154
- children: cancelText !== null && cancelText !== void 0 ? cancelText : intl({
155
- id: 'cancel'
156
- })
157
- })), jsx(Button, Object.assign({
158
- className: "".concat($prefixCls, "-popconfirm-btn"),
159
- onClick: handleOk,
160
- variant: 'contained',
161
- size: 'small'
162
- }, okButtonProps, {
163
- danger: okButtonDanger !== null && okButtonDanger !== void 0 ? okButtonDanger : okButtonProps === null || okButtonProps === void 0 ? void 0 : okButtonProps.danger,
164
- disabled: isCountting ? true : okButtonProps === null || okButtonProps === void 0 ? void 0 : okButtonProps.disabled
165
- }, {
166
- children: isCountting ? "".concat(inCountdownTime, "s") : okText !== null && okText !== void 0 ? okText : intl({
167
- id: 'ok'
168
- })
169
- }))]
170
- });
171
- return jsxs("div", Object.assign({
172
- className: clsx('popconfirm-wrapper'),
173
- style: style,
174
- onClick: evt => {
175
- if (!bubble) evt.stopPropagation();
176
- }
177
- }, {
178
- children: [jsxs("div", Object.assign({
179
- className: 'popconfirm-message'
180
- }, {
181
- children: [jsx("span", Object.assign({
182
- className: 'popconfirm-message-icon'
183
- }, {
184
- children: icon || iconMapping[type]
185
- })), jsxs("div", Object.assign({
186
- className: 'popconfirm-message-body'
187
- }, {
188
- children: [title && jsx("div", Object.assign({
189
- className: "popconfirm-message-title"
190
- }, {
191
- children: title
192
- })), content && jsx("div", Object.assign({
193
- className: clsx('popconfirm-message-content', title ? '' : 'without-title')
194
- }, {
195
- children: content
196
- })), description && jsx("div", Object.assign({
197
- className: clsx('popconfirm-message-description', title || content ? '' : 'without-title-or-content')
198
- }, {
199
- children: description
200
- }))]
201
- }))]
202
- })), jsx("div", Object.assign({
203
- className: 'popconfirm-btns'
204
- }, {
205
- children: actions !== null && actions !== void 0 ? actions : btns
206
- }))]
207
- }));
208
- };
209
- return jsx(Tooltip, Object.assign({}, restProps, {
210
- ref: wrapRef,
211
- trigger: trigger,
212
- open: inOpen,
213
- arrow: false,
214
- placement: placement,
215
- title: renderOverlay(),
216
- onVisibleChange: onVisibleChange,
217
- overlayClassName: clsx("".concat($prefixCls, "-popconfirm"), overlayClassName, className),
218
- getPopupContainer: getPopupContainer
219
- }, {
220
- children: children
221
- }));
222
- };
223
-
224
- export { PopConfirm, PopConfirm as default };
@@ -3,10 +3,9 @@ import { useState, useRef } from 'react';
3
3
  import clsx from 'clsx';
4
4
  import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
5
5
  import { d as dist } from '../_verture/index-0f5ee6f7.js';
6
- import { Button } from '../Button/index.js';
6
+ import { B as Button, P as PopConfirm } from '../_verture/index-cd9ede02.js';
7
7
  import { Checkbox } from '../Checkbox/index.js';
8
8
  import { TextField } from '../TextField/index.js';
9
- import { PopConfirm } from '../PopConfirm/index.js';
10
9
  import Empty from '../Empty/index.js';
11
10
  import AutoTips from '../AutoTips/index.js';
12
11
  import Plus from '@para-ui/icons/Plus';
@@ -31,19 +30,19 @@ import '../_verture/index-bde7aabe.js';
31
30
  import 'rc-dropdown';
32
31
  import '../_verture/usePopupContainer-635f66f4.js';
33
32
  import 'dayjs';
34
- import '../_verture/index-ca413216.js';
33
+ import '@para-ui/icons/CheckCircleF';
34
+ import '@para-ui/icons/WarningCircle';
35
+ import '@para-ui/icons/CloseCircleF';
36
+ import '@para-ui/icons/WarningCircleF';
35
37
  import '../Label/index.js';
36
38
  import '../Help/index.js';
37
39
  import '@para-ui/icons/Help';
38
40
  import '@para-ui/icons/PreviewClose';
39
41
  import '@para-ui/icons/PreviewOpen';
40
- import '@para-ui/icons/CloseCircleF';
41
42
  import '../Loading/index.js';
42
43
  import '../HelperText/index.js';
43
44
  import '../_verture/useGlobalProps-4ae1a007.js';
44
- import '@para-ui/icons/CheckCircleF';
45
- import '@para-ui/icons/WarningCircle';
46
- import '@para-ui/icons/WarningCircleF';
45
+ import '../_verture/index-ca413216.js';
47
46
 
48
47
  var en = {
49
48
  back: 'Back',
package/README.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 🎉 para-ui/core@4.0.56 发布
2
+
3
+ 🎁【Feature】
4
+ - 【SplitButton-分体式按钮】支持自定义前置按钮
5
+ - 【FieldForm-表单】新增是否隐藏帮助信息、item之间是否有间距参数;修复组件size参数覆盖问题
6
+ - 【AutoButton-自动按钮】调整外部尺寸发生变化,重新计算
7
+
8
+ ## 🎉 para-ui/core@4.0.55 发布
9
+
10
+ 🎁【Feature】
11
+ - 【AutoButton-超出自适应按钮】修改超出自适应按钮支持PopConfirm
12
+ - 【Button-按钮】参数支持disabledTooltip
13
+ - 【SplitButton-分体式按钮】option支持气泡确认框
14
+
1
15
  ## 🎉 para-ui/core@4.0.54 发布
2
16
 
3
17
  🎁【Feature】
package/Selector/index.js CHANGED
@@ -1176,7 +1176,7 @@ const Selector = props => {
1176
1176
  reqId: Math.random().toString(),
1177
1177
  /** 请求数据 */
1178
1178
  reqParams: {
1179
- size: 10,
1179
+ size: size,
1180
1180
  pagination: false,
1181
1181
  isLazy: false
1182
1182
  },
@@ -1193,12 +1193,13 @@ const Selector = props => {
1193
1193
  /** 搜索配置 */
1194
1194
  searchConfig: {
1195
1195
  page: 1,
1196
- size: 10,
1196
+ size: size,
1197
1197
  reqId: Math.random().toString(),
1198
1198
  /** 当前页数据源 本地数据为当前页所有的数据,请求数据为当前展示的数据 */
1199
1199
  currentSourceData: []
1200
1200
  }
1201
1201
  }); // 常量
1202
+ constData.current.searchConfig.size = size;
1202
1203
  constData.current.reqParams.size = size;
1203
1204
  constData.current.reqParams.pagination = pagination;
1204
1205
  constData.current.reqParams.isLazy = isLazy;
package/Stepper/index.js CHANGED
@@ -24,7 +24,7 @@ import '@para-ui/icons/Forbid';
24
24
  import '@paraview/lib';
25
25
 
26
26
  //默认图标
27
- const Icons = {
27
+ var Icons = {
28
28
  1: jsx(One, {
29
29
  size: "medium"
30
30
  }),