@para-ui/core 4.0.0-rc → 4.0.0-rc.2
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.d.ts +1 -1
- package/AutoBox/index.js +12 -12
- package/AutoTips/autoTipsMultiline/index.d.ts +1 -1
- package/AutoTips/index.d.ts +2 -2
- package/AutoTips/index.js +15 -21
- package/Badge/index.d.ts +23 -0
- package/Badge/index.js +54 -0
- package/Breadcrumbs/index.js +8 -8
- package/Button/SplitButton.d.ts +1 -1
- package/Button/index.d.ts +1 -1
- package/Button/index.js +8 -38
- package/Carousel/index.d.ts +6 -6
- package/Carousel/index.js +5 -5
- package/Cascader/Cascader.d.ts +10 -10
- package/Cascader/OptionList/Column.d.ts +3 -3
- package/Cascader/OptionList/index.d.ts +2 -2
- package/Cascader/index.d.ts +1 -1
- package/Cascader/index.js +4 -2
- package/Cascader/lang/en_US.d.ts +5 -0
- package/Cascader/lang/index.d.ts +11 -0
- package/Cascader/lang/zh_CN.d.ts +5 -0
- package/Cascader/utils/treeUtil.d.ts +1 -1
- package/Checkbox/index.d.ts +1 -1
- package/Checkbox/index.js +5 -5
- package/CheckboxGroup/index.d.ts +2 -2
- package/CheckboxGroup/index.js +4 -4
- package/Collapse/index.js +5 -5
- package/CollapseBox/index.js +12 -20
- package/CollapseLayout/index.js +21 -21
- package/ColorPicker/index.js +2 -2
- package/ComboSelect/index.js +43 -52
- package/ComboSelect/interface.d.ts +3 -3
- package/Container/index.d.ts +3 -3
- package/Container/index.js +56 -56
- package/CopyText/index.d.ts +2 -2
- package/CopyText/index.js +3 -3
- package/DatePicker/generatePicker/index.d.ts +22 -22
- package/DatePicker/index.js +10 -9
- package/DatePicker/util.d.ts +1 -1
- package/Descriptions/index.d.ts +38 -0
- package/Descriptions/index.js +23 -0
- package/Desktop/index.d.ts +1 -1
- package/Desktop/index.js +18 -13
- package/DragVerify/index.d.ts +1 -1
- package/DragVerify/index.js +13 -13
- package/Drawer/index.js +40 -38
- package/Drawer/interface.d.ts +4 -6
- package/Dropdown/index.d.ts +1 -1
- package/DynamicMultiBox/formItem.d.ts +1 -1
- package/DynamicMultiBox/index.d.ts +1 -1
- package/DynamicMultiBox/index.js +38 -35
- package/DynamicMultiBox/interface.d.ts +8 -8
- package/DynamicMultiBox/rowForm.d.ts +3 -1
- package/Empty/index.d.ts +1 -1
- package/Empty/index.js +3 -3
- package/Form/index.d.ts +12 -13
- package/Form/index.js +10 -8
- package/FormItem/compoments/defaultCompoments/index.d.ts +4 -4
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +1 -1
- package/FormItem/compoments/formFile/index.d.ts +2 -2
- package/FormItem/compoments/formRadioGroup/index.d.ts +1 -1
- package/FormItem/compoments/formSelect/index.d.ts +7 -7
- package/FormItem/errorTips.d.ts +3 -3
- package/FormItem/index.d.ts +5 -5
- package/FormItem/index.js +3 -2
- package/FormItem/lang/en_US.d.ts +10 -0
- package/FormItem/lang/index.d.ts +21 -0
- package/FormItem/lang/zh_CN.d.ts +10 -0
- package/FormItem/validateFunction.d.ts +1 -1
- package/FunctionModal/dialog.d.ts +26 -26
- package/FunctionModal/index.d.ts +6 -6
- package/FunctionModal/index.js +9 -10
- package/FunctionModal/modalContext.d.ts +3 -3
- package/GlobalContext/componentsProps.d.ts +7 -7
- package/GlobalContext/confirmLocale.d.ts +1 -2
- package/GlobalContext/index.d.ts +2 -2
- package/GlobalContext/index.js +3 -2
- package/GlobalContext/useFormatMessage.d.ts +1 -1
- package/Help/index.js +2 -2
- package/HelperText/index.js +1 -1
- package/InputLang/index.d.ts +2 -2
- package/InputLang/index.js +8 -8
- package/InputNumber/index.d.ts +4 -2
- package/InputNumber/index.js +27 -15
- package/Label/index.js +2 -2
- package/Loading/index.js +1 -1
- package/Menu/index.js +17 -17
- package/Menu/interface.d.ts +1 -1
- package/Message/index.js +13 -13
- package/Modal/Confirm/index.d.ts +3 -3
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +20 -17
- package/Modal/lang/index.d.ts +8 -0
- package/MultiBox/index.d.ts +2 -2
- package/MultiBox/index.js +4 -4
- package/Notification/index.js +2 -2
- package/OperateBtn/index.d.ts +2 -2
- package/OperateBtn/index.js +49 -49
- package/PageHeader/index.js +45 -34
- package/PageHeader/interface.d.ts +1 -1
- package/Pagination/index.d.ts +1 -1
- package/Pagination/index.js +19 -19
- package/PasswordRules/index.js +8 -8
- package/PopConfirm/index.js +8 -7
- package/Progress/Line.d.ts +10 -10
- package/Progress/Steps.d.ts +2 -2
- package/Progress/index.d.ts +12 -12
- package/Progress/index.js +43 -42
- package/Progress/utils.d.ts +4 -4
- package/Querying/index.d.ts +1 -1
- package/Querying/index.js +3 -3
- package/README.md +7 -0
- package/Radio/index.d.ts +1 -1
- package/Radio/index.js +5 -5
- package/RadioGroup/index.d.ts +2 -2
- package/RadioGroup/index.js +4 -4
- package/Search/index.js +1 -1
- package/Select/index.d.ts +3 -3
- package/Select/index.js +43 -43
- package/SelectInput/index.js +2 -2
- package/Selector/index.js +26 -34
- package/Selector/interface.d.ts +6 -6
- package/SelectorPicker/index.d.ts +4 -4
- package/SelectorPicker/index.js +10 -10
- package/SingleBox/index.d.ts +2 -2
- package/SingleBox/index.js +4 -4
- package/Slider/index.js +1 -1
- package/Slider/interface.d.ts +1 -1
- package/Status/index.d.ts +4 -4
- package/Status/index.js +6 -7
- package/Stepper/index.d.ts +5 -5
- package/Stepper/index.js +23 -23
- package/Styles/theme.scss +1 -0
- package/Switch/index.d.ts +7 -7
- package/Switch/index.js +38 -21
- package/Switch/lang/en_US.d.ts +4 -0
- package/Switch/lang/index.d.ts +9 -0
- package/Switch/lang/zh_CN.d.ts +4 -0
- package/Table/index.js +35 -35
- package/Table/interface.d.ts +4 -4
- package/Table/tableBodyElement/index.d.ts +1 -1
- package/Table/tableBodyInterface.d.ts +2 -2
- package/Table/tableContainer/index.d.ts +1 -1
- package/Table/tableElement/index.d.ts +1 -1
- package/Table/tableHeadElement/index.d.ts +1 -1
- package/Table/tableHeadInterface.d.ts +1 -1
- package/Table/tablePaginationInterface.d.ts +6 -6
- package/Table/tdElement/index.d.ts +1 -1
- package/Table/thElement/index.d.ts +2 -2
- package/Table/trElement/index.d.ts +1 -1
- package/Table/util.d.ts +1 -1
- package/Tabs/index.d.ts +1 -1
- package/Tabs/index.js +27 -19
- package/Tag/TagGroup.d.ts +5 -5
- package/Tag/index.d.ts +7 -7
- package/Tag/index.js +25 -25
- package/TextEditor/index.d.ts +2 -2
- package/TextEditor/index.js +45 -27
- package/TextEditor/lang/en_US.d.ts +4 -0
- package/TextEditor/lang/index.d.ts +9 -0
- package/TextEditor/lang/zh_CN.d.ts +4 -0
- package/TextField/index.d.ts +1 -1
- package/TextField/index.js +19 -16
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +2 -2
- package/Timeline/TimelineItem.d.ts +1 -1
- package/Timeline/index.d.ts +5 -5
- package/Timeline/index.js +14 -14
- package/Title/index.d.ts +4 -4
- package/Title/index.js +3 -3
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButton/index.d.ts +5 -1
- package/ToggleButton/index.js +18 -11
- package/Transfer/box.d.ts +6 -6
- package/Transfer/index.js +22 -25
- package/Tree/OperateBar/index.d.ts +4 -4
- package/Tree/Tree.d.ts +2 -2
- package/Tree/index.js +2 -2
- package/Tree/interface.d.ts +4 -4
- package/Tree/utils/tools.d.ts +1 -1
- package/Upload/Dragger/index.d.ts +2 -2
- package/Upload/ErroTip/index.d.ts +1 -1
- package/Upload/index.d.ts +2 -2
- package/Upload/index.js +10 -11
- package/Upload/interface.d.ts +1 -1
- package/_verture/{index-8469865e.js → index-024bbc9b.js} +3 -3
- package/_verture/{index-19947788.js → index-05f7bf11.js} +3 -1
- package/_verture/{index-e1b800aa.js → index-50f56891.js} +49 -25
- package/_verture/{index-1c8d3e94.js → index-649b450f.js} +102 -48
- package/_verture/{index-47297a40.js → index-692e29c1.js} +53 -46
- package/_verture/{modalContext-670eab09.js → modalContext-11c51a45.js} +25 -25
- package/index.d.ts +4 -0
- package/index.js +14 -11
- package/locale/en-US.d.ts +19 -0
- package/locale/index.d.ts +38 -0
- package/locale/index.js +40 -2
- package/locale/zh-CN.d.ts +19 -0
- package/package.json +4 -2
- package/umd/AutoBox.js +1 -1
- package/umd/AutoTips.js +1 -1
- package/umd/Badge.js +1 -0
- package/umd/Breadcrumbs.js +1 -1
- package/umd/Button.js +2 -2
- package/umd/ButtonGroup.js +2 -2
- package/umd/Cascader.js +4 -4
- package/umd/Checkbox.js +2 -2
- package/umd/CheckboxGroup.js +2 -2
- package/umd/Collapse.js +5 -5
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ColorPicker.js +1 -1
- package/umd/ComboSelect.js +4 -4
- package/umd/CopyText.js +2 -2
- package/umd/DatePicker.js +2 -2
- package/umd/Descriptions.js +1 -0
- package/umd/Desktop.js +2 -2
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +2 -2
- package/umd/DynamicMultiBox.js +4 -4
- package/umd/Empty.js +1 -1
- package/umd/Form.js +4 -4
- package/umd/FormItem.js +4 -4
- package/umd/FunctionModal.js +4 -4
- package/umd/GlobalContext.js +1 -1
- package/umd/Help.js +2 -2
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +2 -2
- package/umd/InputNumber.js +4 -4
- package/umd/Label.js +2 -2
- package/umd/Loading.js +1 -1
- package/umd/Menu.js +3 -3
- package/umd/Message.js +2 -2
- package/umd/Modal.js +4 -4
- package/umd/MultiBox.js +7 -7
- package/umd/Notification.js +2 -2
- package/umd/OperateBtn.js +4 -4
- package/umd/PageHeader.js +4 -4
- package/umd/Pagination.js +2 -2
- package/umd/PasswordRules.js +4 -4
- package/umd/PopConfirm.js +2 -2
- package/umd/Progress.js +3 -3
- package/umd/Querying.js +1 -1
- package/umd/Radio.js +2 -2
- package/umd/RadioGroup.js +2 -2
- package/umd/Search.js +7 -7
- package/umd/Select.js +2 -2
- package/umd/SelectInput.js +2 -2
- package/umd/Selector.js +2 -2
- package/umd/SelectorPicker.js +2 -2
- package/umd/SingleBox.js +2 -2
- package/umd/Slider.js +1 -1
- package/umd/Status.js +2 -2
- package/umd/Stepper.js +1 -1
- package/umd/Switch.js +5 -5
- package/umd/Table.js +6 -6
- package/umd/Tabs.js +6 -6
- package/umd/Tag.js +1 -1
- package/umd/TextEditor.js +3 -3
- package/umd/TextField.js +7 -7
- package/umd/TimePicker.js +2 -2
- package/umd/Title.js +7 -7
- package/umd/ToggleButton.js +4 -4
- package/umd/Transfer.js +3 -3
- package/umd/Tree.js +2 -2
- package/umd/Upload.js +2 -2
- package/umd/locale.js +1 -1
package/PopConfirm/index.js
CHANGED
|
@@ -16,7 +16,6 @@ import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
|
16
16
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
17
17
|
import '../_verture/typeof-adeedc13.js';
|
|
18
18
|
import '@para-ui/icons/LoadingF';
|
|
19
|
-
import '@para-ui/icons/Forbid';
|
|
20
19
|
import '@para-ui/icons/Down';
|
|
21
20
|
import '../_verture/index-e9007d6a.js';
|
|
22
21
|
import 'rc-dropdown';
|
|
@@ -25,6 +24,7 @@ import '@paraview/lib';
|
|
|
25
24
|
import '../AutoTips/index.js';
|
|
26
25
|
import 'rc-tooltip';
|
|
27
26
|
import 'rc-tooltip/lib/placements';
|
|
27
|
+
import '@para-ui/icons/Forbid';
|
|
28
28
|
import '@para-ui/core/GlobalContext';
|
|
29
29
|
|
|
30
30
|
var en = {
|
|
@@ -34,7 +34,7 @@ var en = {
|
|
|
34
34
|
|
|
35
35
|
var zh = {
|
|
36
36
|
cancel: '取消',
|
|
37
|
-
ok: '
|
|
37
|
+
ok: '确认'
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
var localeJson = {
|
|
@@ -42,7 +42,7 @@ var localeJson = {
|
|
|
42
42
|
en: en
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
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: 0px 2px 8px 0px rgb(234, 236, 241);\n border-radius: 8px;\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:
|
|
45
|
+
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: 0px 2px 8px 0px rgb(234, 236, 241);\n border-radius: 8px;\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}";
|
|
46
46
|
styleInject(css_248z);
|
|
47
47
|
|
|
48
48
|
//图标
|
|
@@ -69,7 +69,7 @@ var PopConfirm = function PopConfirm(props) {
|
|
|
69
69
|
okButtonProps = props.okButtonProps,
|
|
70
70
|
cancelButtonProps = props.cancelButtonProps,
|
|
71
71
|
_props$placement = props.placement,
|
|
72
|
-
placement = _props$placement === void 0 ? '
|
|
72
|
+
placement = _props$placement === void 0 ? 'top-start' : _props$placement,
|
|
73
73
|
className = props.className,
|
|
74
74
|
overlayClassName = props.overlayClassName,
|
|
75
75
|
style = props.style,
|
|
@@ -92,6 +92,7 @@ var PopConfirm = function PopConfirm(props) {
|
|
|
92
92
|
customizeContainer = props.getPopupContainer,
|
|
93
93
|
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"]);
|
|
94
94
|
var intl = useFormatMessage('PopConfirm', localeJson);
|
|
95
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
95
96
|
var wrapRef = useRef();
|
|
96
97
|
var getPopupContainer = usePopupContainer(wrapRef, customizeContainer);
|
|
97
98
|
//打开
|
|
@@ -202,15 +203,15 @@ var PopConfirm = function PopConfirm(props) {
|
|
|
202
203
|
className: 'popconfirm-message-body'
|
|
203
204
|
}, {
|
|
204
205
|
children: [title && jsx("div", Object.assign({
|
|
205
|
-
className:
|
|
206
|
+
className: "popconfirm-message-title"
|
|
206
207
|
}, {
|
|
207
208
|
children: title
|
|
208
209
|
})), content && jsx("div", Object.assign({
|
|
209
|
-
className: 'popconfirm-message-content'
|
|
210
|
+
className: clsx('popconfirm-message-content', title ? '' : 'without-title')
|
|
210
211
|
}, {
|
|
211
212
|
children: content
|
|
212
213
|
})), description && jsx("div", Object.assign({
|
|
213
|
-
className: 'popconfirm-message-description'
|
|
214
|
+
className: clsx('popconfirm-message-description', title || content ? '' : 'without-title-or-content')
|
|
214
215
|
}, {
|
|
215
216
|
children: description
|
|
216
217
|
}))]
|
package/Progress/Line.d.ts
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* @date 2022/3/10 18:25
|
|
4
4
|
* @description 线性进度条
|
|
5
5
|
*/
|
|
6
|
-
import * as React from
|
|
7
|
-
import { ProgressProps, StringGradients, DirectionType } from
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { ProgressProps, StringGradients, DirectionType } from './index';
|
|
8
8
|
interface LineProps extends ProgressProps {
|
|
9
9
|
direction?: DirectionType;
|
|
10
10
|
children: React.ReactNode;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* 转换 百分比 到 样式格式
|
|
13
|
+
* 转换 百分比 到 样式格式
|
|
14
14
|
* {
|
|
15
15
|
* "0%": "#afc163",
|
|
16
16
|
* "75%": "#009900",
|
|
@@ -18,12 +18,12 @@ interface LineProps extends ProgressProps {
|
|
|
18
18
|
* "25%": "#66FF00",
|
|
19
19
|
* "100%": "#ffffff"
|
|
20
20
|
* }
|
|
21
|
-
* @param gradients 渐变的参数
|
|
22
|
-
* @return {string} 样式值
|
|
23
|
-
*/
|
|
21
|
+
* @param gradients 渐变的参数
|
|
22
|
+
* @return {string} 样式值
|
|
23
|
+
*/
|
|
24
24
|
export declare const sortGradient: (gradients: StringGradients) => string;
|
|
25
25
|
/**
|
|
26
|
-
* 转换传进来 渐变的参数 为css样式
|
|
26
|
+
* 转换传进来 渐变的参数 为css样式
|
|
27
27
|
* {
|
|
28
28
|
* "0%": "#afc163",
|
|
29
29
|
* "25%": "#66FF00",
|
|
@@ -37,9 +37,9 @@ export declare const sortGradient: (gradients: StringGradients) => string;
|
|
|
37
37
|
* "to": "#66FF00",// ====> linear-gradient(to right, #afc163, #66FF00)
|
|
38
38
|
* }
|
|
39
39
|
*
|
|
40
|
-
* @param {string} strokeColor 颜色值
|
|
41
|
-
* @return 返回 backgroundImage 的样式值
|
|
42
|
-
*/
|
|
40
|
+
* @param {string} strokeColor 颜色值
|
|
41
|
+
* @return 返回 backgroundImage 的样式值
|
|
42
|
+
*/
|
|
43
43
|
export declare const handleGradient: (strokeColor: any, directionConfig: DirectionType) => {
|
|
44
44
|
backgroundImage: string;
|
|
45
45
|
};
|
package/Progress/Steps.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @date 2022/3/10 18:25
|
|
4
4
|
* @description 进度条的步骤条
|
|
5
5
|
*/
|
|
6
|
-
import * as React from
|
|
7
|
-
import { ProgressProps } from
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { ProgressProps } from './index';
|
|
8
8
|
interface StepsProps extends ProgressProps {
|
|
9
9
|
/** 一共有多少步 **/
|
|
10
10
|
steps: number;
|
package/Progress/index.d.ts
CHANGED
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
* @date 2022/3/10 18:25
|
|
4
4
|
* @description 进度条
|
|
5
5
|
*/
|
|
6
|
-
import React, { FunctionComponent } from
|
|
7
|
-
import
|
|
6
|
+
import React, { FunctionComponent } from 'react';
|
|
7
|
+
import './index.scss';
|
|
8
8
|
/** 进度条类型 **/
|
|
9
9
|
declare enum ProgressTypes {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
'line' = 0,
|
|
11
|
+
'circle' = 1,
|
|
12
|
+
'dashboard' = 2
|
|
13
13
|
}
|
|
14
14
|
export type ProgressType = typeof ProgressTypes[number];
|
|
15
15
|
/** 进度条状态 **/
|
|
16
16
|
declare enum ProgressStatuses {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
'normal' = 0,
|
|
18
|
+
'exception' = 1,
|
|
19
|
+
'active' = 2,
|
|
20
|
+
'success' = 3
|
|
21
21
|
}
|
|
22
22
|
/** 渐变进度条入参格式 两种 **/
|
|
23
23
|
export type StringGradients = {
|
|
@@ -32,7 +32,7 @@ export type ProgressGradient = {
|
|
|
32
32
|
direction?: string;
|
|
33
33
|
} & (StringGradients | FromToGradients);
|
|
34
34
|
/** 进度条渐变方向 **/
|
|
35
|
-
export type DirectionType =
|
|
35
|
+
export type DirectionType = 'ltr' | 'rtl' | undefined;
|
|
36
36
|
/** 成功的进度条的配置 **/
|
|
37
37
|
export interface SuccessProps {
|
|
38
38
|
/** 进度条值 **/
|
|
@@ -58,7 +58,7 @@ export interface ProgressProps {
|
|
|
58
58
|
/** 进度条线的宽度,单位 px **/
|
|
59
59
|
strokeWidth?: number;
|
|
60
60
|
/** 进度条的样式 **/
|
|
61
|
-
strokeLinecap?:
|
|
61
|
+
strokeLinecap?: 'butt' | 'square' | 'round';
|
|
62
62
|
/** 进度条的色彩 **/
|
|
63
63
|
strokeColor?: string | ({
|
|
64
64
|
direction?: string;
|
|
@@ -72,7 +72,7 @@ export interface ProgressProps {
|
|
|
72
72
|
/** 仪表盘进度条缺口角度,可取值 0 ~ 295 **/
|
|
73
73
|
gapDegree?: number;
|
|
74
74
|
/** 仪表盘进度条缺口位置 **/
|
|
75
|
-
gapPosition?:
|
|
75
|
+
gapPosition?: 'top' | 'bottom' | 'left' | 'right';
|
|
76
76
|
/** 进度条总共步数 **/
|
|
77
77
|
steps?: number;
|
|
78
78
|
/** 渐变颜色的方向 **/
|
package/Progress/index.js
CHANGED
|
@@ -18,11 +18,11 @@ var Steps = function Steps(props) {
|
|
|
18
18
|
trailColor = props.trailColor,
|
|
19
19
|
children = props.children;
|
|
20
20
|
/** 计算出应该高亮多少步 **/
|
|
21
|
-
var current = typeof percent ===
|
|
21
|
+
var current = typeof percent === 'number' ? Math.round(steps * (percent / 100)) : 1;
|
|
22
22
|
var styledSteps = [];
|
|
23
23
|
for (var i = 0; i < steps; i += 1) {
|
|
24
24
|
styledSteps.push(jsx("div", {
|
|
25
|
-
className: i <= current - 1 ?
|
|
25
|
+
className: i <= current - 1 ? 'steps-item steps-item-active' : 'steps-item',
|
|
26
26
|
style: {
|
|
27
27
|
backgroundColor: i <= current - 1 ? strokeColor : trailColor,
|
|
28
28
|
width: 14,
|
|
@@ -38,10 +38,10 @@ var Steps = function Steps(props) {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
-
* 判断进度条传的百分比参数是否规范
|
|
42
|
-
* @param {number | undefined} progress 方法入参说明
|
|
43
|
-
* @return {numner} 百分比值
|
|
44
|
-
*/
|
|
41
|
+
* 判断进度条传的百分比参数是否规范
|
|
42
|
+
* @param {number | undefined} progress 方法入参说明
|
|
43
|
+
* @return {numner} 百分比值
|
|
44
|
+
*/
|
|
45
45
|
function validProgress(progress) {
|
|
46
46
|
if (!progress || progress < 0) {
|
|
47
47
|
return 0;
|
|
@@ -53,7 +53,7 @@ function validProgress(progress) {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
* 转换 百分比 到 样式格式
|
|
56
|
+
* 转换 百分比 到 样式格式
|
|
57
57
|
* {
|
|
58
58
|
* "0%": "#afc163",
|
|
59
59
|
* "75%": "#009900",
|
|
@@ -61,14 +61,14 @@ function validProgress(progress) {
|
|
|
61
61
|
* "25%": "#66FF00",
|
|
62
62
|
* "100%": "#ffffff"
|
|
63
63
|
* }
|
|
64
|
-
* @param gradients 渐变的参数
|
|
65
|
-
* @return {string} 样式值
|
|
66
|
-
*/
|
|
64
|
+
* @param gradients 渐变的参数
|
|
65
|
+
* @return {string} 样式值
|
|
66
|
+
*/
|
|
67
67
|
var sortGradient = function sortGradient(gradients) {
|
|
68
68
|
var tempArr = [];
|
|
69
69
|
Object.keys(gradients).forEach(function (key) {
|
|
70
70
|
// 拿到百分比的数字
|
|
71
|
-
var formattedKey = parseFloat(key.replace(/%/g,
|
|
71
|
+
var formattedKey = parseFloat(key.replace(/%/g, ''));
|
|
72
72
|
// 进行序列化
|
|
73
73
|
if (!isNaN(formattedKey)) {
|
|
74
74
|
tempArr.push({
|
|
@@ -85,10 +85,10 @@ var sortGradient = function sortGradient(gradients) {
|
|
|
85
85
|
var key = _ref.key,
|
|
86
86
|
value = _ref.value;
|
|
87
87
|
return "".concat(value, " ").concat(key, "%");
|
|
88
|
-
}).join(
|
|
88
|
+
}).join(', ');
|
|
89
89
|
};
|
|
90
90
|
/**
|
|
91
|
-
* 转换传进来 渐变的参数 为css样式
|
|
91
|
+
* 转换传进来 渐变的参数 为css样式
|
|
92
92
|
* {
|
|
93
93
|
* "0%": "#afc163",
|
|
94
94
|
* "25%": "#66FF00",
|
|
@@ -102,16 +102,16 @@ var sortGradient = function sortGradient(gradients) {
|
|
|
102
102
|
* "to": "#66FF00",// ====> linear-gradient(to right, #afc163, #66FF00)
|
|
103
103
|
* }
|
|
104
104
|
*
|
|
105
|
-
* @param {string} strokeColor 颜色值
|
|
106
|
-
* @return 返回 backgroundImage 的样式值
|
|
107
|
-
*/
|
|
105
|
+
* @param {string} strokeColor 颜色值
|
|
106
|
+
* @return 返回 backgroundImage 的样式值
|
|
107
|
+
*/
|
|
108
108
|
var handleGradient = function handleGradient(strokeColor, directionConfig) {
|
|
109
109
|
var _strokeColor$from = strokeColor.from,
|
|
110
|
-
from = _strokeColor$from === void 0 ?
|
|
110
|
+
from = _strokeColor$from === void 0 ? '#3D66F8' : _strokeColor$from,
|
|
111
111
|
_strokeColor$to = strokeColor.to,
|
|
112
|
-
to = _strokeColor$to === void 0 ?
|
|
112
|
+
to = _strokeColor$to === void 0 ? '#4F93F0' : _strokeColor$to,
|
|
113
113
|
_strokeColor$directio = strokeColor.direction,
|
|
114
|
-
direction = _strokeColor$directio === void 0 ? directionConfig ===
|
|
114
|
+
direction = _strokeColor$directio === void 0 ? directionConfig === 'rtl' ? 'to left' : 'to right' : _strokeColor$directio,
|
|
115
115
|
rest = __rest(strokeColor, ["from", "to", "direction"]);
|
|
116
116
|
// 剩余参数有值说明除了from to direction 还传了 另外的参数
|
|
117
117
|
if (Object.keys(rest).length !== 0) {
|
|
@@ -132,7 +132,7 @@ var Line = function Line(props) {
|
|
|
132
132
|
strokeLinecap = props.strokeLinecap,
|
|
133
133
|
trailColor = props.trailColor;
|
|
134
134
|
/** 进度条高亮部分的颜色样式 **/
|
|
135
|
-
var backgroundProps = strokeColor && typeof strokeColor !==
|
|
135
|
+
var backgroundProps = strokeColor && typeof strokeColor !== 'string' ? handleGradient(strokeColor, directionConfig) : {
|
|
136
136
|
background: strokeColor
|
|
137
137
|
};
|
|
138
138
|
/** 进度条轨道部分的颜色样式 **/
|
|
@@ -143,7 +143,7 @@ var Line = function Line(props) {
|
|
|
143
143
|
var percentStyle = Object.assign({
|
|
144
144
|
width: "".concat(validProgress(percent), "%"),
|
|
145
145
|
height: strokeWidth || 8,
|
|
146
|
-
borderRadius: strokeLinecap ===
|
|
146
|
+
borderRadius: strokeLinecap === 'square' ? 0 : ''
|
|
147
147
|
}, backgroundProps);
|
|
148
148
|
return jsx("div", Object.assign({
|
|
149
149
|
className: "trail-bar",
|
|
@@ -156,7 +156,7 @@ var Line = function Line(props) {
|
|
|
156
156
|
}));
|
|
157
157
|
};
|
|
158
158
|
|
|
159
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer {\n display: flex;\n /*margin-right: 8px;\n margin-bottom: 8px;*/\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-inner {\n width: 100%;\n display: flex;\n align-items: center;\n /*.component-progress-line {\n height: 10px;\n width: 100%;\n }*/\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-inner .steps-outer {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-inner .steps-outer .steps-item {\n flex-shrink: 0;\n min-width: 2px;\n margin-right: 2px;\n background: rgb(234, 236, 241);\n transition: all 0.3s;\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-inner .steps-outer .steps-item-active {\n background-color: rgb(46, 101, 230);\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-inner .trail-bar {\n position: relative;\n display: inline-block;\n width: 100%;\n overflow: hidden;\n vertical-align: middle;\n background-color: rgb(234, 236, 241);\n border-radius: 100px;\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-inner .trail-bar .active-bar {\n position: relative;\n background-color: rgb(46, 101, 230);\n border-radius: 100px;\n transition: all 0.4s cubic-bezier(0.08, 0.82, 0.17, 1) 0s;\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-text {\n min-width: 40px;\n font-size: 14px;\n font-weight: 500;\n text-align: left;\n color: rgb(46, 101, 230);\n margin-left: 10px;\n white-space: nowrap;\n vertical-align: middle;\n word-break: normal;\n display: flex;\n align-items: center;\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-text svg {\n width: 16px;\n height: 16px;\n position: relative;\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-text svg.success {\n color: rgb(19, 191, 76) !important;\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-text svg.error {\n color: rgb(244, 66, 66) !important;\n}\n.paraui-v4-progress.paraui-v4-progress-circle, .paraui-v4-progress.paraui-v4-progress-dashboard {\n display: inline-block;\n position: relative;\n margin: 0 5px;\n}\n.paraui-v4-progress.paraui-v4-progress-circle .progress-outer .progress-text, .paraui-v4-progress.paraui-v4-progress-dashboard .progress-outer .progress-text {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 100%;\n margin: 0;\n padding: 0;\n color: rgb(46, 101, 230);\n font-size:
|
|
159
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer {\n display: flex;\n /*margin-right: 8px;\n margin-bottom: 8px;*/\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-inner {\n width: 100%;\n display: flex;\n align-items: center;\n /*.component-progress-line {\n height: 10px;\n width: 100%;\n }*/\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-inner .steps-outer {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-inner .steps-outer .steps-item {\n flex-shrink: 0;\n min-width: 2px;\n margin-right: 2px;\n background: rgb(234, 236, 241);\n transition: all 0.3s;\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-inner .steps-outer .steps-item-active {\n background-color: rgb(46, 101, 230);\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-inner .trail-bar {\n position: relative;\n display: inline-block;\n width: 100%;\n overflow: hidden;\n vertical-align: middle;\n background-color: rgb(234, 236, 241);\n border-radius: 100px;\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-inner .trail-bar .active-bar {\n position: relative;\n background-color: rgb(46, 101, 230);\n border-radius: 100px;\n transition: all 0.4s cubic-bezier(0.08, 0.82, 0.17, 1) 0s;\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-text {\n min-width: 40px;\n font-size: 14px;\n font-weight: 500;\n text-align: left;\n color: rgb(46, 101, 230);\n margin-left: 10px;\n white-space: nowrap;\n vertical-align: middle;\n word-break: normal;\n display: flex;\n align-items: center;\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-text svg {\n width: 16px;\n height: 16px;\n position: relative;\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-text svg.success {\n color: rgb(19, 191, 76) !important;\n}\n.paraui-v4-progress.paraui-v4-progress-line .progress-outer .progress-text svg.error {\n color: rgb(244, 66, 66) !important;\n}\n.paraui-v4-progress.paraui-v4-progress-circle, .paraui-v4-progress.paraui-v4-progress-dashboard {\n display: inline-block;\n position: relative;\n margin: 0 5px;\n}\n.paraui-v4-progress.paraui-v4-progress-circle .progress-outer .progress-text, .paraui-v4-progress.paraui-v4-progress-dashboard .progress-outer .progress-text {\n position: absolute;\n top: 50%;\n left: 50%;\n width: 100%;\n margin: 0;\n padding: 0;\n color: rgb(46, 101, 230);\n font-size: 14px;\n line-height: 1;\n white-space: normal;\n text-align: center;\n transform: translate(-50%, -50%);\n}\n.paraui-v4-progress.paraui-v4-progress-circle .progress-outer .progress-text svg, .paraui-v4-progress.paraui-v4-progress-dashboard .progress-outer .progress-text svg {\n width: 2em;\n height: 2em;\n}\n.paraui-v4-progress.paraui-v4-progress-circle .progress-outer .progress-text svg.success, .paraui-v4-progress.paraui-v4-progress-dashboard .progress-outer .progress-text svg.success {\n color: rgb(19, 191, 76) !important;\n}\n.paraui-v4-progress.paraui-v4-progress-circle .progress-outer .progress-text svg.error, .paraui-v4-progress.paraui-v4-progress-dashboard .progress-outer .progress-text svg.error {\n color: rgb(244, 66, 66) !important;\n}\n.paraui-v4-progress.paraui-v4-progress-success-status .progress-text {\n color: rgb(19, 191, 76) !important;\n}\n.paraui-v4-progress.paraui-v4-progress-exception-status .progress-text {\n color: rgb(244, 66, 66) !important;\n}\n.paraui-v4-progress.paraui-v4-progress-active-status .active-bar:before {\n position: absolute;\n inset: 0;\n background: rgb(255, 255, 255);\n border-radius: 10px;\n opacity: 0;\n -webkit-animation: progress-active 2.4s cubic-bezier(0.23, 1, 0.32, 1) infinite;\n animation: progress-active 2.4s cubic-bezier(0.23, 1, 0.32, 1) infinite;\n content: \"\";\n}\n\n@keyframes progress-active {\n 0% {\n transform: translateX(-100%) scaleX(0);\n opacity: 0.1;\n }\n 20% {\n transform: translateX(-100%) scaleX(0);\n opacity: 0.5;\n }\n 100% {\n transform: translateX(0) scaleX(1);\n opacity: 0;\n }\n}";
|
|
160
160
|
styleInject(css_248z);
|
|
161
161
|
|
|
162
162
|
/** 进度条类型 **/
|
|
@@ -176,14 +176,14 @@ var ProgressStatuses;
|
|
|
176
176
|
})(ProgressStatuses || (ProgressStatuses = {}));
|
|
177
177
|
/** 每个类型对应的进度条默认颜色 **/
|
|
178
178
|
var strokeColorMap = {
|
|
179
|
-
success:
|
|
180
|
-
exception:
|
|
181
|
-
normal:
|
|
182
|
-
active:
|
|
179
|
+
success: 'rgba(19, 191, 76, 1)',
|
|
180
|
+
exception: 'rgba(244, 66, 66, 1)',
|
|
181
|
+
normal: 'rgba(46, 101, 230, 1)',
|
|
182
|
+
active: 'rgba(46, 101, 230, 1)'
|
|
183
183
|
};
|
|
184
184
|
var Progress = function Progress(props) {
|
|
185
185
|
var _props$type = props.type,
|
|
186
|
-
type = _props$type === void 0 ?
|
|
186
|
+
type = _props$type === void 0 ? 'line' : _props$type,
|
|
187
187
|
className = props.className,
|
|
188
188
|
style = props.style;
|
|
189
189
|
props.children;
|
|
@@ -207,14 +207,14 @@ var Progress = function Progress(props) {
|
|
|
207
207
|
* @return {string}
|
|
208
208
|
*/
|
|
209
209
|
var classString = function classString() {
|
|
210
|
-
var str = "".concat($prefixCls, "-progress ").concat($prefixCls, "-progress-").concat(type ||
|
|
210
|
+
var str = "".concat($prefixCls, "-progress ").concat($prefixCls, "-progress-").concat(type || 'default');
|
|
211
211
|
// 添加成功状态的class
|
|
212
212
|
if (isSuccessStatus) str += " ".concat($prefixCls, "-progress-success-status");
|
|
213
213
|
// 添加错误状态下的class
|
|
214
|
-
if (status ===
|
|
214
|
+
if (status === 'exception') str += " ".concat($prefixCls, "-progress-exception-status");
|
|
215
215
|
// 添加active状态下的class
|
|
216
|
-
if (status ===
|
|
217
|
-
if (className) str += " "
|
|
216
|
+
if (status === 'active') str += " ".concat($prefixCls, "-progress-active-status");
|
|
217
|
+
if (className) str += " ".concat(className);
|
|
218
218
|
return str;
|
|
219
219
|
};
|
|
220
220
|
/**
|
|
@@ -225,24 +225,24 @@ var Progress = function Progress(props) {
|
|
|
225
225
|
// 如果传了成功进度条的配置
|
|
226
226
|
if (strokeColor) return strokeColor;
|
|
227
227
|
if (success && success.percent < percent) {
|
|
228
|
-
return [success.strokeColor || strokeColorMap[
|
|
228
|
+
return [success.strokeColor || strokeColorMap['success'], strokeColorMap['normal']];
|
|
229
229
|
}
|
|
230
|
-
return isSuccessStatus ? strokeColorMap[
|
|
230
|
+
return isSuccessStatus ? strokeColorMap['success'] : strokeColorMap[status || 'normal'];
|
|
231
231
|
};
|
|
232
232
|
/**
|
|
233
233
|
* 处理进度条的值
|
|
234
234
|
* @return {string}
|
|
235
235
|
*/
|
|
236
236
|
var renderPercent = function renderPercent() {
|
|
237
|
-
if (success && success.percent < percent && typeof percent ===
|
|
237
|
+
if (success && success.percent < percent && typeof percent === 'number') {
|
|
238
238
|
return [success.percent, percent - success.percent];
|
|
239
239
|
}
|
|
240
240
|
return percent;
|
|
241
241
|
};
|
|
242
242
|
/** 标记是不是成功状态 **/
|
|
243
|
-
var isSuccessStatus = percent && percent === 100 && !status || status ===
|
|
243
|
+
var isSuccessStatus = percent && percent === 100 && !status || status === 'success';
|
|
244
244
|
/** style值 **/
|
|
245
|
-
var renderStyle = type ===
|
|
245
|
+
var renderStyle = type === 'circle' || type === 'dashboard' ? {
|
|
246
246
|
width: width,
|
|
247
247
|
height: width
|
|
248
248
|
} : {};
|
|
@@ -252,17 +252,17 @@ var Progress = function Progress(props) {
|
|
|
252
252
|
*/
|
|
253
253
|
var renderLabel = function renderLabel() {
|
|
254
254
|
if (format) return format(percent);
|
|
255
|
-
if (isSuccessStatus) return type ===
|
|
255
|
+
if (isSuccessStatus) return type === 'circle' ? jsx(Check, {
|
|
256
256
|
className: "success"
|
|
257
257
|
}) : jsx(CompleteIcon, {
|
|
258
258
|
className: "success"
|
|
259
259
|
});
|
|
260
|
-
if (status ===
|
|
260
|
+
if (status === 'exception') return type === 'circle' ? jsx(CloseIcon, {
|
|
261
261
|
className: "error"
|
|
262
262
|
}) : jsx(CloseCircleF, {
|
|
263
263
|
className: "error"
|
|
264
264
|
});
|
|
265
|
-
return validProgress(percent)
|
|
265
|
+
return "".concat(validProgress(percent), "%");
|
|
266
266
|
};
|
|
267
267
|
/** 默认进度条 **/
|
|
268
268
|
var renderLineProgress = steps ? jsx(Steps, Object.assign({
|
|
@@ -280,7 +280,7 @@ var Progress = function Progress(props) {
|
|
|
280
280
|
percent: renderPercent(),
|
|
281
281
|
direction: direction
|
|
282
282
|
}, otherProps, {
|
|
283
|
-
children:
|
|
283
|
+
children: ' '
|
|
284
284
|
}));
|
|
285
285
|
/** 圆形进度条 **/
|
|
286
286
|
var renderCircleProgress = jsx(Circle, Object.assign({
|
|
@@ -298,7 +298,8 @@ var Progress = function Progress(props) {
|
|
|
298
298
|
gapPosition: "bottom",
|
|
299
299
|
gapDegree: gapDegree,
|
|
300
300
|
strokeColor: strokeColorVal(),
|
|
301
|
-
percent: renderPercent()
|
|
301
|
+
percent: renderPercent(),
|
|
302
|
+
trailColor: 'rgba(234,236,241,1)'
|
|
302
303
|
}, otherProps));
|
|
303
304
|
return jsx("div", Object.assign({
|
|
304
305
|
className: classString(),
|
|
@@ -311,7 +312,7 @@ var Progress = function Progress(props) {
|
|
|
311
312
|
className: "progress-inner",
|
|
312
313
|
style: renderStyle
|
|
313
314
|
}, {
|
|
314
|
-
children: type ===
|
|
315
|
+
children: type === 'dashboard' ? renderDashboardProgress : type === 'circle' ? renderCircleProgress : renderLineProgress
|
|
315
316
|
})), showInfo && !steps && jsx("div", Object.assign({
|
|
316
317
|
className: "progress-text"
|
|
317
318
|
}, {
|
package/Progress/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 判断进度条传的百分比参数是否规范
|
|
3
|
-
* @param {number | undefined} progress 方法入参说明
|
|
4
|
-
* @return {numner} 百分比值
|
|
5
|
-
*/
|
|
2
|
+
* 判断进度条传的百分比参数是否规范
|
|
3
|
+
* @param {number | undefined} progress 方法入参说明
|
|
4
|
+
* @return {numner} 百分比值
|
|
5
|
+
*/
|
|
6
6
|
export declare function validProgress(progress: number | number[] | undefined): number | number[];
|
package/Querying/index.d.ts
CHANGED
package/Querying/index.js
CHANGED
|
@@ -705,12 +705,12 @@ var localeJson = {
|
|
|
705
705
|
en: en
|
|
706
706
|
};
|
|
707
707
|
|
|
708
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/4/2 上午10:55\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-querying {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n}\n.paraui-v4-querying > .querying-image {\n line-height: 0;\n overflow: hidden;\n}\n.paraui-v4-querying > .querying-image img {\n width: 100%;\n}\n.paraui-v4-querying .querying-image-large {\n width: 334px;\n height: 238px;\n}\n.paraui-v4-querying .querying-image-small {\n width: 120px;\n height: 120px;\n}\n.paraui-v4-querying > .querying-description {\n line-height: 17px;\n font-size: 14px;\n font-weight: 400;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-querying.paraui-v4-querying-large > .querying-description {\n margin-top: 24px;\n}\n.paraui-v4-querying.paraui-v4-querying-small > .querying-description {\n margin-top: 12px;\n font-size:
|
|
708
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/4/2 上午10:55\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-querying {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n}\n.paraui-v4-querying > .querying-image {\n line-height: 0;\n overflow: hidden;\n}\n.paraui-v4-querying > .querying-image img {\n width: 100%;\n}\n.paraui-v4-querying .querying-image-large {\n width: 334px;\n height: 238px;\n}\n.paraui-v4-querying .querying-image-small {\n width: 120px;\n height: 120px;\n}\n.paraui-v4-querying > .querying-description {\n line-height: 17px;\n font-size: 14px;\n font-weight: 400;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-querying.paraui-v4-querying-large > .querying-description {\n margin-top: 24px;\n}\n.paraui-v4-querying.paraui-v4-querying-small > .querying-description {\n margin-top: 12px;\n font-size: 14px;\n}";
|
|
709
709
|
styleInject(css_248z);
|
|
710
710
|
|
|
711
711
|
var imageMap = {
|
|
712
|
-
|
|
713
|
-
|
|
712
|
+
large: jsx(LargeSearch, {}),
|
|
713
|
+
small: jsx(SmallSearch, {})
|
|
714
714
|
};
|
|
715
715
|
//Querying 查询中
|
|
716
716
|
var Querying = function Querying(props) {
|
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
## 版本: 4.0.0-alpha
|
|
2
2
|
para-ui/core@4.0.0-alpha 发布
|
|
3
3
|
【lisq】
|
|
4
|
+
【确认框-Confirm】修复确认框国际化问题
|
|
5
|
+
【Upload】ImageUpload 文案添加居中
|
|
4
6
|
【表单-FormItem】移除console.log
|
|
5
7
|
【穿梭框-Transfer】移除console.log
|
|
6
8
|
【文档】tooltip 添加FAQ、tooltip 和 popConfirm 添加依赖 badge
|
|
@@ -26,6 +28,9 @@
|
|
|
26
28
|
【通知提示框-Notification】支持移除closeIcon
|
|
27
29
|
|
|
28
30
|
【linhd】
|
|
31
|
+
【动态多值框-DynamicMultiBox】没有拖拽,valueList不生成chosen,selected字段
|
|
32
|
+
【动态多值框-DynamicMultiBox】增加labelProps参数,用来修改标题
|
|
33
|
+
【动态多值框-DynamicMultiBox】增加rowKey,用来自定义每行的唯一id
|
|
29
34
|
【输入框-TextField】修复输入框存在焦点,点击输入框,触发onBlur事件
|
|
30
35
|
【下拉框-Select】去除searchModel为inside,自动得到焦点,防止页面上下抖动
|
|
31
36
|
【下拉框-Select】修复下拉框闪烁渲染
|
|
@@ -93,4 +98,6 @@
|
|
|
93
98
|
【级联选择器-Cascader】级联选择器增加dropdownClassName,className字段,修改组件样式,组件暴露clearValue函数清空组件值 (这一条无用,v4级联重构value受控)
|
|
94
99
|
【穿梭框-Transfer】搜索添加防抖处理,搜索渲染不再反复渲染节点,避免数据过多引起的bug
|
|
95
100
|
【组织树-Tree】修改组织树icon和title不在同一行的问题
|
|
101
|
+
【表单-Form】表单校验国际化
|
|
102
|
+
【表单-Form】修复当单选框组的的值是boolean的时候,设置默认值为fasle选中不了的问题
|
|
96
103
|
|
package/Radio/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
7
|
import { LabelTooltipProps } from '../Label';
|
|
8
|
-
import { TooltipProps } from
|
|
8
|
+
import { TooltipProps } from '../Tooltip';
|
|
9
9
|
import './index.scss';
|
|
10
10
|
export interface RadioProps {
|
|
11
11
|
/** 样式class */
|
package/Radio/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import 'rc-tooltip';
|
|
|
14
14
|
import 'rc-tooltip/lib/placements';
|
|
15
15
|
import '@para-ui/icons/Forbid';
|
|
16
16
|
|
|
17
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-radio {\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 cursor: pointer;\n display: inline-flex;\n align-items: flex-start;\n line-height: 16px;\n}\n.paraui-v4-radio:hover {\n /*& > .radio-label {\n color: $NP1;\n cursor: pointer;\n\n svg {\n color: $NP1;\n }\n }*/\n /*& > .radio-help {\n & > .radio-label {\n color: $NP1;\n cursor: pointer;\n\n svg {\n color: $NP1;\n }\n }\n }*/\n}\n.paraui-v4-radio:hover > .radio-box > .radio-box-inner {\n border-color: rgb(46, 101, 230);\n}\n.paraui-v4-radio > .radio-box {\n position: relative;\n}\n.paraui-v4-radio > .radio-box > input {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.paraui-v4-radio > .radio-box > .radio-box-inner {\n position: relative;\n top: 0;\n left: 0;\n display: block;\n background-color: white;\n border: 1px solid rgb(212, 218, 227);\n border-radius: 50%;\n}\n.paraui-v4-radio > .radio-box > .radio-box-inner:after {\n position: absolute;\n display: table;\n content: \" \";\n transform: scale(1) translate(-50%, -50%);\n background-color: white;\n border-radius: 50%;\n left: 50%;\n top: 50%;\n}\n.paraui-v4-radio > .radio-label {\n color: rgb(29, 33, 38);\n padding: 0 8px;\n margin: 0;\n display: inline-flex;\n align-items: flex-start;\n overflow: hidden;\n cursor: pointer;\n}\n.paraui-v4-radio > .radio-label > .radio-help > svg {\n top: 0;\n}\n.paraui-v4-radio .radio-label {\n line-height: 16px;\n}\n.paraui-v4-radio > .radio-help {\n padding: 0 8px;\n position: relative;\n top: -1px;\n overflow: hidden;\n}\n.paraui-v4-radio > .radio-help > .radio-label {\n width: 100%;\n color: rgb(29, 33, 38);\n margin: 0;\n display: inline-flex;\n align-items: center;\n overflow: hidden;\n cursor: pointer;\n}\n.paraui-v4-radio.paraui-v4-radio-checked > .radio-box > .radio-box-inner {\n border-color: transparent;\n background-color: rgb(46, 101, 230);\n}\n.paraui-v4-radio.paraui-v4-radio-checked:hover > .radio-box > .radio-box-inner {\n border-color: transparent;\n background-color: rgb(
|
|
17
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-radio {\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 cursor: pointer;\n display: inline-flex;\n align-items: flex-start;\n line-height: 16px;\n}\n.paraui-v4-radio:hover {\n /*& > .radio-label {\n color: $NP1;\n cursor: pointer;\n\n svg {\n color: $NP1;\n }\n }*/\n /*& > .radio-help {\n & > .radio-label {\n color: $NP1;\n cursor: pointer;\n\n svg {\n color: $NP1;\n }\n }\n }*/\n}\n.paraui-v4-radio:hover > .radio-box > .radio-box-inner {\n border-color: rgb(46, 101, 230);\n}\n.paraui-v4-radio > .radio-box {\n position: relative;\n}\n.paraui-v4-radio > .radio-box > input {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.paraui-v4-radio > .radio-box > .radio-box-inner {\n position: relative;\n top: 0;\n left: 0;\n display: block;\n background-color: white;\n border: 1px solid rgb(212, 218, 227);\n border-radius: 50%;\n}\n.paraui-v4-radio > .radio-box > .radio-box-inner:after {\n position: absolute;\n display: table;\n content: \" \";\n transform: scale(1) translate(-50%, -50%);\n background-color: white;\n border-radius: 50%;\n left: 50%;\n top: 50%;\n}\n.paraui-v4-radio > .radio-label {\n color: rgb(29, 33, 38);\n padding: 0 8px;\n margin: 0;\n display: inline-flex;\n align-items: flex-start;\n overflow: hidden;\n cursor: pointer;\n}\n.paraui-v4-radio > .radio-label > .radio-help > svg {\n top: 0;\n}\n.paraui-v4-radio .radio-label {\n line-height: 16px;\n}\n.paraui-v4-radio > .radio-help {\n padding: 0 8px;\n position: relative;\n top: -1px;\n overflow: hidden;\n}\n.paraui-v4-radio > .radio-help > .radio-label {\n width: 100%;\n color: rgb(29, 33, 38);\n margin: 0;\n display: inline-flex;\n align-items: center;\n overflow: hidden;\n cursor: pointer;\n}\n.paraui-v4-radio.paraui-v4-radio-checked > .radio-box > .radio-box-inner {\n border-color: transparent;\n background-color: rgb(46, 101, 230);\n}\n.paraui-v4-radio.paraui-v4-radio-checked:hover > .radio-box > .radio-box-inner {\n border-color: transparent;\n background-color: rgb(87, 131, 235);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled {\n cursor: not-allowed;\n}\n.paraui-v4-radio.paraui-v4-radio-disabled:hover > .radio-box > .radio-box-inner {\n background-color: rgb(234, 236, 241);\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-label {\n color: rgb(161, 168, 179);\n cursor: not-allowed;\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-label svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-box > input {\n cursor: not-allowed;\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-box > .radio-box-inner {\n background-color: rgb(234, 236, 241);\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-box > .radio-box-inner:after {\n background-color: rgb(234, 236, 241);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled.paraui-v4-radio-checked > .radio-box > .radio-box-inner {\n background-color: rgb(212, 218, 227);\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled.paraui-v4-radio-checked > .radio-box > .radio-box-inner:hover > .radio-box > .radio-box-inner {\n background-color: rgb(212, 218, 227);\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled.paraui-v4-radio-checked > .radio-box > .radio-box-inner:after {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-help {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-help > .radio-label {\n color: rgb(161, 168, 179);\n cursor: not-allowed;\n}\n.paraui-v4-radio.paraui-v4-radio-small > .radio-box {\n top: 1px;\n}\n.paraui-v4-radio.paraui-v4-radio-small > .radio-box > .radio-box-inner {\n width: 14px;\n height: 14px;\n}\n.paraui-v4-radio.paraui-v4-radio-small > .radio-box > .radio-box-inner:after {\n width: 4px;\n height: 4px;\n}\n.paraui-v4-radio.paraui-v4-radio-medium > .radio-box {\n top: 1px;\n}\n.paraui-v4-radio.paraui-v4-radio-medium > .radio-box > .radio-box-inner {\n width: 14px;\n height: 14px;\n}\n.paraui-v4-radio.paraui-v4-radio-medium > .radio-box > .radio-box-inner:after {\n width: 4px;\n height: 4px;\n}\n.paraui-v4-radio.paraui-v4-radio-large > .radio-box {\n top: 1px;\n}\n.paraui-v4-radio.paraui-v4-radio-large > .radio-box > .radio-box-inner {\n width: 14px;\n height: 14px;\n}\n.paraui-v4-radio.paraui-v4-radio-large > .radio-box > .radio-box-inner:after {\n width: 4px;\n height: 4px;\n}";
|
|
18
18
|
styleInject(css_248z);
|
|
19
19
|
|
|
20
20
|
var Radio = function Radio(props) {
|
|
@@ -52,8 +52,8 @@ var Radio = function Radio(props) {
|
|
|
52
52
|
};
|
|
53
53
|
// 处理className
|
|
54
54
|
var handClass = function handClass() {
|
|
55
|
-
var str = $prefixCls
|
|
56
|
-
if (className) str +=
|
|
55
|
+
var str = "".concat($prefixCls, "-radio");
|
|
56
|
+
if (className) str += " ".concat(className);
|
|
57
57
|
if (size) str += " ".concat($prefixCls, "-radio-").concat(size);
|
|
58
58
|
if (disabled) str += " ".concat($prefixCls, "-radio-disabled");
|
|
59
59
|
if (checkedCom) str += " ".concat($prefixCls, "-radio-checked");
|
|
@@ -62,7 +62,7 @@ var Radio = function Radio(props) {
|
|
|
62
62
|
var handLabelClass = function handLabelClass() {
|
|
63
63
|
var str = 'radio-label';
|
|
64
64
|
if (labelTooltip && labelTooltip.className) {
|
|
65
|
-
str +=
|
|
65
|
+
str += " ".concat(labelTooltip.className);
|
|
66
66
|
}
|
|
67
67
|
return str;
|
|
68
68
|
};
|
|
@@ -70,7 +70,7 @@ var Radio = function Radio(props) {
|
|
|
70
70
|
var handHelpClassName = function handHelpClassName() {
|
|
71
71
|
var str = ' radio-help';
|
|
72
72
|
if (labelTooltip && labelTooltip.helpClassName) {
|
|
73
|
-
str +=
|
|
73
|
+
str += " ".concat(labelTooltip.helpClassName);
|
|
74
74
|
}
|
|
75
75
|
return str;
|
|
76
76
|
};
|
package/RadioGroup/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
7
|
import { RadioProps } from '../Radio';
|
|
8
|
-
import { LabelTooltipProps } from
|
|
9
|
-
import { HelperTextDetailProps } from
|
|
8
|
+
import { LabelTooltipProps } from '../Label';
|
|
9
|
+
import { HelperTextDetailProps } from '../HelperText';
|
|
10
10
|
import './index.scss';
|
|
11
11
|
export interface RadioListProps extends RadioProps {
|
|
12
12
|
[name: string]: any;
|
package/RadioGroup/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var RadioGroup = function RadioGroup(props) {
|
|
|
26
26
|
label = props.label,
|
|
27
27
|
labelTooltip = props.labelTooltip,
|
|
28
28
|
_props$spacing = props.spacing,
|
|
29
|
-
spacing = _props$spacing === void 0 ? '
|
|
29
|
+
spacing = _props$spacing === void 0 ? '32px' : _props$spacing,
|
|
30
30
|
itemWidth = props.itemWidth,
|
|
31
31
|
_props$size = props.size,
|
|
32
32
|
size = _props$size === void 0 ? 'large' : _props$size,
|
|
@@ -73,7 +73,7 @@ var RadioGroup = function RadioGroup(props) {
|
|
|
73
73
|
var handLabelClass = function handLabelClass() {
|
|
74
74
|
var str = 'radio-group-label';
|
|
75
75
|
if (labelTooltip && labelTooltip.className) {
|
|
76
|
-
str +=
|
|
76
|
+
str += " ".concat(labelTooltip.className);
|
|
77
77
|
}
|
|
78
78
|
return str;
|
|
79
79
|
};
|
|
@@ -102,8 +102,8 @@ var RadioGroup = function RadioGroup(props) {
|
|
|
102
102
|
};
|
|
103
103
|
// 处理class
|
|
104
104
|
var handClass = function handClass() {
|
|
105
|
-
var str = $prefixCls
|
|
106
|
-
if (className) str +=
|
|
105
|
+
var str = "".concat($prefixCls, "-radio-group");
|
|
106
|
+
if (className) str += " ".concat(className);
|
|
107
107
|
if (size) str += " ".concat($prefixCls, "-radio-group-size");
|
|
108
108
|
if (error) str += " ".concat($prefixCls, "-radio-group-error");
|
|
109
109
|
if (disabled) str += " ".concat($prefixCls, "-radio-group-disabled");
|
package/Search/index.js
CHANGED
|
@@ -107,7 +107,7 @@ var Search = function Search(props) {
|
|
|
107
107
|
*/
|
|
108
108
|
var handClass = function handClass() {
|
|
109
109
|
var str = "".concat($prefixCls, "-search");
|
|
110
|
-
if (className) str +=
|
|
110
|
+
if (className) str += " ".concat(className);
|
|
111
111
|
if (size) str += " ".concat($prefixCls, "-search-").concat(size);
|
|
112
112
|
if (radius) str += " ".concat($prefixCls, "-search-radius");
|
|
113
113
|
return str;
|