@para-ui/core 4.0.0-rc → 4.0.0-rc.1
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 +12 -12
- 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 +3 -3
- 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 +4 -4
- package/CheckboxGroup/index.d.ts +2 -2
- package/CheckboxGroup/index.js +3 -3
- package/Collapse/index.js +4 -4
- package/CollapseBox/index.js +12 -20
- package/CollapseLayout/index.js +20 -20
- 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/DatePicker/generatePicker/index.d.ts +22 -22
- package/DatePicker/index.js +8 -7
- package/DatePicker/util.d.ts +1 -1
- 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 +29 -33
- package/Drawer/interface.d.ts +2 -2
- 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 +2 -2
- 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 +6 -6
- package/FunctionModal/modalContext.d.ts +3 -3
- package/GlobalContext/componentsProps.d.ts +7 -7
- package/GlobalContext/index.d.ts +2 -2
- package/GlobalContext/useFormatMessage.d.ts +1 -1
- package/Help/index.js +1 -1
- package/HelperText/index.js +1 -1
- package/InputLang/index.d.ts +2 -2
- package/InputLang/index.js +8 -8
- package/InputNumber/index.d.ts +2 -2
- package/InputNumber/index.js +3 -3
- package/Label/index.js +2 -2
- package/Loading/index.js +1 -1
- package/Menu/index.js +14 -14
- package/Menu/interface.d.ts +1 -1
- package/Message/index.js +12 -12
- package/Modal/Confirm/index.d.ts +3 -3
- package/Modal/index.d.ts +1 -1
- package/Modal/index.js +5 -5
- package/MultiBox/index.d.ts +2 -2
- package/MultiBox/index.js +3 -3
- package/Notification/index.js +1 -1
- package/OperateBtn/index.d.ts +2 -2
- package/OperateBtn/index.js +40 -36
- package/PageHeader/index.js +30 -30
- package/PageHeader/interface.d.ts +1 -1
- package/Pagination/index.d.ts +1 -1
- package/Pagination/index.js +17 -17
- package/PasswordRules/index.js +7 -7
- package/PopConfirm/index.js +3 -3
- 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 +40 -40
- package/Progress/utils.d.ts +4 -4
- package/Querying/index.d.ts +1 -1
- package/Querying/index.js +2 -2
- package/README.md +3 -0
- package/Radio/index.d.ts +1 -1
- package/Radio/index.js +4 -4
- package/RadioGroup/index.d.ts +2 -2
- package/RadioGroup/index.js +3 -3
- package/Search/index.js +1 -1
- package/Select/index.d.ts +3 -3
- package/Select/index.js +42 -42
- package/SelectInput/index.js +2 -2
- package/Selector/index.js +15 -15
- package/Selector/interface.d.ts +6 -6
- package/SelectorPicker/index.d.ts +4 -4
- package/SelectorPicker/index.js +9 -9
- package/SingleBox/index.d.ts +2 -2
- package/SingleBox/index.js +3 -3
- package/Slider/interface.d.ts +1 -1
- package/Status/index.d.ts +4 -4
- package/Status/index.js +4 -4
- package/Stepper/index.d.ts +5 -5
- package/Stepper/index.js +23 -23
- package/Switch/index.d.ts +7 -7
- package/Switch/index.js +23 -5
- 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 +34 -34
- 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 +25 -17
- 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 +13 -13
- package/TimePicker/index.d.ts +1 -1
- package/TimePicker/index.js +1 -1
- 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 +17 -10
- package/Transfer/box.d.ts +6 -6
- package/Transfer/index.js +21 -21
- 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 +7 -7
- package/Upload/interface.d.ts +1 -1
- package/_verture/{index-8469865e.js → index-0f315bca.js} +2 -2
- package/_verture/{index-e1b800aa.js → index-92e406f4.js} +48 -24
- package/_verture/{index-47297a40.js → index-bc461491.js} +45 -45
- package/_verture/{index-1c8d3e94.js → index-d251967e.js} +101 -47
- package/_verture/{modalContext-670eab09.js → modalContext-9299acc9.js} +25 -25
- package/index.d.ts +2 -0
- package/index.js +8 -7
- package/locale/en-US.d.ts +19 -0
- package/locale/index.d.ts +38 -0
- package/locale/index.js +39 -1
- package/locale/zh-CN.d.ts +19 -0
- package/package.json +3 -1
- 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 +5 -5
- package/umd/Checkbox.js +1 -1
- package/umd/CheckboxGroup.js +1 -1
- package/umd/Collapse.js +1 -1
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ComboSelect.js +4 -4
- package/umd/CopyText.js +1 -1
- package/umd/DatePicker.js +2 -2
- 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/Form.js +4 -4
- package/umd/FormItem.js +4 -4
- package/umd/FunctionModal.js +2 -2
- package/umd/Help.js +1 -1
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +1 -1
- package/umd/InputNumber.js +1 -1
- package/umd/Label.js +1 -1
- package/umd/Loading.js +1 -1
- package/umd/Menu.js +2 -2
- package/umd/Message.js +1 -1
- package/umd/Modal.js +2 -2
- package/umd/MultiBox.js +7 -7
- package/umd/Notification.js +1 -1
- package/umd/OperateBtn.js +2 -2
- package/umd/PageHeader.js +2 -2
- package/umd/Pagination.js +4 -4
- package/umd/PasswordRules.js +4 -4
- package/umd/PopConfirm.js +2 -2
- package/umd/Progress.js +1 -1
- package/umd/Radio.js +1 -1
- package/umd/RadioGroup.js +1 -1
- package/umd/Search.js +7 -7
- package/umd/Select.js +1 -1
- package/umd/SelectInput.js +1 -1
- package/umd/Selector.js +1 -1
- package/umd/SelectorPicker.js +1 -1
- package/umd/SingleBox.js +1 -1
- package/umd/Stepper.js +1 -1
- package/umd/Switch.js +4 -4
- package/umd/Table.js +2 -2
- package/umd/Tabs.js +4 -4
- package/umd/Tag.js +1 -1
- package/umd/TextEditor.js +2 -2
- package/umd/TextField.js +7 -7
- package/umd/TimePicker.js +2 -2
- package/umd/Title.js +1 -1
- package/umd/ToggleButton.js +4 -4
- package/umd/Transfer.js +2 -2
- package/umd/Tree.js +1 -1
- package/umd/Upload.js +2 -2
- package/umd/locale.js +1 -1
package/Selector/index.js
CHANGED
|
@@ -170,7 +170,7 @@ var SelectorNode = function SelectorNode(props) {
|
|
|
170
170
|
var handImg = function handImg() {
|
|
171
171
|
if (!img) return null;
|
|
172
172
|
var imgDom = img;
|
|
173
|
-
if (typeof img ===
|
|
173
|
+
if (typeof img === 'string') imgDom = jsx("img", {
|
|
174
174
|
src: img
|
|
175
175
|
});
|
|
176
176
|
return jsx("span", Object.assign({
|
|
@@ -182,13 +182,13 @@ var SelectorNode = function SelectorNode(props) {
|
|
|
182
182
|
/** 处理选择框 */
|
|
183
183
|
var handSelectDom = function handSelectDom() {
|
|
184
184
|
if (selectMode === 'radio') return jsx(Radio, {
|
|
185
|
-
size:
|
|
185
|
+
size: 'small',
|
|
186
186
|
className: 'selector-node-radio',
|
|
187
187
|
checked: checked,
|
|
188
188
|
disabled: disabled
|
|
189
189
|
});
|
|
190
190
|
if (selectMode === 'check') return jsx(Checkbox, {
|
|
191
|
-
size:
|
|
191
|
+
size: 'small',
|
|
192
192
|
className: 'selector-node-check',
|
|
193
193
|
checked: checked,
|
|
194
194
|
disabled: disabled,
|
|
@@ -212,7 +212,7 @@ var SelectorNode = function SelectorNode(props) {
|
|
|
212
212
|
content: handDetailDom(),
|
|
213
213
|
trigger: 'hover',
|
|
214
214
|
placement: 'bottomRight',
|
|
215
|
-
overlayClassName: $prefixCls
|
|
215
|
+
overlayClassName: "".concat($prefixCls, "-selector-detail"),
|
|
216
216
|
onVisibleChange: onVisibleChange
|
|
217
217
|
}, {
|
|
218
218
|
children: jsx("span", Object.assign({
|
|
@@ -295,13 +295,13 @@ var SelectorNode = function SelectorNode(props) {
|
|
|
295
295
|
};
|
|
296
296
|
/** 处理className */
|
|
297
297
|
var handClass = function handClass() {
|
|
298
|
-
var str = $prefixCls
|
|
298
|
+
var str = "".concat($prefixCls, "-selector-node");
|
|
299
299
|
str += " ".concat($prefixCls, "-selector-node-").concat(useCase);
|
|
300
300
|
str += " ".concat($prefixCls, "-selector-node-").concat(nodeMode);
|
|
301
301
|
if (disabled) str += " ".concat($prefixCls, "-selector-node-disabled");
|
|
302
302
|
if (disabledChild) str += " ".concat($prefixCls, "-selector-node-disabled-child");
|
|
303
303
|
if (img) str += " ".concat($prefixCls, "-selector-node-img");
|
|
304
|
-
if (className) str +=
|
|
304
|
+
if (className) str += " ".concat(className);
|
|
305
305
|
return str;
|
|
306
306
|
};
|
|
307
307
|
return jsxs("div", Object.assign({
|
|
@@ -493,7 +493,7 @@ var SelectorMainContent = function SelectorMainContent(props) {
|
|
|
493
493
|
/** 全选 */
|
|
494
494
|
var handAllCheck = function handAllCheck() {
|
|
495
495
|
// 只存在复选框模式
|
|
496
|
-
if (!isAllCheck || selectMode !==
|
|
496
|
+
if (!isAllCheck || selectMode !== 'check') return null;
|
|
497
497
|
var checkJson = handAllCheckFunc();
|
|
498
498
|
var onAllCheckCom = function onAllCheckCom() {
|
|
499
499
|
var bol = true;
|
|
@@ -657,7 +657,7 @@ var SelectorMainContent = function SelectorMainContent(props) {
|
|
|
657
657
|
className: "selector-main-list-no-data"
|
|
658
658
|
}, {
|
|
659
659
|
children: jsx(Empty, Object.assign({}, emptyProps, {
|
|
660
|
-
size: (emptyProps === null || emptyProps === void 0 ? void 0 : emptyProps.size) ||
|
|
660
|
+
size: (emptyProps === null || emptyProps === void 0 ? void 0 : emptyProps.size) || 'small'
|
|
661
661
|
}))
|
|
662
662
|
}));
|
|
663
663
|
}
|
|
@@ -680,9 +680,9 @@ var SelectorMainContent = function SelectorMainContent(props) {
|
|
|
680
680
|
};
|
|
681
681
|
var handClass = function handClass() {
|
|
682
682
|
var str = 'selector-main-content';
|
|
683
|
-
if (className) str +=
|
|
683
|
+
if (className) str += " ".concat(className);
|
|
684
684
|
if (disabled) str += ' selector-main-content-disabled';
|
|
685
|
-
if (isAllCheck && selectMode ===
|
|
685
|
+
if (isAllCheck && selectMode === 'check') str += ' selector-main-content-all-check';
|
|
686
686
|
if (loadMore) str += ' selector-main-content-load-more';
|
|
687
687
|
return str;
|
|
688
688
|
};
|
|
@@ -897,8 +897,8 @@ var SelectorMain = function SelectorMain(props) {
|
|
|
897
897
|
};
|
|
898
898
|
// 处理class
|
|
899
899
|
var handClass = function handClass() {
|
|
900
|
-
var str = $prefixCls
|
|
901
|
-
if (className) str +=
|
|
900
|
+
var str = "".concat($prefixCls, "-selector-main");
|
|
901
|
+
if (className) str += " ".concat(className);
|
|
902
902
|
if (selectMode === 'check') str += " ".concat($prefixCls, "-selector-main-select");
|
|
903
903
|
if (showSearch) str += " ".concat($prefixCls, "-selector-main-show-search");
|
|
904
904
|
if (search) str += " ".concat($prefixCls, "-selector-main-search");
|
|
@@ -1121,10 +1121,10 @@ var SelectorData = function SelectorData(props) {
|
|
|
1121
1121
|
}));
|
|
1122
1122
|
};
|
|
1123
1123
|
var handClass = function handClass() {
|
|
1124
|
-
var str = $prefixCls
|
|
1124
|
+
var str = "".concat($prefixCls, "-selector-data");
|
|
1125
1125
|
if (layout) str += " ".concat($prefixCls, "-selector-data-").concat(layout);
|
|
1126
1126
|
if (disabled === true) str += " ".concat($prefixCls, "-selector-data-disabled");
|
|
1127
|
-
if (className) str +=
|
|
1127
|
+
if (className) str += " ".concat(className);
|
|
1128
1128
|
return str;
|
|
1129
1129
|
};
|
|
1130
1130
|
return jsx("div", Object.assign({
|
|
@@ -2130,7 +2130,7 @@ var Selector = function Selector(props) {
|
|
|
2130
2130
|
// 处理className
|
|
2131
2131
|
var handClass = function handClass() {
|
|
2132
2132
|
var str = "".concat($prefixCls, "-selector");
|
|
2133
|
-
if (className) str +=
|
|
2133
|
+
if (className) str += " ".concat(className);
|
|
2134
2134
|
if (layout) str += " ".concat($prefixCls, "-selector-").concat(layout);
|
|
2135
2135
|
if (selectMode) str += " ".concat($prefixCls, "-selector-").concat(selectMode);
|
|
2136
2136
|
if (disabled === true) str += " ".concat($prefixCls, "-selector-disabled");
|
package/Selector/interface.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { ReactNode } from
|
|
2
|
-
import { EmptyProps } from
|
|
3
|
-
import { ReqFuncProps } from
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { EmptyProps } from '../Empty';
|
|
3
|
+
import { ReqFuncProps } from './util';
|
|
4
4
|
/** 搜索方法 */
|
|
5
5
|
export interface SearchFuncProps {
|
|
6
6
|
page?: number;
|
|
@@ -385,7 +385,7 @@ export interface SelectorProps {
|
|
|
385
385
|
* @param item 当前节点数据
|
|
386
386
|
* @param bol true列表数据, false展示数据
|
|
387
387
|
* */
|
|
388
|
-
detailRender?: (item: SelectorAnyJson, bol: boolean) =>
|
|
388
|
+
detailRender?: (item: SelectorAnyJson, bol: boolean) => Promise<ReactNode> | ReactNode;
|
|
389
389
|
/** 是否全选, 只存在复选框的时候 */
|
|
390
390
|
isAllCheck?: boolean;
|
|
391
391
|
/** 禁用 */
|
|
@@ -417,7 +417,7 @@ export interface SelectorProps {
|
|
|
417
417
|
* @param val 搜索框的值
|
|
418
418
|
* @return [] 返回平铺数组
|
|
419
419
|
* */
|
|
420
|
-
onSearch?: (val: string, reqParams: SearchFuncProps) =>
|
|
420
|
+
onSearch?: (val: string, reqParams: SearchFuncProps) => Promise<SearchReqDataProps> | SearchReqDataProps;
|
|
421
421
|
/** 刷新事件 */
|
|
422
422
|
onRefresh?: () => void;
|
|
423
423
|
/** 选择事件 返回true不触发onChange事件
|
|
@@ -425,7 +425,7 @@ export interface SelectorProps {
|
|
|
425
425
|
* bol 选中/不选中
|
|
426
426
|
* isAllCheck 全选
|
|
427
427
|
* */
|
|
428
|
-
onSelect?: (item: SelectorAnyJson | SelectorAnyJson[], bol: boolean, isAllCheck: boolean) =>
|
|
428
|
+
onSelect?: (item: SelectorAnyJson | SelectorAnyJson[], bol: boolean, isAllCheck: boolean) => Promise<boolean | void> | (boolean | void);
|
|
429
429
|
/** 改变事件 val绑定值, node处理过的数据 rowData原始数据 */
|
|
430
430
|
onChange?: (val: Record<string, any>[] | Record<string, any> | null, node: Record<string, any>, rowData: Record<string, any>) => void;
|
|
431
431
|
[name: string]: any;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* @description 选择器选择
|
|
5
5
|
*/
|
|
6
6
|
import React, { ReactNode } from 'react';
|
|
7
|
-
import { HelperTextDetailProps } from
|
|
8
|
-
import { LabelTooltipProps } from
|
|
9
|
-
import { SelectorProps } from
|
|
10
|
-
import { TooltipProps } from
|
|
7
|
+
import { HelperTextDetailProps } from '../HelperText';
|
|
8
|
+
import { LabelTooltipProps } from '../Label';
|
|
9
|
+
import { SelectorProps } from '../Selector/interface';
|
|
10
|
+
import { TooltipProps } from '../Tooltip';
|
|
11
11
|
import './index.scss';
|
|
12
12
|
export interface SelectorPickerProps extends HelperTextDetailProps {
|
|
13
13
|
/** className */
|
package/SelectorPicker/index.js
CHANGED
|
@@ -125,7 +125,7 @@ var SelectorPicker = function SelectorPicker(props) {
|
|
|
125
125
|
var constData = useRef({
|
|
126
126
|
list: []
|
|
127
127
|
});
|
|
128
|
-
var prefixCls = $prefixCls
|
|
128
|
+
var prefixCls = "".concat($prefixCls, "-selector-picker");
|
|
129
129
|
constData.current.value = value;
|
|
130
130
|
constData.current.valueCom = valueCom;
|
|
131
131
|
constData.current.openMore = openMore;
|
|
@@ -148,10 +148,10 @@ var SelectorPicker = function SelectorPicker(props) {
|
|
|
148
148
|
if (!overLine && multiple) {
|
|
149
149
|
window.addEventListener('resize', changeSize);
|
|
150
150
|
} else {
|
|
151
|
-
window.removeEventListener(
|
|
151
|
+
window.removeEventListener('resize', changeSize);
|
|
152
152
|
}
|
|
153
153
|
return function () {
|
|
154
|
-
window.removeEventListener(
|
|
154
|
+
window.removeEventListener('resize', changeSize);
|
|
155
155
|
};
|
|
156
156
|
}, [overLine, multiple]);
|
|
157
157
|
useEffect(function () {
|
|
@@ -229,7 +229,7 @@ var SelectorPicker = function SelectorPicker(props) {
|
|
|
229
229
|
return jsx("div", Object.assign({
|
|
230
230
|
className: 'selector-picker-dropdown-content',
|
|
231
231
|
style: {
|
|
232
|
-
width: (refDom && refDom.current ? refDom.current.offsetWidth : 0
|
|
232
|
+
width: "".concat(refDom && refDom.current ? refDom.current.offsetWidth : 0, "px")
|
|
233
233
|
}
|
|
234
234
|
}, {
|
|
235
235
|
children: jsx(Selector, Object.assign({}, handSelectorProps()))
|
|
@@ -284,7 +284,7 @@ var SelectorPicker = function SelectorPicker(props) {
|
|
|
284
284
|
}, {
|
|
285
285
|
children: [jsx("span", {
|
|
286
286
|
children: jsx(AutoTips, Object.assign({
|
|
287
|
-
placement:
|
|
287
|
+
placement: 'top-start'
|
|
288
288
|
}, {
|
|
289
289
|
children: renderVal || val
|
|
290
290
|
}))
|
|
@@ -318,7 +318,7 @@ var SelectorPicker = function SelectorPicker(props) {
|
|
|
318
318
|
className: 'selector-picker-wrapper-content-radio'
|
|
319
319
|
}, {
|
|
320
320
|
children: overLine ? resultVal : jsx(AutoTips, Object.assign({
|
|
321
|
-
placement:
|
|
321
|
+
placement: 'top-start'
|
|
322
322
|
}, {
|
|
323
323
|
children: resultVal
|
|
324
324
|
}))
|
|
@@ -386,7 +386,7 @@ var SelectorPicker = function SelectorPicker(props) {
|
|
|
386
386
|
}, {
|
|
387
387
|
children: [jsx("span", {
|
|
388
388
|
children: jsx(AutoTips, Object.assign({
|
|
389
|
-
placement:
|
|
389
|
+
placement: 'top-start'
|
|
390
390
|
}, {
|
|
391
391
|
children: renderVal || val
|
|
392
392
|
}))
|
|
@@ -404,7 +404,7 @@ var SelectorPicker = function SelectorPicker(props) {
|
|
|
404
404
|
var handleClassMorePopover = function handleClassMorePopover() {
|
|
405
405
|
var str = "".concat($prefixCls, "-selector-more-popover ").concat($prefixCls, "-scrollbar-small");
|
|
406
406
|
if (size) str += " ".concat($prefixCls, "-selector-more-popover-").concat(size);
|
|
407
|
-
if (morePopoverClassName) str +=
|
|
407
|
+
if (morePopoverClassName) str += " ".concat(morePopoverClassName);
|
|
408
408
|
return str;
|
|
409
409
|
};
|
|
410
410
|
/** 多选超出popover */
|
|
@@ -428,7 +428,7 @@ var SelectorPicker = function SelectorPicker(props) {
|
|
|
428
428
|
placement: 'bottomLeft',
|
|
429
429
|
trigger: ['click'],
|
|
430
430
|
onVisibleChange: onVisibleChange,
|
|
431
|
-
overlayClassName: $prefixCls
|
|
431
|
+
overlayClassName: "".concat($prefixCls, "-selector-picker-dropdown"),
|
|
432
432
|
getPopupContainer: getPopupContainer
|
|
433
433
|
}, {
|
|
434
434
|
children: disabledTooltip ? jsx(Tooltip, Object.assign({
|
package/SingleBox/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
7
|
import { TextFieldProps } from '../TextField';
|
|
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 SingleBoxProps extends HelperTextDetailProps {
|
|
12
12
|
/** 样式class */
|
package/SingleBox/index.js
CHANGED
|
@@ -148,7 +148,7 @@ var SingleBox = function SingleBox(props) {
|
|
|
148
148
|
var handLabelClass = function handLabelClass() {
|
|
149
149
|
var str = 'single-box-label';
|
|
150
150
|
if (labelTooltip && labelTooltip.className) {
|
|
151
|
-
str +=
|
|
151
|
+
str += " ".concat(labelTooltip.className);
|
|
152
152
|
}
|
|
153
153
|
return str;
|
|
154
154
|
};
|
|
@@ -162,8 +162,8 @@ var SingleBox = function SingleBox(props) {
|
|
|
162
162
|
};
|
|
163
163
|
/** 处理class */
|
|
164
164
|
var handClass = function handClass() {
|
|
165
|
-
var str = $prefixCls
|
|
166
|
-
if (className) str +=
|
|
165
|
+
var str = "".concat($prefixCls, "-single-box");
|
|
166
|
+
if (className) str += " ".concat(className);
|
|
167
167
|
if (size) str += " ".concat($prefixCls, "-single-box-").concat(size);
|
|
168
168
|
if (disabled) str += " ".concat($prefixCls, "-single-box-disabled");
|
|
169
169
|
return str;
|
package/Slider/interface.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @date 2021/11/5 下午4:05
|
|
4
4
|
* @description
|
|
5
5
|
*/
|
|
6
|
-
import React from
|
|
6
|
+
import React from 'react';
|
|
7
7
|
export type TooltipPlacement = 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
|
|
8
8
|
interface SliderRange {
|
|
9
9
|
draggableTrack?: boolean;
|
package/Status/index.d.ts
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* @date 2022/11/8 5:53 PM
|
|
4
4
|
* @description 状态组件
|
|
5
5
|
*/
|
|
6
|
-
import React, { FC, ReactNode } from
|
|
7
|
-
import
|
|
8
|
-
type iconType =
|
|
6
|
+
import React, { FC, ReactNode } from 'react';
|
|
7
|
+
import './index.scss';
|
|
8
|
+
type iconType = 'success' | 'error';
|
|
9
9
|
export interface StatusProps {
|
|
10
10
|
/** 文本 **/
|
|
11
11
|
text?: ReactNode;
|
|
12
12
|
/** 状态 */
|
|
13
|
-
status?:
|
|
13
|
+
status?: 'info' | 'success' | 'warning' | 'error' | 'completed';
|
|
14
14
|
/** 自定义状态图标 **/
|
|
15
15
|
icon?: ReactNode | iconType;
|
|
16
16
|
/** cls */
|
package/Status/index.js
CHANGED
|
@@ -13,7 +13,7 @@ styleInject(css_248z);
|
|
|
13
13
|
var Status = function Status(props) {
|
|
14
14
|
var text = props.text,
|
|
15
15
|
_props$status = props.status,
|
|
16
|
-
status = _props$status === void 0 ?
|
|
16
|
+
status = _props$status === void 0 ? 'info' : _props$status,
|
|
17
17
|
icon = props.icon,
|
|
18
18
|
className = props.className,
|
|
19
19
|
style = props.style,
|
|
@@ -23,13 +23,13 @@ var Status = function Status(props) {
|
|
|
23
23
|
// render Icon
|
|
24
24
|
var renderIcon = function renderIcon() {
|
|
25
25
|
if (icon) {
|
|
26
|
-
if (typeof icon ===
|
|
26
|
+
if (typeof icon === 'string') {
|
|
27
27
|
switch (icon) {
|
|
28
|
-
case
|
|
28
|
+
case 'success':
|
|
29
29
|
return jsx(CompleteIcon, {
|
|
30
30
|
className: "status-icon-".concat(icon)
|
|
31
31
|
});
|
|
32
|
-
case
|
|
32
|
+
case 'error':
|
|
33
33
|
return jsx(CloseCircleF, {
|
|
34
34
|
className: "status-icon-".concat(icon)
|
|
35
35
|
});
|
package/Stepper/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* @date 2022/6/7 下午4:02
|
|
4
4
|
* @description stepper
|
|
5
5
|
*/
|
|
6
|
-
import React from
|
|
7
|
-
import RcSteps from
|
|
8
|
-
import
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import RcSteps from 'rc-steps';
|
|
8
|
+
import './index.scss';
|
|
9
9
|
type StepItem = string | {
|
|
10
10
|
label?: React.ReactNode;
|
|
11
11
|
icon?: React.ReactNode;
|
|
@@ -20,7 +20,7 @@ export interface StepperProps {
|
|
|
20
20
|
/** 发生err的步骤 */
|
|
21
21
|
errorStep?: number;
|
|
22
22
|
/** 指定步骤条方向 */
|
|
23
|
-
direction?:
|
|
23
|
+
direction?: 'horizontal' | 'vertical';
|
|
24
24
|
style?: React.CSSProperties;
|
|
25
25
|
/**
|
|
26
26
|
* 步骤条数据
|
|
@@ -40,7 +40,7 @@ export interface StepProps {
|
|
|
40
40
|
/** 点击步骤时触发 */
|
|
41
41
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
42
42
|
/** 步骤状态 */
|
|
43
|
-
status?:
|
|
43
|
+
status?: 'wait' | 'process' | 'finish' | 'error';
|
|
44
44
|
/** 禁用点击 */
|
|
45
45
|
disabled?: boolean;
|
|
46
46
|
/** 标题 */
|
package/Stepper/index.js
CHANGED
|
@@ -29,34 +29,34 @@ import '@paraview/lib';
|
|
|
29
29
|
//默认图标
|
|
30
30
|
var Icons = {
|
|
31
31
|
1: jsx(One, {
|
|
32
|
-
size:
|
|
32
|
+
size: "medium"
|
|
33
33
|
}),
|
|
34
34
|
2: jsx(Two, {
|
|
35
|
-
size:
|
|
35
|
+
size: "medium"
|
|
36
36
|
}),
|
|
37
37
|
3: jsx(Three, {
|
|
38
|
-
size:
|
|
38
|
+
size: "medium"
|
|
39
39
|
}),
|
|
40
40
|
4: jsx(Four, {
|
|
41
|
-
size:
|
|
41
|
+
size: "medium"
|
|
42
42
|
}),
|
|
43
43
|
5: jsx(Five, {
|
|
44
|
-
size:
|
|
44
|
+
size: "medium"
|
|
45
45
|
}),
|
|
46
46
|
6: jsx(Six, {
|
|
47
|
-
size:
|
|
47
|
+
size: "medium"
|
|
48
48
|
}),
|
|
49
49
|
7: jsx(Seven, {
|
|
50
|
-
size:
|
|
50
|
+
size: "medium"
|
|
51
51
|
}),
|
|
52
52
|
8: jsx(Eight, {
|
|
53
|
-
size:
|
|
53
|
+
size: "medium"
|
|
54
54
|
}),
|
|
55
55
|
9: jsx(Nine, {
|
|
56
|
-
size:
|
|
56
|
+
size: "medium"
|
|
57
57
|
}),
|
|
58
|
-
|
|
59
|
-
size:
|
|
58
|
+
done: jsx(Check, {
|
|
59
|
+
size: "medium"
|
|
60
60
|
})
|
|
61
61
|
};
|
|
62
62
|
|
|
@@ -70,22 +70,22 @@ var Stepper = function Stepper(props) {
|
|
|
70
70
|
errorStep = props.errorStep,
|
|
71
71
|
steps = props.steps,
|
|
72
72
|
_props$direction = props.direction,
|
|
73
|
-
direction = _props$direction === void 0 ?
|
|
73
|
+
direction = _props$direction === void 0 ? 'horizontal' : _props$direction,
|
|
74
74
|
children = props.children,
|
|
75
75
|
className = props.className,
|
|
76
76
|
restProps = __rest(props, ["current", "errorStep", "steps", "direction", "children", "className"]);
|
|
77
77
|
var prefixCls = "".concat($rcPrefixCls, "-stepper");
|
|
78
78
|
//内置finish、error 图标
|
|
79
79
|
var icons = {
|
|
80
|
-
finish: Icons[
|
|
81
|
-
error: Icons[
|
|
80
|
+
finish: Icons['done'],
|
|
81
|
+
error: Icons['done']
|
|
82
82
|
};
|
|
83
83
|
//步骤图标渲染
|
|
84
84
|
var stepIconRender = function stepIconRender(_ref) {
|
|
85
85
|
var node = _ref.node,
|
|
86
86
|
status = _ref.status;
|
|
87
|
-
if (status ===
|
|
88
|
-
return /*#__PURE__*/React__default.cloneElement(node, {}, Icons[
|
|
87
|
+
if (status === 'finish') {
|
|
88
|
+
return /*#__PURE__*/React__default.cloneElement(node, {}, Icons['done']);
|
|
89
89
|
}
|
|
90
90
|
return node;
|
|
91
91
|
};
|
|
@@ -93,20 +93,20 @@ var Stepper = function Stepper(props) {
|
|
|
93
93
|
var renderStep = function renderStep() {
|
|
94
94
|
if (!(steps === null || steps === void 0 ? void 0 : steps.length)) return children;
|
|
95
95
|
return steps.map(function (item, index) {
|
|
96
|
-
var label =
|
|
97
|
-
var description =
|
|
96
|
+
var label = '';
|
|
97
|
+
var description = '';
|
|
98
98
|
var icon = null;
|
|
99
99
|
var isErr = index === errorStep;
|
|
100
|
-
if (typeof item ===
|
|
100
|
+
if (typeof item === 'string') {
|
|
101
101
|
label = item;
|
|
102
102
|
icon = isErr ? jsx(CloseIcon, {
|
|
103
|
-
size:
|
|
103
|
+
size: "medium"
|
|
104
104
|
}) : Icons[index + 1];
|
|
105
|
-
} else if (_typeof(item) ===
|
|
105
|
+
} else if (_typeof(item) === 'object') {
|
|
106
106
|
label = item.label;
|
|
107
107
|
description = item.description;
|
|
108
108
|
icon = isErr ? jsx(CloseIcon, {
|
|
109
|
-
size:
|
|
109
|
+
size: "medium"
|
|
110
110
|
}) : item.icon || Icons[index + 1];
|
|
111
111
|
}
|
|
112
112
|
return jsx(Stepper.Step, {
|
|
@@ -116,7 +116,7 @@ var Stepper = function Stepper(props) {
|
|
|
116
116
|
title: jsx(AutoTips, {
|
|
117
117
|
children: label
|
|
118
118
|
}),
|
|
119
|
-
status: index === errorStep ?
|
|
119
|
+
status: index === errorStep ? 'error' : undefined,
|
|
120
120
|
icon: icon
|
|
121
121
|
}, index);
|
|
122
122
|
});
|
package/Switch/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import React, { FunctionComponent, ReactNode } from
|
|
2
|
-
import { LabelTooltipProps } from
|
|
3
|
-
import { TooltipProps } from
|
|
4
|
-
import
|
|
1
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { LabelTooltipProps } from '../Label';
|
|
3
|
+
import { TooltipProps } from '../Tooltip';
|
|
4
|
+
import './index.scss';
|
|
5
5
|
type SwitchChangeEventHandler = (checked: boolean, event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
6
6
|
type SwitchClickEventHandler = SwitchChangeEventHandler;
|
|
7
7
|
export interface SwitchProps {
|
|
8
8
|
/**
|
|
9
9
|
* 开关大小
|
|
10
10
|
*/
|
|
11
|
-
size?:
|
|
11
|
+
size?: 'small' | 'default';
|
|
12
12
|
/**
|
|
13
13
|
* 类名
|
|
14
14
|
*/
|
|
@@ -84,11 +84,11 @@ export interface SwitchProps {
|
|
|
84
84
|
/**
|
|
85
85
|
* 标题位置
|
|
86
86
|
*/
|
|
87
|
-
labelPlacement?:
|
|
87
|
+
labelPlacement?: 'top' | 'bottom' | 'start' | 'end';
|
|
88
88
|
/**
|
|
89
89
|
* 描述位置
|
|
90
90
|
*/
|
|
91
|
-
descPlacement?:
|
|
91
|
+
descPlacement?: 'start' | 'end';
|
|
92
92
|
/**
|
|
93
93
|
* 辅助文本
|
|
94
94
|
*/
|
package/Switch/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import clsx from 'clsx';
|
|
|
7
7
|
import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-0d9802f7.js';
|
|
8
8
|
import Label from '../Label/index.js';
|
|
9
9
|
import { Tooltip } from '../Tooltip/index.js';
|
|
10
|
+
import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
|
|
10
11
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
11
12
|
import '../_verture/typeof-adeedc13.js';
|
|
12
13
|
import '../Help/index.js';
|
|
@@ -17,12 +18,27 @@ import 'react';
|
|
|
17
18
|
import 'rc-tooltip';
|
|
18
19
|
import 'rc-tooltip/lib/placements';
|
|
19
20
|
import '@para-ui/icons/Forbid';
|
|
21
|
+
import '@para-ui/core/GlobalContext';
|
|
22
|
+
|
|
23
|
+
var en = {
|
|
24
|
+
ing: 'In Progress'
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var zh = {
|
|
28
|
+
ing: '正在进行中'
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var localeJson = {
|
|
32
|
+
zh: zh,
|
|
33
|
+
en: en
|
|
34
|
+
};
|
|
20
35
|
|
|
21
36
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/3 下午5:58\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-switch {\n position: relative;\n display: inline-block;\n width: 32px;\n height: 16px;\n vertical-align: middle;\n background-color: transparent;\n border: 0;\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n}\n.paraui-v4-switch .component-switch {\n border: none;\n cursor: pointer;\n}\n.paraui-v4-switch:before {\n position: absolute;\n top: 0px;\n left: 0;\n width: 100%;\n height: 16px;\n border-radius: 8px;\n background-color: rgb(212, 218, 227);\n content: \"\";\n transition: all 0.2s;\n}\na .paraui-v4-switch:focus {\n outline: 0;\n box-shadow: none;\n}\n.paraui-v4-switch.component-switch-checked:focus {\n box-shadow: none;\n}\n.paraui-v4-switch:focus:hover {\n box-shadow: none;\n}\n.paraui-v4-switch.component-switch-checked:before {\n background-color: rgb(46, 101, 230);\n}\n.paraui-v4-switch-loading *, .paraui-v4-switch.component-switch-disabled * {\n box-shadow: none;\n}\n.paraui-v4-switch-loading .component-switch-inner::before, .paraui-v4-switch.component-switch-disabled .component-switch-inner::before {\n position: absolute;\n top: 0px;\n left: 0;\n width: 100%;\n height: 16px;\n background-color: rgba(255, 255, 255, 0.5);\n content: \"\";\n z-index: 100;\n}\n.paraui-v4-switch .component-switch-inner {\n display: block;\n margin: 0 7px 0 25px;\n font-size: 14px;\n transition: margin 0.2s;\n}\n.paraui-v4-switch.component-switch-checked .component-switch-inner {\n margin: 0 25px 0 7px;\n}\n.paraui-v4-switch .component-switch-handle {\n position: absolute;\n top: 2px;\n left: 2px;\n width: 12px;\n height: 12px;\n transition: all 0.2s ease-in-out;\n}\n.paraui-v4-switch .component-switch-handle::before {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: rgb(255, 255, 255);\n border-radius: 9px;\n box-shadow: none;\n transition: all 0.2s ease-in-out;\n content: \"\";\n}\n.paraui-v4-switch.component-switch-checked .component-switch-handle {\n left: calc(100% - 14px);\n}\n.paraui-v4-switch.component-switch-checked .component-switch-handle::before {\n background-color: rgb(255, 255, 255);\n}\n.paraui-v4-switch:not(.paraui-v4-switch-disabled):active .component-switch-handle::before {\n right: -30%;\n left: 0;\n}\n.paraui-v4-switch:not(.paraui-v4-switch-disabled):active.component-switch-checked .component-switch-handle::before {\n right: 0;\n left: -30%;\n}\n.paraui-v4-switch .component-switch-loading-icon {\n position: relative;\n top: 1px;\n color: rgb(46, 101, 230);\n font-size: 10px;\n vertical-align: top;\n animation: switchLoadingCircle 1s infinite linear;\n}\n.paraui-v4-switch.component-switch-checked .component-switch-loading-icon {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-switch-small {\n min-width: 28px;\n height: 14px;\n line-height: 14px;\n}\n.paraui-v4-switch-small .component-switch-inner {\n margin: 0 5px 0 18px;\n font-size: 14px;\n}\n.paraui-v4-switch-small .component-switch-handle {\n width: 12px;\n height: 12px;\n top: 3px;\n left: 2px;\n}\n.paraui-v4-switch-small .component-switch-loading-icon {\n top: 1.5px;\n font-size: 9px;\n}\n.paraui-v4-switch-small.component-switch-checked .component-switch-inner {\n margin: 0 18px 0 5px;\n}\n.paraui-v4-switch-small.component-switch-checked .component-switch-handle {\n left: calc(100% - 12px - 2px);\n}\n@keyframes switchLoadingCircle {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.component-label-box {\n display: flex;\n align-items: center;\n}\n.component-label-box .sup-text {\n color: rgb(92, 101, 115);\n font-size: 14px;\n margin-left: 10px;\n line-height: 16px;\n}\n.component-label-box .sup-text > a {\n text-decoration: none;\n cursor: pointer;\n color: rgb(46, 101, 230);\n}\n.component-label-box .sup-text > a:hover {\n color: rgb(87, 131, 235);\n}\n\n.paraui-v4-switch-label {\n display: inline-flex;\n align-items: flex-end;\n}\n.paraui-v4-switch-label .component-disabled-text {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-switch-label .component-desc-text {\n margin-bottom: 0;\n margin-right: 10px;\n line-height: 16px;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-switch-label .component-desc-text .paraui-v4-help {\n line-height: 1;\n}\n.paraui-v4-switch-label .component-desc-text .paraui-v4-help svg {\n top: 0;\n}\n.paraui-v4-switch-label .paraui-v4-label-text-container {\n display: flex;\n flex-direction: column;\n}\n\n.paraui-v4-switch-desc-end {\n flex-direction: row-reverse;\n}\n.paraui-v4-switch-desc-end .component-desc-text {\n margin-right: 0;\n}";
|
|
22
37
|
styleInject(css_248z);
|
|
23
38
|
|
|
24
39
|
//Switch 开关
|
|
25
40
|
var Switch = function Switch(props) {
|
|
41
|
+
var intl = useFormatMessage('Switch', localeJson);
|
|
26
42
|
props.size;
|
|
27
43
|
var loading = props.loading,
|
|
28
44
|
disabled = props.disabled,
|
|
@@ -35,11 +51,13 @@ var Switch = function Switch(props) {
|
|
|
35
51
|
descTooltip = props.descTooltip,
|
|
36
52
|
disabledTooltip = props.disabledTooltip,
|
|
37
53
|
_props$loadingTitle = props.loadingTitle,
|
|
38
|
-
loadingTitle = _props$loadingTitle === void 0 ?
|
|
54
|
+
loadingTitle = _props$loadingTitle === void 0 ? intl({
|
|
55
|
+
id: 'ing'
|
|
56
|
+
}) : _props$loadingTitle,
|
|
39
57
|
_props$labelPlacement = props.labelPlacement,
|
|
40
|
-
labelPlacement = _props$labelPlacement === void 0 ?
|
|
58
|
+
labelPlacement = _props$labelPlacement === void 0 ? 'top' : _props$labelPlacement,
|
|
41
59
|
_props$descPlacement = props.descPlacement,
|
|
42
|
-
descPlacement = _props$descPlacement === void 0 ?
|
|
60
|
+
descPlacement = _props$descPlacement === void 0 ? 'start' : _props$descPlacement,
|
|
43
61
|
supText = props.supText,
|
|
44
62
|
restProps = __rest(props, ["size", "loading", "disabled", "className", "label", "required", "desc", "labelTooltip", "descTooltip", "disabledTooltip", "loadingTitle", "labelPlacement", "descPlacement", "supText"]);
|
|
45
63
|
//cls
|
|
@@ -119,7 +137,7 @@ var Switch = function Switch(props) {
|
|
|
119
137
|
label: desc,
|
|
120
138
|
required: required
|
|
121
139
|
}, descTooltip, {
|
|
122
|
-
className: "".concat($rcPrefixCls, "-desc-text ").concat(disabled ? "".concat($rcPrefixCls, "-disabled-text") :
|
|
140
|
+
className: "".concat($rcPrefixCls, "-desc-text ").concat(disabled ? "".concat($rcPrefixCls, "-disabled-text") : '')
|
|
123
141
|
})), jsxs("span", Object.assign({
|
|
124
142
|
className: "".concat($prefixCls, "-label-text-container")
|
|
125
143
|
}, {
|
|
@@ -127,7 +145,7 @@ var Switch = function Switch(props) {
|
|
|
127
145
|
label: label,
|
|
128
146
|
required: required
|
|
129
147
|
}, labelTooltip, {
|
|
130
|
-
className: "".concat($rcPrefixCls, "-switch-text ").concat(disabled ? "".concat($rcPrefixCls, "-disabled-text") :
|
|
148
|
+
className: "".concat($rcPrefixCls, "-switch-text ").concat(disabled ? "".concat($rcPrefixCls, "-disabled-text") : '')
|
|
131
149
|
})), renderSwitch()]
|
|
132
150
|
}))]
|
|
133
151
|
}));
|