@para-ui/core 3.0.1 → 3.0.2-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AutoBox/index.js +180 -68
- package/AutoBox/protal.d.ts +17 -0
- package/AutoTips/index.js +4 -3
- package/Breadcrumbs/index.js +10 -7
- package/Button/index.js +15 -14
- package/ButtonGroup/index.js +3 -2
- package/Carousel/index.js +7 -5
- package/Cascader/index.d.ts +3 -1
- package/Cascader/index.js +13 -5
- package/Checkbox/index.js +27 -8
- package/CheckboxGroup/index.d.ts +2 -5
- package/CheckboxGroup/index.js +13 -10
- package/Collapse/index.js +11 -10
- package/CollapseBox/index.js +7 -6
- package/ComboSelect/index.js +161 -67
- package/ComboSelect/interface.d.ts +10 -9
- package/Container/index.js +24 -23
- package/DatePicker/index.js +12 -17
- package/DatePicker/util.d.ts +0 -1
- package/Desktop/index.js +6 -5
- package/Drawer/index.js +10 -9
- package/Dropdown/index.js +59 -6
- package/Empty/index.js +7 -6
- package/Form/index.js +6 -5
- package/FormItem/compoments/formFile/index.d.ts +16 -16
- package/FormItem/index.d.ts +19 -19
- package/FormItem/index.js +3 -2
- package/FunctionModal/index.js +3 -2
- package/GlobalContext/constant.d.ts +8 -0
- package/Help/index.js +3 -2
- package/HelperText/index.d.ts +9 -5
- package/HelperText/index.js +9 -4
- package/InputLang/index.d.ts +2 -5
- package/InputLang/index.js +13 -7
- package/InputNumber/index.d.ts +2 -5
- package/InputNumber/index.js +15 -12
- package/Label/index.d.ts +2 -0
- package/Label/index.js +12 -8
- package/Loading/index.js +5 -4
- package/Menu/index.js +18 -17
- package/Message/index.js +5 -4
- package/Modal/index.js +28 -26
- package/MultiBox/index.d.ts +2 -5
- package/MultiBox/index.js +13 -6
- package/Notification/index.js +3 -2
- package/OperateBtn/index.js +15 -12
- package/PageHeader/index.js +18 -18
- package/Pagination/index.js +10 -4
- package/ParauiProvider/index.js +1 -1
- package/PopConfirm/index.js +3 -2
- package/Popover/index.js +7 -4
- package/Progress/index.d.ts +2 -0
- package/Progress/index.js +13 -9
- package/Querying/index.js +6 -5
- package/README.md +15 -0
- package/Radio/index.js +22 -8
- package/RadioGroup/index.d.ts +2 -5
- package/RadioGroup/index.js +10 -7
- package/Search/index.js +13 -8
- package/Select/index.d.ts +2 -5
- package/Select/index.js +23 -20
- package/SelectInput/index.js +3 -2
- package/Selector/index.js +63 -51
- package/Selector/interface.d.ts +6 -6
- package/SelectorPicker/index.d.ts +2 -5
- package/SelectorPicker/index.js +20 -17
- package/SingleBox/index.d.ts +2 -5
- package/SingleBox/index.js +11 -6
- package/Slider/index.d.ts +4 -4
- package/Slider/index.js +9 -4
- package/Split/index.js +8 -7
- package/Stepper/index.js +7 -3
- package/Switch/index.js +10 -12
- package/Table/index.js +522 -296
- package/Table/interface.d.ts +43 -1
- package/Table/tableElement/index.d.ts +2 -2
- package/Table/util.d.ts +13 -1
- package/Tabs/index.js +7 -6
- package/Tag/index.js +12 -14
- package/TextField/index.d.ts +2 -5
- package/TextField/index.js +20 -18
- package/TimePicker/index.js +1 -0
- package/Timeline/index.js +13 -12
- package/Title/index.d.ts +30 -0
- package/Title/index.js +49 -0
- package/ToggleButton/index.js +13 -13
- package/Tooltip/index.js +13 -9
- package/Transfer/index.d.ts +6 -2
- package/Transfer/index.js +8 -4
- package/Tree/index.js +3 -2
- package/Tree/utils/tools.d.ts +0 -1
- package/Upload/ImgCrop/constants.d.ts +1 -1
- package/Upload/index.js +50 -43
- package/_verture/constant-bf34e6fa.js +11 -0
- package/_verture/{index-abfdd262.js → index-08b7101b.js} +63 -31
- package/_verture/{index-5bb4b5d7.js → index-df70784b.js} +30 -17
- package/_verture/{modalContext-59669f93.js → modalContext-7b378e49.js} +0 -0
- package/index.d.ts +2 -0
- package/index.js +7 -5
- package/package.json +2 -1
package/Timeline/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
+
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
6
7
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
7
8
|
|
|
8
9
|
var TimelineItem = function TimelineItem(props) {
|
|
@@ -18,7 +19,7 @@ var TimelineItem = function TimelineItem(props) {
|
|
|
18
19
|
children = props.children,
|
|
19
20
|
restProps = __rest(props, ["className", "color", "dot", "pending", "position", "label", "children"]);
|
|
20
21
|
|
|
21
|
-
var prefixCls =
|
|
22
|
+
var prefixCls = "".concat($rcPrefixCls, "-timeline"); //item cls
|
|
22
23
|
|
|
23
24
|
var itemClassName = clsx((_clsx = {}, _defineProperty(_clsx, "".concat(prefixCls, "-item"), true), _defineProperty(_clsx, "".concat(prefixCls, "-item-pending"), pending), _clsx), className); //dot cls
|
|
24
25
|
|
|
@@ -48,7 +49,7 @@ var TimelineItem = function TimelineItem(props) {
|
|
|
48
49
|
}));
|
|
49
50
|
};
|
|
50
51
|
|
|
51
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/6/9 下午8:00\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-timeline {\n color: rgb(46, 55, 67);\n font-size: 14px;\n line-height: 1.5715;\n list-style: none;\n}\n
|
|
52
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/6/9 下午8:00\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-timeline {\n color: rgb(46, 55, 67);\n font-size: 14px;\n line-height: 1.5715;\n list-style: none;\n}\n.paraui-v3-timeline .component-timeline-item {\n position: relative;\n margin: 0;\n min-height: 70px;\n padding-bottom: 20px;\n font-size: 14px;\n list-style: none;\n}\n.paraui-v3-timeline .component-timeline-item-disabled .component-timeline-item-head:not(.component-timeline-item-head-custom) {\n background-color: rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-timeline .component-timeline-item-disabled .component-timeline-item-head svg {\n color: rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-timeline .component-timeline-item-disabled .component-timeline-item-content {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-timeline .component-timeline-item-tail {\n position: absolute;\n top: 16px;\n bottom: 8px;\n left: 3.5px;\n border-left: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-timeline .component-timeline-item-pending .component-timeline-item-head {\n font-size: 12px;\n background-color: transparent;\n}\n.paraui-v3-timeline .component-timeline-item-pending .component-timeline-item-tail {\n display: none;\n}\n.paraui-v3-timeline .component-timeline-item-head {\n position: absolute;\n width: 8px;\n height: 8px;\n background-color: rgb(54, 102, 214);\n border-radius: 100px;\n}\n.paraui-v3-timeline .component-timeline-item-head-custom {\n position: absolute;\n top: 5.5px;\n left: 5px;\n width: auto;\n height: auto;\n margin-top: 0;\n padding: 3px 1px;\n line-height: 1;\n text-align: center;\n border: 0;\n border-radius: 0;\n background-color: transparent;\n transform: translate(-50%, -50%);\n}\n.paraui-v3-timeline .component-timeline-item-content {\n position: relative;\n top: -7px;\n margin: 0 0 0 22px;\n word-break: break-word;\n}\n.paraui-v3-timeline .component-timeline-item-last > .component-timeline-item-tail {\n display: none;\n}\n.paraui-v3-timeline .component-timeline-item-last > .component-timeline-item-content {\n min-height: 48px;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-alternate .component-timeline-item-tail,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-tail,\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-tail,\n.paraui-v3-timeline.paraui-v3-timeline-alternate .component-timeline-item-head,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-head,\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-head,\n.paraui-v3-timeline.paraui-v3-timeline-alternate .component-timeline-item-head-custom,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-head-custom,\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-head-custom {\n left: 50%;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-alternate .component-timeline-item-head,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-head,\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-head {\n margin-left: -4px;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-alternate .component-timeline-item-head-custom,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-head-custom,\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-head-custom {\n margin-left: 1px;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-alternate .component-timeline-item-left .component-timeline-item-content,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-left .component-timeline-item-content,\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-left .component-timeline-item-content {\n left: calc(50% - 4px);\n width: calc(50% - 14px);\n text-align: left;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-alternate .component-timeline-item-right .component-timeline-item-content,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-right .component-timeline-item-content,\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-right .component-timeline-item-content {\n width: calc(50% - 12px);\n margin: 0;\n text-align: right;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-right .component-timeline-item-tail,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-right .component-timeline-item-head,\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-right .component-timeline-item-head-custom {\n left: calc(100% - 4px - 2px);\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-right .component-timeline-item-right .component-timeline-item-content {\n width: calc(100% - 18px);\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-pending .component-timeline-item-last .component-timeline-item-tail {\n display: block;\n height: calc(100% - 14px);\n border-left: 2px dotted #f0f0f0;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-reverse .component-timeline-item-last .component-timeline-item-tail {\n display: none;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-reverse .component-timeline-item-pending .component-timeline-item-tail {\n top: 15px;\n display: block;\n height: calc(100% - 15px);\n border-left: 2px dotted #f0f0f0;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-reverse .component-timeline-item-pending .component-timeline-item-content {\n min-height: 48px;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-label {\n position: absolute;\n top: -7.001px;\n width: calc(50% - 12px);\n text-align: right;\n}\n\n.paraui-v3-timeline.paraui-v3-timeline-label .component-timeline-item-right .component-timeline-item-label {\n left: calc(50% + 14px);\n width: calc(50% - 14px);\n text-align: left;\n}";
|
|
52
53
|
styleInject(css_248z);
|
|
53
54
|
|
|
54
55
|
var Timeline = function Timeline(props) {
|
|
@@ -67,7 +68,7 @@ var Timeline = function Timeline(props) {
|
|
|
67
68
|
data = props.data,
|
|
68
69
|
restProps = __rest(props, ["pending", "pendingDot", "children", "className", "reverse", "mode", "align", "data"]);
|
|
69
70
|
|
|
70
|
-
var prefixCls =
|
|
71
|
+
var prefixCls = "".concat($prefixCls, "-timeline");
|
|
71
72
|
var innerMode = align !== null && align !== void 0 ? align : mode; //时间轴和内容相对位置
|
|
72
73
|
|
|
73
74
|
var pendingNode = typeof pending === 'boolean' ? null : pending; //是否有幽灵节点
|
|
@@ -92,14 +93,14 @@ var Timeline = function Timeline(props) {
|
|
|
92
93
|
var _a, _b, _c;
|
|
93
94
|
|
|
94
95
|
if (innerMode === 'alternate') {
|
|
95
|
-
if (((_a = ele === null || ele === void 0 ? void 0 : ele.props) === null || _a === void 0 ? void 0 : _a.position) === 'right') return "".concat(
|
|
96
|
-
if (((_b = ele === null || ele === void 0 ? void 0 : ele.props) === null || _b === void 0 ? void 0 : _b.position) === 'left') return "".concat(
|
|
97
|
-
return idx % 2 === 0 ? "".concat(
|
|
96
|
+
if (((_a = ele === null || ele === void 0 ? void 0 : ele.props) === null || _a === void 0 ? void 0 : _a.position) === 'right') return "".concat($rcPrefixCls, "-timeline-item-right");
|
|
97
|
+
if (((_b = ele === null || ele === void 0 ? void 0 : ele.props) === null || _b === void 0 ? void 0 : _b.position) === 'left') return "".concat($rcPrefixCls, "-timeline-item-left");
|
|
98
|
+
return idx % 2 === 0 ? "".concat($rcPrefixCls, "-timeline-item-left") : "".concat($rcPrefixCls, "-timeline-item-right");
|
|
98
99
|
}
|
|
99
100
|
|
|
100
|
-
if (innerMode === 'left') return "".concat(
|
|
101
|
-
if (innerMode === 'right') return "".concat(
|
|
102
|
-
if (((_c = ele === null || ele === void 0 ? void 0 : ele.props) === null || _c === void 0 ? void 0 : _c.position) === 'right') return "".concat(
|
|
101
|
+
if (innerMode === 'left') return "".concat($rcPrefixCls, "-timeline-item-left");
|
|
102
|
+
if (innerMode === 'right') return "".concat($rcPrefixCls, "-timeline-item-right");
|
|
103
|
+
if (((_c = ele === null || ele === void 0 ? void 0 : ele.props) === null || _c === void 0 ? void 0 : _c.position) === 'right') return "".concat($rcPrefixCls, "-timeline-item-right");
|
|
103
104
|
return '';
|
|
104
105
|
}; //实际渲染项
|
|
105
106
|
|
|
@@ -108,7 +109,7 @@ var Timeline = function Timeline(props) {
|
|
|
108
109
|
return !!item;
|
|
109
110
|
});
|
|
110
111
|
var itemsCount = React__default.Children.count(truthyItems);
|
|
111
|
-
var lastCls = "".concat(
|
|
112
|
+
var lastCls = "".concat($rcPrefixCls, "-timeline-item-last");
|
|
112
113
|
var items = React__default.Children.map(truthyItems, function (ele, idx) {
|
|
113
114
|
var pendingClass = idx === itemsCount - 2 ? lastCls : '';
|
|
114
115
|
var readyClass = idx === itemsCount - 1 ? lastCls : '';
|
|
@@ -128,7 +129,7 @@ var Timeline = function Timeline(props) {
|
|
|
128
129
|
var renderItems = function renderItems() {
|
|
129
130
|
if (!(data === null || data === void 0 ? void 0 : data.length)) return items;
|
|
130
131
|
var itemsCount = data.length;
|
|
131
|
-
var lastCls = "".concat(
|
|
132
|
+
var lastCls = "".concat($rcPrefixCls, "-timeline-item-last");
|
|
132
133
|
return data.map(function (item, idx) {
|
|
133
134
|
var dotIcon = item.dotIcon,
|
|
134
135
|
content = item.content,
|
|
@@ -139,7 +140,7 @@ var Timeline = function Timeline(props) {
|
|
|
139
140
|
var readyClass = idx === itemsCount - 1 ? lastCls : '';
|
|
140
141
|
return jsx(TimelineItem, Object.assign({
|
|
141
142
|
dot: dotIcon,
|
|
142
|
-
className: clsx([className, _defineProperty({}, "".concat(
|
|
143
|
+
className: clsx([className, _defineProperty({}, "".concat($rcPrefixCls, "-timeline-item-disabled"), disabled), !reverse && !!pending ? pendingClass : readyClass, getPositionCls(null, idx)])
|
|
143
144
|
}, {
|
|
144
145
|
children: content
|
|
145
146
|
}));
|
package/Title/index.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Hanz
|
|
3
|
+
* @date 2022/8/11 2:54 PM
|
|
4
|
+
* @description 标题
|
|
5
|
+
*/
|
|
6
|
+
import React, { FC, ReactNode } from 'react';
|
|
7
|
+
import './index.scss';
|
|
8
|
+
interface TitleProps {
|
|
9
|
+
/** 标题 **/
|
|
10
|
+
title: ReactNode;
|
|
11
|
+
/** 副标题 **/
|
|
12
|
+
subTitle?: ReactNode;
|
|
13
|
+
/** 图标 **/
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
/** 链接 **/
|
|
16
|
+
link?: {
|
|
17
|
+
href: string;
|
|
18
|
+
text: ReactNode;
|
|
19
|
+
target?: string;
|
|
20
|
+
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
21
|
+
};
|
|
22
|
+
/** 尺寸,仅在 icon 存在时有效 **/
|
|
23
|
+
size?: 'small' | 'medium' | 'large';
|
|
24
|
+
/** cls */
|
|
25
|
+
className?: string;
|
|
26
|
+
/** style */
|
|
27
|
+
style?: React.CSSProperties;
|
|
28
|
+
}
|
|
29
|
+
export declare const Title: FC<TitleProps>;
|
|
30
|
+
export default Title;
|
package/Title/index.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
4
|
+
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
5
|
+
|
|
6
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/8/11 2:55 PM\n* @description 标题\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-title {\n display: flex;\n align-items: center;\n line-height: 20px;\n}\n.paraui-v3-title .paraui-v3-title-ink {\n width: 4px;\n height: 14px;\n background-color: rgb(54, 102, 214);\n border-radius: 2px;\n}\n.paraui-v3-title .paraui-v3-title-icon {\n display: inline-flex;\n}\n.paraui-v3-title .paraui-v3-title-text {\n margin-left: 8px;\n font-size: 14px;\n font-weight: 700;\n color: rgb(28, 41, 60);\n}\n.paraui-v3-title .paraui-v3-title-subtext {\n margin-left: 12px;\n font-size: 14px;\n font-weight: 400;\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-title .paraui-v3-title-link {\n margin-left: 12px;\n text-decoration: none;\n outline: none;\n font-size: 14px;\n font-weight: 400;\n color: rgb(54, 102, 214);\n}\n.paraui-v3-title.paraui-v3-title-large .paraui-v3-title-icon svg {\n font-size: 30px;\n}\n.paraui-v3-title.paraui-v3-title-large .paraui-v3-title-text {\n font-size: 18px;\n}\n.paraui-v3-title.paraui-v3-title-medium .paraui-v3-title-icon svg {\n font-size: 24px;\n}\n.paraui-v3-title.paraui-v3-title-medium .paraui-v3-title-text {\n font-size: 16px;\n}\n.paraui-v3-title.paraui-v3-title-small .paraui-v3-title-icon svg {\n font-size: 20px;\n}\n.paraui-v3-title.paraui-v3-title-small .paraui-v3-title-text {\n margin-left: 4px;\n}";
|
|
7
|
+
styleInject(css_248z);
|
|
8
|
+
|
|
9
|
+
var Title = function Title(props) {
|
|
10
|
+
var title = props.title,
|
|
11
|
+
subTitle = props.subTitle,
|
|
12
|
+
icon = props.icon,
|
|
13
|
+
link = props.link,
|
|
14
|
+
_props$size = props.size,
|
|
15
|
+
size = _props$size === void 0 ? 'medium' : _props$size,
|
|
16
|
+
className = props.className,
|
|
17
|
+
style = props.style; //cls
|
|
18
|
+
|
|
19
|
+
var makeCls = clsx("".concat($prefixCls, "-title"), className, icon && "".concat($prefixCls, "-title-").concat(size));
|
|
20
|
+
return jsxs("div", Object.assign({
|
|
21
|
+
className: makeCls,
|
|
22
|
+
style: style
|
|
23
|
+
}, {
|
|
24
|
+
children: [icon ? jsx("span", Object.assign({
|
|
25
|
+
className: "".concat($prefixCls, "-title-icon")
|
|
26
|
+
}, {
|
|
27
|
+
children: icon
|
|
28
|
+
})) : jsx("span", {
|
|
29
|
+
className: "".concat($prefixCls, "-title-ink")
|
|
30
|
+
}), jsx("span", Object.assign({
|
|
31
|
+
className: "".concat($prefixCls, "-title-text")
|
|
32
|
+
}, {
|
|
33
|
+
children: title
|
|
34
|
+
})), subTitle && jsx("span", Object.assign({
|
|
35
|
+
className: "".concat($prefixCls, "-title-subtext")
|
|
36
|
+
}, {
|
|
37
|
+
children: subTitle
|
|
38
|
+
})), link && jsx("a", Object.assign({
|
|
39
|
+
className: "".concat($prefixCls, "-title-link"),
|
|
40
|
+
target: link.target || '_blank',
|
|
41
|
+
href: link.href,
|
|
42
|
+
onClick: link.onClick
|
|
43
|
+
}, {
|
|
44
|
+
children: link.text
|
|
45
|
+
}))]
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export { Title, Title as default };
|
package/ToggleButton/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { _ as _defineProperty } from '../_verture/defineProperty-0590dc61.js';
|
|
1
2
|
import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
|
|
2
3
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
3
4
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
@@ -6,6 +7,7 @@ import { Button } from '../Button/index.js';
|
|
|
6
7
|
import { Tooltip } from '../Tooltip/index.js';
|
|
7
8
|
import { UUID } from '@paraview/lib';
|
|
8
9
|
import clsx from 'clsx';
|
|
10
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
9
11
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
10
12
|
import '../_verture/typeof-498dd2b1.js';
|
|
11
13
|
import '@para-ui/icons/LoadingF';
|
|
@@ -18,7 +20,7 @@ import '@para-ui/core/GlobalContext';
|
|
|
18
20
|
import 'rc-tooltip';
|
|
19
21
|
import 'rc-tooltip/lib/placements';
|
|
20
22
|
|
|
21
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/23 上午9:50\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-toggle-button {\n color: rgb(46, 55, 67);\n}\n.paraui-toggle-button.paraui-button {\n
|
|
23
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/23 上午9:50\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-toggle-button.paraui-v3-button {\n height: 30px;\n padding: 0 20px;\n color: rgb(46, 55, 67);\n line-height: 30px;\n}\n.paraui-v3-toggle-button.paraui-v3-button:hover {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-toggle-button-wrap {\n display: inline-block;\n}\n.paraui-v3-toggle-button .toggle-button-text {\n display: inline-block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v3-toggle-button.paraui-v3-toggle-button-selected {\n border-color: rgb(54, 102, 214);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-toggle-button.paraui-v3-toggle-button-selected:hover {\n border-color: rgb(54, 102, 214);\n color: rgb(54, 102, 214);\n}\n.paraui-v3-toggle-button.paraui-v3-toggle-button-selected[disabled] {\n color: rgba(46, 55, 67, 0.4);\n background-color: rgba(171, 176, 185, 0.12);\n border: 1px solid rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-toggle-button.paraui-v3-toggle-button-selected[disabled]:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-toggle-button.paraui-v3-toggle-button-selected[disabled]::before {\n border-color: rgba(46, 55, 67, 0.4);\n border-top-color: transparent;\n border-left-color: transparent;\n}\n.paraui-v3-toggle-button.paraui-v3-toggle-button-selected::before {\n content: \" \";\n position: absolute;\n bottom: 0;\n right: 0;\n border: 10px solid rgb(54, 102, 214);\n border-top-color: transparent;\n border-left-color: transparent;\n}\n.paraui-v3-toggle-button.paraui-v3-toggle-button-selected::after {\n content: \" \";\n position: absolute;\n bottom: 2px;\n right: 3px;\n width: 4px;\n height: 8px;\n border: 2px solid rgb(255, 255, 255);\n border-top: 0;\n border-left: 0;\n border-radius: 2px;\n transform: rotate(45deg);\n}\n.paraui-v3-toggle-button-disabled.paraui-v3-toggle-button {\n color: rgba(46, 55, 67, 0.4);\n pointer-events: auto;\n cursor: not-allowed;\n}\n.paraui-v3-toggle-button-disabled.paraui-v3-toggle-button:hover {\n color: rgba(46, 55, 67, 0.4);\n}\n\n.paraui-v3-togglebutton-group {\n display: flex;\n flex-flow: row wrap;\n}\n.paraui-v3-togglebutton-group .paraui-v3-toggle-button {\n margin: 0 10px;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button {\n margin: 0;\n padding: 0 16px;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button:hover {\n color: rgba(54, 102, 214, 0.8);\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button[disabled] {\n color: rgba(46, 55, 67, 0.4);\n background-color: transparent;\n border: 0;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button ~ .paraui-v3-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: rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button-selected {\n color: rgb(54, 102, 214);\n border: 0;\n font-weight: 700;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button-selected:hover {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button-selected[disabled] {\n color: rgba(46, 55, 67, 0.4);\n background-color: transparent;\n border: 0;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button-selected[disabled]:hover {\n background-color: transparent;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button-selected:first-child:before {\n display: none;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-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: rgba(171, 176, 185, 0.4);\n border: 0;\n}\n.paraui-v3-togglebutton-group-text .paraui-v3-toggle-button-selected::after {\n display: none;\n}";
|
|
22
24
|
styleInject(css_248z);
|
|
23
25
|
|
|
24
26
|
var ToggleButtonGroup = function ToggleButtonGroup(props) {
|
|
@@ -38,9 +40,7 @@ var ToggleButtonGroup = function ToggleButtonGroup(props) {
|
|
|
38
40
|
exclusive = true;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
var
|
|
42
|
-
'paraui-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;
|
|
@@ -103,13 +103,15 @@ var ToggleButtonGroup = function ToggleButtonGroup(props) {
|
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
return jsx("div", Object.assign({
|
|
106
|
-
className:
|
|
106
|
+
className: makeCls
|
|
107
107
|
}, {
|
|
108
108
|
children: renderGroup()
|
|
109
109
|
}));
|
|
110
110
|
};
|
|
111
111
|
|
|
112
112
|
var ToggleButton = function ToggleButton(props) {
|
|
113
|
+
var _clsx;
|
|
114
|
+
|
|
113
115
|
var className = props.className,
|
|
114
116
|
style = props.style,
|
|
115
117
|
children = props.children,
|
|
@@ -130,12 +132,10 @@ var ToggleButton = function ToggleButton(props) {
|
|
|
130
132
|
hasTip = _useState2[0],
|
|
131
133
|
setHasTip = _useState2[1];
|
|
132
134
|
|
|
133
|
-
var id = useRef(UUID()).current;
|
|
135
|
+
var id = useRef(UUID()).current;
|
|
136
|
+
var prefixCls = "".concat($prefixCls, "-toggle-button"); //className
|
|
134
137
|
|
|
135
|
-
var
|
|
136
|
-
'paraui-toggle-button-selected': selected,
|
|
137
|
-
'paraui-toggle-button-disabled': disabled
|
|
138
|
-
}); //点击事件
|
|
138
|
+
var makeCls = clsx(prefixCls, className, (_clsx = {}, _defineProperty(_clsx, "".concat(prefixCls, "-selected"), selected), _defineProperty(_clsx, "".concat(prefixCls, "-disabled"), disabled), _clsx)); //点击事件
|
|
139
139
|
|
|
140
140
|
var handleClick = function handleClick(evt) {
|
|
141
141
|
if (onClick) onClick(evt, value);
|
|
@@ -165,13 +165,13 @@ var ToggleButton = function ToggleButton(props) {
|
|
|
165
165
|
style: Object.assign({
|
|
166
166
|
width: width
|
|
167
167
|
}, style),
|
|
168
|
-
className:
|
|
168
|
+
className: makeCls,
|
|
169
169
|
disabled: disabled,
|
|
170
170
|
value: value,
|
|
171
171
|
onClick: handleClick
|
|
172
172
|
}, {
|
|
173
173
|
children: jsx("span", Object.assign({
|
|
174
|
-
className: '
|
|
174
|
+
className: 'toggle-button-text'
|
|
175
175
|
}, {
|
|
176
176
|
children: children
|
|
177
177
|
}))
|
|
@@ -182,7 +182,7 @@ var ToggleButton = function ToggleButton(props) {
|
|
|
182
182
|
title: children
|
|
183
183
|
}, {
|
|
184
184
|
children: jsx("span", Object.assign({
|
|
185
|
-
className:
|
|
185
|
+
className: "".concat(prefixCls, "-wrap")
|
|
186
186
|
}, {
|
|
187
187
|
children: btn
|
|
188
188
|
}))
|
package/Tooltip/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import React__default from 'react';
|
|
|
5
5
|
import RcTooltip from 'rc-tooltip';
|
|
6
6
|
import { placements } from 'rc-tooltip/lib/placements';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
|
+
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
8
9
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
9
10
|
|
|
10
11
|
var autoAdjustOverflowEnabled = {
|
|
@@ -142,7 +143,7 @@ function getDisabledCompatibleChildren(child) {
|
|
|
142
143
|
|
|
143
144
|
return jsx("span", Object.assign({
|
|
144
145
|
style: spanStyle,
|
|
145
|
-
className: clsx(element.props.className, "
|
|
146
|
+
className: clsx(element.props.className, "".concat($rcPrefixCls, "-tooltip-disabled-compatible-wrapper"))
|
|
146
147
|
}, {
|
|
147
148
|
children: _child
|
|
148
149
|
}));
|
|
@@ -208,7 +209,7 @@ function getAlignOffset(place) {
|
|
|
208
209
|
return offsetMap[mPlace];
|
|
209
210
|
}
|
|
210
211
|
|
|
211
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/5/25 下午7:17\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-tooltip {\n color: rgb(255, 255, 255);\n font-size: 14px;\n line-height: 1.5715;\n position: absolute;\n z-index: 1500;\n display: block;\n width: max-content;\n max-width: 250px;\n visibility: visible;\n}\n.paraui-tooltip-content {\n position: relative;\n}\n.paraui-tooltip-hidden {\n display: none;\n}\n.paraui-tooltip-hide-arrow .
|
|
212
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/5/25 下午7:17\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-tooltip {\n color: rgb(255, 255, 255);\n font-size: 14px;\n line-height: 1.5715;\n position: absolute;\n z-index: 1500;\n display: block;\n width: max-content;\n max-width: 250px;\n visibility: visible;\n}\n.paraui-v3-tooltip .component-tooltip-content {\n position: relative;\n}\n.paraui-v3-tooltip.component-tooltip-hidden {\n display: none;\n}\n.paraui-v3-tooltip.paraui-v3-tooltip-hide-arrow .component-tooltip-arrow {\n display: none;\n}\n.paraui-v3-tooltip .component-tooltip-inner {\n min-width: 30px;\n min-height: 32px;\n padding: 5px 12px;\n color: rgb(255, 255, 255);\n text-align: left;\n text-decoration: none;\n word-wrap: break-word;\n background-color: rgba(46, 55, 67, 0.7);\n border-radius: 4px;\n line-height: 22px;\n}\n.paraui-v3-tooltip .component-tooltip-arrow {\n position: absolute;\n z-index: 2;\n display: block;\n width: 22px;\n height: 22px;\n overflow: hidden;\n background: transparent;\n pointer-events: none;\n}\n.paraui-v3-tooltip .component-tooltip-arrow-content {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n display: block;\n width: 11.3137085px;\n height: 11.3137085px;\n margin: auto;\n background-color: transparent;\n content: \"\";\n border-radius: 0 0 4px;\n pointer-events: none;\n}\n.paraui-v3-tooltip .component-tooltip-arrow-content::before {\n position: absolute;\n top: -11.3137085px;\n left: -11.3137085px;\n width: 33.9411255px;\n height: 33.9411255px;\n background: rgba(46, 55, 67, 0.7) -10px -10px no-repeat;\n content: \"\";\n -webkit-clip-path: path(\"M 9.849242404917499 24.091883092036785 A 5 5 0 0 1 13.384776310850237 22.627416997969522 L 20.627416997969522 22.627416997969522 A 2 2 0 0 0 22.627416997969522 20.627416997969522 L 22.627416997969522 13.384776310850237 A 5 5 0 0 1 24.091883092036785 9.849242404917499 L 23.091883092036785 9.849242404917499 L 9.849242404917499 23.091883092036785 Z\");\n}\n.paraui-v3-tooltip.component-tooltip-placement-top .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-topLeft .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-topRight .component-tooltip-arrow {\n bottom: 0;\n transform: translateY(100%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-top .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-topLeft .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-topRight .component-tooltip-arrow-content {\n box-shadow: 3px 3px 7px rgba(0, 0, 0, 0.07);\n transform: translateY(-11px) rotate(45deg);\n}\n.paraui-v3-tooltip.component-tooltip-placement-top .component-tooltip-arrow {\n left: 50%;\n transform: translateY(100%) translateX(-50%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-topLeft .component-tooltip-arrow {\n left: 13px;\n}\n.paraui-v3-tooltip.component-tooltip-placement-topRight .component-tooltip-arrow {\n right: 13px;\n}\n.paraui-v3-tooltip.component-tooltip-placement-right .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-rightTop .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-rightBottom .component-tooltip-arrow {\n left: 0;\n transform: translateX(-100%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-right .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-rightTop .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-rightBottom .component-tooltip-arrow-content {\n box-shadow: -3px 3px 7px rgba(0, 0, 0, 0.07);\n transform: translateX(11px) rotate(135deg);\n}\n.paraui-v3-tooltip.component-tooltip-placement-right .component-tooltip-arrow {\n top: 50%;\n transform: translateX(-100%) translateY(-50%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-rightTop .component-tooltip-arrow {\n top: 5px;\n}\n.paraui-v3-tooltip.component-tooltip-placement-rightBottom .component-tooltip-arrow {\n bottom: 5px;\n}\n.paraui-v3-tooltip.component-tooltip-placement-left .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-leftTop .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-leftBottom .component-tooltip-arrow {\n right: 0;\n transform: translateX(100%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-left .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-leftTop .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-leftBottom .component-tooltip-arrow-content {\n box-shadow: 3px -3px 7px rgba(0, 0, 0, 0.07);\n transform: translateX(-11px) rotate(315deg);\n}\n.paraui-v3-tooltip.component-tooltip-placement-left .component-tooltip-arrow {\n top: 50%;\n transform: translateX(100%) translateY(-50%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-leftTop .component-tooltip-arrow {\n top: 5px;\n}\n.paraui-v3-tooltip.component-tooltip-placement-leftBottom .component-tooltip-arrow {\n bottom: 5px;\n}\n.paraui-v3-tooltip.component-tooltip-placement-bottom .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-bottomLeft .component-tooltip-arrow, .paraui-v3-tooltip.component-tooltip-placement-bottomRight .component-tooltip-arrow {\n top: 0;\n transform: translateY(-100%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-bottom .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-bottomLeft .component-tooltip-arrow-content, .paraui-v3-tooltip.component-tooltip-placement-bottomRight .component-tooltip-arrow-content {\n box-shadow: -3px -3px 7px rgba(0, 0, 0, 0.07);\n transform: translateY(11px) rotate(225deg);\n}\n.paraui-v3-tooltip.component-tooltip-placement-bottom .component-tooltip-arrow {\n left: 50%;\n transform: translateY(-100%) translateX(-50%);\n}\n.paraui-v3-tooltip.component-tooltip-placement-bottomLeft .component-tooltip-arrow {\n left: 13px;\n}\n.paraui-v3-tooltip.component-tooltip-placement-bottomRight .component-tooltip-arrow {\n right: 13px;\n}\n\n.component-tooltip-zoom-big-fast-enter,\n.component-tooltip-zoom-big-fast-appear {\n animation-duration: 0.1s;\n animation-fill-mode: both;\n animation-play-state: paused;\n}\n\n.component-tooltip-zoom-big-fast-leave {\n animation-duration: 0.1s;\n animation-fill-mode: both;\n animation-play-state: paused;\n}\n\n.component-tooltip-zoom-big-fast-enter.component-tooltip-zoom-big-fast-enter-active,\n.component-tooltip-zoom-big-fast-appear.component-tooltip-zoom-big-fast-appear-active {\n animation-name: componentTooltipZoomBigIn;\n animation-play-state: running;\n}\n\n.component-tooltip-zoom-big-fast-leave.component-tooltip-zoom-big-fast-leave-active {\n animation-name: componentTooltipZoomBigOut;\n animation-play-state: running;\n pointer-events: none;\n}\n\n.component-tooltip-zoom-big-fast-enter,\n.component-tooltip-zoom-big-fast-appear {\n transform: scale(0);\n opacity: 0;\n animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);\n}\n\n.component-tooltip-zoom-big-fast-enter-prepare,\n.component-tooltip-zoom-big-fast-appear-prepare {\n transform: none;\n}\n\n.component-tooltip-zoom-big-fast-leave {\n animation-timing-function: cubic-bezier(0.78, 0.14, 0.15, 0.86);\n}\n\n@keyframes componentTooltipZoomBigIn {\n 0% {\n transform: scale(0.8);\n opacity: 0;\n }\n 100% {\n transform: scale(1);\n opacity: 1;\n }\n}\n@keyframes componentTooltipZoomBigOut {\n 0% {\n transform: scale(1);\n }\n 100% {\n transform: scale(0.8);\n opacity: 0;\n }\n}";
|
|
212
213
|
styleInject(css_248z);
|
|
213
214
|
|
|
214
215
|
var Tooltip = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
@@ -292,7 +293,7 @@ var Tooltip = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
292
293
|
};
|
|
293
294
|
|
|
294
295
|
var _props$prefixCls = props.prefixCls,
|
|
295
|
-
prefixCls = _props$prefixCls === void 0 ?
|
|
296
|
+
prefixCls = _props$prefixCls === void 0 ? "".concat($rcPrefixCls, "-tooltip") : _props$prefixCls,
|
|
296
297
|
getTooltipContainer = props.getTooltipContainer,
|
|
297
298
|
getPopupContainer = props.getPopupContainer,
|
|
298
299
|
overlayClassName = props.overlayClassName,
|
|
@@ -300,19 +301,22 @@ var Tooltip = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
300
301
|
children = props.children,
|
|
301
302
|
title = props.title,
|
|
302
303
|
placement = props.placement,
|
|
303
|
-
|
|
304
|
+
isPopover = props.isPopover,
|
|
305
|
+
restProps = __rest(props, ["prefixCls", "getTooltipContainer", "getPopupContainer", "overlayClassName", "overlayInnerStyle", "children", "title", "placement", "isPopover"]);
|
|
304
306
|
|
|
305
307
|
var tempVisible = visible;
|
|
306
308
|
|
|
307
309
|
if (!('visible' in props || 'open' in props) && isUntitled()) {
|
|
308
310
|
//没有title必然不可见
|
|
309
311
|
tempVisible = false;
|
|
310
|
-
}
|
|
312
|
+
} //overlayCls
|
|
313
|
+
|
|
311
314
|
|
|
315
|
+
var overlayCls = clsx(!isPopover && "".concat($prefixCls, "-tooltip"), overlayClassName, !props.arrow && "".concat($prefixCls, "-tooltip-hide-arrow"));
|
|
312
316
|
return jsx(RcTooltip, Object.assign({}, restProps, {
|
|
313
|
-
placement: mapLegacyPlacement(placement),
|
|
314
317
|
prefixCls: prefixCls,
|
|
315
|
-
|
|
318
|
+
placement: mapLegacyPlacement(placement),
|
|
319
|
+
overlayClassName: overlayCls,
|
|
316
320
|
getTooltipContainer: getPopupContainer || getTooltipContainer,
|
|
317
321
|
ref: ref,
|
|
318
322
|
builtinPlacements: getTooltipPlacements(),
|
|
@@ -322,10 +326,10 @@ var Tooltip = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
322
326
|
onPopupAlign: onPopupAlign,
|
|
323
327
|
overlayInnerStyle: overlayInnerStyle,
|
|
324
328
|
arrowContent: props.arrow ? jsx("span", {
|
|
325
|
-
className: "".concat(
|
|
329
|
+
className: "".concat($rcPrefixCls, "-tooltip-arrow-content")
|
|
326
330
|
}) : null,
|
|
327
331
|
motion: {
|
|
328
|
-
motionName:
|
|
332
|
+
motionName: "".concat($rcPrefixCls, "-tooltip-zoom-big-fast"),
|
|
329
333
|
motionDeadline: 1000
|
|
330
334
|
}
|
|
331
335
|
}, {
|
package/Transfer/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './style/index.scss';
|
|
3
3
|
/**
|
|
4
4
|
* @description: 穿梭框
|
|
5
|
+
* @param className{string} 类名
|
|
6
|
+
* @param style{string} 样式
|
|
5
7
|
* @param data{Array} 数据源
|
|
6
8
|
* @param value{Array} 当前选中的值
|
|
7
9
|
* @param onChange{Function} 值改变时的回调
|
|
@@ -9,10 +11,12 @@ import './style/index.scss';
|
|
|
9
11
|
*
|
|
10
12
|
*/
|
|
11
13
|
interface TransferProps {
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
12
16
|
data?: Array<any>;
|
|
13
17
|
value?: Array<any>;
|
|
14
18
|
onChange?: (data: Array<any>) => void;
|
|
15
19
|
titles?: Array<string>;
|
|
16
20
|
}
|
|
17
|
-
export declare const Transfer: ({ data, value, onChange, titles, }: TransferProps) => JSX.Element;
|
|
21
|
+
export declare const Transfer: ({ data, value, onChange, titles, className, style }: TransferProps) => JSX.Element;
|
|
18
22
|
export default Transfer;
|
package/Transfer/index.js
CHANGED
|
@@ -2,12 +2,14 @@ import { _ as _toConsumableArray } from '../_verture/toConsumableArray-f8047a75.
|
|
|
2
2
|
import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
|
|
3
3
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { useState, useCallback, useEffect } from 'react';
|
|
5
|
+
import clsx from 'clsx';
|
|
5
6
|
import { Checkbox } from '../Checkbox/index.js';
|
|
6
7
|
import { Search } from '../Search/index.js';
|
|
7
8
|
import SearchIcon from '@para-ui/icons/Search';
|
|
8
9
|
import NavigateBefore from '@para-ui/icons/Left';
|
|
9
10
|
import Right from '@para-ui/icons/Right';
|
|
10
11
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-ac9d6acf.js';
|
|
12
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
11
13
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
12
14
|
import '../Label/index.js';
|
|
13
15
|
import '../Help/index.js';
|
|
@@ -15,7 +17,6 @@ import '../_verture/tslib.es6-55ed4bd2.js';
|
|
|
15
17
|
import '../Tooltip/index.js';
|
|
16
18
|
import 'rc-tooltip';
|
|
17
19
|
import 'rc-tooltip/lib/placements';
|
|
18
|
-
import 'clsx';
|
|
19
20
|
import '@para-ui/icons/Help';
|
|
20
21
|
import '../TextField/index.js';
|
|
21
22
|
import '../_verture/typeof-498dd2b1.js';
|
|
@@ -52,7 +53,7 @@ var localeJson = {
|
|
|
52
53
|
en: en
|
|
53
54
|
};
|
|
54
55
|
|
|
55
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.transfer {\n display: flex;\n font-size: 14px;\n}\n.transfer .box {\n width: 289px;\n border-radius: 4px;\n border: 1px solid rgba(171, 176, 185, 0.368627451);\n overflow: hidden;\n}\n.transfer .box .box-header {\n background: rgba(171, 176, 185, 0.2745098039);\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-left: 10px;\n height: 44px;\n}\n.transfer .box .box-header .count {\n margin: 0 10px 0 0;\n color: #999;\n letter-spacing: 1px;\n}\n.transfer .box .context {\n height: 400px;\n overflow: auto;\n scrollbar-base-color: red;\n}\n.transfer .box .text-field-content {\n border: none;\n border-radius: 0;\n border-bottom: 1px solid #ddd;\n}\n.transfer ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background: #3666D6;\n}\n.transfer .moveBtn {\n display: flex;\n height: 414px;\n flex-direction: column;\n justify-content: center;\n}\n.transfer .moveBtn .btn {\n cursor: not-allowed;\n width: 36px;\n height: 36px;\n border: 1px solid #ABB0B9;\n border-radius: 8px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin: 10px 20px;\n}\n.transfer .moveBtn .btn svg {\n font-size: 18px;\n fill: #ABB0B9;\n}\n.transfer .moveBtn .on {\n cursor: pointer;\n border: 1px solid #3666D6;\n}\n.transfer .moveBtn .on svg {\n fill: #3666D6;\n}\n.transfer .context .item {\n margin: 0px 12px;\n line-height: 0;\n height: 36px;\n display: flex;\n align-items: center;\n}";
|
|
56
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-transfer {\n display: flex;\n font-size: 14px;\n}\n.paraui-v3-transfer .box {\n width: 289px;\n border-radius: 4px;\n border: 1px solid rgba(171, 176, 185, 0.368627451);\n overflow: hidden;\n}\n.paraui-v3-transfer .box .box-header {\n background: rgba(171, 176, 185, 0.2745098039);\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding-left: 10px;\n height: 44px;\n}\n.paraui-v3-transfer .box .box-header .count {\n margin: 0 10px 0 0;\n color: #999;\n letter-spacing: 1px;\n}\n.paraui-v3-transfer .box .context {\n height: 400px;\n overflow: auto;\n scrollbar-base-color: red;\n}\n.paraui-v3-transfer .box .text-field-content {\n border: none;\n border-radius: 0;\n border-bottom: 1px solid #ddd;\n}\n.paraui-v3-transfer ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background: #3666D6;\n}\n.paraui-v3-transfer .moveBtn {\n display: flex;\n height: 414px;\n flex-direction: column;\n justify-content: center;\n}\n.paraui-v3-transfer .moveBtn .btn {\n cursor: not-allowed;\n width: 36px;\n height: 36px;\n border: 1px solid #ABB0B9;\n border-radius: 8px;\n display: flex;\n justify-content: center;\n align-items: center;\n margin: 10px 20px;\n}\n.paraui-v3-transfer .moveBtn .btn svg {\n font-size: 18px;\n fill: #ABB0B9;\n}\n.paraui-v3-transfer .moveBtn .on {\n cursor: pointer;\n border: 1px solid #3666D6;\n}\n.paraui-v3-transfer .moveBtn .on svg {\n fill: #3666D6;\n}\n.paraui-v3-transfer .context .item {\n margin: 0px 12px;\n line-height: 0;\n height: 36px;\n display: flex;\n align-items: center;\n}";
|
|
56
57
|
styleInject(css_248z);
|
|
57
58
|
|
|
58
59
|
var Transfer = function Transfer(_ref) {
|
|
@@ -61,7 +62,9 @@ var Transfer = function Transfer(_ref) {
|
|
|
61
62
|
_ref$value = _ref.value,
|
|
62
63
|
value = _ref$value === void 0 ? [] : _ref$value,
|
|
63
64
|
onChange = _ref.onChange,
|
|
64
|
-
titles = _ref.titles
|
|
65
|
+
titles = _ref.titles,
|
|
66
|
+
className = _ref.className,
|
|
67
|
+
style = _ref.style;
|
|
65
68
|
var intl = useFormatMessage('Transfer', localeJson);
|
|
66
69
|
|
|
67
70
|
var _useState = useState(data),
|
|
@@ -207,7 +210,8 @@ var Transfer = function Transfer(_ref) {
|
|
|
207
210
|
}
|
|
208
211
|
}, [leftData, rightData]);
|
|
209
212
|
return jsxs("div", Object.assign({
|
|
210
|
-
className: "transfer"
|
|
213
|
+
className: clsx("".concat($prefixCls, "-transfer"), className),
|
|
214
|
+
style: style
|
|
211
215
|
}, {
|
|
212
216
|
children: [jsxs("div", Object.assign({
|
|
213
217
|
className: "box"
|
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-df70784b.js';
|
|
2
|
+
export { T as default } from '../_verture/index-df70784b.js';
|
|
3
3
|
import '../_verture/toConsumableArray-f8047a75.js';
|
|
4
4
|
import '../_verture/slicedToArray-d7722f4b.js';
|
|
5
5
|
import '../_verture/defineProperty-0590dc61.js';
|
|
@@ -19,6 +19,7 @@ import '../Help/index.js';
|
|
|
19
19
|
import '../Tooltip/index.js';
|
|
20
20
|
import 'rc-tooltip';
|
|
21
21
|
import 'rc-tooltip/lib/placements';
|
|
22
|
+
import '../_verture/constant-bf34e6fa.js';
|
|
22
23
|
import '../_verture/style-inject.es-300983ab.js';
|
|
23
24
|
import '@para-ui/icons/Help';
|
|
24
25
|
import 'react-dom';
|
package/Tree/utils/tools.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ interface RFiled {
|
|
|
3
3
|
key: string;
|
|
4
4
|
parentId: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const getPrefixCls: (suffixCls?: string, customizePrefixCls?: string) => string;
|
|
7
6
|
export declare const debounce: (func: Function, wait?: number, options?: any) => {
|
|
8
7
|
(...args: any): any;
|
|
9
8
|
cancel: () => void;
|