@para-ui/core 4.0.84 → 4.0.85
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/ComboSelect/index.js +4 -1
- package/CycleSelector/index.js +1 -2
- package/Desktop/index.js +2 -2
- package/DynamicMultiBox/index.js +4 -2
- package/Form/index.js +5 -2
- package/FormItem/index.js +5 -2
- package/Image/index.js +11 -12
- package/Menu/index.js +347 -286
- package/Progress/index.js +41 -40
- package/README.md +6 -0
- package/TextEditor/index.js +3 -3
- package/Timeline/index.js +14 -20
- package/Tree/index.js +8 -4
- package/_verture/{index-1ef401c5.js → index-d068959c.js} +395 -313
- package/index.js +2 -2
- package/package.json +1 -1
- package/umd/CycleSelector.js +1 -1
- /package/_verture/{index-d49daa78.js → index-73a11529.js} +0 -0
package/Progress/index.js
CHANGED
|
@@ -8,19 +8,19 @@ import Close from '@para-ui/icons/Close';
|
|
|
8
8
|
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
9
9
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
percent =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
const Steps = props => {
|
|
12
|
+
const {
|
|
13
|
+
steps,
|
|
14
|
+
percent = 0,
|
|
15
|
+
strokeWidth = 8,
|
|
16
|
+
strokeColor,
|
|
17
|
+
trailColor,
|
|
18
|
+
children
|
|
19
|
+
} = props;
|
|
20
20
|
/** 计算出应该高亮多少步 **/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
for (
|
|
21
|
+
const current = typeof percent === 'number' ? Math.round(steps * (percent / 100)) : 1;
|
|
22
|
+
const styledSteps = [];
|
|
23
|
+
for (let i = 0; i < steps; i += 1) {
|
|
24
24
|
styledSteps.push(jsx("div", {
|
|
25
25
|
className: i <= current - 1 ? 'steps-item steps-item-active' : 'steps-item',
|
|
26
26
|
style: {
|
|
@@ -64,11 +64,11 @@ function validProgress(progress) {
|
|
|
64
64
|
* @param gradients 渐变的参数
|
|
65
65
|
* @return {string} 样式值
|
|
66
66
|
*/
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
Object.keys(gradients).forEach(
|
|
67
|
+
const sortGradient = gradients => {
|
|
68
|
+
let tempArr = [];
|
|
69
|
+
Object.keys(gradients).forEach(key => {
|
|
70
70
|
// 拿到百分比的数字
|
|
71
|
-
|
|
71
|
+
const formattedKey = parseFloat(key.replace(/%/g, ''));
|
|
72
72
|
// 进行序列化
|
|
73
73
|
if (!isNaN(formattedKey)) {
|
|
74
74
|
tempArr.push({
|
|
@@ -78,12 +78,12 @@ var sortGradient = function sortGradient(gradients) {
|
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
// 排序 从小到大
|
|
81
|
-
tempArr = tempArr.sort(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
tempArr = tempArr.sort((a, b) => a.key - b.key);
|
|
82
|
+
return tempArr.map(_ref => {
|
|
83
|
+
let {
|
|
84
|
+
key,
|
|
85
|
+
value
|
|
86
|
+
} = _ref;
|
|
87
87
|
return "".concat(value, " ").concat(key, "%");
|
|
88
88
|
}).join(', ');
|
|
89
89
|
};
|
|
@@ -105,17 +105,16 @@ var sortGradient = function sortGradient(gradients) {
|
|
|
105
105
|
* @param {string} strokeColor 颜色值
|
|
106
106
|
* @return 返回 backgroundImage 的样式值
|
|
107
107
|
*/
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
direction = _strokeColor$directio === void 0 ? directionConfig === 'rtl' ? 'to left' : 'to right' : _strokeColor$directio,
|
|
108
|
+
const handleGradient = (strokeColor, directionConfig) => {
|
|
109
|
+
const {
|
|
110
|
+
from = '#3D66F8',
|
|
111
|
+
to = '#4F93F0',
|
|
112
|
+
direction = directionConfig === 'rtl' ? 'to left' : 'to right'
|
|
113
|
+
} = strokeColor,
|
|
115
114
|
rest = __rest(strokeColor, ["from", "to", "direction"]);
|
|
116
115
|
// 剩余参数有值说明除了from to direction 还传了 另外的参数
|
|
117
116
|
if (Object.keys(rest).length !== 0) {
|
|
118
|
-
|
|
117
|
+
const sortedGradients = sortGradient(rest);
|
|
119
118
|
return {
|
|
120
119
|
backgroundImage: "linear-gradient(".concat(direction, ", ").concat(sortedGradients, ")")
|
|
121
120
|
};
|
|
@@ -124,23 +123,25 @@ var handleGradient = function handleGradient(strokeColor, directionConfig) {
|
|
|
124
123
|
backgroundImage: "linear-gradient(".concat(direction, ", ").concat(from, ", ").concat(to, ")")
|
|
125
124
|
};
|
|
126
125
|
};
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
126
|
+
const Line = props => {
|
|
127
|
+
const {
|
|
128
|
+
direction: directionConfig,
|
|
129
|
+
percent,
|
|
130
|
+
strokeWidth,
|
|
131
|
+
strokeColor,
|
|
132
|
+
strokeLinecap,
|
|
133
|
+
trailColor
|
|
134
|
+
} = props;
|
|
134
135
|
/** 进度条高亮部分的颜色样式 **/
|
|
135
|
-
|
|
136
|
+
const backgroundProps = strokeColor && typeof strokeColor !== 'string' ? handleGradient(strokeColor, directionConfig) : {
|
|
136
137
|
background: strokeColor
|
|
137
138
|
};
|
|
138
139
|
/** 进度条轨道部分的颜色样式 **/
|
|
139
|
-
|
|
140
|
+
const trailStyle = trailColor ? {
|
|
140
141
|
backgroundColor: trailColor
|
|
141
142
|
} : undefined;
|
|
142
143
|
/** 进度条百分比的样式 **/
|
|
143
|
-
|
|
144
|
+
const percentStyle = Object.assign({
|
|
144
145
|
width: "".concat(validProgress(percent), "%"),
|
|
145
146
|
height: strokeWidth || 8,
|
|
146
147
|
borderRadius: strokeLinecap === 'square' ? 0 : ''
|
package/README.md
CHANGED
package/TextEditor/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import '../_verture/index-ca413216.js';
|
|
|
23
23
|
* @date 2022/09/06 18:00
|
|
24
24
|
* @description 存放富文本编辑器的一些默认配置
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
const TOOL_BAR_CONFIG = ['headerSelect', 'blockquote', '|', 'bold', 'underline', 'italic', {
|
|
27
27
|
key: 'group-more-style',
|
|
28
28
|
title: '更多',
|
|
29
29
|
iconSvg: '<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',
|
|
@@ -59,8 +59,8 @@ var zh = {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
var localeJson = {
|
|
62
|
-
zh
|
|
63
|
-
en
|
|
62
|
+
zh,
|
|
63
|
+
en
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-text-editor.is-error .text-editor-content {\n border-color: rgb(244, 66, 66);\n}\n.paraui-v4-text-editor .w-e-max-length-info {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-text-editor .w-e-bar-item > button:hover {\n background: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item {\n padding-left: 0;\n padding-right: 0;\n display: flex;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item > button {\n flex: 1;\n display: flex;\n justify-content: flex-start;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item > button:hover {\n background: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-text-editor .w-e-full-screen-container {\n z-index: 1000;\n}\n.paraui-v4-text-editor .text-editor-content {\n border: 1px solid rgb(212, 218, 227);\n border-radius: 4px;\n padding: 1px 0;\n background-color: #fff;\n}\n.paraui-v4-text-editor .text-editor-content > div:nth-child(1) {\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-text-editor .text-editor-content div[contenteditable=false] {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-text-editor .text-editor-content div[contenteditable=false]:hover {\n cursor: not-allowed;\n}\n.paraui-v4-text-editor .preview-mode > div:nth-child(1) {\n border-bottom: none;\n}";
|
package/Timeline/index.js
CHANGED
|
@@ -2,33 +2,27 @@ import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
+
import { _ as _defineProperty } from '../_verture/defineProperty-6f62bb2a.js';
|
|
5
6
|
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
6
7
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
8
|
+
import '../_verture/typeof-adeedc13.js';
|
|
7
9
|
|
|
8
10
|
//TimelineItem
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} = props,
|
|
11
|
+
var TimelineItem = function TimelineItem(props) {
|
|
12
|
+
var className = props.className,
|
|
13
|
+
color = props.color,
|
|
14
|
+
dot = props.dot,
|
|
15
|
+
_props$pending = props.pending,
|
|
16
|
+
pending = _props$pending === void 0 ? false : _props$pending;
|
|
17
|
+
props.position;
|
|
18
|
+
var label = props.label,
|
|
19
|
+
children = props.children,
|
|
19
20
|
restProps = __rest(props, ["className", "color", "dot", "pending", "position", "label", "children"]);
|
|
20
|
-
|
|
21
|
+
var prefixCls = "".concat($rcPrefixCls, "-timeline");
|
|
21
22
|
//item cls
|
|
22
|
-
|
|
23
|
-
["".concat(prefixCls, "-item")]: true,
|
|
24
|
-
["".concat(prefixCls, "-item-pending")]: pending
|
|
25
|
-
}, className);
|
|
23
|
+
var itemClassName = clsx(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-item"), true), "".concat(prefixCls, "-item-pending"), pending), className);
|
|
26
24
|
//dot cls
|
|
27
|
-
|
|
28
|
-
["".concat(prefixCls, "-item-head")]: true,
|
|
29
|
-
["".concat(prefixCls, "-item-head-custom")]: !!dot,
|
|
30
|
-
["".concat(prefixCls, "-item-head-").concat(color)]: color
|
|
31
|
-
});
|
|
25
|
+
var dotClassName = clsx(_defineProperty(_defineProperty(_defineProperty({}, "".concat(prefixCls, "-item-head"), true), "".concat(prefixCls, "-item-head-custom"), !!dot), "".concat(prefixCls, "-item-head-").concat(color), color));
|
|
32
26
|
return jsxs("li", Object.assign({}, restProps, {
|
|
33
27
|
className: itemClassName
|
|
34
28
|
}, {
|
package/Tree/index.js
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { T as Tree } from '../_verture/index-
|
|
2
|
-
export { T as default } from '../_verture/index-
|
|
1
|
+
import { T as Tree } from '../_verture/index-d068959c.js';
|
|
2
|
+
export { T as default } from '../_verture/index-d068959c.js';
|
|
3
|
+
import '../_verture/toConsumableArray-599cd94a.js';
|
|
4
|
+
import '../_verture/slicedToArray-61604a6c.js';
|
|
5
|
+
import '../_verture/defineProperty-6f62bb2a.js';
|
|
6
|
+
import '../_verture/typeof-adeedc13.js';
|
|
7
|
+
import '../_verture/index-8ac46bd9.js';
|
|
8
|
+
import '../_verture/typeof-6ec38efd.js';
|
|
3
9
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
4
10
|
import 'react/jsx-runtime';
|
|
5
11
|
import 'react';
|
|
6
12
|
import 'rc-tree';
|
|
7
13
|
import 'clsx';
|
|
8
|
-
import '../_verture/typeof-adeedc13.js';
|
|
9
14
|
import '@para-ui/icons/LoadingF';
|
|
10
15
|
import '@para-ui/icons/Document';
|
|
11
16
|
import '@para-ui/icons/DownTriangleF';
|
|
@@ -19,7 +24,6 @@ import '../_verture/constant-5317fc89.js';
|
|
|
19
24
|
import '@para-ui/icons/Forbid';
|
|
20
25
|
import '../_verture/style-inject.es-300983ab.js';
|
|
21
26
|
import '@para-ui/icons/Help';
|
|
22
|
-
import '../_verture/slicedToArray-61604a6c.js';
|
|
23
27
|
import 'react-dom';
|
|
24
28
|
import '@para-ui/icons/EditFile';
|
|
25
29
|
import '@para-ui/icons/PlusCircle';
|