@para-ui/core 3.0.28 → 3.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AutoBox/index.js +48 -88
- package/AutoTips/index.js +25 -32
- package/Breadcrumbs/index.js +43 -63
- package/Button/SplitButton.d.ts +1 -1
- package/Button/index.d.ts +1 -1
- package/Button/index.js +88 -118
- package/ButtonGroup/index.js +27 -36
- package/Carousel/index.d.ts +2 -2
- package/Carousel/index.js +27 -28
- package/Cascader/index.js +52 -64
- package/Checkbox/index.js +23 -39
- package/CheckboxGroup/index.js +31 -48
- package/Collapse/collapsePanel.d.ts +1 -1
- package/Collapse/index.d.ts +1 -1
- package/Collapse/index.js +9 -29
- package/Collapse/util.d.ts +2 -2
- package/CollapseBox/index.js +45 -56
- package/CollapseLayout/index.js +35 -54
- package/ComboSelect/index.js +222 -349
- package/ComboSelect/interface.d.ts +3 -3
- package/Container/index.js +17 -20
- package/DatePicker/generatePicker/index.d.ts +17 -17
- package/DatePicker/index.d.ts +4 -4
- package/DatePicker/index.js +111 -167
- package/Desktop/index.js +62 -173
- package/Drawer/index.js +65 -58
- package/Drawer/interface.d.ts +7 -3
- package/Dropdown/index.d.ts +1 -1
- package/Dropdown/index.js +3 -3
- package/Empty/index.js +17 -22
- package/Form/index.d.ts +1 -1
- package/Form/index.js +38 -80
- package/FormItem/index.d.ts +1 -1
- package/FormItem/index.js +11 -11
- package/FormItem/validateFunction.d.ts +1 -1
- package/FunctionModal/index.js +11 -11
- package/GlobalContext/index.js +3 -3
- package/GlobalContext/usePopupContainer.d.ts +1 -1
- package/Help/index.js +11 -11
- package/HelperText/index.js +11 -12
- package/InputLang/index.js +47 -80
- package/InputNumber/index.js +65 -100
- package/Label/index.js +15 -16
- package/Loading/index.js +6 -7
- package/Menu/index.js +148 -328
- package/Menu/interface.d.ts +2 -2
- package/Menu/verticalMenuList.d.ts +1 -1
- package/Message/index.d.ts +1 -1
- package/Message/index.js +45 -64
- package/Modal/Confirm/index.d.ts +2 -2
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +119 -152
- package/MultiBox/index.js +44 -76
- package/Notification/index.d.ts +2 -2
- package/Notification/index.js +51 -72
- package/OperateBtn/index.js +42 -70
- package/PageHeader/index.js +120 -286
- package/PageHeader/interface.d.ts +1 -1
- package/Pagination/index.d.ts +2 -2
- package/Pagination/index.js +79 -131
- package/ParauiProvider/index.js +2 -3
- package/PasswordRules/index.js +12 -30
- package/PopConfirm/index.d.ts +1 -1
- package/PopConfirm/index.js +52 -59
- package/Popover/index.js +8 -9
- package/Progress/index.d.ts +6 -6
- package/Progress/index.js +50 -89
- package/Querying/index.js +14 -17
- package/README.md +813 -800
- package/Radio/index.js +21 -33
- package/RadioGroup/index.js +32 -47
- package/Search/index.js +44 -66
- package/Select/index.js +176 -343
- package/SelectInput/index.js +8 -9
- package/Selector/index.js +285 -681
- package/SelectorPicker/index.js +62 -97
- package/SingleBox/index.js +30 -55
- package/Slider/index.d.ts +1 -1
- package/Slider/index.js +29 -41
- package/Slider/interface.d.ts +2 -2
- package/Split/index.js +10 -23
- package/Status/index.js +8 -7
- package/Stepper/index.d.ts +1 -1
- package/Stepper/index.js +20 -25
- package/Styles/form.scss +5 -5
- package/Styles/index.scss +37 -37
- package/Styles/normalize.scss +348 -348
- package/Styles/scrollbar.scss +223 -223
- package/Styles/theme.scss +74 -74
- package/Switch/index.d.ts +2 -2
- package/Switch/index.js +19 -20
- package/Table/index.js +568 -1019
- package/Table/interface.d.ts +5 -5
- package/Tabs/index.d.ts +3 -3
- package/Tabs/index.js +47 -65
- package/Tag/TagGroup.d.ts +1 -1
- package/Tag/index.d.ts +2 -2
- package/Tag/index.js +72 -107
- package/TextEditor/index.d.ts +2 -2
- package/TextEditor/index.js +81 -105
- package/TextField/index.js +141 -220
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +12 -15
- package/Timeline/index.js +42 -52
- package/Title/index.js +10 -9
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButton/index.js +50 -70
- package/Tooltip/index.js +64 -98
- package/Tooltip/interface.d.ts +1 -1
- package/Transfer/index.d.ts +1 -1
- package/Transfer/index.js +114 -137
- package/Transfer/useClick.d.ts +1 -1
- package/Tree/index.js +10 -10
- package/Tree/interface.d.ts +6 -6
- package/Upload/Dragger/index.d.ts +1 -1
- package/Upload/ImageUpload/index.d.ts +1 -1
- package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
- package/Upload/index.d.ts +1 -1
- package/Upload/index.js +283 -475
- package/Upload/interface.d.ts +2 -2
- package/_verture/{constant-bf34e6fa.js → constant-66aa48a1.js} +0 -1
- package/_verture/defineProperty-62acccfc.js +34 -0
- package/_verture/{index-342379c6.js → index-06fea29b.js} +79 -124
- package/_verture/{index-48875ffd.js → index-131f8fe5.js} +80 -181
- package/_verture/{index-31ce5a11.js → index-92144ad3.js} +238 -445
- package/_verture/{index-bbed73a3.js → index-be4faaee.js} +19 -61
- package/_verture/{intl-336570e4.js → intl-5cbb940c.js} +4 -12
- package/_verture/{modalContext-d646d9db.js → modalContext-c749e1c6.js} +18 -43
- package/_verture/{slicedToArray-d7722f4b.js → slicedToArray-77980792.js} +23 -25
- package/_verture/{toConsumableArray-f8047a75.js → toConsumableArray-87c7d895.js} +1 -1
- package/_verture/{useFormatMessage-f4452258.js → useFormatMessage-703f8b20.js} +1 -3
- package/_verture/{useGlobalProps-af9a2af6.js → useGlobalProps-1b846a65.js} +1 -2
- package/_verture/{usePopupContainer-b8ab7cab.js → usePopupContainer-87febeb9.js} +10 -25
- package/_verture/{util-a77b261e.js → util-7e1fb1e2.js} +2 -3
- package/index.d.ts +2 -4
- package/index.js +15 -16
- package/package.json +167 -168
- package/Test/index.d.ts +0 -3
- package/Test/index.js +0 -9
- package/_verture/defineProperty-0590dc61.js +0 -16
package/Slider/interface.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @description
|
|
5
5
|
*/
|
|
6
6
|
import React from "react";
|
|
7
|
-
export
|
|
7
|
+
export type TooltipPlacement = 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
8
8
|
interface SliderRange {
|
|
9
9
|
draggableTrack?: boolean;
|
|
10
10
|
}
|
|
@@ -19,7 +19,7 @@ export interface HandleGeneratorInfo {
|
|
|
19
19
|
dragging?: boolean;
|
|
20
20
|
index: number;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type HandleGeneratorFn = (config: {
|
|
23
23
|
tooltipPrefixCls?: string;
|
|
24
24
|
info: HandleGeneratorInfo;
|
|
25
25
|
}) => React.ReactElement;
|
package/Split/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { _ as _typeof } from '../_verture/typeof-498dd2b1.js';
|
|
2
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
2
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-77980792.js';
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import React__default from 'react';
|
|
5
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
5
|
+
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
6
6
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
7
7
|
|
|
8
8
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-split {\n display: flex;\n min-height: 200px;\n -webkit-user-select: none;\n user-select: none;\n}\n.paraui-v3-split .split-left {\n background-color: #ffffff;\n position: relative;\n min-width: 201px;\n}\n.paraui-v3-split .split-left .split-separator {\n display: flex;\n justify-content: center;\n align-items: center;\n position: absolute;\n top: 0;\n right: 0;\n width: 6px;\n height: 100%;\n background-color: white;\n box-shadow: 0 0 2px rgba(0, 0, 0, 0.35);\n cursor: col-resize;\n}\n.paraui-v3-split .split-left .split-separator i {\n display: inline-block;\n height: 14px;\n width: 1px;\n background-color: #e9e9e9;\n margin: 0 1px;\n}\n.paraui-v3-split .split-left .split-left-content {\n padding: 20px 34px 20px 20px;\n}\n.paraui-v3-split .split-right {\n background-color: #ffffff;\n flex: 1;\n}\n.paraui-v3-split .split-right-content {\n padding: 20px;\n}";
|
|
@@ -10,27 +10,24 @@ styleInject(css_248z);
|
|
|
10
10
|
|
|
11
11
|
var Split = function Split(props) {
|
|
12
12
|
var _props$minWidth = props.minWidth,
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
minWidth = _props$minWidth === void 0 ? 200 : _props$minWidth,
|
|
14
|
+
children = props.children;
|
|
15
15
|
var startX, startWidth, startWidthContainer;
|
|
16
16
|
var separatorRef = React__default.useRef(null);
|
|
17
17
|
var scalableRef = React__default.useRef(null);
|
|
18
18
|
var containerRef = React__default.useRef(null);
|
|
19
|
-
|
|
20
19
|
var _React$useState = React__default.useState({
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
left: null,
|
|
21
|
+
right: null
|
|
22
|
+
}),
|
|
23
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
24
|
+
state = _React$useState2[0],
|
|
25
|
+
setState = _React$useState2[1];
|
|
27
26
|
/**
|
|
28
27
|
* 陈夕 2021/4/21 下午3:34
|
|
29
28
|
* desc: 开始拖拽
|
|
30
29
|
* @params
|
|
31
30
|
**/
|
|
32
|
-
|
|
33
|
-
|
|
34
31
|
var startDrag = function startDrag(e) {
|
|
35
32
|
startX = e.clientX;
|
|
36
33
|
startWidthContainer = getDivWidth(containerRef.current);
|
|
@@ -43,8 +40,6 @@ var Split = function Split(props) {
|
|
|
43
40
|
* desc: 拖拽计算宽度位置,不能出现滚动条,所以要设置临界值
|
|
44
41
|
* @params
|
|
45
42
|
**/
|
|
46
|
-
|
|
47
|
-
|
|
48
43
|
var onDrag = function onDrag(e) {
|
|
49
44
|
var newWidth = startWidth + e.clientX - startX;
|
|
50
45
|
if (startWidthContainer - newWidth <= minWidth || newWidth <= minWidth) return;
|
|
@@ -55,8 +50,6 @@ var Split = function Split(props) {
|
|
|
55
50
|
* desc: 停止拖动,移除事件
|
|
56
51
|
* @params
|
|
57
52
|
**/
|
|
58
|
-
|
|
59
|
-
|
|
60
53
|
var onStopDrag = function onStopDrag(e) {
|
|
61
54
|
document.documentElement.removeEventListener("mousemove", onDrag);
|
|
62
55
|
document.documentElement.removeEventListener("mouseup", onStopDrag);
|
|
@@ -66,15 +59,11 @@ var Split = function Split(props) {
|
|
|
66
59
|
* desc: 获取dom的宽度
|
|
67
60
|
* @params
|
|
68
61
|
**/
|
|
69
|
-
|
|
70
|
-
|
|
71
62
|
var getDivWidth = function getDivWidth(dom) {
|
|
72
63
|
return parseInt(dom.getBoundingClientRect().width, 10);
|
|
73
64
|
};
|
|
74
|
-
|
|
75
65
|
React__default.useEffect(function () {
|
|
76
66
|
var _a;
|
|
77
|
-
|
|
78
67
|
if (separatorRef.current) {
|
|
79
68
|
(_a = separatorRef.current) === null || _a === void 0 ? void 0 : _a.addEventListener("mousedown", startDrag);
|
|
80
69
|
}
|
|
@@ -84,7 +73,6 @@ var Split = function Split(props) {
|
|
|
84
73
|
* desc: 切分传进来的数组的组件值
|
|
85
74
|
* @params
|
|
86
75
|
**/
|
|
87
|
-
|
|
88
76
|
React__default.useEffect(function () {
|
|
89
77
|
if (children && _typeof(children) === "object") {
|
|
90
78
|
setState({
|
|
@@ -92,7 +80,6 @@ var Split = function Split(props) {
|
|
|
92
80
|
right: null
|
|
93
81
|
});
|
|
94
82
|
}
|
|
95
|
-
|
|
96
83
|
if (children && Array.isArray(children)) {
|
|
97
84
|
var leftComponent = children.slice(0, Math.floor(children.length / 2));
|
|
98
85
|
var rightComponent = children.slice(Math.floor(children.length / 2), children.length);
|
package/Status/index.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
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-66aa48a1.js';
|
|
4
4
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
5
5
|
|
|
6
6
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/11/8 6:32 PM\n* @description 状态\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-status {\n display: inline-flex;\n align-items: center;\n}\n.paraui-v3-status .status-ink {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: 10px;\n height: 10px;\n border-radius: 5px;\n}\n.paraui-v3-status .status-ink:before {\n content: \" \";\n width: 6px;\n height: 6px;\n border-radius: 3px;\n}\n.paraui-v3-status .status-icon {\n display: inline-flex;\n font-size: 16px;\n}\n.paraui-v3-status .status-icon svg {\n font-size: 16px;\n}\n.paraui-v3-status .status-text {\n margin-left: 4px;\n font-size: 14px;\n color: rgb(46, 55, 67);\n}\n.paraui-v3-status-info .status-ink {\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-status-info .status-ink:before {\n background-color: #3666d6;\n}\n.paraui-v3-status-success .status-ink {\n background-color: rgba(83, 195, 27, 0.05);\n}\n.paraui-v3-status-success .status-ink:before {\n background-color: #53c31b;\n}\n.paraui-v3-status-warning .status-ink {\n background-color: rgba(255, 161, 80, 0.05);\n}\n.paraui-v3-status-warning .status-ink:before {\n background-color: #ffa150;\n}\n.paraui-v3-status-error .status-ink {\n background-color: rgba(235, 96, 84, 0.05);\n}\n.paraui-v3-status-error .status-ink:before {\n background-color: #eb6054;\n}\n.paraui-v3-status-completed .status-ink {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-status-completed .status-ink:before {\n background-color: rgba(46, 55, 67, 0.4);\n}";
|
|
7
7
|
styleInject(css_248z);
|
|
8
8
|
|
|
9
|
+
//状态
|
|
9
10
|
var Status = function Status(props) {
|
|
10
11
|
var text = props.text,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
_props$status = props.status,
|
|
13
|
+
status = _props$status === void 0 ? 'info' : _props$status,
|
|
14
|
+
icon = props.icon,
|
|
15
|
+
className = props.className,
|
|
16
|
+
style = props.style;
|
|
17
|
+
//cls
|
|
17
18
|
var makeCls = clsx("".concat($prefixCls, "-status"), className, status && !icon && "".concat($prefixCls, "-status-").concat(status));
|
|
18
19
|
return jsxs("span", Object.assign({
|
|
19
20
|
className: makeCls,
|
package/Stepper/index.d.ts
CHANGED
package/Stepper/index.js
CHANGED
|
@@ -13,10 +13,11 @@ import Seven from '@para-ui/icons/Seven';
|
|
|
13
13
|
import Eight from '@para-ui/icons/Eight';
|
|
14
14
|
import Nine from '@para-ui/icons/Nine';
|
|
15
15
|
import Check from '@para-ui/icons/Check';
|
|
16
|
-
import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-
|
|
16
|
+
import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-66aa48a1.js';
|
|
17
17
|
import clsx from 'clsx';
|
|
18
18
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
19
19
|
|
|
20
|
+
//默认图标
|
|
20
21
|
var Icons = {
|
|
21
22
|
1: jsx(One, {}),
|
|
22
23
|
2: jsx(Two, {}),
|
|
@@ -33,44 +34,40 @@ var Icons = {
|
|
|
33
34
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/26 下午2:57\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-stepper {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n display: flex;\n width: 100%;\n text-align: initial;\n}\n.paraui-v3-stepper .component-stepper-item {\n position: relative;\n display: inline-block;\n flex: 1;\n vertical-align: top;\n}\n.paraui-v3-stepper .component-stepper-item-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n outline: none;\n}\n.paraui-v3-stepper .component-stepper-item:last-child > .component-stepper-item-container > .component-stepper-item-tail,\n.paraui-v3-stepper .component-stepper-item:last-child > .component-stepper-item-container > .component-stepper-item-content > .component-stepper-item-title::after {\n display: none;\n}\n.paraui-v3-stepper .component-stepper-item-icon,\n.paraui-v3-stepper .component-stepper-item-content {\n display: block;\n vertical-align: top;\n}\n.paraui-v3-stepper .component-stepper-item-icon {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: 30px;\n height: 30px;\n font-size: 16px;\n line-height: 30px;\n text-align: center;\n border-radius: 50%;\n background-color: rgba(171, 176, 185, 0.12);\n transition: background-color 0.3s, border-color 0.3s;\n}\n.paraui-v3-stepper .component-stepper-item-icon .component-stepper-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: rgba(46, 55, 67, 0.7);\n vertical-align: middle;\n}\n.paraui-v3-stepper .component-stepper-item-icon .component-stepper-icon svg {\n color: inherit;\n}\n.paraui-v3-stepper .component-stepper-item-tail {\n position: absolute;\n top: 12px;\n left: 0;\n width: 100%;\n padding: 0 10px;\n}\n.paraui-v3-stepper .component-stepper-item-tail::after {\n display: inline-block;\n width: 100%;\n height: 1px;\n border-radius: 1px;\n transition: background 0.3s;\n content: \"\";\n}\n.paraui-v3-stepper .component-stepper-item-title {\n display: inline-block;\n color: rgba(46, 55, 67, 0.7);\n font-size: 14px;\n font-weight: 400;\n line-height: 30px;\n}\n.paraui-v3-stepper .component-stepper-item-title::after {\n position: absolute;\n display: block;\n height: 1px;\n content: \"\";\n top: 15px;\n left: calc(50% + 30px);\n right: calc(-50% + 30px);\n}\n.paraui-v3-stepper .component-stepper-item-subtitle {\n display: inline;\n margin-left: 8px;\n color: rgb(46, 55, 67);\n font-weight: normal;\n font-size: 14px;\n}\n.paraui-v3-stepper .component-stepper-item-description {\n color: rgb(46, 55, 67);\n font-size: 14px;\n}\n.paraui-v3-stepper .component-stepper-item-wait .component-stepper-item-icon {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-stepper .component-stepper-item-wait .component-stepper-item-icon > .component-stepper-icon {\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-stepper .component-stepper-item-wait .component-stepper-item-icon > .component-stepper-icon .component-stepper-icon-dot {\n background: rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-stepper .component-stepper-item-wait > .component-stepper-item-container > .component-stepper-item-content > .component-stepper-item-title {\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-stepper .component-stepper-item-wait > .component-stepper-item-container > .component-stepper-item-content > .component-stepper-item-title::after {\n border-top: 1px dashed rgba(171, 176, 185, 0.4);\n height: 0;\n background: transparent;\n}\n.paraui-v3-stepper .component-stepper-item-wait > .component-stepper-item-container > .component-stepper-item-content > .component-stepper-item-description {\n color: rgb(235, 96, 84);\n}\n.paraui-v3-stepper .component-stepper-item-wait > .component-stepper-item-container > .component-stepper-item-tail::after {\n border-left: 1px dashed rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-stepper .component-stepper-item-process .component-stepper-item-icon {\n background-color: rgb(255, 255, 255);\n}\n.paraui-v3-stepper .component-stepper-item-process .component-stepper-item-icon > .component-stepper-icon {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-stepper .component-stepper-item-process .component-stepper-item-icon > .component-stepper-icon .component-stepper-icon-dot {\n background: rgb(54, 102, 214);\n}\n.paraui-v3-stepper .component-stepper-item-process > .component-stepper-item-container > .component-stepper-item-content > .component-stepper-item-title {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-stepper .component-stepper-item-process > .component-stepper-item-container > .component-stepper-item-content > .component-stepper-item-title::after {\n background: linear-gradient(90deg, rgb(61, 102, 248), rgb(119, 147, 249) 74%, rgb(216, 223, 250));\n}\n.paraui-v3-stepper .component-stepper-item-process > .component-stepper-item-container > .component-stepper-item-content > .component-stepper-item-description {\n color: rgb(46, 55, 67);\n}\n.paraui-v3-stepper .component-stepper-item-process > .component-stepper-item-container > .component-stepper-item-tail::after {\n background: linear-gradient(180deg, rgb(61, 102, 248), rgb(119, 147, 249) 74%, rgb(216, 223, 250));\n}\n.paraui-v3-stepper .component-stepper-item-process > .component-stepper-item-container > .component-stepper-item-icon {\n background: rgb(54, 102, 214);\n}\n.paraui-v3-stepper .component-stepper-item-process > .component-stepper-item-container > .component-stepper-item-icon .component-stepper-icon {\n color: rgb(255, 255, 255);\n}\n.paraui-v3-stepper .component-stepper-item-process > .component-stepper-item-container > .component-stepper-item-title {\n font-weight: 400;\n}\n.paraui-v3-stepper .component-stepper-item-finish .component-stepper-item-icon {\n background-color: rgba(54, 102, 214, 0.8);\n}\n.paraui-v3-stepper .component-stepper-item-finish .component-stepper-item-icon > .component-stepper-icon {\n color: rgb(255, 255, 255);\n}\n.paraui-v3-stepper .component-stepper-item-finish .component-stepper-item-icon > .component-stepper-icon .component-stepper-icon-dot {\n background: rgb(54, 102, 214);\n}\n.paraui-v3-stepper .component-stepper-item-finish > .component-stepper-item-container > .component-stepper-item-content > .component-stepper-item-title {\n color: rgb(46, 55, 67);\n}\n.paraui-v3-stepper .component-stepper-item-finish > .component-stepper-item-container > .component-stepper-item-content > .component-stepper-item-title::after {\n background-color: rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-stepper .component-stepper-item-finish > .component-stepper-item-container > .component-stepper-item-content > .component-stepper-item-description {\n color: rgb(46, 55, 67);\n}\n.paraui-v3-stepper .component-stepper-item-finish > .component-stepper-item-container > .component-stepper-item-tail::after {\n border-left: 1px solid rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-stepper .component-stepper-item-error .component-stepper-item-icon {\n background-color: rgb(255, 255, 255);\n border-color: rgb(235, 96, 84);\n}\n.paraui-v3-stepper .component-stepper-item-error .component-stepper-item-icon > .component-stepper-icon {\n color: rgb(235, 96, 84);\n}\n.paraui-v3-stepper .component-stepper-item-error .component-stepper-item-icon > .component-stepper-icon .component-stepper-icon-dot {\n background: rgb(235, 96, 84);\n}\n.paraui-v3-stepper .component-stepper-item-error > .component-stepper-item-container > .component-stepper-item-content > .component-stepper-item-title {\n color: rgb(235, 96, 84);\n}\n.paraui-v3-stepper .component-stepper-item-error > .component-stepper-item-container > .component-stepper-item-content > .component-stepper-item-title::after {\n background-color: rgba(248, 249, 251, 0.8);\n}\n.paraui-v3-stepper .component-stepper-item-error > .component-stepper-item-container > .component-stepper-item-content > .component-stepper-item-description {\n color: rgb(235, 96, 84);\n}\n.paraui-v3-stepper .component-stepper-item-error > .component-stepper-item-container > .component-stepper-item-tail::after {\n background-color: rgba(248, 249, 251, 0.8);\n}\n.paraui-v3-stepper .component-stepper-item.component-stepper-next-error .component-stepper-item-title::after {\n background: rgb(235, 96, 84);\n}\n.paraui-v3-stepper .component-stepper-item-disabled {\n cursor: not-allowed;\n}\n.paraui-v3-stepper .component-stepper .component-stepper-item:not(.component-stepper-item-active) > .component-stepper-item-container[role=button] {\n cursor: pointer;\n}\n.paraui-v3-stepper .component-stepper .component-stepper-item:not(.component-stepper-item-active) > .component-stepper-item-container[role=button] .component-stepper-item-title,\n.paraui-v3-stepper .component-stepper .component-stepper-item:not(.component-stepper-item-active) > .component-stepper-item-container[role=button] .component-stepper-item-subtitle,\n.paraui-v3-stepper .component-stepper .component-stepper-item:not(.component-stepper-item-active) > .component-stepper-item-container[role=button] .component-stepper-item-description,\n.paraui-v3-stepper .component-stepper .component-stepper-item:not(.component-stepper-item-active) > .component-stepper-item-container[role=button] .component-stepper-item-icon .component-stepper-icon {\n transition: color 0.3s;\n}\n.paraui-v3-stepper .component-stepper .component-stepper-item:not(.component-stepper-item-active) > .component-stepper-item-container[role=button]:hover .component-stepper-item-title,\n.paraui-v3-stepper .component-stepper .component-stepper-item:not(.component-stepper-item-active) > .component-stepper-item-container[role=button]:hover .component-stepper-item-subtitle,\n.paraui-v3-stepper .component-stepper .component-stepper-item:not(.component-stepper-item-active) > .component-stepper-item-container[role=button]:hover .component-stepper-item-description {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-stepper .component-stepper .component-stepper-item:not(.component-stepper-item-active):not(.component-stepper-item-process) > .component-stepper-item-container[role=button]:hover .component-stepper-item-icon {\n border-color: rgb(54, 102, 214);\n}\n.paraui-v3-stepper .component-stepper .component-stepper-item:not(.component-stepper-item-active):not(.component-stepper-item-process) > .component-stepper-item-container[role=button]:hover .component-stepper-item-icon .component-stepper-icon {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-stepper .component-stepper-item-custom > .component-stepper-item-container > .component-stepper-item-icon {\n height: auto;\n border: 0;\n}\n.paraui-v3-stepper .component-stepper-item-custom > .component-stepper-item-container > .component-stepper-item-icon > .component-stepper-icon {\n top: 0;\n left: 0;\n width: 30px;\n height: 30px;\n background-color: rgba(171, 176, 185, 0.12);\n border-radius: 50%;\n}\n.paraui-v3-stepper .component-stepper-item-custom.component-stepper-item-process .component-stepper-item-icon > .component-stepper-icon {\n background: rgb(54, 102, 214);\n}\n.paraui-v3-stepper.component-stepper-horizontal:not(.component-stepper-label-vertical) .component-stepper-item {\n white-space: nowrap;\n}\n.paraui-v3-stepper.component-stepper-horizontal:not(.component-stepper-label-vertical) .component-stepper-item:first-child {\n padding-left: 0;\n}\n.paraui-v3-stepper.component-stepper-horizontal:not(.component-stepper-label-vertical) .component-stepper-item:last-child .component-stepper-item-title {\n padding-right: 0;\n}\n.paraui-v3-stepper.component-stepper-horizontal:not(.component-stepper-label-vertical) .component-stepper-item-tail {\n display: none;\n}\n.paraui-v3-stepper.component-stepper-horizontal:not(.component-stepper-label-vertical) .component-stepper-item-description {\n max-width: 140px;\n white-space: normal;\n}\n.paraui-v3-stepper.component-stepper:not(.component-stepper-vertical) .component-stepper-item-custom .component-stepper-item-icon {\n width: auto;\n background: none;\n}\n.paraui-v3-stepper.component-stepper:not(.component-stepper-vertical) .component-stepper-item-custom.component-stepper-item-process .component-stepper-item-icon {\n background: rgb(54, 102, 214);\n}\n.paraui-v3-stepper.component-stepper:not(.component-stepper-vertical) .component-stepper-item-custom.component-stepper-item-finish .component-stepper-item-icon {\n background: rgba(54, 102, 214, 0.8);\n}\n.paraui-v3-stepper.component-stepper-small.component-stepper-horizontal:not(.component-stepper-label-vertical) .component-stepper-item {\n padding-left: 12px;\n}\n.paraui-v3-stepper.component-stepper-small.component-stepper-horizontal:not(.component-stepper-label-vertical) .component-stepper-item:first-child {\n padding-left: 0;\n}\n.paraui-v3-stepper.component-stepper-small .component-stepper-item-icon {\n width: 24px;\n height: 24px;\n margin: 0 8px 0 0;\n font-size: 12px;\n line-height: 24px;\n text-align: center;\n border-radius: 24px;\n}\n.paraui-v3-stepper.component-stepper-small .component-stepper-item-title {\n padding-right: 12px;\n font-size: 14px;\n line-height: 24px;\n}\n.paraui-v3-stepper.component-stepper-small .component-stepper-item-title::after {\n top: 12px;\n}\n.paraui-v3-stepper.component-stepper-small .component-stepper-item-description {\n color: rgb(46, 55, 67);\n font-size: 14px;\n}\n.paraui-v3-stepper.component-stepper-small .component-stepper-item-tail {\n top: 8px;\n}\n.paraui-v3-stepper.component-stepper-small .component-stepper-item-custom .component-stepper-item-icon {\n width: inherit;\n height: inherit;\n line-height: inherit;\n background: none;\n border: 0;\n border-radius: 0;\n}\n.paraui-v3-stepper.component-stepper-small .component-stepper-item-custom .component-stepper-item-icon > .component-stepper-icon {\n font-size: 24px;\n line-height: 24px;\n transform: none;\n}\n.paraui-v3-stepper.component-stepper-vertical {\n display: flex;\n flex-direction: column;\n}\n.paraui-v3-stepper.component-stepper-vertical > .component-stepper-item {\n display: block;\n flex: 1 0 auto;\n padding-left: 0;\n overflow: visible;\n}\n.paraui-v3-stepper.component-stepper-vertical > .component-stepper-item .component-stepper-item-icon {\n float: left;\n margin-right: 16px;\n}\n.paraui-v3-stepper.component-stepper-vertical > .component-stepper-item .component-stepper-item-content {\n display: block;\n min-height: 68px;\n overflow: hidden;\n}\n.paraui-v3-stepper.component-stepper-vertical > .component-stepper-item .component-stepper-item-title {\n line-height: 32px;\n}\n.paraui-v3-stepper.component-stepper-vertical > .component-stepper-item .component-stepper-item-description {\n padding-bottom: 12px;\n}\n.paraui-v3-stepper.component-stepper-vertical > .component-stepper-item > .component-stepper-item-container {\n flex-direction: row;\n align-items: flex-start;\n}\n.paraui-v3-stepper.component-stepper-vertical > .component-stepper-item > .component-stepper-item-container > .component-stepper-item-tail {\n position: absolute;\n top: 0;\n left: 15px;\n width: 1px;\n height: 100%;\n padding: 36px 0 6px;\n}\n.paraui-v3-stepper.component-stepper-vertical > .component-stepper-item > .component-stepper-item-container > .component-stepper-item-tail::after {\n width: 1px;\n height: 100%;\n}\n.paraui-v3-stepper.component-stepper-vertical > .component-stepper-item:not(:last-child) > .component-stepper-item-container > .component-stepper-item-tail {\n display: block;\n}\n.paraui-v3-stepper.component-stepper-vertical > .component-stepper-item > .component-stepper-item-container > .component-stepper-item-content > .component-stepper-item-title::after {\n display: none;\n}\n.paraui-v3-stepper.component-stepper-vertical.component-stepper-small .component-stepper-item-container .component-stepper-item-tail {\n position: absolute;\n top: 0;\n left: 12px;\n padding: 30px 0 6px;\n}\n.paraui-v3-stepper.component-stepper-vertical.component-stepper-small .component-stepper-item-container .component-stepper-item-title {\n line-height: 24px;\n}\n.paraui-v3-stepper.component-stepper-label-vertical .component-stepper-item {\n overflow: visible;\n}\n.paraui-v3-stepper.component-stepper-label-vertical .component-stepper-item-tail {\n margin-left: 58px;\n padding: 3.5px 24px;\n}\n.paraui-v3-stepper.component-stepper-label-vertical .component-stepper-item-content {\n display: block;\n width: 116px;\n margin-top: 8px;\n text-align: center;\n}\n.paraui-v3-stepper.component-stepper-label-vertical .component-stepper-item-icon {\n display: inline-block;\n margin-left: 42px;\n}\n.paraui-v3-stepper.component-stepper-label-vertical .component-stepper-item-title {\n padding-right: 0;\n padding-left: 0;\n}\n.paraui-v3-stepper.component-stepper-label-vertical .component-stepper-item-title::after {\n display: none;\n}\n.paraui-v3-stepper.component-stepper-label-vertical .component-stepper-item-subtitle {\n display: block;\n margin-bottom: 4px;\n margin-left: 0;\n line-height: 1.5715;\n}\n.paraui-v3-stepper.component-stepper-label-vertical.component-stepper-small:not(.component-stepper-dot) .component-stepper-item-icon {\n margin-left: 46px;\n}";
|
|
34
35
|
styleInject(css_248z);
|
|
35
36
|
|
|
37
|
+
//steps
|
|
36
38
|
var Stepper = function Stepper(props) {
|
|
37
39
|
var _props$current = props.current,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
40
|
+
current = _props$current === void 0 ? 0 : _props$current,
|
|
41
|
+
activeStep = props.activeStep,
|
|
42
|
+
_props$mode = props.mode,
|
|
43
|
+
mode = _props$mode === void 0 ? 'number' : _props$mode,
|
|
44
|
+
steps = props.steps,
|
|
45
|
+
_props$direction = props.direction,
|
|
46
|
+
direction = _props$direction === void 0 ? 'horizontal' : _props$direction,
|
|
47
|
+
children = props.children,
|
|
48
|
+
className = props.className,
|
|
49
|
+
restProps = __rest(props, ["current", "activeStep", "mode", "steps", "direction", "children", "className"]);
|
|
50
|
+
var prefixCls = "".concat($rcPrefixCls, "-stepper");
|
|
51
|
+
//内置finish、error 图标
|
|
51
52
|
var icons = {
|
|
52
53
|
finish: Icons['done'],
|
|
53
54
|
error: Icons['done']
|
|
54
|
-
};
|
|
55
|
-
|
|
55
|
+
};
|
|
56
|
+
//步骤图标渲染
|
|
56
57
|
var stepIconRender = function stepIconRender(_ref) {
|
|
57
58
|
var node = _ref.node,
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
status = _ref.status;
|
|
60
60
|
if (status === 'finish') {
|
|
61
61
|
return /*#__PURE__*/React__default.cloneElement(node, {}, Icons['done']);
|
|
62
62
|
}
|
|
63
|
-
|
|
64
63
|
return node;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
|
|
64
|
+
};
|
|
65
|
+
//渲染Step
|
|
68
66
|
var renderStep = function renderStep() {
|
|
69
67
|
if (!(steps === null || steps === void 0 ? void 0 : steps.length)) return children;
|
|
70
68
|
return steps.map(function (item, index) {
|
|
71
69
|
var label = '';
|
|
72
70
|
var icon = null;
|
|
73
|
-
|
|
74
71
|
if (mode === 'number') {
|
|
75
72
|
label = item;
|
|
76
73
|
icon = Icons[index + 1];
|
|
@@ -78,14 +75,12 @@ var Stepper = function Stepper(props) {
|
|
|
78
75
|
label = item.label;
|
|
79
76
|
icon = item.icon;
|
|
80
77
|
}
|
|
81
|
-
|
|
82
78
|
return jsx(Stepper.Step, {
|
|
83
79
|
title: label,
|
|
84
80
|
icon: icon
|
|
85
81
|
}, index);
|
|
86
82
|
});
|
|
87
83
|
};
|
|
88
|
-
|
|
89
84
|
return jsx(RcSteps, Object.assign({}, restProps, {
|
|
90
85
|
className: clsx("".concat($prefixCls, "-stepper"), className),
|
|
91
86
|
current: activeStep !== null && activeStep !== void 0 ? activeStep : current,
|
package/Styles/form.scss
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.#{$prefixCls}-form {
|
|
2
|
-
.#{$prefixCls}-helper-text {
|
|
3
|
-
min-height: 20px;
|
|
4
|
-
}
|
|
5
|
-
}
|
|
1
|
+
.#{$prefixCls}-form {
|
|
2
|
+
.#{$prefixCls}-helper-text {
|
|
3
|
+
min-height: 20px;
|
|
4
|
+
}
|
|
5
|
+
}
|
package/Styles/index.scss
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
@import "normalize";
|
|
2
|
-
@import "theme";
|
|
3
|
-
@import "scrollbar";
|
|
4
|
-
@import "form";
|
|
5
|
-
|
|
6
|
-
* {
|
|
7
|
-
font-family: $font-family;
|
|
8
|
-
margin: 0;
|
|
9
|
-
padding: 0;
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
outline: none;
|
|
12
|
-
-webkit-tap-highlight-color: transparent;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
html, body {
|
|
16
|
-
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
overflow: hidden;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
ol, ul {
|
|
22
|
-
list-style: none;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
a,
|
|
26
|
-
h1,
|
|
27
|
-
h2,
|
|
28
|
-
h3,
|
|
29
|
-
h4,
|
|
30
|
-
h5,
|
|
31
|
-
h6,
|
|
32
|
-
input,
|
|
33
|
-
select,
|
|
34
|
-
button,
|
|
35
|
-
textarea {
|
|
36
|
-
outline: none;
|
|
37
|
-
}
|
|
1
|
+
@import "normalize";
|
|
2
|
+
@import "theme";
|
|
3
|
+
@import "scrollbar";
|
|
4
|
+
@import "form";
|
|
5
|
+
|
|
6
|
+
* {
|
|
7
|
+
font-family: $font-family;
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
outline: none;
|
|
12
|
+
-webkit-tap-highlight-color: transparent;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
html, body {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
overflow: hidden;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
ol, ul {
|
|
22
|
+
list-style: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
a,
|
|
26
|
+
h1,
|
|
27
|
+
h2,
|
|
28
|
+
h3,
|
|
29
|
+
h4,
|
|
30
|
+
h5,
|
|
31
|
+
h6,
|
|
32
|
+
input,
|
|
33
|
+
select,
|
|
34
|
+
button,
|
|
35
|
+
textarea {
|
|
36
|
+
outline: none;
|
|
37
|
+
}
|