@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
@@ -1,5 +1,5 @@
1
- import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
2
- import { r as regenerator } from '../_verture/index-342379c6.js';
1
+ import { _ as _slicedToArray } from '../_verture/slicedToArray-77980792.js';
2
+ import { r as regenerator } from '../_verture/index-06fea29b.js';
3
3
  import { a as __awaiter } from '../_verture/tslib.es6-55ed4bd2.js';
4
4
  import { jsxs, jsx, Fragment as Fragment$1 } from 'react/jsx-runtime';
5
5
  import { useState, Fragment } from 'react';
@@ -7,7 +7,7 @@ import More from '@para-ui/icons/More';
7
7
  import { Button } from '../Button/index.js';
8
8
  import { Popover } from '../Popover/index.js';
9
9
  import AutoTips from '../AutoTips/index.js';
10
- import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
10
+ import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
11
11
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
12
12
  import '../_verture/typeof-498dd2b1.js';
13
13
  import 'clsx';
@@ -17,12 +17,12 @@ import '../Tooltip/index.js';
17
17
  import 'rc-tooltip';
18
18
  import 'rc-tooltip/lib/placements';
19
19
  import '@para-ui/icons/Down';
20
- import '../_verture/index-bbed73a3.js';
20
+ import '../_verture/index-be4faaee.js';
21
21
  import 'rc-dropdown';
22
- import '../_verture/usePopupContainer-b8ab7cab.js';
22
+ import '../_verture/usePopupContainer-87febeb9.js';
23
23
  import 'dayjs';
24
24
  import '@paraview/lib';
25
- import '../_verture/useFormatMessage-f4452258.js';
25
+ import '../_verture/useFormatMessage-703f8b20.js';
26
26
  import '@para-ui/core/GlobalContext';
27
27
 
28
28
  var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2022/4/13 10:48 AM\n* @description 表格操作按钮\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-operate-btn {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n display: flex;\n align-items: center;\n}\n.paraui-v3-operate-btn > .operate-btn-line {\n display: inline-block;\n width: 1px;\n background-color: rgba(54, 102, 214, 0.2);\n margin: 0 12px;\n}\n.paraui-v3-operate-btn.paraui-v3-operate-btn-small > .operate-btn-line {\n height: 12px;\n}\n.paraui-v3-operate-btn.paraui-v3-operate-btn-small button svg {\n font-size: 18px;\n}\n.paraui-v3-operate-btn.paraui-v3-operate-btn-medium > .operate-btn-line {\n height: 14px;\n}\n.paraui-v3-operate-btn.paraui-v3-operate-btn-medium button svg {\n font-size: 24px;\n}\n.paraui-v3-operate-btn.paraui-v3-operate-btn-large > .operate-btn-line {\n height: 16px;\n}\n.paraui-v3-operate-btn.paraui-v3-operate-btn-large button > svg {\n font-size: 28px;\n}\n\n.paraui-v3-operate-btn-popover .operate-btn-list {\n padding: 8px 0;\n}\n.paraui-v3-operate-btn-popover .operate-btn-list > .operate-btn-list-item {\n padding: 0 12px;\n max-width: 120px;\n cursor: pointer;\n color: rgb(46, 55, 67);\n line-height: 36px;\n text-align: left;\n}\n.paraui-v3-operate-btn-popover .operate-btn-list > .operate-btn-list-item:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-operate-btn-popover .operate-btn-list > .operate-btn-list-item-disabled {\n cursor: not-allowed;\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-operate-btn-popover .operate-btn-list > .operate-btn-list-item-danger {\n color: rgb(235, 96, 84);\n}";
@@ -30,36 +30,31 @@ styleInject(css_248z);
30
30
 
31
31
  var OperateBtn = function OperateBtn(props) {
32
32
  var _props$className = props.className,
33
- className = _props$className === void 0 ? '' : _props$className,
34
- style = props.style,
35
- _props$size = props.size,
36
- size = _props$size === void 0 ? 'small' : _props$size,
37
- list = props.list,
38
- _props$showNum = props.showNum,
39
- showNum = _props$showNum === void 0 ? 3 : _props$showNum,
40
- popoverClassName = props.popoverClassName,
41
- _props$placement = props.placement,
42
- placement = _props$placement === void 0 ? 'bottom-end' : _props$placement,
43
- _props$clickCloseMore = props.clickCloseMore,
44
- clickCloseMore = _props$clickCloseMore === void 0 ? true : _props$clickCloseMore,
45
- onClick = props.onClick,
46
- loadingMapping = props.loadingMapping,
47
- _props$key = props.key,
48
- key = _props$key === void 0 ? 'key' : _props$key;
49
-
33
+ className = _props$className === void 0 ? '' : _props$className,
34
+ style = props.style,
35
+ _props$size = props.size,
36
+ size = _props$size === void 0 ? 'small' : _props$size,
37
+ list = props.list,
38
+ _props$showNum = props.showNum,
39
+ showNum = _props$showNum === void 0 ? 3 : _props$showNum,
40
+ popoverClassName = props.popoverClassName,
41
+ _props$placement = props.placement,
42
+ placement = _props$placement === void 0 ? 'bottom-end' : _props$placement,
43
+ _props$clickCloseMore = props.clickCloseMore,
44
+ clickCloseMore = _props$clickCloseMore === void 0 ? true : _props$clickCloseMore,
45
+ onClick = props.onClick,
46
+ loadingMapping = props.loadingMapping,
47
+ _props$key = props.key,
48
+ key = _props$key === void 0 ? 'key' : _props$key;
50
49
  var _useState = useState(false),
51
- _useState2 = _slicedToArray(_useState, 2),
52
- openMoreCom = _useState2[0],
53
- setOpenMoreCom = _useState2[1]; // 显示更多
54
-
55
-
50
+ _useState2 = _slicedToArray(_useState, 2),
51
+ openMoreCom = _useState2[0],
52
+ setOpenMoreCom = _useState2[1]; // 显示更多
56
53
  var _useState3 = useState({}),
57
- _useState4 = _slicedToArray(_useState3, 2),
58
- loadingInside = _useState4[0],
59
- setLoadingInside = _useState4[1]; // 内部loading
54
+ _useState4 = _slicedToArray(_useState3, 2),
55
+ loadingInside = _useState4[0],
56
+ setLoadingInside = _useState4[1]; // 内部loading
60
57
  // 点击选项
61
-
62
-
63
58
  var clickItem = function clickItem(item, index) {
64
59
  return function (e) {
65
60
  return __awaiter(void 0, void 0, void 0, /*#__PURE__*/regenerator.mark(function _callee() {
@@ -72,51 +67,40 @@ var OperateBtn = function OperateBtn(props) {
72
67
  _context.next = 2;
73
68
  break;
74
69
  }
75
-
76
70
  return _context.abrupt("return");
77
-
78
71
  case 2:
79
72
  if (clickCloseMore) closeMore();
80
73
  handKey = item[key];
81
74
  loading = loadingMapping && loadingMapping[handKey]; // 不存在外部loading
82
-
83
75
  if (loading === undefined) {
84
76
  loadingInside[index] = true;
85
77
  setLoadingInside(Object.assign({}, loadingInside));
86
78
  }
87
-
88
79
  if (!item.onClick) {
89
80
  _context.next = 12;
90
81
  break;
91
82
  }
92
-
93
83
  _context.next = 9;
94
84
  return item.onClick(item, e);
95
-
96
85
  case 9:
97
86
  result = _context.sent;
98
87
  _context.next = 16;
99
88
  break;
100
-
101
89
  case 12:
102
90
  if (!onClick) {
103
91
  _context.next = 16;
104
92
  break;
105
93
  }
106
-
107
94
  _context.next = 15;
108
95
  return onClick(item, e);
109
-
110
96
  case 15:
111
97
  result = _context.sent;
112
-
113
98
  case 16:
114
99
  // 不存在外部loading
115
100
  if (loading === undefined) {
116
101
  loadingInside[index] = result;
117
102
  setLoadingInside(Object.assign({}, loadingInside));
118
103
  }
119
-
120
104
  case 17:
121
105
  case "end":
122
106
  return _context.stop();
@@ -125,42 +109,35 @@ var OperateBtn = function OperateBtn(props) {
125
109
  }, _callee);
126
110
  }));
127
111
  };
128
- }; // 点击更多
129
-
130
-
112
+ };
113
+ // 点击更多
131
114
  var clickMore = function clickMore() {
132
115
  setOpenMoreCom(true);
133
- }; // 关闭显示更多
134
-
135
-
116
+ };
117
+ // 关闭显示更多
136
118
  var closeMore = function closeMore(bol) {
137
119
  if (bol) return;
138
120
  setOpenMoreCom(false);
139
- }; // 处理loading
140
-
141
-
121
+ };
122
+ // 处理loading
142
123
  var handLoadStatus = function handLoadStatus(item, index) {
143
124
  var loading;
144
125
  var handKey = item[key];
145
- loading = loadingMapping && loadingMapping[handKey]; // 外部没有传laoding
146
-
126
+ loading = loadingMapping && loadingMapping[handKey];
127
+ // 外部没有传laoding
147
128
  if (loading === undefined) {
148
129
  loading = loadingInside[index];
149
130
  }
150
-
151
131
  return loading;
152
- }; // 处理handClassPopover
153
-
154
-
132
+ };
133
+ // 处理handClassPopover
155
134
  var handClassPopover = function handClassPopover() {
156
135
  var str = $prefixCls + '-operate-btn-popover';
157
136
  if (popoverClassName) str += ' ' + popoverClassName;
158
137
  return str;
159
138
  };
160
-
161
139
  var morePopoverContent = function morePopoverContent() {
162
140
  var arr = (list === null || list === void 0 ? void 0 : list.slice(showNum, list === null || list === void 0 ? void 0 : list.length)) || [];
163
-
164
141
  var handPopoverClass = function handPopoverClass(item) {
165
142
  var str = 'operate-btn-list-item';
166
143
  if (item.disabled) str += ' operate-btn-list-item-disabled';
@@ -168,7 +145,6 @@ var OperateBtn = function OperateBtn(props) {
168
145
  if (item.className) str += ' ' + className;
169
146
  return str;
170
147
  };
171
-
172
148
  return jsx("div", Object.assign({
173
149
  className: "operate-btn-list"
174
150
  }, {
@@ -184,9 +160,8 @@ var OperateBtn = function OperateBtn(props) {
184
160
  }), index);
185
161
  })
186
162
  }));
187
- }; // 更多按钮
188
-
189
-
163
+ };
164
+ // 更多按钮
190
165
  var moreRender = function moreRender() {
191
166
  return jsx(Fragment$1, {
192
167
  children: list && list.length > showNum + 1 && jsx(Popover, Object.assign({
@@ -211,21 +186,19 @@ var OperateBtn = function OperateBtn(props) {
211
186
  }))
212
187
  });
213
188
  };
214
-
215
189
  var handClass = function handClass() {
216
190
  var str = $prefixCls + '-operate-btn';
217
191
  if (className) str += ' ' + className;
218
192
  if (size) str += " ".concat($prefixCls, "-operate-btn-").concat(size);
219
193
  return str;
220
194
  };
221
-
222
195
  return jsxs("div", Object.assign({
223
196
  className: handClass(),
224
197
  style: style
225
198
  }, {
226
199
  children: [list === null || list === void 0 ? void 0 : list.map(function (item, index) {
227
- var bol = true; // 满足这个条件,有更多按钮
228
-
200
+ var bol = true;
201
+ // 满足这个条件,有更多按钮
229
202
  if (list.length > showNum + 1) {
230
203
  // 超出显示个数不显示
231
204
  if (showNum < index + 1) {
@@ -238,7 +211,6 @@ var OperateBtn = function OperateBtn(props) {
238
211
  bol = false;
239
212
  }
240
213
  }
241
-
242
214
  return jsxs(Fragment, {
243
215
  children: [jsx(Button.IconButton, Object.assign({
244
216
  className: item.className,