@para-ui/core 4.0.32 → 4.0.37
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/Anchor/anchorMenu/index.d.ts +16 -0
- package/Anchor/index.d.ts +4 -0
- package/Anchor/index.js +394 -0
- package/Anchor/lang/en_US.d.ts +4 -0
- package/Anchor/lang/index.d.ts +9 -0
- package/Anchor/lang/zh_CN.d.ts +4 -0
- package/Anchor/type.d.ts +42 -0
- package/Argv/batchEdit/index.d.ts +18 -0
- package/Argv/dataGenerator/config.d.ts +16 -0
- package/Argv/dataGenerator/index.d.ts +24 -0
- package/Argv/index.d.ts +36 -0
- package/Argv/index.js +738 -0
- package/Argv/lang/en_US.d.ts +15 -0
- package/Argv/lang/index.d.ts +31 -0
- package/Argv/lang/zh_CN.d.ts +15 -0
- package/AutoBox/index.js +1 -1
- package/AutoButton/index.js +3 -3
- package/AutoTips/index.js +1 -1
- package/Breadcrumbs/index.js +1 -1
- package/Button/index.d.ts +2 -2
- package/Button/index.js +4 -4
- package/ButtonGroup/index.d.ts +4 -0
- package/ButtonGroup/index.js +53 -37
- package/Card/index.js +1 -1
- package/Carousel/index.js +1 -1
- package/Cascader/index.js +3 -3
- package/Checkbox/index.js +1 -1
- package/CheckboxGroup/index.js +1 -1
- package/CollapseLayout/index.js +1 -1
- package/ComboSelect/index.js +7 -4
- package/CopyText/index.js +1 -1
- package/CycleSelector/index.js +1 -1
- package/DatePicker/index.js +1 -1
- package/Descriptions/index.js +1 -1
- package/Desktop/index.js +1 -1
- package/DragVerify/index.js +1 -1
- package/Drawer/index.js +1 -1
- package/DynamicMultiBox/index.js +5 -5
- package/Form/index.js +7 -4
- package/FormItem/index.js +7 -4
- package/FunctionModal/index.js +3 -3
- package/Help/index.js +1 -1
- package/Image/index.js +1 -1
- package/InputCode/index.js +1 -1
- package/InputLang/index.js +1 -1
- package/InputNumber/index.js +1 -1
- package/Label/index.js +1 -1
- package/Menu/index.js +1 -1
- package/Modal/index.js +1 -1
- package/MultiBox/index.js +1 -1
- package/OperateBtn/index.js +1 -1
- package/PageHeader/index.js +1 -1
- package/Pagination/index.js +1 -1
- package/PopConfirm/index.js +1 -1
- package/PopMenu/index.js +1 -1
- package/Popover/index.js +1 -1
- package/Progress/index.js +1 -1
- package/QuickReply/index.js +1 -1
- package/README.md +29 -0
- package/Radio/index.js +1 -1
- package/RadioGroup/index.js +1 -1
- package/RangeInput/index.js +1 -1
- package/Search/index.js +1 -1
- package/Select/index.js +1 -1
- package/SelectInput/index.js +1 -1
- package/Selector/index.js +53 -41
- package/Selector/interface.d.ts +2 -1
- package/SelectorPicker/index.js +1 -1
- package/SingleBox/index.js +1 -1
- package/Slider/index.js +1 -1
- package/SortBox/index.d.ts +0 -2
- package/SortBox/index.js +9 -9
- package/Stepper/index.js +1 -1
- package/Switch/index.js +1 -1
- package/Table/index.js +555 -499
- package/Table/interface.d.ts +9 -1
- package/Table/lang/en_US.d.ts +1 -0
- package/Table/lang/index.d.ts +2 -0
- package/Table/lang/zh_CN.d.ts +1 -0
- package/Table/tableBodyElement/index.d.ts +5 -0
- package/Table/tableBodyInterface.d.ts +4 -0
- package/Table/tableHeadInterface.d.ts +2 -0
- package/Tabs/index.js +1 -1
- package/Tag/index.js +1 -1
- package/TextEditor/index.js +4 -4
- package/TextField/index.js +1 -1
- package/TimePicker/index.js +1 -1
- package/Timeline/index.js +21 -14
- package/Title/index.js +1 -1
- package/ToggleButton/ToggleButtonGroup.d.ts +4 -2
- package/ToggleButton/index.d.ts +4 -3
- package/ToggleButton/index.js +51 -37
- package/Tooltip/index.js +1 -1
- package/Transfer/index.js +1 -1
- package/Tree/index.js +3 -3
- package/Upload/index.js +79 -23
- package/Upload/interface.d.ts +4 -0
- package/Upload/util.d.ts +32 -0
- package/Utils/index.d.ts +7 -0
- package/Utils/index.js +10 -1
- package/Utils/type.d.ts +1 -0
- package/_verture/{index-519d0a1f.js → index-086e9a6d.js} +1 -1
- package/_verture/{index-44152845.js → index-5f0bfdcf.js} +1 -1
- package/_verture/{modalContext-10f0c5aa.js → modalContext-205db1f4.js} +1 -1
- package/_verture/{tslib.es6-55ed4bd2.js → tslib.es6-f43aa41d.js} +1 -1
- package/index.d.ts +4 -0
- package/index.js +21 -16
- package/locale/en-US.d.ts +18 -0
- package/locale/index.d.ts +36 -0
- package/locale/index.js +38 -2
- package/locale/zh-CN.d.ts +18 -0
- package/package.json +6 -4
- package/umd/Anchor.js +43 -0
- package/umd/Argv.js +43 -0
- package/umd/AutoButton.js +5 -5
- package/umd/Button.js +1 -1
- package/umd/ButtonGroup.js +5 -5
- package/umd/CollapseLayout.js +1 -1
- package/umd/ComboSelect.js +19 -7
- package/umd/CopyText.js +3 -3
- package/umd/CycleSelector.js +3 -3
- package/umd/DatePicker.js +1 -1
- package/umd/Descriptions.js +1 -1
- package/umd/Desktop.js +3 -3
- package/umd/Drawer.js +1 -1
- package/umd/DynamicMultiBox.js +6 -6
- package/umd/Form.js +19 -7
- package/umd/FormItem.js +19 -7
- package/umd/FunctionModal.js +1 -1
- package/umd/InputCode.js +3 -3
- package/umd/InputLang.js +3 -3
- package/umd/Message.js +15 -16
- package/umd/Modal.js +1 -1
- package/umd/MultiBox.js +3 -3
- package/umd/OperateBtn.js +1 -1
- package/umd/PageHeader.js +1 -1
- package/umd/Pagination.js +3 -3
- package/umd/PopConfirm.js +1 -1
- package/umd/QuickReply.js +3 -3
- package/umd/Search.js +3 -3
- package/umd/Selector.js +4 -4
- package/umd/SelectorPicker.js +6 -6
- package/umd/SingleBox.js +3 -3
- package/umd/SortBox.js +1 -1
- package/umd/Table.js +19 -7
- package/umd/Tabs.js +1 -1
- package/umd/TextField.js +2 -2
- package/umd/TimePicker.js +1 -1
- package/umd/ToggleButton.js +6 -6
- package/umd/Transfer.js +2 -2
- package/umd/Upload.js +2 -2
- package/umd/Utils.js +1 -1
- package/umd/locale.js +1 -1
- /package/_verture/{index-b037486c.js → index-4c5d6cd7.js} +0 -0
package/Table/interface.d.ts
CHANGED
|
@@ -132,7 +132,7 @@ export interface TableHeadBodyPublicProps {
|
|
|
132
132
|
showColumns?: 'inside' | false;
|
|
133
133
|
/** 是否等分表格,出滚动条 */
|
|
134
134
|
fixedTable?: boolean;
|
|
135
|
-
/**
|
|
135
|
+
/** 是否具有固定列,必须要有宽度 */
|
|
136
136
|
fixedColumn?: boolean;
|
|
137
137
|
/** 排序字段 */
|
|
138
138
|
orderFieldArr?: string[];
|
|
@@ -219,6 +219,8 @@ export interface TableProps extends TableHeadBodyPublicProps {
|
|
|
219
219
|
serialNumber?: boolean | HeadDataProps;
|
|
220
220
|
/** 是否拖动列 */
|
|
221
221
|
dragColumn?: boolean;
|
|
222
|
+
/** 拖动行 */
|
|
223
|
+
dragRow?: boolean;
|
|
222
224
|
/** 是否过滤 */
|
|
223
225
|
filter?: boolean;
|
|
224
226
|
/** 排序 多个/单个 */
|
|
@@ -293,6 +295,12 @@ export interface TableProps extends TableHeadBodyPublicProps {
|
|
|
293
295
|
* 不返回或者返回false,走外部逻辑
|
|
294
296
|
* */
|
|
295
297
|
onError?: (err: any) => Promise<boolean | void> | (boolean | void);
|
|
298
|
+
/** 拖动行事件
|
|
299
|
+
* list: 排序后的数据
|
|
300
|
+
* evt: 拖拽信息,可拿到拖拽前后的数据对比
|
|
301
|
+
* 返回true,组件内部不设置
|
|
302
|
+
* */
|
|
303
|
+
onDragRow?: (list: any[], evt: any) => Promise<boolean | void> | (boolean | void);
|
|
296
304
|
[key: string]: any;
|
|
297
305
|
}
|
|
298
306
|
export interface ExpandableRowItem {
|
package/Table/lang/en_US.d.ts
CHANGED
package/Table/lang/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ declare const _default: {
|
|
|
8
8
|
refresh: string;
|
|
9
9
|
selectNum: string;
|
|
10
10
|
selectAll: string;
|
|
11
|
+
dragSort: string;
|
|
11
12
|
};
|
|
12
13
|
en: {
|
|
13
14
|
empty: string;
|
|
@@ -18,6 +19,7 @@ declare const _default: {
|
|
|
18
19
|
refresh: string;
|
|
19
20
|
selectNum: string;
|
|
20
21
|
selectAll: string;
|
|
22
|
+
dragSort: string;
|
|
21
23
|
};
|
|
22
24
|
};
|
|
23
25
|
export default _default;
|
package/Table/lang/zh_CN.d.ts
CHANGED
|
@@ -9,6 +9,11 @@ export interface TableBodyElementProps {
|
|
|
9
9
|
className?: string;
|
|
10
10
|
style?: React.CSSProperties;
|
|
11
11
|
children?: any;
|
|
12
|
+
list?: any;
|
|
13
|
+
handle?: any;
|
|
14
|
+
drag?: boolean;
|
|
15
|
+
onDrag?: any;
|
|
16
|
+
onChoose?: any;
|
|
12
17
|
[name: string]: any;
|
|
13
18
|
}
|
|
14
19
|
export declare const TableBodyElement: FunctionComponent<TableBodyElementProps>;
|
|
@@ -10,6 +10,8 @@ import { DragResultProps } from './thElement';
|
|
|
10
10
|
export interface TableHeadProps extends TableHeadBodyPublicProps {
|
|
11
11
|
/** 是否拖动列 */
|
|
12
12
|
dragColumn?: boolean;
|
|
13
|
+
/** 拖动行 */
|
|
14
|
+
dragRow?: boolean;
|
|
13
15
|
/** 表格每列没设置宽度的默认宽度, 默认80 */
|
|
14
16
|
lineWidth?: number;
|
|
15
17
|
/** 排序触发事件 property: 属性名 */
|
package/Tabs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as __rest } from '../_verture/tslib.es6-f43aa41d.js';
|
|
2
2
|
import React__default, { useState, useEffect, createElement } from 'react';
|
|
3
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
4
|
import RcTabs, { TabPane } from 'rc-tabs';
|
package/Tag/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as __rest } from '../_verture/tslib.es6-f43aa41d.js';
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useRef, useEffect } from 'react';
|
|
4
4
|
import CloseIcon from '@para-ui/icons/Close';
|
package/TextEditor/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
|
8
8
|
import { UUID } from '@paraview/lib';
|
|
9
9
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-1fc7c957.js';
|
|
10
10
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
11
|
-
import '../_verture/tslib.es6-
|
|
11
|
+
import '../_verture/tslib.es6-f43aa41d.js';
|
|
12
12
|
import '../Help/index.js';
|
|
13
13
|
import '../Tooltip/index.js';
|
|
14
14
|
import 'rc-tooltip';
|
|
@@ -23,7 +23,7 @@ import '../_verture/index-ca413216.js';
|
|
|
23
23
|
* @date 2022/09/06 18:00
|
|
24
24
|
* @description 存放富文本编辑器的一些默认配置
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
var TOOL_BAR_CONFIG = ['headerSelect', 'blockquote', '|', 'bold', 'underline', 'italic', {
|
|
27
27
|
key: 'group-more-style',
|
|
28
28
|
title: '更多',
|
|
29
29
|
iconSvg: '<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',
|
|
@@ -59,8 +59,8 @@ var zh = {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
var localeJson = {
|
|
62
|
-
zh,
|
|
63
|
-
en
|
|
62
|
+
zh: zh,
|
|
63
|
+
en: en
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-text-editor .w-e-max-length-info {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-text-editor .w-e-bar-item > button:hover {\n background: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item {\n padding-left: 0;\n padding-right: 0;\n display: flex;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item > button {\n flex: 1;\n display: flex;\n justify-content: flex-start;\n}\n.paraui-v4-text-editor .w-e-bar-item-menus-container .w-e-bar-item > button:hover {\n background: rgb(247, 248, 250);\n border-radius: 2px;\n}\n.paraui-v4-text-editor .w-e-full-screen-container {\n z-index: 1000;\n}\n.paraui-v4-text-editor .text-editor-content {\n border: 1px solid rgb(212, 218, 227);\n border-radius: 4px;\n padding: 1px 0;\n background-color: #fff;\n}\n.paraui-v4-text-editor .text-editor-content > div:nth-child(1) {\n border-bottom: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-text-editor .text-editor-content div[contenteditable=false] {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-text-editor .text-editor-content div[contenteditable=false]:hover {\n border-color: rgb(212, 218, 227);\n cursor: not-allowed;\n}\n.paraui-v4-text-editor .preview-mode > div:nth-child(1) {\n border-bottom: none;\n}";
|
package/TextField/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as __rest } from '../_verture/tslib.es6-f43aa41d.js';
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useRef, useEffect, useMemo } from 'react';
|
|
4
4
|
import Label from '../Label/index.js';
|
package/TimePicker/index.js
CHANGED
package/Timeline/index.js
CHANGED
|
@@ -1,27 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as __rest } from '../_verture/tslib.es6-f43aa41d.js';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React__default from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
-
import { a as _defineProperty } from '../_verture/defineProperty-f0e15205.js';
|
|
6
5
|
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
7
6
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
8
7
|
|
|
9
8
|
//TimelineItem
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
const TimelineItem = props => {
|
|
10
|
+
const {
|
|
11
|
+
className,
|
|
12
|
+
color,
|
|
13
|
+
dot,
|
|
14
|
+
pending = false,
|
|
15
|
+
position,
|
|
16
|
+
label,
|
|
17
|
+
children
|
|
18
|
+
} = props,
|
|
19
19
|
restProps = __rest(props, ["className", "color", "dot", "pending", "position", "label", "children"]);
|
|
20
|
-
|
|
20
|
+
const prefixCls = "".concat($rcPrefixCls, "-timeline");
|
|
21
21
|
//item cls
|
|
22
|
-
|
|
22
|
+
const itemClassName = clsx({
|
|
23
|
+
["".concat(prefixCls, "-item")]: true,
|
|
24
|
+
["".concat(prefixCls, "-item-pending")]: pending
|
|
25
|
+
}, className);
|
|
23
26
|
//dot cls
|
|
24
|
-
|
|
27
|
+
const dotClassName = clsx({
|
|
28
|
+
["".concat(prefixCls, "-item-head")]: true,
|
|
29
|
+
["".concat(prefixCls, "-item-head-custom")]: !!dot,
|
|
30
|
+
["".concat(prefixCls, "-item-head-").concat(color)]: color
|
|
31
|
+
});
|
|
25
32
|
return jsxs("li", Object.assign({}, restProps, {
|
|
26
33
|
className: itemClassName
|
|
27
34
|
}, {
|
package/Title/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import Help from '../Help/index.js';
|
|
|
7
7
|
import { Collapse } from '../Collapse/index.js';
|
|
8
8
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
9
9
|
import '../Tooltip/index.js';
|
|
10
|
-
import '../_verture/tslib.es6-
|
|
10
|
+
import '../_verture/tslib.es6-f43aa41d.js';
|
|
11
11
|
import 'rc-tooltip';
|
|
12
12
|
import 'rc-tooltip/lib/placements';
|
|
13
13
|
import '@para-ui/icons/Forbid';
|
|
@@ -7,14 +7,16 @@ import React, { FunctionComponent } from 'react';
|
|
|
7
7
|
import './index.scss';
|
|
8
8
|
export type ToggleButtonItemProps = {
|
|
9
9
|
label: string;
|
|
10
|
+
/** type为icon时有效 */
|
|
11
|
+
icon?: React.ReactNode;
|
|
10
12
|
value: any;
|
|
11
13
|
selected?: boolean;
|
|
12
14
|
disabled?: boolean;
|
|
13
|
-
toolTipTitle?:
|
|
15
|
+
toolTipTitle?: React.ReactNode;
|
|
14
16
|
className?: string;
|
|
15
17
|
};
|
|
16
18
|
export interface ToggleButtonGroupProps {
|
|
17
|
-
type?: 'text' | 'outlined';
|
|
19
|
+
type?: 'text' | 'outlined' | 'icon';
|
|
18
20
|
/**
|
|
19
21
|
* 类名
|
|
20
22
|
*/
|
package/ToggleButton/index.d.ts
CHANGED
|
@@ -15,18 +15,19 @@ export interface ToggleButtonProps {
|
|
|
15
15
|
* 样式
|
|
16
16
|
*/
|
|
17
17
|
style?: React.CSSProperties;
|
|
18
|
+
type?: 'text' | 'outlined' | 'icon';
|
|
18
19
|
/**
|
|
19
20
|
* 子节点
|
|
20
21
|
*/
|
|
21
|
-
children?:
|
|
22
|
+
children?: React.ReactNode;
|
|
22
23
|
/**
|
|
23
24
|
* 禁用
|
|
24
25
|
*/
|
|
25
26
|
disabled?: boolean;
|
|
26
27
|
/**
|
|
27
|
-
*
|
|
28
|
+
* 提示文字
|
|
28
29
|
*/
|
|
29
|
-
toolTipTitle?:
|
|
30
|
+
toolTipTitle?: React.ReactNode;
|
|
30
31
|
/**
|
|
31
32
|
* 是否选中
|
|
32
33
|
*/
|
package/ToggleButton/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as __rest } from '../_verture/tslib.es6-f43aa41d.js';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useRef } from 'react';
|
|
4
4
|
import { Button } from '../Button/index.js';
|
|
5
|
+
import { a as _defineProperty } from '../_verture/defineProperty-f0e15205.js';
|
|
5
6
|
import { UUID } from '@paraview/lib';
|
|
6
7
|
import clsx from 'clsx';
|
|
7
8
|
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
@@ -20,35 +21,34 @@ import 'dayjs';
|
|
|
20
21
|
import '../_verture/useFormatMessage-1fc7c957.js';
|
|
21
22
|
import '../_verture/index-ca413216.js';
|
|
22
23
|
|
|
23
|
-
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.
|
|
24
|
+
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.toggle-button-outlined.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.toggle-button-outlined.paraui-v4-toggle-button-radio.paraui-v4-toggle-button-selected:hover {\n border-color: rgb(46, 101, 230);\n}\n.paraui-v4-toggle-button.toggle-button-outlined.paraui-v4-toggle-button-radio:hover {\n border-color: rgb(87, 131, 235);\n}\n.paraui-v4-toggle-button.toggle-button-outlined.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.toggle-button-outlined.paraui-v4-toggle-button-radio[disabled]:hover {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-toggle-button.toggle-button-outlined.paraui-v4-toggle-button-radio[disabled].paraui-v4-toggle-button-selected {\n color: rgb(92, 101, 115);\n background-color: rgb(247, 248, 250);\n border: 1px solid rgb(212, 218, 227);\n}\n.paraui-v4-toggle-button.toggle-button-outlined.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.toggle-button-outlined.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.toggle-button-outlined.paraui-v4-toggle-button-check:hover {\n border-color: rgb(87, 131, 235);\n}\n.paraui-v4-toggle-button.toggle-button-outlined.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.toggle-button-outlined.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.toggle-button-outlined.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.toggle-button-outlined.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.toggle-button-outlined.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.toggle-button-outlined.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.toggle-button-outlined.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.toggle-button-outlined.paraui-v4-toggle-button-check[disabled].paraui-v4-toggle-button-selected {\n color: rgb(92, 101, 115);\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-toggle-button.toggle-button-icon.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.toggle-button-icon.paraui-v4-toggle-button-selected:hover {\n border-color: rgb(46, 101, 230);\n}\n.paraui-v4-toggle-button.toggle-button-icon[disabled].paraui-v4-toggle-button-selected {\n border-color: rgba(255, 255, 255, 0.5);\n}\n.paraui-v4-toggle-button.toggle-button-icon[disabled].paraui-v4-toggle-button-selected::before {\n width: 100%;\n height: 100%;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 1;\n content: \"\";\n background-color: rgba(255, 255, 255, 0.5);\n}\n.paraui-v4-toggle-button.toggle-button-text.paraui-v4-button-text {\n color: rgb(29, 33, 38);\n}\n.paraui-v4-toggle-button.toggle-button-text.paraui-v4-button-text:hover {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-toggle-button.toggle-button-text.paraui-v4-button-text:hover[disabled] {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-toggle-button.toggle-button-text.paraui-v4-toggle-button-selected {\n color: rgb(46, 101, 230);\n border: 0;\n font-weight: 700;\n}\n.paraui-v4-toggle-button.toggle-button-text.paraui-v4-toggle-button-selected:hover {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-toggle-button.toggle-button-text.paraui-v4-toggle-button-selected[disabled] {\n color: rgb(92, 101, 115);\n background-color: transparent;\n border: 0;\n}\n.paraui-v4-toggle-button.toggle-button-text.paraui-v4-toggle-button-selected[disabled]:hover {\n background-color: transparent;\n}\n.paraui-v4-toggle-button.toggle-button-text.paraui-v4-toggle-button-selected:first-child:before {\n display: none;\n}\n.paraui-v4-toggle-button.toggle-button-text.paraui-v4-toggle-button-selected::after {\n display: none;\n}\n.paraui-v4-toggle-button.toggle-button-text[disabled] {\n color: rgb(161, 168, 179);\n background-color: transparent;\n border: 0;\n}\n.paraui-v4-toggle-button.toggle-button-text[disabled]:hover {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-toggle-button-wrap {\n display: inline-block;\n}\n.paraui-v4-toggle-button .toggle-button-text {\n width: 100%;\n}\n.paraui-v4-toggle-button-disabled.paraui-v4-toggle-button {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-toggle-button-disabled.paraui-v4-toggle-button:hover {\n color: rgb(92, 101, 115);\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 8px;\n}\n.paraui-v4-togglebutton-group-text .toggle-button-item .paraui-v4-toggle-button {\n margin: 0;\n padding: 0 16px;\n}\n.paraui-v4-togglebutton-group-text .toggle-button-item ~ .toggle-button-item .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}";
|
|
24
25
|
styleInject(css_248z);
|
|
25
26
|
|
|
26
27
|
//切换按钮组
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
type = 'outlined',
|
|
30
|
-
className,
|
|
31
|
-
style,
|
|
32
|
-
exclusive =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
var ToggleButtonGroup = function ToggleButtonGroup(props) {
|
|
29
|
+
var _props$type = props.type,
|
|
30
|
+
type = _props$type === void 0 ? 'outlined' : _props$type,
|
|
31
|
+
className = props.className,
|
|
32
|
+
style = props.style,
|
|
33
|
+
_props$exclusive = props.exclusive,
|
|
34
|
+
exclusive = _props$exclusive === void 0 ? false : _props$exclusive,
|
|
35
|
+
_props$toggleable = props.toggleable,
|
|
36
|
+
toggleable = _props$toggleable === void 0 ? true : _props$toggleable,
|
|
37
|
+
data = props.data,
|
|
38
|
+
value = props.value,
|
|
39
|
+
onChange = props.onChange;
|
|
38
40
|
if (type === 'text' && !('exclusive' in props)) {
|
|
39
41
|
exclusive = true;
|
|
40
42
|
}
|
|
41
|
-
|
|
42
|
-
["".concat($prefixCls, "-togglebutton-group-text")]: type === 'text'
|
|
43
|
-
});
|
|
43
|
+
var makeCls = clsx("".concat($prefixCls, "-togglebutton-group"), className, _defineProperty({}, "".concat($prefixCls, "-togglebutton-group-text"), type === 'text'));
|
|
44
44
|
//多选
|
|
45
|
-
|
|
45
|
+
var handleChange = function handleChange(evt, buttonValue) {
|
|
46
46
|
if (!onChange) return;
|
|
47
47
|
if (!Array.isArray(value)) {
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
var index = value && (value === null || value === void 0 ? void 0 : value.indexOf(buttonValue));
|
|
51
|
+
var newValue;
|
|
52
52
|
if (value && index >= 0) {
|
|
53
53
|
newValue = value.slice();
|
|
54
54
|
newValue.splice(index, 1);
|
|
@@ -58,7 +58,7 @@ const ToggleButtonGroup = props => {
|
|
|
58
58
|
onChange(evt, newValue);
|
|
59
59
|
};
|
|
60
60
|
//单选
|
|
61
|
-
|
|
61
|
+
var handleExclusiveChange = function handleExclusiveChange(evt, buttonValue) {
|
|
62
62
|
if (!onChange) return;
|
|
63
63
|
if (!toggleable) {
|
|
64
64
|
if (value === buttonValue) return;
|
|
@@ -68,7 +68,7 @@ const ToggleButtonGroup = props => {
|
|
|
68
68
|
onChange(evt, value === buttonValue ? null : buttonValue);
|
|
69
69
|
};
|
|
70
70
|
//是否选中
|
|
71
|
-
|
|
71
|
+
var hasValueSelected = function hasValueSelected(value, candidate) {
|
|
72
72
|
if (candidate === undefined || value === undefined) return false;
|
|
73
73
|
if (Array.isArray(candidate)) {
|
|
74
74
|
return candidate.includes(value);
|
|
@@ -76,27 +76,24 @@ const ToggleButtonGroup = props => {
|
|
|
76
76
|
return value === candidate;
|
|
77
77
|
};
|
|
78
78
|
//渲染组
|
|
79
|
-
|
|
79
|
+
var renderGroup = function renderGroup() {
|
|
80
80
|
if (!data || !(data === null || data === void 0 ? void 0 : data.length)) return null;
|
|
81
|
-
return data.map((item, idx)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
selected
|
|
85
|
-
} = item,
|
|
81
|
+
return data.map(function (item, idx) {
|
|
82
|
+
var label = item.label,
|
|
83
|
+
selected = item.selected,
|
|
86
84
|
rest = __rest(item, ["label", "selected"]);
|
|
87
|
-
|
|
85
|
+
var hasSelected = selected === undefined ? hasValueSelected(rest.value, value) : selected;
|
|
88
86
|
return jsx("div", Object.assign({
|
|
89
87
|
className: 'toggle-button-item'
|
|
90
88
|
}, {
|
|
91
89
|
children: jsx(ToggleButton, Object.assign({}, rest, {
|
|
92
90
|
style: style,
|
|
93
91
|
selected: hasSelected,
|
|
94
|
-
|
|
95
|
-
variant: type === 'text' ? 'text' : 'outlined',
|
|
92
|
+
type: type,
|
|
96
93
|
onClick: exclusive ? handleExclusiveChange : handleChange,
|
|
97
94
|
exclusive: exclusive
|
|
98
95
|
}, {
|
|
99
|
-
children: label
|
|
96
|
+
children: type === 'icon' ? item.icon || null : label
|
|
100
97
|
}))
|
|
101
98
|
}), idx);
|
|
102
99
|
});
|
|
@@ -113,23 +110,23 @@ const ToggleButton = props => {
|
|
|
113
110
|
const {
|
|
114
111
|
className,
|
|
115
112
|
style,
|
|
113
|
+
type = 'outlined',
|
|
116
114
|
children,
|
|
117
115
|
disabled = false,
|
|
118
116
|
toolTipTitle,
|
|
119
117
|
selected = false,
|
|
120
118
|
exclusive = false,
|
|
121
119
|
value,
|
|
122
|
-
autoToolTipOverflow = true,
|
|
123
120
|
width,
|
|
124
121
|
onClick
|
|
125
122
|
} = props,
|
|
126
|
-
restProps = __rest(props, ["className", "style", "children", "disabled", "toolTipTitle", "selected", "exclusive", "value", "
|
|
123
|
+
restProps = __rest(props, ["className", "style", "type", "children", "disabled", "toolTipTitle", "selected", "exclusive", "value", "width", "onClick"]);
|
|
127
124
|
// const [hasTip, setHasTip] = useState<boolean>(false);
|
|
128
125
|
const id = useRef(UUID()).current;
|
|
129
126
|
const prefixCls = "".concat($prefixCls, "-toggle-button");
|
|
130
127
|
//className
|
|
131
|
-
const makeCls = clsx(prefixCls, className, {
|
|
132
|
-
["".concat(prefixCls, "-").concat(exclusive ? 'radio' : 'check')]:
|
|
128
|
+
const makeCls = clsx(prefixCls, className, "toggle-button-".concat(type), {
|
|
129
|
+
["".concat(prefixCls, "-").concat(exclusive ? 'radio' : 'check')]: type === 'outlined',
|
|
133
130
|
["".concat(prefixCls, "-selected")]: selected,
|
|
134
131
|
["".concat(prefixCls, "-disabled")]: disabled
|
|
135
132
|
});
|
|
@@ -137,10 +134,27 @@ const ToggleButton = props => {
|
|
|
137
134
|
const handleClick = evt => {
|
|
138
135
|
if (onClick) onClick(evt, value);
|
|
139
136
|
};
|
|
137
|
+
if (type === 'icon') {
|
|
138
|
+
return jsx(Button.IconButton, Object.assign({
|
|
139
|
+
"data-id": id
|
|
140
|
+
}, restProps, {
|
|
141
|
+
variant: 'outlined',
|
|
142
|
+
style: Object.assign({
|
|
143
|
+
width
|
|
144
|
+
}, style),
|
|
145
|
+
className: makeCls,
|
|
146
|
+
disabled: disabled,
|
|
147
|
+
toolTipTitle: toolTipTitle,
|
|
148
|
+
value: value,
|
|
149
|
+
onClick: handleClick
|
|
150
|
+
}, {
|
|
151
|
+
children: children
|
|
152
|
+
}));
|
|
153
|
+
}
|
|
140
154
|
return jsx(Button, Object.assign({
|
|
141
|
-
"data-id": id
|
|
142
|
-
variant: 'outlined'
|
|
155
|
+
"data-id": id
|
|
143
156
|
}, restProps, {
|
|
157
|
+
variant: type === 'text' ? 'text' : 'outlined',
|
|
144
158
|
style: Object.assign({
|
|
145
159
|
width
|
|
146
160
|
}, style),
|
package/Tooltip/index.js
CHANGED
package/Transfer/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import Drag from '@para-ui/icons/Drag';
|
|
|
16
16
|
import { S as Sortable } from '../_verture/sortable.esm-76fe46a4.js';
|
|
17
17
|
import { d as debounce } from '../_verture/utils-c17b5265.js';
|
|
18
18
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
19
|
-
import '../_verture/tslib.es6-
|
|
19
|
+
import '../_verture/tslib.es6-f43aa41d.js';
|
|
20
20
|
import '@para-ui/icons/LoadingF';
|
|
21
21
|
import '../Tooltip/index.js';
|
|
22
22
|
import 'rc-tooltip';
|
package/Tree/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { T as Tree } from '../_verture/index-
|
|
2
|
-
export { T as default } from '../_verture/index-
|
|
1
|
+
import { T as Tree } from '../_verture/index-5f0bfdcf.js';
|
|
2
|
+
export { T as default } from '../_verture/index-5f0bfdcf.js';
|
|
3
3
|
import '../_verture/toConsumableArray-c7a8028f.js';
|
|
4
4
|
import '../_verture/slicedToArray-75fa4188.js';
|
|
5
5
|
import '../_verture/defineProperty-f0e15205.js';
|
|
6
6
|
import '../_verture/index-8ac46bd9.js';
|
|
7
7
|
import '../_verture/typeof-6ec38efd.js';
|
|
8
|
-
import '../_verture/tslib.es6-
|
|
8
|
+
import '../_verture/tslib.es6-f43aa41d.js';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
10
|
import 'react';
|
|
11
11
|
import 'rc-tree';
|