@para-ui/core 3.0.1 → 3.0.3
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 +180 -68
- package/AutoBox/protal.d.ts +17 -0
- package/AutoTips/index.js +4 -3
- package/Breadcrumbs/index.js +10 -7
- package/Button/index.js +15 -14
- package/ButtonGroup/index.js +3 -2
- package/Carousel/index.js +7 -5
- package/Cascader/index.d.ts +3 -1
- package/Cascader/index.js +13 -5
- package/Checkbox/index.js +27 -8
- package/CheckboxGroup/index.d.ts +2 -5
- package/CheckboxGroup/index.js +13 -10
- package/Collapse/index.js +11 -10
- package/CollapseBox/index.js +7 -6
- package/ComboSelect/index.js +161 -67
- package/ComboSelect/interface.d.ts +10 -9
- package/Container/index.js +24 -23
- package/DatePicker/index.js +12 -17
- package/DatePicker/util.d.ts +0 -1
- package/Desktop/index.js +6 -5
- package/Drawer/index.js +10 -9
- package/Dropdown/index.js +59 -6
- package/Empty/index.js +7 -6
- package/Form/index.js +6 -5
- package/FormItem/compoments/formFile/index.d.ts +16 -16
- package/FormItem/index.d.ts +19 -19
- package/FormItem/index.js +3 -2
- package/FunctionModal/index.js +3 -2
- package/GlobalContext/constant.d.ts +8 -0
- package/Help/index.js +3 -2
- package/HelperText/index.d.ts +9 -5
- package/HelperText/index.js +9 -4
- package/InputLang/index.d.ts +2 -5
- package/InputLang/index.js +13 -7
- package/InputNumber/index.d.ts +2 -5
- package/InputNumber/index.js +15 -12
- package/Label/index.d.ts +2 -0
- package/Label/index.js +12 -8
- package/Loading/index.js +5 -4
- package/Menu/index.js +18 -17
- package/Message/index.js +5 -4
- package/Modal/index.js +28 -26
- package/MultiBox/index.d.ts +2 -5
- package/MultiBox/index.js +13 -6
- package/Notification/index.js +3 -2
- package/OperateBtn/index.js +15 -12
- package/PageHeader/index.js +18 -18
- package/Pagination/index.js +10 -4
- package/ParauiProvider/index.js +1 -1
- package/PopConfirm/index.js +3 -2
- package/Popover/index.js +7 -4
- package/Progress/index.d.ts +2 -0
- package/Progress/index.js +13 -9
- package/Querying/index.js +6 -5
- package/README.md +30 -0
- package/Radio/index.js +22 -8
- package/RadioGroup/index.d.ts +2 -5
- package/RadioGroup/index.js +10 -7
- package/Search/index.js +13 -8
- package/Select/index.d.ts +2 -5
- package/Select/index.js +23 -20
- package/SelectInput/index.js +3 -2
- package/Selector/index.js +189 -81
- package/Selector/interface.d.ts +17 -7
- package/Selector/lang/en_US.d.ts +1 -0
- package/Selector/lang/zh_CN.d.ts +1 -0
- package/SelectorPicker/index.d.ts +2 -5
- package/SelectorPicker/index.js +20 -17
- package/SingleBox/index.d.ts +2 -5
- package/SingleBox/index.js +11 -6
- package/Slider/index.d.ts +4 -4
- package/Slider/index.js +9 -4
- package/Split/index.js +8 -7
- package/Stepper/index.js +7 -3
- package/Switch/index.js +10 -12
- package/Table/index.js +528 -300
- package/Table/interface.d.ts +45 -1
- package/Table/tableElement/index.d.ts +2 -2
- package/Table/util.d.ts +13 -1
- package/Tabs/index.js +7 -6
- package/Tag/index.js +12 -14
- package/TextField/index.d.ts +2 -5
- package/TextField/index.js +20 -18
- package/TimePicker/index.js +1 -0
- package/Timeline/index.js +13 -12
- package/Title/index.d.ts +30 -0
- package/Title/index.js +49 -0
- package/ToggleButton/index.js +13 -13
- package/Tooltip/index.js +59 -12
- package/Tooltip/interface.d.ts +2 -0
- package/Transfer/index.d.ts +6 -2
- package/Transfer/index.js +74 -37
- package/Transfer/lang/en_US.d.ts +2 -0
- package/Transfer/lang/zh_CN.d.ts +2 -0
- package/Tree/index.js +3 -2
- package/Tree/utils/tools.d.ts +0 -1
- package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
- package/Upload/ImgCrop/constants.d.ts +1 -1
- package/Upload/ImgCrop/interface.d.ts +5 -0
- package/Upload/index.js +56 -45
- package/_verture/constant-bf34e6fa.js +11 -0
- package/_verture/{index-abfdd262.js → index-3136f653.js} +63 -31
- package/_verture/{index-5bb4b5d7.js → index-77832168.js} +30 -17
- package/_verture/{modalContext-59669f93.js → modalContext-f1a611ab.js} +0 -0
- package/index.d.ts +2 -0
- package/index.js +7 -5
- package/package.json +2 -1
package/Transfer/index.js
CHANGED
|
@@ -2,12 +2,16 @@ import { _ as _toConsumableArray } from '../_verture/toConsumableArray-f8047a75.
|
|
|
2
2
|
import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { useState, useCallback, useEffect } from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
5
6
|
import { Checkbox } from '../Checkbox/index.js';
|
|
6
7
|
import { Search } from '../Search/index.js';
|
|
8
|
+
import AutoTips from '../AutoTips/index.js';
|
|
9
|
+
import { Button } from '../Button/index.js';
|
|
7
10
|
import SearchIcon from '@para-ui/icons/Search';
|
|
8
11
|
import NavigateBefore from '@para-ui/icons/Left';
|
|
9
12
|
import Right from '@para-ui/icons/Right';
|
|
10
13
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-ac9d6acf.js';
|
|
14
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
11
15
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
12
16
|
import '../Label/index.js';
|
|
13
17
|
import '../Help/index.js';
|
|
@@ -15,7 +19,6 @@ import '../_verture/tslib.es6-55ed4bd2.js';
|
|
|
15
19
|
import '../Tooltip/index.js';
|
|
16
20
|
import 'rc-tooltip';
|
|
17
21
|
import 'rc-tooltip/lib/placements';
|
|
18
|
-
import 'clsx';
|
|
19
22
|
import '@para-ui/icons/Help';
|
|
20
23
|
import '../TextField/index.js';
|
|
21
24
|
import '../_verture/typeof-498dd2b1.js';
|
|
@@ -23,7 +26,6 @@ import '@paraview/lib';
|
|
|
23
26
|
import '@para-ui/icons/PreviewClose';
|
|
24
27
|
import '@para-ui/icons/PreviewOpen';
|
|
25
28
|
import '@para-ui/icons/CloseCircle';
|
|
26
|
-
import '../AutoTips/index.js';
|
|
27
29
|
import '../Loading/index.js';
|
|
28
30
|
import '@para-ui/icons/LoadingF';
|
|
29
31
|
import '../HelperText/index.js';
|
|
@@ -31,20 +33,23 @@ import '../_verture/useGlobalProps-af9a2af6.js';
|
|
|
31
33
|
import '@para-ui/core/GlobalContext';
|
|
32
34
|
import '../Dropdown/index.js';
|
|
33
35
|
import 'rc-dropdown';
|
|
34
|
-
import '../Button/index.js';
|
|
35
36
|
import '@para-ui/icons/Forbid';
|
|
36
37
|
import '@para-ui/icons/Down';
|
|
37
38
|
|
|
38
39
|
var en = {
|
|
39
40
|
left: 'Left',
|
|
40
41
|
right: 'Right',
|
|
41
|
-
searchPlaceholder: 'Please enter the search content'
|
|
42
|
+
searchPlaceholder: 'Please enter the search content',
|
|
43
|
+
leftBtnTips: 'Please check the content on the right first',
|
|
44
|
+
rightBtnTips: 'Please check the content on the left first'
|
|
42
45
|
};
|
|
43
46
|
|
|
44
47
|
var zh = {
|
|
45
48
|
left: '左侧',
|
|
46
49
|
right: '右侧',
|
|
47
|
-
searchPlaceholder: '请输入搜索内容'
|
|
50
|
+
searchPlaceholder: '请输入搜索内容',
|
|
51
|
+
leftBtnTips: '请先勾选右侧内容',
|
|
52
|
+
rightBtnTips: '请先勾选左侧内容'
|
|
48
53
|
};
|
|
49
54
|
|
|
50
55
|
var localeJson = {
|
|
@@ -52,7 +57,7 @@ var localeJson = {
|
|
|
52
57
|
en: en
|
|
53
58
|
};
|
|
54
59
|
|
|
55
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.transfer {\n display: flex;\n font-size: 14px;\n}\n.transfer .box {\n width: 289px;\n border-radius: 4px;\n border: 1px solid rgba(171, 176, 185, 0.368627451);\n overflow: hidden;\n}\n.transfer .box .box-header {\n background: rgba(171, 176, 185, 0.2745098039);\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-left: 10px;\n height: 44px;\n}\n.transfer .box .box-header .count {\n margin: 0 10px 0 0;\n color: #999;\n letter-spacing: 1px;\n}\n.transfer .box .context {\n height: 400px;\n overflow: auto;\n scrollbar-base-color: red;\n}\n.transfer .box .text-field-content {\n border: none;\n border-radius: 0;\n border-bottom: 1px solid #ddd;\n}\n.transfer ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background: #3666D6;\n}\n.transfer .moveBtn {\n display: flex;\n height: 414px;\n flex-direction: column;\n justify-content: center;\n}\n.transfer .moveBtn .btn {\n
|
|
60
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-transfer {\n display: flex;\n font-size: 14px;\n}\n.paraui-v3-transfer .box {\n width: 289px;\n border-radius: 4px;\n border: 1px solid rgba(171, 176, 185, 0.368627451);\n overflow: hidden;\n}\n.paraui-v3-transfer .box .box-header {\n background: rgba(171, 176, 185, 0.2745098039);\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-left: 10px;\n height: 44px;\n}\n.paraui-v3-transfer .box .box-header .count {\n margin: 0 10px 0 0;\n color: #999;\n letter-spacing: 1px;\n}\n.paraui-v3-transfer .box .context {\n height: 400px;\n overflow: auto;\n scrollbar-base-color: red;\n}\n.paraui-v3-transfer .box .text-field-content {\n border: none;\n border-radius: 0;\n border-bottom: 1px solid #ddd;\n}\n.paraui-v3-transfer ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background: #3666D6;\n}\n.paraui-v3-transfer .moveBtn {\n display: flex;\n height: 414px;\n flex-direction: column;\n justify-content: center;\n margin: 0 24px;\n}\n.paraui-v3-transfer .moveBtn .btn-left {\n margin-top: 20px;\n}\n.paraui-v3-transfer .context .item {\n padding: 0px 12px;\n height: 36px;\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n.paraui-v3-transfer .context .item > .item-label {\n margin-left: 8px;\n flex: 1;\n overflow: hidden;\n color: rgb(46, 55, 67);\n}\n.paraui-v3-transfer .context .item:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-transfer .context .item:hover > .item-label {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-transfer .context .item.item-disabled:hover {\n background: inherit;\n}\n.paraui-v3-transfer .context .item.item-disabled > .item-label {\n color: rgba(46, 55, 67, 0.4);\n}";
|
|
56
61
|
styleInject(css_248z);
|
|
57
62
|
|
|
58
63
|
var Transfer = function Transfer(_ref) {
|
|
@@ -61,7 +66,9 @@ var Transfer = function Transfer(_ref) {
|
|
|
61
66
|
_ref$value = _ref.value,
|
|
62
67
|
value = _ref$value === void 0 ? [] : _ref$value,
|
|
63
68
|
onChange = _ref.onChange,
|
|
64
|
-
titles = _ref.titles
|
|
69
|
+
titles = _ref.titles,
|
|
70
|
+
className = _ref.className,
|
|
71
|
+
style = _ref.style;
|
|
65
72
|
var intl = useFormatMessage('Transfer', localeJson);
|
|
66
73
|
|
|
67
74
|
var _useState = useState(data),
|
|
@@ -106,10 +113,10 @@ var Transfer = function Transfer(_ref) {
|
|
|
106
113
|
|
|
107
114
|
var onchange = useCallback(function (e, bol, index, direction) {
|
|
108
115
|
if (direction === 'left') {
|
|
109
|
-
leftData[index].checked =
|
|
116
|
+
leftData[index].checked = bol;
|
|
110
117
|
setLeftData(_toConsumableArray(leftData));
|
|
111
118
|
} else {
|
|
112
|
-
rightData[index].checked =
|
|
119
|
+
rightData[index].checked = bol;
|
|
113
120
|
setRightData(_toConsumableArray(rightData));
|
|
114
121
|
}
|
|
115
122
|
}, [leftData, rightData]);
|
|
@@ -207,7 +214,8 @@ var Transfer = function Transfer(_ref) {
|
|
|
207
214
|
}
|
|
208
215
|
}, [leftData, rightData]);
|
|
209
216
|
return jsxs("div", Object.assign({
|
|
210
|
-
className: "transfer"
|
|
217
|
+
className: clsx("".concat($prefixCls, "-transfer"), className),
|
|
218
|
+
style: style
|
|
211
219
|
}, {
|
|
212
220
|
children: [jsxs("div", Object.assign({
|
|
213
221
|
className: "box"
|
|
@@ -243,44 +251,67 @@ var Transfer = function Transfer(_ref) {
|
|
|
243
251
|
var arr = (_a = e === null || e === void 0 ? void 0 : e.split('')) !== null && _a !== void 0 ? _a : [];
|
|
244
252
|
onSearch(arr, 'left');
|
|
245
253
|
},
|
|
246
|
-
// onEnter={onEnter}
|
|
247
254
|
allowClear: false
|
|
248
255
|
}), jsx("div", Object.assign({
|
|
249
256
|
className: "context"
|
|
250
257
|
}, {
|
|
251
258
|
children: leftData.map(function (item, index) {
|
|
252
|
-
return
|
|
253
|
-
className:
|
|
259
|
+
return jsxs("div", Object.assign({
|
|
260
|
+
className: clsx('item', item.disabled && 'item-disabled'),
|
|
261
|
+
onClick: function onClick(e) {
|
|
262
|
+
if (item.disabled) return;
|
|
263
|
+
onchange(e, !item.checked, index, 'left');
|
|
264
|
+
}
|
|
254
265
|
}, {
|
|
255
|
-
children: jsx(Checkbox, {
|
|
256
|
-
label: item.name,
|
|
266
|
+
children: [jsx(Checkbox, {
|
|
257
267
|
size: "medium",
|
|
258
268
|
checked: item.checked,
|
|
259
|
-
disabled: item.disabled
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
269
|
+
disabled: item.disabled
|
|
270
|
+
}), jsx("div", Object.assign({
|
|
271
|
+
className: "item-label"
|
|
272
|
+
}, {
|
|
273
|
+
children: jsx(AutoTips, {
|
|
274
|
+
children: item.name
|
|
275
|
+
})
|
|
276
|
+
}))]
|
|
264
277
|
}), item.name);
|
|
265
278
|
})
|
|
266
279
|
}))]
|
|
267
280
|
})), jsxs("div", Object.assign({
|
|
268
281
|
className: "moveBtn"
|
|
269
282
|
}, {
|
|
270
|
-
children: [jsx(
|
|
271
|
-
className:
|
|
283
|
+
children: [jsx(Button.IconButton, Object.assign({
|
|
284
|
+
className: 'btn btn-right',
|
|
285
|
+
variant: 'outlined',
|
|
286
|
+
disabled: actionRightStyle !== 'on',
|
|
287
|
+
toolTipTitle: actionRightStyle !== 'on' ? intl({
|
|
288
|
+
id: 'rightBtnTips'
|
|
289
|
+
}) : '',
|
|
290
|
+
TooltipProps: {
|
|
291
|
+
arrow: false,
|
|
292
|
+
placement: 'bottomRight'
|
|
293
|
+
},
|
|
272
294
|
onClick: function onClick() {
|
|
273
|
-
onMove(
|
|
295
|
+
onMove("right");
|
|
274
296
|
}
|
|
275
297
|
}, {
|
|
276
|
-
children: jsx(
|
|
277
|
-
})), jsx(
|
|
278
|
-
className:
|
|
298
|
+
children: jsx(Right, {})
|
|
299
|
+
})), jsx(Button.IconButton, Object.assign({
|
|
300
|
+
className: 'btn btn-left',
|
|
301
|
+
variant: 'outlined',
|
|
302
|
+
disabled: actionLeftStyle !== 'on',
|
|
303
|
+
toolTipTitle: actionLeftStyle !== 'on' ? intl({
|
|
304
|
+
id: 'leftBtnTips'
|
|
305
|
+
}) : '',
|
|
306
|
+
TooltipProps: {
|
|
307
|
+
arrow: false,
|
|
308
|
+
placement: 'bottomRight'
|
|
309
|
+
},
|
|
279
310
|
onClick: function onClick() {
|
|
280
|
-
onMove(
|
|
311
|
+
onMove('left');
|
|
281
312
|
}
|
|
282
313
|
}, {
|
|
283
|
-
children: jsx(
|
|
314
|
+
children: jsx(NavigateBefore, {})
|
|
284
315
|
}))]
|
|
285
316
|
})), jsxs("div", Object.assign({
|
|
286
317
|
className: "box"
|
|
@@ -321,18 +352,24 @@ var Transfer = function Transfer(_ref) {
|
|
|
321
352
|
className: "context"
|
|
322
353
|
}, {
|
|
323
354
|
children: rightData.map(function (item, index) {
|
|
324
|
-
return
|
|
325
|
-
className:
|
|
355
|
+
return jsxs("div", Object.assign({
|
|
356
|
+
className: clsx('item', item.disabled && 'item-disabled'),
|
|
357
|
+
onClick: function onClick(e) {
|
|
358
|
+
if (item.disabled) return;
|
|
359
|
+
onchange(e, !item.checked, index, 'right');
|
|
360
|
+
}
|
|
326
361
|
}, {
|
|
327
|
-
children: jsx(Checkbox, {
|
|
328
|
-
label: item.name,
|
|
362
|
+
children: [jsx(Checkbox, {
|
|
329
363
|
size: "medium",
|
|
330
364
|
checked: item.checked,
|
|
331
|
-
disabled: item.disabled
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
365
|
+
disabled: item.disabled
|
|
366
|
+
}), jsx("div", Object.assign({
|
|
367
|
+
className: "item-label"
|
|
368
|
+
}, {
|
|
369
|
+
children: jsx(AutoTips, {
|
|
370
|
+
children: item.name
|
|
371
|
+
})
|
|
372
|
+
}))]
|
|
336
373
|
}), item.name);
|
|
337
374
|
})
|
|
338
375
|
}))]
|
package/Transfer/lang/en_US.d.ts
CHANGED
package/Transfer/lang/zh_CN.d.ts
CHANGED
package/Tree/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Tree } from '../_verture/index-
|
|
2
|
-
export { T as default } from '../_verture/index-
|
|
1
|
+
import { T as Tree } from '../_verture/index-77832168.js';
|
|
2
|
+
export { T as default } from '../_verture/index-77832168.js';
|
|
3
3
|
import '../_verture/toConsumableArray-f8047a75.js';
|
|
4
4
|
import '../_verture/slicedToArray-d7722f4b.js';
|
|
5
5
|
import '../_verture/defineProperty-0590dc61.js';
|
|
@@ -19,6 +19,7 @@ import '../Help/index.js';
|
|
|
19
19
|
import '../Tooltip/index.js';
|
|
20
20
|
import 'rc-tooltip';
|
|
21
21
|
import 'rc-tooltip/lib/placements';
|
|
22
|
+
import '../_verture/constant-bf34e6fa.js';
|
|
22
23
|
import '../_verture/style-inject.es-300983ab.js';
|
|
23
24
|
import '@para-ui/icons/Help';
|
|
24
25
|
import 'react-dom';
|
package/Tree/utils/tools.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ interface RFiled {
|
|
|
3
3
|
key: string;
|
|
4
4
|
parentId: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const getPrefixCls: (suffixCls?: string, customizePrefixCls?: string) => string;
|
|
7
6
|
export declare const debounce: (func: Function, wait?: number, options?: any) => {
|
|
8
7
|
(...args: any): any;
|
|
9
8
|
cancel: () => void;
|
|
@@ -9,7 +9,7 @@ export declare type EasyCropHandle = {
|
|
|
9
9
|
setRotateVal: Dispatch<SetStateAction<number>>;
|
|
10
10
|
cropPixelsRef: MutableRefObject<Area>;
|
|
11
11
|
};
|
|
12
|
-
interface EasyCropProps extends Required<Pick<ImgCropProps, 'aspect' | 'shape' | 'grid' | 'zoom' | 'rotate' | 'minZoom' | 'maxZoom' | 'cropperProps'>> {
|
|
12
|
+
interface EasyCropProps extends Required<Pick<ImgCropProps, 'aspect' | 'shape' | 'grid' | 'zoom' | 'rotate' | 'minZoom' | 'maxZoom' | 'cropperProps' | 'fixedCropSize'>> {
|
|
13
13
|
cropperRef: ForwardedRef<Cropper>;
|
|
14
14
|
image: string;
|
|
15
15
|
}
|