@para-ui/core 3.0.27 → 3.0.29
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 +231 -358
- 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 +40 -82
- package/FormItem/index.d.ts +1 -1
- package/FormItem/index.js +13 -13
- 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 +43 -75
- 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 +16 -5
- package/Pagination/index.js +169 -188
- 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 +16 -0
- 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 +298 -686
- package/SelectorPicker/index.d.ts +2 -0
- package/SelectorPicker/index.js +64 -97
- package/SingleBox/index.js +29 -54
- 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/Switch/index.d.ts +2 -2
- package/Switch/index.js +19 -20
- package/Table/index.js +590 -1028
- package/Table/interface.d.ts +15 -6
- package/Table/tableBodyInterface.d.ts +4 -0
- package/Table/tablePagination.d.ts +1 -1
- package/Table/{tablePaginationInterFace.d.ts → tablePaginationInterface.d.ts} +4 -1
- 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 +89 -116
- 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-c40bd040.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.js +15 -15
- package/package.json +4 -5
- package/_verture/defineProperty-0590dc61.js +0 -16
package/Progress/index.js
CHANGED
|
@@ -5,23 +5,21 @@ import CompleteIcon from '@para-ui/icons/CheckCircleF';
|
|
|
5
5
|
import CloseCircleFilled from '@para-ui/icons/CloseCircleF';
|
|
6
6
|
import Check from '@para-ui/icons/Check';
|
|
7
7
|
import CloseIcon from '@para-ui/icons/Close';
|
|
8
|
-
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-
|
|
8
|
+
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
9
9
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
10
10
|
|
|
11
11
|
var Steps = function Steps(props) {
|
|
12
12
|
var steps = props.steps,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
_props$percent = props.percent,
|
|
14
|
+
percent = _props$percent === void 0 ? 0 : _props$percent,
|
|
15
|
+
_props$strokeWidth = props.strokeWidth,
|
|
16
|
+
strokeWidth = _props$strokeWidth === void 0 ? 8 : _props$strokeWidth,
|
|
17
|
+
strokeColor = props.strokeColor,
|
|
18
|
+
trailColor = props.trailColor,
|
|
19
|
+
children = props.children;
|
|
20
20
|
/** 计算出应该高亮多少步 **/
|
|
21
|
-
|
|
22
21
|
var current = typeof percent === "number" ? Math.round(steps * (percent / 100)) : 1;
|
|
23
22
|
var styledSteps = [];
|
|
24
|
-
|
|
25
23
|
for (var i = 0; i < steps; i += 1) {
|
|
26
24
|
styledSteps.push(jsx("div", {
|
|
27
25
|
className: i <= current - 1 ? "steps-item steps-item-active" : "steps-item",
|
|
@@ -32,7 +30,6 @@ var Steps = function Steps(props) {
|
|
|
32
30
|
}
|
|
33
31
|
}, i));
|
|
34
32
|
}
|
|
35
|
-
|
|
36
33
|
return jsxs("div", Object.assign({
|
|
37
34
|
className: "steps-outer"
|
|
38
35
|
}, {
|
|
@@ -49,11 +46,9 @@ function validProgress(progress) {
|
|
|
49
46
|
if (!progress || progress < 0) {
|
|
50
47
|
return 0;
|
|
51
48
|
}
|
|
52
|
-
|
|
53
49
|
if (progress > 100) {
|
|
54
50
|
return 100;
|
|
55
51
|
}
|
|
56
|
-
|
|
57
52
|
return progress;
|
|
58
53
|
}
|
|
59
54
|
|
|
@@ -69,27 +64,26 @@ function validProgress(progress) {
|
|
|
69
64
|
* @param gradients 渐变的参数
|
|
70
65
|
* @return {string} 样式值
|
|
71
66
|
*/
|
|
72
|
-
|
|
73
67
|
var sortGradient = function sortGradient(gradients) {
|
|
74
68
|
var tempArr = [];
|
|
75
69
|
Object.keys(gradients).forEach(function (key) {
|
|
76
70
|
// 拿到百分比的数字
|
|
77
|
-
var formattedKey = parseFloat(key.replace(/%/g, ""));
|
|
78
|
-
|
|
71
|
+
var formattedKey = parseFloat(key.replace(/%/g, ""));
|
|
72
|
+
// 进行序列化
|
|
79
73
|
if (!isNaN(formattedKey)) {
|
|
80
74
|
tempArr.push({
|
|
81
75
|
key: formattedKey,
|
|
82
76
|
value: gradients[key]
|
|
83
77
|
});
|
|
84
78
|
}
|
|
85
|
-
});
|
|
86
|
-
|
|
79
|
+
});
|
|
80
|
+
// 排序 从小到大
|
|
87
81
|
tempArr = tempArr.sort(function (a, b) {
|
|
88
82
|
return a.key - b.key;
|
|
89
83
|
});
|
|
90
84
|
return tempArr.map(function (_ref) {
|
|
91
85
|
var key = _ref.key,
|
|
92
|
-
|
|
86
|
+
value = _ref.value;
|
|
93
87
|
return "".concat(value, " ").concat(key, "%");
|
|
94
88
|
}).join(", ");
|
|
95
89
|
};
|
|
@@ -111,48 +105,41 @@ var sortGradient = function sortGradient(gradients) {
|
|
|
111
105
|
* @param {string} strokeColor 颜色值
|
|
112
106
|
* @return 返回 backgroundImage 的样式值
|
|
113
107
|
*/
|
|
114
|
-
|
|
115
108
|
var handleGradient = function handleGradient(strokeColor, directionConfig) {
|
|
116
109
|
var _strokeColor$from = strokeColor.from,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
110
|
+
from = _strokeColor$from === void 0 ? "#3D66F8" : _strokeColor$from,
|
|
111
|
+
_strokeColor$to = strokeColor.to,
|
|
112
|
+
to = _strokeColor$to === void 0 ? "#4F93F0" : _strokeColor$to,
|
|
113
|
+
_strokeColor$directio = strokeColor.direction,
|
|
114
|
+
direction = _strokeColor$directio === void 0 ? directionConfig === "rtl" ? "to left" : "to right" : _strokeColor$directio,
|
|
115
|
+
rest = __rest(strokeColor, ["from", "to", "direction"]);
|
|
116
|
+
// 剩余参数有值说明除了from to direction 还传了 另外的参数
|
|
125
117
|
if (Object.keys(rest).length !== 0) {
|
|
126
118
|
var sortedGradients = sortGradient(rest);
|
|
127
119
|
return {
|
|
128
120
|
backgroundImage: "linear-gradient(".concat(direction, ", ").concat(sortedGradients, ")")
|
|
129
121
|
};
|
|
130
122
|
}
|
|
131
|
-
|
|
132
123
|
return {
|
|
133
124
|
backgroundImage: "linear-gradient(".concat(direction, ", ").concat(from, ", ").concat(to, ")")
|
|
134
125
|
};
|
|
135
126
|
};
|
|
136
|
-
|
|
137
127
|
var Line = function Line(props) {
|
|
138
128
|
var directionConfig = props.direction,
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
129
|
+
percent = props.percent,
|
|
130
|
+
strokeWidth = props.strokeWidth,
|
|
131
|
+
strokeColor = props.strokeColor,
|
|
132
|
+
strokeLinecap = props.strokeLinecap,
|
|
133
|
+
trailColor = props.trailColor;
|
|
144
134
|
/** 进度条高亮部分的颜色样式 **/
|
|
145
|
-
|
|
146
135
|
var backgroundProps = strokeColor && typeof strokeColor !== "string" ? handleGradient(strokeColor, directionConfig) : {
|
|
147
136
|
background: strokeColor
|
|
148
137
|
};
|
|
149
138
|
/** 进度条轨道部分的颜色样式 **/
|
|
150
|
-
|
|
151
139
|
var trailStyle = trailColor ? {
|
|
152
140
|
backgroundColor: trailColor
|
|
153
141
|
} : undefined;
|
|
154
142
|
/** 进度条百分比的样式 **/
|
|
155
|
-
|
|
156
143
|
var percentStyle = Object.assign({
|
|
157
144
|
width: "".concat(validProgress(percent), "%"),
|
|
158
145
|
height: strokeWidth || 8,
|
|
@@ -173,19 +160,14 @@ var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下
|
|
|
173
160
|
styleInject(css_248z);
|
|
174
161
|
|
|
175
162
|
/** 进度条类型 **/
|
|
176
|
-
|
|
177
163
|
var ProgressTypes;
|
|
178
|
-
|
|
179
164
|
(function (ProgressTypes) {
|
|
180
165
|
ProgressTypes[ProgressTypes["line"] = 0] = "line";
|
|
181
166
|
ProgressTypes[ProgressTypes["circle"] = 1] = "circle";
|
|
182
167
|
ProgressTypes[ProgressTypes["dashboard"] = 2] = "dashboard";
|
|
183
168
|
})(ProgressTypes || (ProgressTypes = {}));
|
|
184
169
|
/** 进度条状态 **/
|
|
185
|
-
|
|
186
|
-
|
|
187
170
|
var ProgressStatuses;
|
|
188
|
-
|
|
189
171
|
(function (ProgressStatuses) {
|
|
190
172
|
ProgressStatuses[ProgressStatuses["normal"] = 0] = "normal";
|
|
191
173
|
ProgressStatuses[ProgressStatuses["exception"] = 1] = "exception";
|
|
@@ -193,8 +175,6 @@ var ProgressStatuses;
|
|
|
193
175
|
ProgressStatuses[ProgressStatuses["success"] = 3] = "success";
|
|
194
176
|
})(ProgressStatuses || (ProgressStatuses = {}));
|
|
195
177
|
/** 每个类型对应的进度条默认颜色 **/
|
|
196
|
-
|
|
197
|
-
|
|
198
178
|
var strokeColorMap = {
|
|
199
179
|
success: "rgba(83, 195, 27, 1)",
|
|
200
180
|
exception: "rgba(235, 96, 84, 1)",
|
|
@@ -203,38 +183,36 @@ var strokeColorMap = {
|
|
|
203
183
|
};
|
|
204
184
|
var Progress = function Progress(props) {
|
|
205
185
|
var _props$type = props.type,
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
186
|
+
type = _props$type === void 0 ? "line" : _props$type,
|
|
187
|
+
className = props.className,
|
|
188
|
+
style = props.style;
|
|
189
|
+
props.children;
|
|
190
|
+
var status = props.status,
|
|
191
|
+
_props$width = props.width,
|
|
192
|
+
width = _props$width === void 0 ? 132 : _props$width,
|
|
193
|
+
_props$showInfo = props.showInfo,
|
|
194
|
+
showInfo = _props$showInfo === void 0 ? true : _props$showInfo,
|
|
195
|
+
format = props.format,
|
|
196
|
+
success = props.success,
|
|
197
|
+
_props$percent = props.percent,
|
|
198
|
+
percent = _props$percent === void 0 ? 0 : _props$percent,
|
|
199
|
+
steps = props.steps,
|
|
200
|
+
direction = props.direction,
|
|
201
|
+
strokeColor = props.strokeColor,
|
|
202
|
+
_props$gapDegree = props.gapDegree,
|
|
203
|
+
gapDegree = _props$gapDegree === void 0 ? 75 : _props$gapDegree,
|
|
204
|
+
otherProps = __rest(props, ["type", "className", "style", "children", "status", "width", "showInfo", "format", "success", "percent", "steps", "direction", "strokeColor", "gapDegree"]);
|
|
225
205
|
/**
|
|
226
206
|
* 处理class
|
|
227
207
|
* @return {string}
|
|
228
208
|
*/
|
|
229
|
-
|
|
230
|
-
|
|
231
209
|
var classString = function classString() {
|
|
232
|
-
var str = "".concat($prefixCls, "-progress ").concat($prefixCls, "-progress-").concat(type || "default");
|
|
233
|
-
|
|
234
|
-
if (isSuccessStatus) str += " ".concat($prefixCls, "-progress-success-status");
|
|
235
|
-
|
|
236
|
-
if (status === "exception") str += " ".concat($prefixCls, "-progress-exception-status");
|
|
237
|
-
|
|
210
|
+
var str = "".concat($prefixCls, "-progress ").concat($prefixCls, "-progress-").concat(type || "default");
|
|
211
|
+
// 添加成功状态的class
|
|
212
|
+
if (isSuccessStatus) str += " ".concat($prefixCls, "-progress-success-status");
|
|
213
|
+
// 添加错误状态下的class
|
|
214
|
+
if (status === "exception") str += " ".concat($prefixCls, "-progress-exception-status");
|
|
215
|
+
// 添加active状态下的class
|
|
238
216
|
if (status === "active") str += " ".concat($prefixCls, "-progress-active-status");
|
|
239
217
|
if (className) str += " " + className;
|
|
240
218
|
return str;
|
|
@@ -243,37 +221,27 @@ var Progress = function Progress(props) {
|
|
|
243
221
|
* 处理进度条颜色
|
|
244
222
|
* @return {string}
|
|
245
223
|
*/
|
|
246
|
-
|
|
247
|
-
|
|
248
224
|
var strokeColorVal = function strokeColorVal() {
|
|
249
225
|
// 如果传了成功进度条的配置
|
|
250
226
|
if (strokeColor) return strokeColor;
|
|
251
|
-
|
|
252
227
|
if (success && success.percent < percent) {
|
|
253
228
|
return [success.strokeColor || strokeColorMap["success"], strokeColorMap["normal"]];
|
|
254
229
|
}
|
|
255
|
-
|
|
256
230
|
return isSuccessStatus ? strokeColorMap["success"] : strokeColorMap[status || "normal"];
|
|
257
231
|
};
|
|
258
232
|
/**
|
|
259
233
|
* 处理进度条的值
|
|
260
234
|
* @return {string}
|
|
261
235
|
*/
|
|
262
|
-
|
|
263
|
-
|
|
264
236
|
var renderPercent = function renderPercent() {
|
|
265
237
|
if (success && success.percent < percent && typeof percent === "number") {
|
|
266
238
|
return [success.percent, percent - success.percent];
|
|
267
239
|
}
|
|
268
|
-
|
|
269
240
|
return percent;
|
|
270
241
|
};
|
|
271
242
|
/** 标记是不是成功状态 **/
|
|
272
|
-
|
|
273
|
-
|
|
274
243
|
var isSuccessStatus = percent && percent === 100 && !status || status === "success";
|
|
275
244
|
/** style值 **/
|
|
276
|
-
|
|
277
245
|
var renderStyle = type === "circle" || type === "dashboard" ? {
|
|
278
246
|
width: width,
|
|
279
247
|
height: width
|
|
@@ -282,7 +250,6 @@ var Progress = function Progress(props) {
|
|
|
282
250
|
* 处理描述信息
|
|
283
251
|
* @return {string | ReactNode}
|
|
284
252
|
*/
|
|
285
|
-
|
|
286
253
|
var renderLabel = function renderLabel() {
|
|
287
254
|
if (format) return format(percent);
|
|
288
255
|
if (isSuccessStatus) return type === "circle" ? jsx(Check, {
|
|
@@ -298,8 +265,6 @@ var Progress = function Progress(props) {
|
|
|
298
265
|
return validProgress(percent) + "%";
|
|
299
266
|
};
|
|
300
267
|
/** 默认进度条 **/
|
|
301
|
-
|
|
302
|
-
|
|
303
268
|
var renderLineProgress = steps ? jsx(Steps, Object.assign({
|
|
304
269
|
steps: steps,
|
|
305
270
|
strokeColor: strokeColorVal(),
|
|
@@ -318,7 +283,6 @@ var Progress = function Progress(props) {
|
|
|
318
283
|
children: " "
|
|
319
284
|
}));
|
|
320
285
|
/** 圆形进度条 **/
|
|
321
|
-
|
|
322
286
|
var renderCircleProgress = jsx(Circle, Object.assign({
|
|
323
287
|
strokeWidth: 6,
|
|
324
288
|
trailWidth: 6,
|
|
@@ -327,8 +291,6 @@ var Progress = function Progress(props) {
|
|
|
327
291
|
prefixCls: "".concat($rcPrefixCls, "-progress")
|
|
328
292
|
}, otherProps));
|
|
329
293
|
/** 仪表盘 **/
|
|
330
|
-
|
|
331
|
-
|
|
332
294
|
var renderDashboardProgress = jsx(Circle, Object.assign({
|
|
333
295
|
strokeWidth: 6,
|
|
334
296
|
trailWidth: 6,
|
|
@@ -337,7 +299,6 @@ var Progress = function Progress(props) {
|
|
|
337
299
|
strokeColor: strokeColorVal(),
|
|
338
300
|
percent: renderPercent()
|
|
339
301
|
}, otherProps));
|
|
340
|
-
|
|
341
302
|
return jsx("div", Object.assign({
|
|
342
303
|
className: classString(),
|
|
343
304
|
style: style
|
package/Querying/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import { u as useFormatMessage } from '../_verture/useFormatMessage-
|
|
4
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
5
|
-
import { u as useGlobalProps } from '../_verture/useGlobalProps-
|
|
3
|
+
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
4
|
+
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
5
|
+
import { u as useGlobalProps } from '../_verture/useGlobalProps-1b846a65.js';
|
|
6
6
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
7
7
|
import 'react';
|
|
8
8
|
import '@para-ui/core/GlobalContext';
|
|
@@ -711,27 +711,25 @@ styleInject(css_248z);
|
|
|
711
711
|
var imageMap = {
|
|
712
712
|
'large': jsx(LargeSearch, {}),
|
|
713
713
|
'small': jsx(SmallSearch, {})
|
|
714
|
-
};
|
|
715
|
-
|
|
714
|
+
};
|
|
715
|
+
//Querying 查询中
|
|
716
716
|
var Querying = function Querying(props) {
|
|
717
717
|
var _useGlobalProps = useGlobalProps(props, 'Querying'),
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
718
|
+
className = _useGlobalProps.className,
|
|
719
|
+
style = _useGlobalProps.style,
|
|
720
|
+
_useGlobalProps$size = _useGlobalProps.size,
|
|
721
|
+
size = _useGlobalProps$size === void 0 ? 'large' : _useGlobalProps$size,
|
|
722
|
+
imageStyle = _useGlobalProps.imageStyle,
|
|
723
|
+
_useGlobalProps$image = _useGlobalProps.image,
|
|
724
|
+
image = _useGlobalProps$image === void 0 ? imageMap[size] : _useGlobalProps$image,
|
|
725
|
+
description = _useGlobalProps.description,
|
|
726
|
+
customQuerying = _useGlobalProps.customQuerying;
|
|
728
727
|
var intl = useFormatMessage('Querying', localeJson);
|
|
729
728
|
var des = typeof description !== 'undefined' ? description : intl({
|
|
730
729
|
id: 'querying'
|
|
731
730
|
});
|
|
732
731
|
var alt = typeof des === 'string' ? des : 'querying';
|
|
733
732
|
var imageNode = null;
|
|
734
|
-
|
|
735
733
|
if (typeof image === 'string') {
|
|
736
734
|
imageNode = jsx("img", {
|
|
737
735
|
src: image,
|
|
@@ -740,7 +738,6 @@ var Querying = function Querying(props) {
|
|
|
740
738
|
} else {
|
|
741
739
|
imageNode = image;
|
|
742
740
|
}
|
|
743
|
-
|
|
744
741
|
return jsx("div", Object.assign({
|
|
745
742
|
className: clsx("".concat($prefixCls, "-querying"), className, "".concat($prefixCls, "-querying-").concat(size)),
|
|
746
743
|
style: style
|
package/README.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## 版本: 3.0.29
|
|
2
|
+
|
|
3
|
+
para-ui/core@3.0.29 发布
|
|
4
|
+
【级联选择器-Cascader】解决弹窗超出不自适应
|
|
5
|
+
【抽屉-Drawer】优化多层抽屉逻辑,升级至rc-drawer@6.1.0
|
|
6
|
+
|
|
7
|
+
## 版本: 3.0.28
|
|
8
|
+
|
|
9
|
+
para-ui/core@3.0.28 发布
|
|
10
|
+
【分页-Pagination】增加自定义渲染布局
|
|
11
|
+
【表格-Table】增加 rowClassMapping 用来增加行的class
|
|
12
|
+
【选择器-Selector】修改主标题,副标题超出...,不显示提示
|
|
13
|
+
【表格-Table】HeadDataProps增加autoTips参数,来控制是否显示...
|
|
14
|
+
【穿梭款-Transfer】优化穿梭款初始化排序
|
|
15
|
+
【下拉选择器-SelectorPicker】默认挂载容器须同时满足overflow属性和出现滚动条,否则挂载到body
|
|
16
|
+
|
|
1
17
|
## 版本: 3.0.27
|
|
2
18
|
|
|
3
19
|
para-ui/core@3.0.27 发布
|
package/Radio/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-77980792.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import Label from '../Label/index.js';
|
|
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
|
import '../Help/index.js';
|
|
8
8
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
@@ -17,40 +17,36 @@ styleInject(css_248z);
|
|
|
17
17
|
|
|
18
18
|
var Radio = function Radio(props) {
|
|
19
19
|
var _props$className = props.className,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
21
|
+
labelTooltip = props.labelTooltip,
|
|
22
|
+
_props$label = props.label,
|
|
23
|
+
label = _props$label === void 0 ? '' : _props$label,
|
|
24
|
+
_props$size = props.size,
|
|
25
|
+
size = _props$size === void 0 ? 'large' : _props$size,
|
|
26
|
+
_props$disabled = props.disabled,
|
|
27
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
28
|
+
onChange = props.onChange,
|
|
29
|
+
style = props.style;
|
|
31
30
|
var _useState = useState(false),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
32
|
+
checkedCom = _useState2[0],
|
|
33
|
+
setCheckedCom = _useState2[1]; // 复选框状态
|
|
37
34
|
useEffect(function () {
|
|
38
35
|
if (props.defaultChecked !== undefined) setCheckedCom(props.defaultChecked);
|
|
39
36
|
}, []);
|
|
40
37
|
useEffect(function () {
|
|
41
38
|
if (props.checked !== undefined) setCheckedCom(props.checked);
|
|
42
|
-
}, [props.checked]);
|
|
43
|
-
|
|
39
|
+
}, [props.checked]);
|
|
40
|
+
// 点击选择
|
|
44
41
|
var clickCheck = function clickCheck(e) {
|
|
45
42
|
e.preventDefault();
|
|
46
|
-
if (disabled) return;
|
|
47
|
-
|
|
43
|
+
if (disabled) return;
|
|
44
|
+
// 不可受控组件
|
|
48
45
|
if (props.checked === undefined) setCheckedCom(!checkedCom);
|
|
49
46
|
e.target.checked = !checkedCom;
|
|
50
47
|
onChange && onChange(e, !checkedCom);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
};
|
|
49
|
+
// 处理className
|
|
54
50
|
var handClass = function handClass() {
|
|
55
51
|
var str = $prefixCls + '-radio';
|
|
56
52
|
if (className) str += ' ' + className;
|
|
@@ -59,29 +55,21 @@ var Radio = function Radio(props) {
|
|
|
59
55
|
if (checkedCom) str += " ".concat($prefixCls, "-radio-checked");
|
|
60
56
|
return str;
|
|
61
57
|
};
|
|
62
|
-
|
|
63
58
|
var handLabelClass = function handLabelClass() {
|
|
64
59
|
var str = 'radio-label';
|
|
65
|
-
|
|
66
60
|
if (labelTooltip && labelTooltip.className) {
|
|
67
61
|
str += ' ' + labelTooltip.className;
|
|
68
62
|
}
|
|
69
|
-
|
|
70
63
|
return str;
|
|
71
64
|
};
|
|
72
65
|
/** 处理帮组classNaem */
|
|
73
|
-
|
|
74
|
-
|
|
75
66
|
var handHelpClassName = function handHelpClassName() {
|
|
76
67
|
var str = ' radio-help';
|
|
77
|
-
|
|
78
68
|
if (labelTooltip && labelTooltip.helpClassName) {
|
|
79
69
|
str += ' ' + labelTooltip.helpClassName;
|
|
80
70
|
}
|
|
81
|
-
|
|
82
71
|
return str;
|
|
83
72
|
};
|
|
84
|
-
|
|
85
73
|
return jsxs("label", Object.assign({
|
|
86
74
|
className: handClass(),
|
|
87
75
|
onClick: clickCheck,
|
package/RadioGroup/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-77980792.js';
|
|
2
2
|
import { useState, useEffect, createElement } from 'react';
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { Radio } from '../Radio/index.js';
|
|
5
5
|
import Label from '../Label/index.js';
|
|
6
6
|
import HelperText from '../HelperText/index.js';
|
|
7
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
7
|
+
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
8
8
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
9
9
|
import '../Help/index.js';
|
|
10
10
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
@@ -19,37 +19,35 @@ styleInject(css_248z);
|
|
|
19
19
|
|
|
20
20
|
var RadioGroup = function RadioGroup(props) {
|
|
21
21
|
var _props$className = props.className,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
22
|
+
className = _props$className === void 0 ? '' : _props$className,
|
|
23
|
+
style = props.style,
|
|
24
|
+
_props$label = props.label,
|
|
25
|
+
label = _props$label === void 0 ? '' : _props$label,
|
|
26
|
+
labelTooltip = props.labelTooltip,
|
|
27
|
+
_props$spacing = props.spacing,
|
|
28
|
+
spacing = _props$spacing === void 0 ? '28px' : _props$spacing,
|
|
29
|
+
_props$size = props.size,
|
|
30
|
+
size = _props$size === void 0 ? 'large' : _props$size,
|
|
31
|
+
_props$row = props.row,
|
|
32
|
+
row = _props$row === void 0 ? true : _props$row,
|
|
33
|
+
_props$disabled = props.disabled,
|
|
34
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
35
|
+
_props$required = props.required,
|
|
36
|
+
required = _props$required === void 0 ? false : _props$required,
|
|
37
|
+
_props$error = props.error,
|
|
38
|
+
error = _props$error === void 0 ? false : _props$error,
|
|
39
|
+
hideErrorDom = props.hideErrorDom,
|
|
40
|
+
_props$helperText = props.helperText,
|
|
41
|
+
helperText = _props$helperText === void 0 ? '' : _props$helperText,
|
|
42
|
+
_props$id = props.id,
|
|
43
|
+
id = _props$id === void 0 ? 'name' : _props$id,
|
|
44
|
+
value = props.value,
|
|
45
|
+
list = props.list,
|
|
46
|
+
onChange = props.onChange;
|
|
48
47
|
var _useState = useState(),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
48
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
49
|
+
valueCom = _useState2[0],
|
|
50
|
+
setValueCom = _useState2[1];
|
|
53
51
|
useEffect(function () {
|
|
54
52
|
if (props.defaultValue !== undefined) setValueCom(props.defaultValue);
|
|
55
53
|
}, []);
|
|
@@ -60,29 +58,23 @@ var RadioGroup = function RadioGroup(props) {
|
|
|
60
58
|
* 改变值
|
|
61
59
|
* @param item 点击当前项数据
|
|
62
60
|
*/
|
|
63
|
-
|
|
64
61
|
var onchangeCom = function onchangeCom(item) {
|
|
65
62
|
return function () {
|
|
66
63
|
var name = item[id]; // 值
|
|
67
|
-
|
|
68
64
|
if (value === name) return;
|
|
69
65
|
if (props.value === undefined) setValueCom(name);
|
|
70
66
|
onChange && onChange(name, item);
|
|
71
67
|
};
|
|
72
68
|
};
|
|
73
|
-
|
|
74
69
|
var handLabel = function handLabel() {
|
|
75
70
|
if (label || required) {
|
|
76
71
|
var handLabelClass = function handLabelClass() {
|
|
77
72
|
var str = 'radio-group-label';
|
|
78
|
-
|
|
79
73
|
if (labelTooltip && labelTooltip.className) {
|
|
80
74
|
str += ' ' + labelTooltip.className;
|
|
81
75
|
}
|
|
82
|
-
|
|
83
76
|
return str;
|
|
84
77
|
};
|
|
85
|
-
|
|
86
78
|
return jsx(Label, Object.assign({
|
|
87
79
|
label: label,
|
|
88
80
|
required: required
|
|
@@ -90,25 +82,19 @@ var RadioGroup = function RadioGroup(props) {
|
|
|
90
82
|
className: handLabelClass()
|
|
91
83
|
}));
|
|
92
84
|
}
|
|
93
|
-
|
|
94
85
|
return null;
|
|
95
86
|
};
|
|
96
87
|
/**
|
|
97
88
|
* @description 处理单选框每一项样式
|
|
98
89
|
* */
|
|
99
|
-
|
|
100
|
-
|
|
101
90
|
var handStyleItem = function handStyleItem(item, index) {
|
|
102
91
|
var obj = Object.assign({}, item.style);
|
|
103
|
-
|
|
104
92
|
if (spacing && row && list.length !== index + 1) {
|
|
105
93
|
obj.marginRight = spacing;
|
|
106
94
|
}
|
|
107
|
-
|
|
108
95
|
return obj;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
|
|
96
|
+
};
|
|
97
|
+
// 处理class
|
|
112
98
|
var handClass = function handClass() {
|
|
113
99
|
var str = $prefixCls + '-radio-group';
|
|
114
100
|
if (className) str += ' ' + className;
|
|
@@ -118,7 +104,6 @@ var RadioGroup = function RadioGroup(props) {
|
|
|
118
104
|
if (row) str += " ".concat($prefixCls, "-radio-group-row");else str += " ".concat($prefixCls, "-radio-group-column");
|
|
119
105
|
return str;
|
|
120
106
|
};
|
|
121
|
-
|
|
122
107
|
return jsxs("div", Object.assign({
|
|
123
108
|
className: handClass(),
|
|
124
109
|
style: style
|