@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/Title/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var Title = function Title(props) {
|
|
|
31
31
|
icon = props.icon,
|
|
32
32
|
link = props.link,
|
|
33
33
|
_props$size = props.size,
|
|
34
|
-
size = _props$size === void 0 ?
|
|
34
|
+
size = _props$size === void 0 ? 'medium' : _props$size,
|
|
35
35
|
className = props.className,
|
|
36
36
|
collapseClassName = props.collapseClassName,
|
|
37
37
|
titleTooltip = props.titleTooltip,
|
|
@@ -41,7 +41,7 @@ var Title = function Title(props) {
|
|
|
41
41
|
style = props.style;
|
|
42
42
|
var titleTextRef = useRef(null);
|
|
43
43
|
var linkTextRef = useRef(null);
|
|
44
|
-
var _useState = useState(
|
|
44
|
+
var _useState = useState('calc(100% - 20px)'),
|
|
45
45
|
_useState2 = _slicedToArray(_useState, 2),
|
|
46
46
|
descWith = _useState2[0],
|
|
47
47
|
setDescWith = _useState2[1];
|
|
@@ -93,7 +93,7 @@ var Title = function Title(props) {
|
|
|
93
93
|
})
|
|
94
94
|
})), link && jsx("a", Object.assign({
|
|
95
95
|
className: "title-link",
|
|
96
|
-
target: link.target ||
|
|
96
|
+
target: link.target || '_blank',
|
|
97
97
|
href: link.href,
|
|
98
98
|
onClick: link.onClick,
|
|
99
99
|
ref: linkTextRef
|
package/ToggleButton/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @date 2021/11/23 上午9:44
|
|
4
4
|
* @description toggleButton
|
|
5
5
|
*/
|
|
6
|
-
import React, { FunctionComponent } from
|
|
6
|
+
import React, { FunctionComponent } from 'react';
|
|
7
7
|
import ToggleButtonGroup, { ToggleButtonGroupProps, ToggleButtonItemProps } from './ToggleButtonGroup';
|
|
8
8
|
import './index.scss';
|
|
9
9
|
export interface ToggleButtonProps {
|
|
@@ -31,6 +31,10 @@ export interface ToggleButtonProps {
|
|
|
31
31
|
* 是否选中
|
|
32
32
|
*/
|
|
33
33
|
selected?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* 是否单选
|
|
36
|
+
*/
|
|
37
|
+
exclusive?: boolean;
|
|
34
38
|
/**
|
|
35
39
|
* value
|
|
36
40
|
*/
|
package/ToggleButton/index.js
CHANGED
|
@@ -24,7 +24,7 @@ import 'dayjs';
|
|
|
24
24
|
import '../_verture/useFormatMessage-703f8b20.js';
|
|
25
25
|
import '@para-ui/core/GlobalContext';
|
|
26
26
|
|
|
27
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/23 上午9:50\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-toggle-button.paraui-v4-button-text {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-toggle-button.paraui-v4-button-text:hover {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-toggle-button.paraui-v4-button-text:hover[disabled] {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-toggle-button-wrap {\n display: inline-block;\n}\n.paraui-v4-toggle-button
|
|
27
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/23 上午9:50\n* @description\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-toggle-button.paraui-v4-button-text {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-toggle-button.paraui-v4-button-text:hover {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-toggle-button.paraui-v4-button-text:hover[disabled] {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-toggle-button-wrap {\n display: inline-block;\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-radio.paraui-v4-toggle-button-selected {\n border-color: rgb(46, 101, 230);\n color: rgb(255, 255, 255);\n background-color: rgb(46, 101, 230);\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-radio.paraui-v4-toggle-button-selected:hover {\n border-color: rgb(46, 101, 230);\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-radio:hover {\n border-color: rgb(87, 131, 235);\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-radio[disabled] {\n color: rgb(161, 168, 179);\n background-color: rgb(255, 255, 255);\n border: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-radio[disabled]:hover {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-radio[disabled].paraui-v4-toggle-button-selected {\n color: rgb(29, 33, 38);\n background-color: rgb(247, 248, 250);\n border: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-check::before {\n content: \" \";\n position: absolute;\n bottom: 0;\n right: 0;\n border: 8px solid rgb(212, 218, 227);\n border-top-color: transparent;\n border-left-color: transparent;\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-check::after {\n content: \" \";\n width: 8px;\n height: 8px;\n background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAM5JREFUOE/NkQENwjAURFcFIAEHgIM5YCgAHCABFBAUAA5wABI2CTgABeUd+V06BqFkCeEnl6X9d7d/vy7rWK6jPvu9gfe+z9QnsHDOlV9NgHhk4gpxrvjJBogL+DtwATkG12QDxEvIG3AzcRmW/5gAgsaR+1S54peht+c8s7vxc7+OAFHCIVhBWkfLUm6VliazRsUGAzoy6YEz0LaDeItYMVrVWCJ/nVuUmHhArPuX1XoFTI4wJ8au+NYb/ziBCJZdJqoiPFfyBO+I/2twBz0qQBFvrubpAAAAAElFTkSuQmCC\");\n background-size: 8px 8px;\n background-repeat: no-repeat;\n position: absolute;\n bottom: 1px;\n right: 1px;\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-check:hover {\n border-color: rgb(87, 131, 235);\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-check:hover::before {\n border-color: rgb(87, 131, 235);\n border-top-color: transparent;\n border-left-color: transparent;\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-check.paraui-v4-toggle-button-selected {\n border-color: rgb(46, 101, 230);\n color: rgb(46, 101, 230);\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-check.paraui-v4-toggle-button-selected::before {\n border-color: rgb(46, 101, 230);\n border-top-color: transparent;\n border-left-color: transparent;\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-check[disabled] {\n color: rgb(161, 168, 179);\n background-color: rgb(255, 255, 255);\n border: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-check[disabled]::before {\n border-color: rgb(212, 218, 227);\n border-top-color: transparent;\n border-left-color: transparent;\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-check[disabled]:hover {\n color: rgb(161, 168, 179);\n background-color: rgb(255, 255, 255);\n border: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-check[disabled]:hover::before {\n border-color: rgb(212, 218, 227);\n border-top-color: transparent;\n border-left-color: transparent;\n}\n.paraui-v4-toggle-button.paraui-v4-toggle-button-check[disabled].paraui-v4-toggle-button-selected {\n color: rgb(29, 33, 38);\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-toggle-button .toggle-button-text {\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v4-toggle-button-disabled.paraui-v4-toggle-button {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-toggle-button-disabled.paraui-v4-toggle-button:hover {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-toggle-button .toggle-button-badge {\n position: absolute;\n right: 0;\n bottom: 16px;\n}\n.paraui-v4-toggle-button .toggle-button-badge > div {\n position: absolute;\n top: 0;\n right: 0;\n border: 8px solid rgb(46, 101, 230);\n border-top-color: transparent;\n border-left-color: transparent;\n}\n.paraui-v4-toggle-button .toggle-button-badge > svg {\n position: absolute;\n top: 7px;\n right: 1px;\n color: #fff;\n font-weight: 600;\n width: 8px;\n height: 8px;\n}\n\n.paraui-v4-togglebutton-group {\n display: flex;\n flex-flow: row wrap;\n}\n.paraui-v4-togglebutton-group .toggle-button-item {\n margin: 0 10px;\n}\n.paraui-v4-togglebutton-group-text .paraui-v4-toggle-button {\n margin: 0;\n padding: 0 16px;\n}\n.paraui-v4-togglebutton-group-text .paraui-v4-toggle-button[disabled] {\n color: rgb(161, 168, 179);\n background-color: transparent;\n border: 0;\n}\n.paraui-v4-togglebutton-group-text .paraui-v4-toggle-button[disabled]:hover {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-togglebutton-group-text .paraui-v4-toggle-button ~ .paraui-v4-toggle-button::before {\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n content: \"\";\n width: 1px;\n height: 14px;\n background-color: rgb(212, 218, 227);\n}\n.paraui-v4-togglebutton-group-text .paraui-v4-toggle-button-selected {\n color: rgb(46, 101, 230);\n border: 0;\n font-weight: 700;\n}\n.paraui-v4-togglebutton-group-text .paraui-v4-toggle-button-selected:hover {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-togglebutton-group-text .paraui-v4-toggle-button-selected[disabled] {\n color: rgb(29, 33, 38);\n background-color: transparent;\n border: 0;\n}\n.paraui-v4-togglebutton-group-text .paraui-v4-toggle-button-selected[disabled]:hover {\n background-color: transparent;\n}\n.paraui-v4-togglebutton-group-text .paraui-v4-toggle-button-selected:first-child:before {\n display: none;\n}\n.paraui-v4-togglebutton-group-text .paraui-v4-toggle-button-selected:not(:first-child)::before {\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n content: \"\";\n width: 1px;\n height: 14px;\n background-color: rgb(212, 218, 227);\n border: 0;\n}\n.paraui-v4-togglebutton-group-text .paraui-v4-toggle-button-selected::after {\n display: none;\n}";
|
|
28
28
|
styleInject(css_248z);
|
|
29
29
|
|
|
30
30
|
//切换按钮组
|
|
@@ -86,14 +86,19 @@ var ToggleButtonGroup = function ToggleButtonGroup(props) {
|
|
|
86
86
|
selected = item.selected,
|
|
87
87
|
rest = __rest(item, ["label", "selected"]);
|
|
88
88
|
var hasSelected = selected === undefined ? hasValueSelected(rest.value, value) : selected;
|
|
89
|
-
return jsx(
|
|
90
|
-
|
|
91
|
-
selected: hasSelected,
|
|
92
|
-
autoToolTipOverflow: type !== 'text',
|
|
93
|
-
variant: type === 'text' ? 'text' : 'outlined',
|
|
94
|
-
onClick: exclusive ? handleExclusiveChange : handleChange
|
|
89
|
+
return jsx("div", Object.assign({
|
|
90
|
+
className: 'toggle-button-item'
|
|
95
91
|
}, {
|
|
96
|
-
children:
|
|
92
|
+
children: jsx(ToggleButton, Object.assign({}, rest, {
|
|
93
|
+
style: style,
|
|
94
|
+
selected: hasSelected,
|
|
95
|
+
autoToolTipOverflow: type !== 'text',
|
|
96
|
+
variant: type === 'text' ? 'text' : 'outlined',
|
|
97
|
+
onClick: exclusive ? handleExclusiveChange : handleChange,
|
|
98
|
+
exclusive: exclusive
|
|
99
|
+
}, {
|
|
100
|
+
children: label
|
|
101
|
+
}))
|
|
97
102
|
}), idx);
|
|
98
103
|
});
|
|
99
104
|
};
|
|
@@ -115,16 +120,18 @@ var ToggleButton = function ToggleButton(props) {
|
|
|
115
120
|
toolTipTitle = props.toolTipTitle,
|
|
116
121
|
_props$selected = props.selected,
|
|
117
122
|
selected = _props$selected === void 0 ? false : _props$selected,
|
|
123
|
+
_props$exclusive = props.exclusive,
|
|
124
|
+
exclusive = _props$exclusive === void 0 ? false : _props$exclusive,
|
|
118
125
|
value = props.value;
|
|
119
126
|
props.autoToolTipOverflow;
|
|
120
127
|
var width = props.width,
|
|
121
128
|
onClick = props.onClick,
|
|
122
|
-
restProps = __rest(props, ["className", "style", "children", "disabled", "toolTipTitle", "selected", "value", "autoToolTipOverflow", "width", "onClick"]);
|
|
129
|
+
restProps = __rest(props, ["className", "style", "children", "disabled", "toolTipTitle", "selected", "exclusive", "value", "autoToolTipOverflow", "width", "onClick"]);
|
|
123
130
|
// const [hasTip, setHasTip] = useState<boolean>(false);
|
|
124
131
|
var id = useRef(UUID()).current;
|
|
125
132
|
var prefixCls = "".concat($prefixCls, "-toggle-button");
|
|
126
133
|
//className
|
|
127
|
-
var makeCls = clsx(prefixCls, className, (_clsx = {}, _defineProperty(_clsx, "".concat(prefixCls, "-selected"), selected), _defineProperty(_clsx, "".concat(prefixCls, "-disabled"), disabled), _clsx));
|
|
134
|
+
var makeCls = clsx(prefixCls, className, (_clsx = {}, _defineProperty(_clsx, "".concat(prefixCls, "-").concat(exclusive ? 'radio' : 'check'), (restProps === null || restProps === void 0 ? void 0 : restProps.variant) !== 'text'), _defineProperty(_clsx, "".concat(prefixCls, "-selected"), selected), _defineProperty(_clsx, "".concat(prefixCls, "-disabled"), disabled), _clsx));
|
|
128
135
|
//点击事件
|
|
129
136
|
var handleClick = function handleClick(evt) {
|
|
130
137
|
if (onClick) onClick(evt, value);
|
package/Transfer/box.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ReactNode, CSSProperties } from
|
|
2
|
-
import Sortable from
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
import Sortable from 'sortablejs';
|
|
3
3
|
interface IBox {
|
|
4
4
|
title: string;
|
|
5
5
|
data: ItemDataProps[];
|
|
6
6
|
multiple: boolean;
|
|
7
|
-
onSearch: (e: string, direction:
|
|
8
|
-
onchange: (e: any, bol: boolean, index: number, direction:
|
|
9
|
-
onMove: (direction:
|
|
7
|
+
onSearch: (e: string, direction: 'left' | 'right') => void;
|
|
8
|
+
onchange: (e: any, bol: boolean, index: number, direction: 'left' | 'right', multiple: boolean) => void;
|
|
9
|
+
onMove: (direction: 'left' | 'right') => void;
|
|
10
10
|
queryAll: (e: any, direction: any) => void;
|
|
11
11
|
inverse: (direction: any) => void;
|
|
12
|
-
direction:
|
|
12
|
+
direction: 'left' | 'right';
|
|
13
13
|
fluctuationPosition?: number;
|
|
14
14
|
fluctuationOrther?: number;
|
|
15
15
|
onEndSort?: (oldIndex: any, newIndex: any) => void;
|
package/Transfer/index.js
CHANGED
|
@@ -109,7 +109,7 @@ var Box = function Box(props) {
|
|
|
109
109
|
rightIcon = props.rightIcon,
|
|
110
110
|
style = props.style,
|
|
111
111
|
customKey = props.customKey;
|
|
112
|
-
var intl = useFormatMessage(
|
|
112
|
+
var intl = useFormatMessage('Transfer', localeJson);
|
|
113
113
|
var _useState = useState([]),
|
|
114
114
|
_useState2 = _slicedToArray(_useState, 2),
|
|
115
115
|
checkCount = _useState2[0],
|
|
@@ -134,11 +134,11 @@ var Box = function Box(props) {
|
|
|
134
134
|
setCheckCount(arr);
|
|
135
135
|
}, [data]);
|
|
136
136
|
useEffect(function () {
|
|
137
|
-
if (direction ==
|
|
137
|
+
if (direction == 'right') {
|
|
138
138
|
new Sortable(ref.current, {
|
|
139
139
|
animation: 180,
|
|
140
|
-
ghostClass:
|
|
141
|
-
handle:
|
|
140
|
+
ghostClass: 'blue-background-class',
|
|
141
|
+
handle: '.handle',
|
|
142
142
|
onEnd: function onEnd(evt) {
|
|
143
143
|
onEndSort === null || onEndSort === void 0 ? void 0 : onEndSort(evt.oldIndex, evt.newIndex);
|
|
144
144
|
}
|
|
@@ -151,7 +151,7 @@ var Box = function Box(props) {
|
|
|
151
151
|
}, function (e, index, item) {
|
|
152
152
|
if (item === null || item === void 0 ? void 0 : item.disabled) return;
|
|
153
153
|
onchange(e, true, index, direction, false);
|
|
154
|
-
onMove(direction ===
|
|
154
|
+
onMove(direction === 'right' ? 'left' : 'right');
|
|
155
155
|
});
|
|
156
156
|
var itemStyle = function itemStyle(data) {
|
|
157
157
|
var stlye = {};
|
|
@@ -159,7 +159,7 @@ var Box = function Box(props) {
|
|
|
159
159
|
stlye.borderLeft = "4px solid ".concat(data.tagColor);
|
|
160
160
|
}
|
|
161
161
|
if (data === null || data === void 0 ? void 0 : data.hide) {
|
|
162
|
-
stlye.display =
|
|
162
|
+
stlye.display = 'none';
|
|
163
163
|
}
|
|
164
164
|
return stlye;
|
|
165
165
|
};
|
|
@@ -174,7 +174,7 @@ var Box = function Box(props) {
|
|
|
174
174
|
})), jsx(Search, {
|
|
175
175
|
btnType: "inside",
|
|
176
176
|
placeholder: intl({
|
|
177
|
-
id:
|
|
177
|
+
id: 'searchPlaceholder'
|
|
178
178
|
}),
|
|
179
179
|
showBtn: false,
|
|
180
180
|
rightIcon: jsx(SearchIcon, {}),
|
|
@@ -187,7 +187,7 @@ var Box = function Box(props) {
|
|
|
187
187
|
},
|
|
188
188
|
onEnter: function onEnter(event) {
|
|
189
189
|
var _a;
|
|
190
|
-
var val = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value) ||
|
|
190
|
+
var val = ((_a = event.target) === null || _a === void 0 ? void 0 : _a.value) || '';
|
|
191
191
|
onSearch(val, direction);
|
|
192
192
|
},
|
|
193
193
|
allowClear: false
|
|
@@ -197,7 +197,7 @@ var Box = function Box(props) {
|
|
|
197
197
|
}, {
|
|
198
198
|
children: data.map(function (item, index) {
|
|
199
199
|
return jsxs("div", Object.assign({
|
|
200
|
-
className: clsx(
|
|
200
|
+
className: clsx('item', (item === null || item === void 0 ? void 0 : item.tagColor) && 'item-border', (item === null || item === void 0 ? void 0 : item.disabled) && 'item-disabled', (item === null || item === void 0 ? void 0 : item.checked) && 'item-checked', fluctuationPosition === index && 'item-fluctuation', fluctuationOrther === index && 'item-fluctuationOrther'),
|
|
201
201
|
style: itemStyle(item),
|
|
202
202
|
onClick: function onClick(e) {
|
|
203
203
|
handler(e, index, item);
|
|
@@ -213,11 +213,11 @@ var Box = function Box(props) {
|
|
|
213
213
|
className: "right-icon"
|
|
214
214
|
}, {
|
|
215
215
|
children: rightIcon(item)
|
|
216
|
-
})) : null, direction ===
|
|
216
|
+
})) : null, direction === 'right' ? jsx("div", Object.assign({
|
|
217
217
|
className: "handle"
|
|
218
218
|
}, {
|
|
219
219
|
children: jsx(Drag, {
|
|
220
|
-
size:
|
|
220
|
+
size: "medium"
|
|
221
221
|
})
|
|
222
222
|
})) : null]
|
|
223
223
|
}), item[item[customKey]] || item.name);
|
|
@@ -228,24 +228,24 @@ var Box = function Box(props) {
|
|
|
228
228
|
children: [jsxs("div", {
|
|
229
229
|
children: [jsx(Button, Object.assign({
|
|
230
230
|
variant: "text",
|
|
231
|
-
className: "".concat(checkCount.length === data.length - disabledCount && data.length > 0 ?
|
|
231
|
+
className: "".concat(checkCount.length === data.length - disabledCount && data.length > 0 ? 'btn-on' : ''),
|
|
232
232
|
onClick: function onClick() {
|
|
233
233
|
queryAll(checkCount.length !== data.length - disabledCount, direction);
|
|
234
234
|
}
|
|
235
235
|
}, {
|
|
236
236
|
children: intl({
|
|
237
|
-
id:
|
|
237
|
+
id: 'allCheck'
|
|
238
238
|
})
|
|
239
239
|
})), jsx(Button, Object.assign({
|
|
240
240
|
variant: "text",
|
|
241
|
-
className: "".concat(checkCount.length === 0 || checkCount.length === data.length - disabledCount ?
|
|
241
|
+
className: "".concat(checkCount.length === 0 || checkCount.length === data.length - disabledCount ? 'btn-off' : ''),
|
|
242
242
|
disabled: checkCount.length === 0 || checkCount.length === data.length - disabledCount,
|
|
243
243
|
onClick: function onClick() {
|
|
244
244
|
inverse(direction);
|
|
245
245
|
}
|
|
246
246
|
}, {
|
|
247
247
|
children: intl({
|
|
248
|
-
id:
|
|
248
|
+
id: 'inVertCheck'
|
|
249
249
|
})
|
|
250
250
|
}))]
|
|
251
251
|
}), jsxs("div", Object.assign({
|
|
@@ -439,11 +439,11 @@ var Transfer = function Transfer(props) {
|
|
|
439
439
|
|
|
440
440
|
var onSearch = debounce(function (e, direction) {
|
|
441
441
|
var str = trim ? e.toUpperCase().trim() : e.toUpperCase();
|
|
442
|
-
if (direction ===
|
|
442
|
+
if (direction === 'left') {
|
|
443
443
|
leftData.forEach(function (item) {
|
|
444
444
|
item.hide = false;
|
|
445
|
-
var name = (item.name ||
|
|
446
|
-
var description = (item.description ||
|
|
445
|
+
var name = (item.name || '').toUpperCase();
|
|
446
|
+
var description = (item.description || '').toUpperCase();
|
|
447
447
|
if (!(name.indexOf(str) !== -1 || description.indexOf(str) !== -1)) {
|
|
448
448
|
item.hide = true;
|
|
449
449
|
}
|
|
@@ -452,8 +452,8 @@ var Transfer = function Transfer(props) {
|
|
|
452
452
|
} else {
|
|
453
453
|
rightData.filter(function (item) {
|
|
454
454
|
item.hide = false;
|
|
455
|
-
var name = (item.name ||
|
|
456
|
-
var description = (item.description ||
|
|
455
|
+
var name = (item.name || '').toUpperCase();
|
|
456
|
+
var description = (item.description || '').toUpperCase();
|
|
457
457
|
if (!(name.indexOf(str) !== -1 || description.indexOf(str) !== -1)) {
|
|
458
458
|
item.hide = true;
|
|
459
459
|
}
|
|
@@ -546,7 +546,7 @@ var Transfer = function Transfer(props) {
|
|
|
546
546
|
placement: 'bottomLeft'
|
|
547
547
|
},
|
|
548
548
|
onClick: function onClick() {
|
|
549
|
-
onMove(
|
|
549
|
+
onMove('right');
|
|
550
550
|
}
|
|
551
551
|
}, {
|
|
552
552
|
children: jsx(Right, {})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React, { FunctionComponent } from
|
|
2
|
-
import { DataNode } from
|
|
3
|
-
import { IActions, ActionType } from
|
|
4
|
-
import
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { DataNode } from 'rc-tree/lib/interface';
|
|
3
|
+
import { IActions, ActionType } from '../interface';
|
|
4
|
+
import './index.scss';
|
|
5
5
|
interface OperateBarProps {
|
|
6
6
|
opRef: any;
|
|
7
7
|
mouseInRef: any;
|
package/Tree/Tree.d.ts
CHANGED
package/Tree/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Tree } from '../_verture/index-
|
|
2
|
-
export { T as default } from '../_verture/index-
|
|
1
|
+
import { T as Tree } from '../_verture/index-bc461491.js';
|
|
2
|
+
export { T as default } from '../_verture/index-bc461491.js';
|
|
3
3
|
import '../_verture/toConsumableArray-8f4c9589.js';
|
|
4
4
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
5
5
|
import '../_verture/defineProperty-1d116156.js';
|
package/Tree/interface.d.ts
CHANGED
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* @date 2021/10/18 下午4:20
|
|
4
4
|
* @description tree interface
|
|
5
5
|
*/
|
|
6
|
-
import { ReactNode } from
|
|
6
|
+
import { ReactNode } from 'react';
|
|
7
7
|
import { TreeProps as RcTreeProps } from 'rc-tree';
|
|
8
|
-
import { DataNode, EventDataNode, Key } from
|
|
9
|
-
import { EmptyProps } from
|
|
10
|
-
import { ParaRequestConfig as RequestConfig } from
|
|
8
|
+
import { DataNode, EventDataNode, Key } from 'rc-tree/lib/interface';
|
|
9
|
+
import { EmptyProps } from '../Empty';
|
|
10
|
+
import { ParaRequestConfig as RequestConfig } from '@paraview/lib/http/interface';
|
|
11
11
|
type HasAction = (nodeData: DataNode) => boolean;
|
|
12
12
|
type ActionItem = boolean | {
|
|
13
13
|
text: string;
|
package/Tree/utils/tools.d.ts
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @date 2021/11/15 下午2:12
|
|
4
4
|
* @description
|
|
5
5
|
*/
|
|
6
|
-
import { FunctionComponent } from
|
|
7
|
-
import { UploadProps } from
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
7
|
+
import { UploadProps } from '../index';
|
|
8
8
|
export type DraggerProps = Omit<UploadProps, 'type'>;
|
|
9
9
|
declare const Dragger: FunctionComponent<DraggerProps>;
|
|
10
10
|
export default Dragger;
|
package/Upload/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import { UploadProps } from './interface';
|
|
3
3
|
import ImageUpload, { ImageUploadProps } from './ImageUpload';
|
|
4
|
-
import Dragger, { DraggerProps } from
|
|
5
|
-
import ImgCrop, { ImgCropProps } from
|
|
4
|
+
import Dragger, { DraggerProps } from './Dragger';
|
|
5
|
+
import ImgCrop, { ImgCropProps } from './ImgCrop';
|
|
6
6
|
import './index.scss';
|
|
7
7
|
declare const InternalUpload: FunctionComponent<UploadProps>;
|
|
8
8
|
type MergedUploadType = typeof InternalUpload & {
|
package/Upload/index.js
CHANGED
|
@@ -107,7 +107,7 @@ var UploadList = function UploadList(props) {
|
|
|
107
107
|
}, {
|
|
108
108
|
children: isImage ? jsx(PhotoIcon, {}) : jsx(TextIcon, {})
|
|
109
109
|
})), renderActions(file), jsx("span", Object.assign({
|
|
110
|
-
className:
|
|
110
|
+
className: 'upload-list-text-name'
|
|
111
111
|
}, {
|
|
112
112
|
children: file.name
|
|
113
113
|
}))]
|
|
@@ -570,7 +570,7 @@ var ImageUpload = function ImageUpload(props) {
|
|
|
570
570
|
src: avatar.imageUrl,
|
|
571
571
|
alt: (_a = avatar.imageName) !== null && _a !== void 0 ? _a : ''
|
|
572
572
|
}), avatar.imageName && jsx("span", Object.assign({
|
|
573
|
-
className:
|
|
573
|
+
className: 'upload-img-wrapper-name'
|
|
574
574
|
}, {
|
|
575
575
|
children: avatar.imageName
|
|
576
576
|
})), jsx("span", Object.assign({
|
|
@@ -1000,11 +1000,11 @@ var ImgCrop = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
1000
1000
|
});
|
|
1001
1001
|
}; // get the new image
|
|
1002
1002
|
_fileRef$current = fileRef.current, type = _fileRef$current.type, name = _fileRef$current.name, uid = _fileRef$current.uid;
|
|
1003
|
-
if (/svg/
|
|
1003
|
+
if (/svg/gi.test(type)) {
|
|
1004
1004
|
//svg 转为 png
|
|
1005
1005
|
type = 'image/png';
|
|
1006
1006
|
idx = name.lastIndexOf('.');
|
|
1007
|
-
if (idx > -1) name = name.substring(0, idx)
|
|
1007
|
+
if (idx > -1) name = "".concat(name.substring(0, idx), ".png");
|
|
1008
1008
|
}
|
|
1009
1009
|
//转为blob
|
|
1010
1010
|
onBlob = function onBlob(blob) {
|
|
@@ -1380,7 +1380,7 @@ var InternalUpload = function InternalUpload(props) {
|
|
|
1380
1380
|
className: 'upload-drag-text-loading'
|
|
1381
1381
|
}, {
|
|
1382
1382
|
children: [jsx("span", Object.assign({
|
|
1383
|
-
className:
|
|
1383
|
+
className: "upload-drag-text-filename"
|
|
1384
1384
|
}, {
|
|
1385
1385
|
children: (_a = curFileRef.current) === null || _a === void 0 ? void 0 : _a.name
|
|
1386
1386
|
})), intl({
|
|
@@ -1393,7 +1393,7 @@ var InternalUpload = function InternalUpload(props) {
|
|
|
1393
1393
|
}, {
|
|
1394
1394
|
children: children ? children : jsxs(Fragment, {
|
|
1395
1395
|
children: [jsx("p", Object.assign({
|
|
1396
|
-
className:
|
|
1396
|
+
className: "upload-drag-icon"
|
|
1397
1397
|
}, {
|
|
1398
1398
|
children: areaIcon
|
|
1399
1399
|
})), jsx("p", Object.assign({
|
|
@@ -1401,7 +1401,7 @@ var InternalUpload = function InternalUpload(props) {
|
|
|
1401
1401
|
}, {
|
|
1402
1402
|
children: areaText
|
|
1403
1403
|
})), !showLoading && jsx("p", Object.assign({
|
|
1404
|
-
className:
|
|
1404
|
+
className: "upload-drag-hint"
|
|
1405
1405
|
}, {
|
|
1406
1406
|
children: areaDesc
|
|
1407
1407
|
}))]
|
package/Upload/interface.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ReactNode } from
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { RcFile as OriRcFile, Action, UploadRequestMethod, UploadRequestHeader, BeforeUploadFileType, UploadRequestOption } from 'rc-upload/lib/interface';
|
|
3
3
|
type UploadType = 'drag' | 'select';
|
|
4
4
|
export type { BeforeUploadFileType };
|
|
@@ -125,7 +125,7 @@ var SketchPicker = function SketchPicker(props) {
|
|
|
125
125
|
className: clsx("".concat($prefixCls, "-sketch-picker"), className)
|
|
126
126
|
}, {
|
|
127
127
|
children: [jsx(SketchPicker$1, Object.assign({
|
|
128
|
-
width:
|
|
128
|
+
width: "100%",
|
|
129
129
|
styles: {
|
|
130
130
|
default: {
|
|
131
131
|
picker: {
|
|
@@ -138,7 +138,7 @@ var SketchPicker = function SketchPicker(props) {
|
|
|
138
138
|
}, props, {
|
|
139
139
|
onChange: onPickerChange
|
|
140
140
|
})), clear && jsx("div", {
|
|
141
|
-
className:
|
|
141
|
+
className: "square",
|
|
142
142
|
onClick: onClearCallback
|
|
143
143
|
})]
|
|
144
144
|
}));
|