@para-ui/core 4.0.0-rc.4 → 4.0.0-rc.6
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 +72 -85
- package/AutoTips/index.js +72 -95
- package/Badge/index.js +17 -16
- package/Breadcrumbs/index.js +57 -73
- package/Button/index.js +90 -118
- package/ButtonGroup/index.js +30 -33
- package/Carousel/index.js +29 -33
- package/Cascader/index.js +9 -10
- package/Checkbox/index.js +28 -35
- package/CheckboxGroup/index.js +43 -58
- package/Collapse/index.js +52 -49
- package/CollapseBox/index.js +65 -70
- package/CollapseLayout/index.js +106 -101
- package/ColorPicker/index.js +3 -3
- package/ComboSelect/index.js +260 -337
- package/ComboSelect/lang/en_US.d.ts +1 -0
- package/ComboSelect/lang/index.d.ts +2 -0
- package/ComboSelect/lang/zh_CN.d.ts +1 -0
- package/ComboSelect/utils.d.ts +6 -0
- package/Container/index.js +17 -21
- package/CopyText/index.js +50 -83
- package/DatePicker/index.js +24 -27
- package/Descriptions/index.js +50 -59
- package/Desktop/index.js +161 -180
- package/DragVerify/index.js +77 -113
- package/Drawer/index.js +80 -95
- package/Dropdown/index.js +3 -3
- package/DynamicMultiBox/index.js +222 -224
- package/DynamicMultiBox/interface.d.ts +7 -0
- package/Empty/index.js +26 -28
- package/Form/index.js +70 -74
- package/FormItem/index.js +18 -15
- package/FunctionModal/index.js +7 -14
- package/GlobalContext/index.js +17 -20
- package/Help/index.js +9 -12
- package/HelperText/index.js +11 -11
- package/InputLang/index.js +104 -124
- package/InputNumber/index.js +62 -81
- package/Label/index.js +19 -21
- package/Loading/index.js +11 -10
- package/Menu/index.js +302 -371
- package/Message/index.js +104 -113
- package/Modal/index.js +122 -148
- package/MultiBox/index.d.ts +5 -0
- package/MultiBox/index.js +111 -115
- package/Notification/index.js +105 -103
- package/OperateBtn/index.d.ts +3 -0
- package/OperateBtn/index.js +77 -107
- package/PageHeader/index.js +327 -406
- package/Pagination/index.js +107 -137
- package/ParauiProvider/index.js +20 -22
- package/PasswordRules/index.js +36 -40
- package/PopConfirm/index.js +60 -77
- package/Popover/index.js +12 -12
- package/Progress/index.js +72 -74
- package/Querying/index.js +22 -23
- package/README.md +2 -0
- package/Radio/index.js +27 -34
- package/RadioGroup/index.js +38 -52
- package/Search/index.js +34 -43
- package/Select/index.js +281 -345
- package/SelectInput/index.js +8 -13
- package/Selector/index.js +582 -796
- package/SelectorPicker/index.js +113 -134
- package/SingleBox/index.d.ts +5 -0
- package/SingleBox/index.js +92 -88
- package/Slider/index.js +46 -57
- package/Status/index.js +14 -13
- package/Stepper/index.js +24 -25
- package/Styles/theme.scss +9 -9
- package/Switch/index.js +32 -35
- package/Table/index.js +360 -494
- package/Tabs/index.js +100 -100
- package/Tag/index.js +64 -82
- package/TextEditor/index.js +78 -100
- package/TextField/index.js +142 -183
- package/TimePicker/index.js +29 -28
- package/Timeline/index.js +50 -47
- package/Title/index.js +32 -34
- package/ToggleButton/index.js +29 -29
- package/Tooltip/index.js +52 -56
- package/Transfer/index.js +117 -154
- package/Tree/index.js +9 -10
- package/Upload/index.js +125 -143
- package/Upload/interface.d.ts +2 -0
- package/_verture/{constant-0d9802f7.js → constant-5317fc89.js} +2 -2
- package/_verture/{index-5a7e2438.js → index-3cdaba96.js} +967 -934
- package/_verture/{index-b1f80962.js → index-4fafd0a0.js} +6 -8
- package/_verture/{index-024bbc9b.js → index-775ad32d.js} +29 -25
- package/_verture/{index-05f7bf11.js → index-c568f272.js} +2 -2
- package/_verture/{index-232d890b.js → index-d63bd287.js} +1 -1
- package/_verture/index-da9097d3.js +239 -0
- package/_verture/{index-9331b116.js → index-e0f9064d.js} +125 -134
- package/_verture/intl-f2f27722.js +69 -0
- package/_verture/{modalContext-736ff215.js → modalContext-8534f23d.js} +36 -64
- package/_verture/{slicedToArray-a8206399.js → slicedToArray-75fa4188.js} +15 -2
- package/_verture/{toConsumableArray-8f4c9589.js → toConsumableArray-c7a8028f.js} +1 -1
- package/_verture/{useFormatMessage-703f8b20.js → useFormatMessage-eb13cf56.js} +5 -4
- package/_verture/{useGlobalProps-1b846a65.js → useGlobalProps-1e416658.js} +4 -3
- package/_verture/{usePopupContainer-87febeb9.js → usePopupContainer-635f66f4.js} +16 -15
- package/_verture/{util-7e1fb1e2.js → util-82646c4f.js} +5 -4
- package/_verture/utils-c17b5265.js +97 -0
- package/index.js +24 -23
- package/locale/en-US.d.ts +1 -0
- package/locale/index.d.ts +2 -0
- package/locale/index.js +10 -8
- package/locale/zh-CN.d.ts +1 -0
- package/package.json +11 -10
- package/umd/AutoBox.js +9 -8
- package/umd/AutoTips.js +9 -8
- package/umd/Badge.js +1 -1
- package/umd/Breadcrumbs.js +9 -8
- package/umd/Button.js +9 -8
- package/umd/ButtonGroup.js +9 -8
- package/umd/Carousel.js +5 -5
- package/umd/Cascader.js +9 -8
- package/umd/Checkbox.js +9 -8
- package/umd/CheckboxGroup.js +9 -8
- package/umd/Collapse.js +8 -7
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ColorPicker.js +1 -1
- package/umd/ComboSelect.js +9 -8
- package/umd/Container.js +1 -1
- package/umd/CopyText.js +9 -8
- package/umd/DatePicker.js +9 -8
- package/umd/Descriptions.js +9 -8
- package/umd/Desktop.js +9 -8
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +9 -8
- package/umd/Dropdown.js +6 -5
- package/umd/DynamicMultiBox.js +11 -10
- package/umd/Empty.js +1 -1
- package/umd/Form.js +9 -8
- package/umd/FormItem.js +9 -8
- package/umd/FunctionModal.js +9 -8
- package/umd/GlobalContext.js +1 -1
- package/umd/Help.js +9 -8
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +9 -8
- package/umd/InputNumber.js +9 -8
- package/umd/Label.js +9 -8
- package/umd/Loading.js +4 -4
- package/umd/Menu.js +4 -4
- package/umd/Message.js +4 -4
- package/umd/Modal.js +9 -8
- package/umd/MultiBox.js +9 -8
- package/umd/Notification.js +8 -7
- package/umd/OperateBtn.js +9 -8
- package/umd/PageHeader.js +9 -8
- package/umd/Pagination.js +9 -8
- package/umd/ParauiProvider.js +1 -1
- package/umd/PasswordRules.js +4 -4
- package/umd/PopConfirm.js +9 -8
- package/umd/Popover.js +9 -8
- package/umd/Progress.js +5 -5
- package/umd/Querying.js +1 -1
- package/umd/Radio.js +9 -8
- package/umd/RadioGroup.js +9 -8
- package/umd/Search.js +9 -8
- package/umd/Select.js +9 -8
- package/umd/SelectInput.js +9 -8
- package/umd/Selector.js +9 -8
- package/umd/SelectorPicker.js +9 -8
- package/umd/SingleBox.js +9 -8
- package/umd/Slider.js +6 -5
- package/umd/Status.js +4 -4
- package/umd/Stepper.js +9 -8
- package/umd/Switch.js +9 -8
- package/umd/Table.js +9 -8
- package/umd/Tabs.js +9 -8
- package/umd/Tag.js +9 -8
- package/umd/TextEditor.js +22 -21
- package/umd/TextField.js +9 -8
- package/umd/TimePicker.js +9 -8
- package/umd/Timeline.js +1 -1
- package/umd/Title.js +9 -8
- package/umd/ToggleButton.js +9 -8
- package/umd/Tooltip.js +9 -8
- package/umd/Transfer.js +10 -9
- package/umd/Tree.js +9 -8
- package/umd/Upload.js +10 -9
- package/umd/locale.js +1 -1
- package/_verture/index-e9007d6a.js +0 -236
- package/_verture/intl-5c1ec055.js +0 -81
- package/_verture/unsupportedIterableToArray-cb478f24.js +0 -16
- package/_verture/utils-418da0a4.js +0 -73
- /package/_verture/{typeof-c310ee4a.js → typeof-b240b062.js} +0 -0
package/SingleBox/index.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { _ as _typeof } from '../_verture/typeof-adeedc13.js';
|
|
2
|
-
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-8f4c9589.js';
|
|
3
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
4
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
5
2
|
import { useState, useEffect } from 'react';
|
|
6
3
|
import { TextField } from '../TextField/index.js';
|
|
@@ -8,28 +5,27 @@ import Label from '../Label/index.js';
|
|
|
8
5
|
import HelperText from '../HelperText/index.js';
|
|
9
6
|
import PlusCircleF from '@para-ui/icons/PlusCircleF';
|
|
10
7
|
import Delete from '@para-ui/icons/Delete';
|
|
11
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
12
|
-
import { u as useFormatMessage } from '../_verture/useFormatMessage-
|
|
8
|
+
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
9
|
+
import { u as useFormatMessage } from '../_verture/useFormatMessage-eb13cf56.js';
|
|
10
|
+
import { Tooltip } from '../Tooltip/index.js';
|
|
13
11
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
14
|
-
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
15
12
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
16
13
|
import '@paraview/lib';
|
|
17
14
|
import '@para-ui/icons/PreviewClose';
|
|
18
15
|
import '@para-ui/icons/PreviewOpen';
|
|
19
16
|
import '@para-ui/icons/CloseCircleF';
|
|
20
17
|
import '../AutoTips/index.js';
|
|
21
|
-
import '../Tooltip/index.js';
|
|
22
18
|
import 'rc-tooltip';
|
|
23
19
|
import 'rc-tooltip/lib/placements';
|
|
24
20
|
import 'clsx';
|
|
25
21
|
import '@para-ui/icons/Forbid';
|
|
26
22
|
import '../Loading/index.js';
|
|
27
23
|
import '@para-ui/icons/LoadingF';
|
|
28
|
-
import '../_verture/useGlobalProps-
|
|
24
|
+
import '../_verture/useGlobalProps-1e416658.js';
|
|
29
25
|
import '@para-ui/core/GlobalContext';
|
|
30
|
-
import '../_verture/index-
|
|
26
|
+
import '../_verture/index-da9097d3.js';
|
|
31
27
|
import 'rc-dropdown';
|
|
32
|
-
import '../_verture/usePopupContainer-
|
|
28
|
+
import '../_verture/usePopupContainer-635f66f4.js';
|
|
33
29
|
import 'dayjs';
|
|
34
30
|
import '../Help/index.js';
|
|
35
31
|
import '@para-ui/icons/Help';
|
|
@@ -43,56 +39,50 @@ var zh = {
|
|
|
43
39
|
};
|
|
44
40
|
|
|
45
41
|
var localeJson = {
|
|
46
|
-
zh
|
|
47
|
-
en
|
|
42
|
+
zh,
|
|
43
|
+
en
|
|
48
44
|
};
|
|
49
45
|
|
|
50
46
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-single-box {\n display: inline-block;\n width: 100%;\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}\n.paraui-v4-single-box > .single-box-content {\n line-height: 0;\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item {\n display: flex;\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item .content-box {\n flex: 1;\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item .content-box .single-box-text-field .paraui-v4-helper-text {\n min-height: 10px;\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item > .opera-box {\n display: flex;\n align-items: center;\n margin-left: 10px;\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item > .opera-box > .del-box {\n cursor: pointer;\n border-radius: 4px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item > .opera-box > .del-box:hover {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item > .opera-box > .del-box:hover svg {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-single-box > .single-box-content > .single-box-content-item > .opera-box > .del-box svg {\n font-size: 20px;\n color: rgb(92, 101, 115);\n}\n.paraui-v4-single-box > .single-box-add {\n text-align: center;\n border: 1px dashed;\n border-color: rgb(212, 218, 227);\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n cursor: pointer;\n background-color: rgb(247, 248, 250);\n color: rgb(46, 101, 230);\n font-size: 14px;\n}\n.paraui-v4-single-box > .single-box-add > svg {\n font-size: 16px;\n color: rgb(46, 101, 230);\n margin-right: 4px;\n}\n.paraui-v4-single-box > .single-box-add:hover {\n border-color: rgb(87, 131, 235);\n background-color: rgb(240, 245, 255);\n}\n.paraui-v4-single-box.paraui-v4-single-box-disabled > .single-box-content > .single-box-content-item > .opera-box > .del-box {\n cursor: not-allowed;\n}\n.paraui-v4-single-box.paraui-v4-single-box-disabled > .single-box-content > .single-box-content-item > .opera-box > .del-box:hover {\n background-color: transparent;\n}\n.paraui-v4-single-box.paraui-v4-single-box-disabled > .single-box-content > .single-box-content-item > .opera-box > .del-box:hover svg {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-single-box.paraui-v4-single-box-disabled > .single-box-content > .single-box-content-item > .opera-box > .del-box svg {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-single-box.paraui-v4-single-box-disabled > .single-box-add {\n border-color: rgb(212, 218, 227);\n cursor: not-allowed;\n background-color: rgb(247, 248, 250);\n color: rgb(161, 168, 179);\n}\n.paraui-v4-single-box.paraui-v4-single-box-disabled > .single-box-add > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-single-box.paraui-v4-single-box-disabled > .single-box-add:hover {\n border-color: rgb(212, 218, 227);\n color: rgb(161, 168, 179);\n}\n.paraui-v4-single-box.paraui-v4-single-box-small > .single-box-content > .single-box-content-item > .opera-box {\n height: 28px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-small > .single-box-content > .single-box-content-item > .opera-box > .del-box {\n width: 28px;\n height: 28px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-small > .single-box-add {\n height: 28px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-medium > .single-box-content > .single-box-content-item > .opera-box {\n height: 32px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-medium > .single-box-content > .single-box-content-item > .opera-box > .del-box {\n width: 32px;\n height: 32px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-medium > .single-box-add {\n height: 32px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-large > .single-box-content > .single-box-content-item > .opera-box {\n height: 32px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-large > .single-box-content > .single-box-content-item > .opera-box > .del-box {\n width: 32px;\n height: 32px;\n}\n.paraui-v4-single-box.paraui-v4-single-box-large > .single-box-add {\n height: 32px;\n}";
|
|
51
47
|
styleInject(css_248z);
|
|
52
48
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
size =
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
var _useState = useState([]),
|
|
79
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
80
|
-
valueCom = _useState2[0],
|
|
81
|
-
setValueCom = _useState2[1];
|
|
82
|
-
useEffect(function () {
|
|
83
|
-
if (props.defaultValue !== undefined) setValueCom(_toConsumableArray(props.defaultValue));
|
|
49
|
+
const SingleBox = props => {
|
|
50
|
+
const {
|
|
51
|
+
className,
|
|
52
|
+
style,
|
|
53
|
+
size = 'large',
|
|
54
|
+
placeholder = '',
|
|
55
|
+
label = '',
|
|
56
|
+
labelTooltip,
|
|
57
|
+
labelSign,
|
|
58
|
+
disabled = false,
|
|
59
|
+
disabledTooltip,
|
|
60
|
+
required = false,
|
|
61
|
+
hideErrorDom,
|
|
62
|
+
helperText = '',
|
|
63
|
+
value,
|
|
64
|
+
onChange,
|
|
65
|
+
fetchSuggestions,
|
|
66
|
+
otherProps
|
|
67
|
+
} = props;
|
|
68
|
+
const isError = helperText && typeof helperText === 'string' ? true : false;
|
|
69
|
+
const isErrorArr = helperText instanceof Array;
|
|
70
|
+
const intl = useFormatMessage('SingleBox', localeJson);
|
|
71
|
+
const [valueCom, setValueCom] = useState([]);
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
if (props.defaultValue !== undefined) setValueCom([...props.defaultValue]);
|
|
84
74
|
}, []);
|
|
85
|
-
useEffect(
|
|
86
|
-
if (value !== undefined) setValueCom(
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
if (value !== undefined) setValueCom([...value]);
|
|
87
77
|
}, [value]);
|
|
88
78
|
/** 处理错误 */
|
|
89
|
-
|
|
90
|
-
|
|
79
|
+
const handError = index => {
|
|
80
|
+
let obj = {
|
|
91
81
|
error: false,
|
|
92
82
|
helperText: ''
|
|
93
83
|
};
|
|
94
84
|
if (isErrorArr) {
|
|
95
|
-
|
|
85
|
+
const errorItem = helperText[index];
|
|
96
86
|
if (errorItem) {
|
|
97
87
|
obj = {
|
|
98
88
|
error: true,
|
|
@@ -103,50 +93,44 @@ var SingleBox = function SingleBox(props) {
|
|
|
103
93
|
return obj;
|
|
104
94
|
};
|
|
105
95
|
/** 增加 */
|
|
106
|
-
|
|
96
|
+
const add = () => {
|
|
107
97
|
if (disabled) return;
|
|
108
98
|
valueCom.push('');
|
|
109
|
-
if (props.value === undefined) setValueCom(
|
|
99
|
+
if (props.value === undefined) setValueCom([...valueCom]);
|
|
110
100
|
onChange && onChange(valueCom);
|
|
111
101
|
};
|
|
112
102
|
/** 删除 */
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
onChange && onChange(valueCom);
|
|
119
|
-
};
|
|
103
|
+
const del = index => () => {
|
|
104
|
+
if (disabled) return;
|
|
105
|
+
valueCom.splice(index, 1);
|
|
106
|
+
if (props.value === undefined) setValueCom([...valueCom]);
|
|
107
|
+
onChange && onChange(valueCom);
|
|
120
108
|
};
|
|
121
109
|
/**
|
|
122
110
|
* 改变输入框
|
|
123
111
|
* @param index
|
|
124
112
|
*/
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
onChange && onChange(valueCom);
|
|
130
|
-
};
|
|
113
|
+
const changeInput = index => event => {
|
|
114
|
+
valueCom[index] = event.target.value;
|
|
115
|
+
if (props.value === undefined) setValueCom([...valueCom]);
|
|
116
|
+
onChange && onChange(valueCom);
|
|
131
117
|
};
|
|
132
118
|
/** 选择值*/
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
onChange && onChange(valueCom);
|
|
141
|
-
};
|
|
119
|
+
const selectValue = index => item => {
|
|
120
|
+
valueCom[index] = item;
|
|
121
|
+
if (typeof item === 'object' && item !== null) {
|
|
122
|
+
valueCom[index] = item.value;
|
|
123
|
+
}
|
|
124
|
+
if (props.value === undefined) setValueCom([...valueCom]);
|
|
125
|
+
onChange && onChange(valueCom);
|
|
142
126
|
};
|
|
143
127
|
/**
|
|
144
128
|
* 处理label
|
|
145
129
|
* */
|
|
146
|
-
|
|
130
|
+
const handLabel = () => {
|
|
147
131
|
if (!label && !labelSign) return null;
|
|
148
|
-
|
|
149
|
-
|
|
132
|
+
const handLabelClass = () => {
|
|
133
|
+
let str = 'single-box-label';
|
|
150
134
|
if (labelTooltip && labelTooltip.className) {
|
|
151
135
|
str += " ".concat(labelTooltip.className);
|
|
152
136
|
}
|
|
@@ -161,13 +145,42 @@ var SingleBox = function SingleBox(props) {
|
|
|
161
145
|
}));
|
|
162
146
|
};
|
|
163
147
|
/** 处理class */
|
|
164
|
-
|
|
165
|
-
|
|
148
|
+
const handClass = () => {
|
|
149
|
+
let str = "".concat($prefixCls, "-single-box");
|
|
166
150
|
if (className) str += " ".concat(className);
|
|
167
151
|
if (size) str += " ".concat($prefixCls, "-single-box-").concat(size);
|
|
168
152
|
if (disabled) str += " ".concat($prefixCls, "-single-box-disabled");
|
|
169
153
|
return str;
|
|
170
154
|
};
|
|
155
|
+
/**
|
|
156
|
+
* 处理添加按钮
|
|
157
|
+
* */
|
|
158
|
+
const handleAddBtn = () => {
|
|
159
|
+
return jsxs("div", Object.assign({
|
|
160
|
+
className: "single-box-add",
|
|
161
|
+
onClick: add
|
|
162
|
+
}, {
|
|
163
|
+
children: [jsx(PlusCircleF, {}), jsx("span", {
|
|
164
|
+
children: intl({
|
|
165
|
+
id: 'add'
|
|
166
|
+
})
|
|
167
|
+
})]
|
|
168
|
+
}));
|
|
169
|
+
};
|
|
170
|
+
/**
|
|
171
|
+
* 处理添加按钮是否带提示
|
|
172
|
+
* */
|
|
173
|
+
const handleAddBtnTooltip = () => {
|
|
174
|
+
if (disabledTooltip) {
|
|
175
|
+
return jsx(Tooltip, Object.assign({
|
|
176
|
+
disabled: true,
|
|
177
|
+
placement: disabledTooltip.placement || 'top'
|
|
178
|
+
}, disabledTooltip, {
|
|
179
|
+
children: handleAddBtn()
|
|
180
|
+
}));
|
|
181
|
+
}
|
|
182
|
+
return handleAddBtn();
|
|
183
|
+
};
|
|
171
184
|
return jsxs("div", Object.assign({
|
|
172
185
|
className: handClass(),
|
|
173
186
|
style: style
|
|
@@ -175,7 +188,7 @@ var SingleBox = function SingleBox(props) {
|
|
|
175
188
|
children: [handLabel(), jsx("div", Object.assign({
|
|
176
189
|
className: "single-box-content"
|
|
177
190
|
}, {
|
|
178
|
-
children: valueCom.map(
|
|
191
|
+
children: valueCom.map((item, index) => {
|
|
179
192
|
return jsxs("div", Object.assign({
|
|
180
193
|
className: "single-box-content-item"
|
|
181
194
|
}, {
|
|
@@ -205,16 +218,7 @@ var SingleBox = function SingleBox(props) {
|
|
|
205
218
|
}))]
|
|
206
219
|
}), index);
|
|
207
220
|
})
|
|
208
|
-
})),
|
|
209
|
-
className: "single-box-add",
|
|
210
|
-
onClick: add
|
|
211
|
-
}, {
|
|
212
|
-
children: [jsx(PlusCircleF, {}), jsx("span", {
|
|
213
|
-
children: intl({
|
|
214
|
-
id: 'add'
|
|
215
|
-
})
|
|
216
|
-
})]
|
|
217
|
-
})), jsx(HelperText, {
|
|
221
|
+
})), handleAddBtnTooltip(), jsx(HelperText, {
|
|
218
222
|
className: "single-box-error",
|
|
219
223
|
error: isError,
|
|
220
224
|
helperText: isError ? helperText : undefined,
|
package/Slider/index.js
CHANGED
|
@@ -1,42 +1,37 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../_verture/defineProperty-1d116156.js';
|
|
2
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
3
|
-
import { _ as _typeof } from '../_verture/typeof-adeedc13.js';
|
|
4
1
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
5
2
|
import { jsx } from 'react/jsx-runtime';
|
|
6
3
|
import React__default from 'react';
|
|
7
4
|
import RcSlider, { Range, SliderTooltip, Handle } from 'rc-slider';
|
|
8
5
|
import clsx from 'clsx';
|
|
9
|
-
import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-
|
|
6
|
+
import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-5317fc89.js';
|
|
10
7
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
11
|
-
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
12
8
|
|
|
13
9
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/4 下午2:58\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-slider {\n position: relative;\n height: 2px;\n padding: 0;\n width: 100%;\n border-radius: 4px;\n touch-action: none;\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.paraui-v4-slider .component-slider-rail {\n position: absolute;\n width: 100%;\n background-color: rgb(234, 236, 241);\n height: 2px;\n border-radius: 4px;\n}\n.paraui-v4-slider .component-slider-track {\n position: absolute;\n left: 0;\n height: 2px;\n border-radius: 4px;\n background-color: rgb(46, 101, 230);\n}\n.paraui-v4-slider .component-slider-handle {\n position: absolute;\n width: 12px;\n height: 12px;\n cursor: pointer;\n margin-top: -5px;\n border-radius: 50%;\n border: solid 2px rgb(46, 101, 230);\n background-color: rgb(255, 255, 255);\n touch-action: pan-x;\n}\n.paraui-v4-slider .component-slider-handle-dragging {\n border-color: rgb(46, 101, 230);\n box-shadow: 0 0 5px rgb(213, 224, 250);\n outline: 2px solid rgb(213, 224, 250);\n}\n.paraui-v4-slider .component-slider-handle:focus {\n outline: none;\n}\n.paraui-v4-slider .component-slider-handle-click-focused:focus {\n border-color: rgb(46, 101, 230);\n box-shadow: unset;\n}\n.paraui-v4-slider .component-slider-handle:hover {\n border-color: rgb(46, 101, 230);\n box-shadow: 0 0 5px rgb(213, 224, 250);\n outline: 2px solid rgb(213, 224, 250);\n}\n.paraui-v4-slider .component-slider-handle:active {\n border-color: rgb(46, 101, 230);\n box-shadow: 0 0 5px rgb(213, 224, 250);\n outline: 2px solid rgb(213, 224, 250);\n cursor: grabbing;\n}\n.paraui-v4-slider .component-slider-mark {\n position: absolute;\n top: 8px;\n left: 0;\n width: 100%;\n font-size: 12px;\n}\n.paraui-v4-slider .component-slider-mark-text {\n position: absolute;\n display: inline-block;\n vertical-align: middle;\n text-align: center;\n cursor: pointer;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-slider .component-slider-mark-text-active {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-slider .component-slider-step {\n position: absolute;\n width: 100%;\n height: 2px;\n background: transparent;\n}\n.paraui-v4-slider .component-slider-dot {\n position: absolute;\n bottom: -3px;\n margin-left: -4px;\n width: 8px;\n height: 8px;\n border: solid 2px rgb(234, 236, 241);\n background-color: rgb(255, 255, 255);\n cursor: pointer;\n border-radius: 50%;\n vertical-align: middle;\n}\n.paraui-v4-slider .component-slider-dot:hover {\n border-color: rgb(46, 101, 230);\n box-shadow: 0 0 4px rgb(213, 224, 250);\n outline: 2px solid rgb(213, 224, 250);\n}\n.paraui-v4-slider .component-slider-dot-active {\n border-color: rgb(46, 101, 230);\n}\n.paraui-v4-slider .component-slider-dot-reverse {\n margin-right: -4px;\n}\n.paraui-v4-slider.component-slider-disabled {\n background-color: rgb(234, 236, 241);\n}\n.paraui-v4-slider.component-slider-disabled .component-slider-handle {\n box-shadow: none !important;\n outline: none !important;\n}\n.paraui-v4-slider.component-slider-disabled .component-slider-track {\n background-color: rgb(161, 168, 179);\n}\n.paraui-v4-slider.component-slider-disabled .component-slider-handle, .paraui-v4-slider.component-slider-disabled .component-slider-dot {\n border-color: rgb(161, 168, 179);\n box-shadow: none;\n background-color: rgb(255, 255, 255);\n cursor: not-allowed;\n}\n.paraui-v4-slider.component-slider-disabled .component-slider-mark-text, .paraui-v4-slider.component-slider-disabled .component-slider-dot {\n cursor: not-allowed !important;\n}\n.paraui-v4-slider.component-slider-vertical {\n width: 14px;\n height: 100%;\n padding: 0 5px;\n}\n.paraui-v4-slider.component-slider-vertical .component-slider-rail {\n height: 100%;\n width: 4px;\n}\n.paraui-v4-slider.component-slider-vertical .component-slider-track {\n left: 5px;\n bottom: 0;\n width: 4px;\n}\n.paraui-v4-slider.component-slider-vertical .component-slider-handle {\n margin-left: -4px;\n touch-action: pan-y;\n}\n.paraui-v4-slider.component-slider-vertical .component-slider-mark {\n top: 0;\n left: 18px;\n height: 100%;\n}\n.paraui-v4-slider.component-slider-vertical .component-slider-step {\n height: 100%;\n width: 4px;\n}\n.paraui-v4-slider.component-slider-vertical .component-slider-dot {\n left: 0px;\n margin-bottom: -4px;\n}\n.paraui-v4-slider.component-slider-vertical .component-slider-dot:first-child {\n margin-bottom: -4px;\n margin-left: -2px;\n}\n.paraui-v4-slider.component-slider-vertical .component-slider-dot:last-child {\n margin-bottom: -4px;\n margin-left: -2px;\n}\n\n.component-slider {\n /*&-tooltip-arrow {\n display: none;\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n }\n\n &-tooltip-placement-top &-tooltip-arrow {\n bottom: 4px;\n left: 50%;\n margin-left: -4px;\n border-width: 4px 4px 0;\n border-top-color: #6c6c6c;\n }*/\n}\n.component-slider-tooltip {\n position: absolute;\n display: block;\n left: -9999px;\n top: -9999px;\n max-width: 250px;\n z-index: 1500;\n visibility: visible;\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.component-slider-tooltip-hidden {\n display: none;\n}\n.component-slider-tooltip-inner {\n min-width: 24px;\n font-size: 14px;\n line-height: 1;\n color: rgb(92, 101, 115);\n text-align: center;\n text-decoration: none;\n background-color: transparent;\n border-radius: 6px;\n white-space: nowrap;\n box-shadow: none;\n}\n.component-slider-tooltip-placement-top {\n top: -18px !important;\n}\n.component-slider-tooltip-zoom-down-enter, .component-slider-tooltip-zoom-down-appear {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n display: block !important;\n animation-play-state: paused;\n}\n.component-slider-tooltip-zoom-down-leave {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n display: block !important;\n animation-play-state: paused;\n}\n.component-slider-tooltip-zoom-down-enter.component-slider-tooltip-zoom-down-enter-active, .component-slider-tooltip-zoom-down-appear.component-slider-tooltip-zoom-down-appear-active {\n animation-name: sliderTooltipZoomDownIn;\n animation-play-state: running;\n}\n.component-slider-tooltip-zoom-down-leave.component-slider-tooltip-zoom-down-leave-active {\n animation-name: sliderTooltipZoomDownOut;\n animation-play-state: running;\n}\n.component-slider-tooltip-zoom-down-enter, .component-slider-tooltip-zoom-down-appear {\n transform: scale(0, 0);\n animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);\n}\n.component-slider-tooltip-zoom-down-leave {\n animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n}\n@keyframes sliderTooltipZoomDownIn {\n 0% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n 100% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n}\n@keyframes sliderTooltipZoomDownOut {\n 0% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n 100% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n}";
|
|
14
10
|
styleInject(css_248z);
|
|
15
11
|
|
|
16
12
|
//slider 滑块
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
const Slider = props => {
|
|
14
|
+
const {
|
|
15
|
+
range,
|
|
16
|
+
step,
|
|
17
|
+
className
|
|
18
|
+
} = props,
|
|
21
19
|
restProps = __rest(props, ["range", "step", "className"]);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
if (
|
|
20
|
+
const prefixCls = "".concat($rcPrefixCls, "-slider");
|
|
21
|
+
const tooltipPrefixCls = "".concat($rcPrefixCls, "-slider-tooltip");
|
|
22
|
+
let draggableTrack;
|
|
23
|
+
if (typeof range === 'object') {
|
|
26
24
|
draggableTrack = range.draggableTrack;
|
|
27
25
|
}
|
|
28
|
-
|
|
29
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
30
|
-
visibles = _React$useState2[0],
|
|
31
|
-
setVisibles = _React$useState2[1]; //是否显示
|
|
26
|
+
const [visibles, setVisibles] = React__default.useState({}); //是否显示
|
|
32
27
|
//切换tooltip 是否显示
|
|
33
|
-
|
|
34
|
-
setVisibles(
|
|
35
|
-
|
|
36
|
-
});
|
|
28
|
+
const toggleTooltipVisible = (index, visible) => {
|
|
29
|
+
setVisibles(prev => Object.assign(Object.assign({}, prev), {
|
|
30
|
+
[index]: visible
|
|
31
|
+
}));
|
|
37
32
|
};
|
|
38
33
|
//获得tooltip 显示位置
|
|
39
|
-
|
|
34
|
+
const getTooltipPlacement = (tooltipPlacement, vertical) => {
|
|
40
35
|
if (tooltipPlacement) {
|
|
41
36
|
return tooltipPlacement;
|
|
42
37
|
}
|
|
@@ -46,28 +41,30 @@ var Slider = function Slider(props) {
|
|
|
46
41
|
return 'right';
|
|
47
42
|
};
|
|
48
43
|
//提示格式化
|
|
49
|
-
|
|
44
|
+
const tipFormatterFn = value => {
|
|
50
45
|
return typeof value === 'number' ? value.toString() : '';
|
|
51
46
|
};
|
|
52
47
|
//handle with tooltip
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
const handleWithTooltip = config => {
|
|
49
|
+
const {
|
|
50
|
+
tooltipPrefixCls
|
|
51
|
+
} = config,
|
|
55
52
|
_a = config.info,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
{
|
|
54
|
+
value,
|
|
55
|
+
index,
|
|
56
|
+
dragging
|
|
57
|
+
} = _a,
|
|
59
58
|
restProps = __rest(_a, ["value", "index", "dragging"]);
|
|
60
|
-
|
|
61
|
-
tipFormatter =
|
|
62
|
-
tooltipVisible
|
|
63
|
-
tooltipPlacement
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
var isTipFormatter = tipFormatter ? visibles[index] || dragging : false;
|
|
70
|
-
var visible = tooltipVisible || tooltipVisible === undefined && isTipFormatter;
|
|
59
|
+
const {
|
|
60
|
+
tipFormatter = tipFormatterFn,
|
|
61
|
+
tooltipVisible,
|
|
62
|
+
tooltipPlacement,
|
|
63
|
+
getTooltipPopupContainer = triggerNode => triggerNode,
|
|
64
|
+
vertical
|
|
65
|
+
} = props;
|
|
66
|
+
const isTipFormatter = tipFormatter ? visibles[index] || dragging : false;
|
|
67
|
+
const visible = tooltipVisible || tooltipVisible === undefined && isTipFormatter;
|
|
71
68
|
return jsx(SliderTooltip, Object.assign({
|
|
72
69
|
prefixCls: tooltipPrefixCls,
|
|
73
70
|
overlay: tipFormatter ? tipFormatter(value) : '',
|
|
@@ -78,12 +75,8 @@ var Slider = function Slider(props) {
|
|
|
78
75
|
}, {
|
|
79
76
|
children: jsx(Handle, Object.assign({}, restProps, {
|
|
80
77
|
value: value,
|
|
81
|
-
onMouseEnter:
|
|
82
|
-
|
|
83
|
-
},
|
|
84
|
-
onMouseLeave: function onMouseLeave() {
|
|
85
|
-
return toggleTooltipVisible(index, false);
|
|
86
|
-
}
|
|
78
|
+
onMouseEnter: () => toggleTooltipVisible(index, true),
|
|
79
|
+
onMouseLeave: () => toggleTooltipVisible(index, false)
|
|
87
80
|
}))
|
|
88
81
|
}), index);
|
|
89
82
|
};
|
|
@@ -94,24 +87,20 @@ var Slider = function Slider(props) {
|
|
|
94
87
|
step: step,
|
|
95
88
|
pushable: restProps.pushable,
|
|
96
89
|
draggableTrack: draggableTrack,
|
|
97
|
-
handle:
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
});
|
|
102
|
-
},
|
|
90
|
+
handle: info => handleWithTooltip({
|
|
91
|
+
tooltipPrefixCls,
|
|
92
|
+
info
|
|
93
|
+
}),
|
|
103
94
|
prefixCls: prefixCls
|
|
104
95
|
}));
|
|
105
96
|
}
|
|
106
97
|
return jsx(RcSlider, Object.assign({}, restProps, {
|
|
107
98
|
className: clsx("".concat($prefixCls, "-slider"), className),
|
|
108
99
|
step: step,
|
|
109
|
-
handle:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
});
|
|
114
|
-
},
|
|
100
|
+
handle: info => handleWithTooltip({
|
|
101
|
+
tooltipPrefixCls,
|
|
102
|
+
info
|
|
103
|
+
}),
|
|
115
104
|
prefixCls: prefixCls
|
|
116
105
|
}));
|
|
117
106
|
};
|
package/Status/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
3
|
+
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
4
4
|
import CloseCircleF from '@para-ui/icons/CloseCircleF';
|
|
5
|
-
import
|
|
5
|
+
import SuccessOutlined from '@para-ui/icons/CheckCircleF';
|
|
6
6
|
import { t as tinycolor } from '../_verture/tinycolor-ece3542d.js';
|
|
7
7
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
8
8
|
|
|
@@ -10,24 +10,25 @@ var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/11/8 6:32
|
|
|
10
10
|
styleInject(css_248z);
|
|
11
11
|
|
|
12
12
|
//状态
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
status =
|
|
17
|
-
icon
|
|
18
|
-
className
|
|
19
|
-
style
|
|
20
|
-
color
|
|
13
|
+
const Status = props => {
|
|
14
|
+
const {
|
|
15
|
+
text,
|
|
16
|
+
status = 'info',
|
|
17
|
+
icon,
|
|
18
|
+
className,
|
|
19
|
+
style,
|
|
20
|
+
color
|
|
21
|
+
} = props;
|
|
21
22
|
//cls
|
|
22
|
-
|
|
23
|
+
const makeCls = clsx("".concat($prefixCls, "-status"), className, status && !icon && "".concat($prefixCls, "-status-").concat(status));
|
|
23
24
|
// render Icon
|
|
24
|
-
|
|
25
|
+
const renderIcon = () => {
|
|
25
26
|
if (icon) {
|
|
26
27
|
if (typeof icon !== "string") return icon;
|
|
27
28
|
if (typeof icon === 'string') {
|
|
28
29
|
switch (icon) {
|
|
29
30
|
case 'success':
|
|
30
|
-
return jsx(
|
|
31
|
+
return jsx(SuccessOutlined, {
|
|
31
32
|
className: "status-icon-".concat(icon)
|
|
32
33
|
});
|
|
33
34
|
case 'error':
|
package/Stepper/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { _ as _typeof } from '../_verture/typeof-adeedc13.js';
|
|
2
1
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
3
2
|
import { jsx } from 'react/jsx-runtime';
|
|
4
3
|
import React__default from 'react';
|
|
@@ -13,13 +12,11 @@ import Seven from '@para-ui/icons/Seven';
|
|
|
13
12
|
import Eight from '@para-ui/icons/Eight';
|
|
14
13
|
import Nine from '@para-ui/icons/Nine';
|
|
15
14
|
import Check from '@para-ui/icons/Check';
|
|
16
|
-
import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-
|
|
15
|
+
import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-5317fc89.js';
|
|
17
16
|
import clsx from 'clsx';
|
|
18
17
|
import AutoTips from '../AutoTips/index.js';
|
|
19
18
|
import CloseIcon from '@para-ui/icons/Close';
|
|
20
19
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
21
|
-
import '../_verture/slicedToArray-a8206399.js';
|
|
22
|
-
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
23
20
|
import '../Tooltip/index.js';
|
|
24
21
|
import 'rc-tooltip';
|
|
25
22
|
import 'rc-tooltip/lib/placements';
|
|
@@ -64,45 +61,47 @@ var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/26 下
|
|
|
64
61
|
styleInject(css_248z);
|
|
65
62
|
|
|
66
63
|
//steps
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
64
|
+
const Stepper = props => {
|
|
65
|
+
const {
|
|
66
|
+
current = 0,
|
|
67
|
+
errorStep,
|
|
68
|
+
steps,
|
|
69
|
+
direction = 'horizontal',
|
|
70
|
+
children,
|
|
71
|
+
className
|
|
72
|
+
} = props,
|
|
76
73
|
restProps = __rest(props, ["current", "errorStep", "steps", "direction", "children", "className"]);
|
|
77
|
-
|
|
74
|
+
const prefixCls = "".concat($rcPrefixCls, "-stepper");
|
|
78
75
|
//内置finish、error 图标
|
|
79
|
-
|
|
76
|
+
const icons = {
|
|
80
77
|
finish: Icons['done'],
|
|
81
78
|
error: Icons['done']
|
|
82
79
|
};
|
|
83
80
|
//步骤图标渲染
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
const stepIconRender = _ref => {
|
|
82
|
+
let {
|
|
83
|
+
node,
|
|
84
|
+
status
|
|
85
|
+
} = _ref;
|
|
87
86
|
if (status === 'finish') {
|
|
88
87
|
return /*#__PURE__*/React__default.cloneElement(node, {}, Icons['done']);
|
|
89
88
|
}
|
|
90
89
|
return node;
|
|
91
90
|
};
|
|
92
91
|
//渲染Step
|
|
93
|
-
|
|
92
|
+
const renderStep = () => {
|
|
94
93
|
if (!(steps === null || steps === void 0 ? void 0 : steps.length)) return children;
|
|
95
|
-
return steps.map(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
94
|
+
return steps.map((item, index) => {
|
|
95
|
+
let label = '';
|
|
96
|
+
let description = '';
|
|
97
|
+
let icon = null;
|
|
98
|
+
const isErr = index === errorStep;
|
|
100
99
|
if (typeof item === 'string') {
|
|
101
100
|
label = item;
|
|
102
101
|
icon = isErr ? jsx(CloseIcon, {
|
|
103
102
|
size: "medium"
|
|
104
103
|
}) : Icons[index + 1];
|
|
105
|
-
} else if (
|
|
104
|
+
} else if (typeof item === 'object') {
|
|
106
105
|
label = item.label;
|
|
107
106
|
description = item.description;
|
|
108
107
|
icon = isErr ? jsx(CloseIcon, {
|
package/Styles/theme.scss
CHANGED
|
@@ -20,15 +20,6 @@ $normal: 400;
|
|
|
20
20
|
$weightMedium: 500;
|
|
21
21
|
$bold: 700;
|
|
22
22
|
|
|
23
|
-
// 阴影
|
|
24
|
-
$boxShadow: 0px 2px 8px 0px rgba(234, 236, 241, 1);
|
|
25
|
-
$boxShadowLeft: inset -10px 0 10px -8px rgba(234, 236, 241, 1); // 表格固定列
|
|
26
|
-
$boxShadowRight: inset 10px 0 10px -8px rgba(234, 236, 241, 1); // 表格固定列
|
|
27
|
-
$boxShadowD3: 0px 2px 8px 0px rgba(212, 218, 227, 0.4); // 表格固定列
|
|
28
|
-
$radius-sm: 2px;
|
|
29
|
-
$radius: 4px;
|
|
30
|
-
$radius-lg: 8px;
|
|
31
|
-
|
|
32
23
|
// 全局弹窗index,往body里面插入的,比如toolTip,popover这类
|
|
33
24
|
$ZIndexBody: 1500;
|
|
34
25
|
|
|
@@ -120,4 +111,13 @@ $NM6: rgba(90, 210, 0, 0.1);
|
|
|
120
111
|
$NL7: rgba(255, 111, 38, 1);
|
|
121
112
|
$NM7: rgba(255, 111, 38, 0.1);
|
|
122
113
|
|
|
114
|
+
// 阴影
|
|
115
|
+
$boxShadow: 1px 1px 10px 2px $ND3;
|
|
116
|
+
$boxShadowLeft: inset -10px 0 10px -8px $NA2; // 表格固定列
|
|
117
|
+
$boxShadowRight: inset 10px 0 10px -8px $NA2; // 表格固定列
|
|
118
|
+
$boxShadowD3: 0px 2px 8px 0px $ND3; // 表格固定列
|
|
119
|
+
$radius-sm: 2px;
|
|
120
|
+
$radius: 4px;
|
|
121
|
+
$radius-lg: 8px;
|
|
122
|
+
|
|
123
123
|
|