@chaoswise/ui 3.1.0 → 3.1.2
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/lib/Antd5/app/style/index.js +2 -1
- package/lib/Antd5/breadcrumb/style/index.js +1 -1
- package/lib/Antd5/checkbox/Checkbox.js +33 -5
- package/lib/Antd5/checkbox/Group.js +7 -2
- package/lib/Antd5/checkbox/assets/duigou1.js +29 -0
- package/lib/Antd5/checkbox/assets/duigou2.js +29 -0
- package/lib/Antd5/checkbox/style/index.js +106 -3
- package/lib/Antd5/message/PurePanel.js +40 -22
- package/lib/Antd5/message/assets/Close.js +22 -0
- package/lib/Antd5/message/style/index.js +47 -8
- package/lib/Antd5/message/useMessage.js +15 -3
- package/lib/Antd5/radio/radio.js +4 -10
- package/lib/Antd5/radio/style/index.js +65 -80
- package/lib/Antd5/upload/Upload.js +83 -55
- package/lib/Antd5/upload/UploadList/ListItem.js +9 -15
- package/lib/Antd5/upload/UploadList/index.js +47 -33
- package/lib/Antd5/upload/style/dragger.js +26 -5
- package/lib/Antd5/upload/style/list.js +7 -2
- package/lib/AppHolder/index.js +2 -1
- package/lib/CWColorPicker/index.js +8 -4
- package/lib/CWTree/index.js +13 -6
- package/lib/ConfigProvider/ConfigProvider.js +2 -0
- package/lib/ConfigProvider/theme/default.js +9 -2
- package/lib/Header/UserSetting/TenantTree.js +0 -1
- package/lib/Pagination/index.style.js +1 -1
- package/lib/SiderMenu/index.style.js +4 -2
- package/lib/Slider/index.style.js +2 -1
- package/package.json +1 -1
|
@@ -22,7 +22,6 @@ import PaperClipOutlined from '@ant-design/icons/PaperClipOutlined';
|
|
|
22
22
|
import PictureTwoTone from '@ant-design/icons/PictureTwoTone';
|
|
23
23
|
import classNames from 'classnames';
|
|
24
24
|
import CSSMotion, { CSSMotionList } from 'rc-motion';
|
|
25
|
-
import omit from 'rc-util/lib/omit';
|
|
26
25
|
import useForceUpdate from '../../_util/hooks/useForceUpdate';
|
|
27
26
|
import initCollapseMotion from '../../_util/motion';
|
|
28
27
|
import { cloneElement } from '../../_util/reactNode';
|
|
@@ -54,7 +53,6 @@ var InternalUploadList = function InternalUploadList(props, ref) {
|
|
|
54
53
|
removeIcon = props.removeIcon,
|
|
55
54
|
previewIcon = props.previewIcon,
|
|
56
55
|
downloadIcon = props.downloadIcon,
|
|
57
|
-
extra = props.extra,
|
|
58
56
|
_props$progress = props.progress,
|
|
59
57
|
progress = _props$progress === void 0 ? {
|
|
60
58
|
size: [-1, 2],
|
|
@@ -70,22 +68,22 @@ var InternalUploadList = function InternalUploadList(props, ref) {
|
|
|
70
68
|
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
71
69
|
motionAppear = _React$useState2[0],
|
|
72
70
|
setMotionAppear = _React$useState2[1];
|
|
73
|
-
var isPictureCardOrCirle = ['picture-card', 'picture-circle'].includes(listType);
|
|
74
71
|
// ============================= Effect =============================
|
|
75
72
|
React.useEffect(function () {
|
|
76
|
-
if (
|
|
73
|
+
if (listType !== 'picture' && listType !== 'picture-card' && listType !== 'picture-circle') {
|
|
77
74
|
return;
|
|
78
75
|
}
|
|
79
76
|
(items || []).forEach(function (file) {
|
|
80
|
-
if (!(file.originFileObj instanceof File || file.originFileObj
|
|
77
|
+
if (typeof document === 'undefined' || typeof window === 'undefined' || !window.FileReader || !window.File || !(file.originFileObj instanceof File || file.originFileObj) || file.thumbUrl !== undefined) {
|
|
81
78
|
return;
|
|
82
79
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
80
|
+
if (previewFile) {
|
|
81
|
+
previewFile(file.originFileObj).then(function (previewDataUrl) {
|
|
82
|
+
// Need append '' to avoid dead loop
|
|
83
|
+
file.thumbUrl = previewDataUrl || '';
|
|
84
|
+
forceUpdate();
|
|
85
|
+
});
|
|
86
|
+
}
|
|
89
87
|
});
|
|
90
88
|
}, [listType, items, previewFile]);
|
|
91
89
|
React.useEffect(function () {
|
|
@@ -114,12 +112,14 @@ var InternalUploadList = function InternalUploadList(props, ref) {
|
|
|
114
112
|
return iconRender(file, listType);
|
|
115
113
|
}
|
|
116
114
|
var isLoading = file.status === 'uploading';
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
115
|
+
var fileIcon = isImgUrl && isImgUrl(file) ? _jsx(PictureTwoTone, {}) : _jsx(FileTwoTone, {});
|
|
116
|
+
var icon = isLoading ? _jsx(LoadingOutlined, {}) : _jsx(PaperClipOutlined, {});
|
|
117
|
+
if (listType === 'picture') {
|
|
118
|
+
icon = isLoading ? _jsx(LoadingOutlined, {}) : fileIcon;
|
|
119
|
+
} else if (listType === 'picture-card' || listType === 'picture-circle') {
|
|
120
|
+
icon = isLoading ? locale.uploading : fileIcon;
|
|
121
121
|
}
|
|
122
|
-
return
|
|
122
|
+
return icon;
|
|
123
123
|
};
|
|
124
124
|
var actionIconRender = function actionIconRender(customIcon, callback, prefixCls, title, acceptUploadDisabled) {
|
|
125
125
|
var btnProps = {
|
|
@@ -138,11 +138,15 @@ var InternalUploadList = function InternalUploadList(props, ref) {
|
|
|
138
138
|
if (acceptUploadDisabled) {
|
|
139
139
|
btnProps.disabled = disabled;
|
|
140
140
|
}
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
if (/*#__PURE__*/React.isValidElement(customIcon)) {
|
|
142
|
+
var btnIcon = cloneElement(customIcon, _objectSpread(_objectSpread({}, customIcon.props), {}, {
|
|
143
143
|
onClick: function onClick() {}
|
|
144
|
-
}))
|
|
145
|
-
|
|
144
|
+
}));
|
|
145
|
+
return _jsx(Button, _objectSpread(_objectSpread({}, btnProps), {}, {
|
|
146
|
+
icon: btnIcon
|
|
147
|
+
}));
|
|
148
|
+
}
|
|
149
|
+
return _jsx(Button, _objectSpread(_objectSpread({}, btnProps), {}, {
|
|
146
150
|
children: _jsx("span", {
|
|
147
151
|
children: customIcon
|
|
148
152
|
})
|
|
@@ -162,20 +166,31 @@ var InternalUploadList = function InternalUploadList(props, ref) {
|
|
|
162
166
|
var prefixCls = getPrefixCls('upload', customizePrefixCls);
|
|
163
167
|
var rootPrefixCls = getPrefixCls();
|
|
164
168
|
var listClassNames = classNames("".concat(prefixCls, "-list"), "".concat(prefixCls, "-list-").concat(listType));
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
+
// >>> Motion config
|
|
170
|
+
var motionKeyList = _toConsumableArray(items.map(function (file) {
|
|
171
|
+
return {
|
|
172
|
+
key: file.uid,
|
|
173
|
+
file: file
|
|
174
|
+
};
|
|
175
|
+
}));
|
|
176
|
+
var animationDirection = listType === 'picture-card' || listType === 'picture-circle' ? 'animate-inline' : 'animate';
|
|
177
|
+
// const transitionName = list.length === 0 ? '' : `${prefixCls}-${animationDirection}`;
|
|
178
|
+
var motionConfig = {
|
|
169
179
|
motionDeadline: 2000,
|
|
170
|
-
motionName: "".concat(prefixCls, "-").concat(
|
|
171
|
-
keys:
|
|
172
|
-
return {
|
|
173
|
-
key: file.uid,
|
|
174
|
-
file: file
|
|
175
|
-
};
|
|
176
|
-
})),
|
|
180
|
+
motionName: "".concat(prefixCls, "-").concat(animationDirection),
|
|
181
|
+
keys: motionKeyList,
|
|
177
182
|
motionAppear: motionAppear
|
|
178
|
-
}
|
|
183
|
+
};
|
|
184
|
+
var listItemMotion = React.useMemo(function () {
|
|
185
|
+
var motion = _objectSpread({}, initCollapseMotion(rootPrefixCls));
|
|
186
|
+
delete motion.onAppearEnd;
|
|
187
|
+
delete motion.onEnterEnd;
|
|
188
|
+
delete motion.onLeaveEnd;
|
|
189
|
+
return motion;
|
|
190
|
+
}, [rootPrefixCls]);
|
|
191
|
+
if (listType !== 'picture-card' && listType !== 'picture-circle') {
|
|
192
|
+
motionConfig = _objectSpread(_objectSpread({}, listItemMotion), motionConfig);
|
|
193
|
+
}
|
|
179
194
|
return _jsxs("div", {
|
|
180
195
|
className: listClassNames,
|
|
181
196
|
children: [_jsx(CSSMotionList, _objectSpread(_objectSpread({}, motionConfig), {}, {
|
|
@@ -201,7 +216,6 @@ var InternalUploadList = function InternalUploadList(props, ref) {
|
|
|
201
216
|
removeIcon: removeIcon,
|
|
202
217
|
previewIcon: previewIcon,
|
|
203
218
|
downloadIcon: downloadIcon,
|
|
204
|
-
extra: extra,
|
|
205
219
|
iconRender: internalIconRender,
|
|
206
220
|
actionIconRender: actionIconRender,
|
|
207
221
|
itemRender: itemRender,
|
|
@@ -17,7 +17,7 @@ var genDraggerStyle = function genDraggerStyle(token) {
|
|
|
17
17
|
cursor: 'pointer',
|
|
18
18
|
transition: "border-color ".concat(token.motionDurationSlow)
|
|
19
19
|
}, componentCls, {
|
|
20
|
-
padding: token.padding
|
|
20
|
+
// padding: token.padding, // 删除符合UI规范
|
|
21
21
|
}), "".concat(componentCls, "-btn"), {
|
|
22
22
|
display: 'table',
|
|
23
23
|
width: '100%',
|
|
@@ -27,10 +27,23 @@ var genDraggerStyle = function genDraggerStyle(token) {
|
|
|
27
27
|
'&:focus-visible': {
|
|
28
28
|
outline: "".concat(unit(token.lineWidthFocus), " solid ").concat(token.colorPrimaryBorder)
|
|
29
29
|
}
|
|
30
|
-
}), "".concat(componentCls, "-drag-container"), {
|
|
30
|
+
}), "".concat(componentCls, "-drag-container"), _defineProperty({
|
|
31
31
|
display: 'table-cell',
|
|
32
32
|
verticalAlign: 'middle'
|
|
33
|
-
}
|
|
33
|
+
}, "".concat(componentCls, "-drag-wrapper"), _defineProperty(_defineProperty(_defineProperty({
|
|
34
|
+
padding: "39px 0"
|
|
35
|
+
}, "".concat(componentCls, "-drag-icon-wrapper"), _defineProperty({
|
|
36
|
+
marginBottom: "8px"
|
|
37
|
+
}, iconCls, {
|
|
38
|
+
color: token.colorPrimaryHover,
|
|
39
|
+
fontSize: "48px"
|
|
40
|
+
})), "".concat(componentCls, "-drag-text"), {
|
|
41
|
+
lineHeight: "20px"
|
|
42
|
+
}), "".concat(componentCls, "-drag-desc"), {
|
|
43
|
+
color: token.colorTextTertiary,
|
|
44
|
+
marginTop: "8px",
|
|
45
|
+
lineHeight: "20px"
|
|
46
|
+
}))), "\n &:not(".concat(componentCls, "-disabled):hover,\n &-hover:not(").concat(componentCls, "-disabled)\n "), {
|
|
34
47
|
borderColor: token.colorPrimaryHover
|
|
35
48
|
}), "p".concat(componentCls, "-drag-icon"), _defineProperty({
|
|
36
49
|
marginBottom: token.margin
|
|
@@ -44,8 +57,16 @@ var genDraggerStyle = function genDraggerStyle(token) {
|
|
|
44
57
|
}), "p".concat(componentCls, "-hint"), {
|
|
45
58
|
color: token.colorTextDescription,
|
|
46
59
|
fontSize: token.fontSize
|
|
47
|
-
}), "&".concat(componentCls, "-disabled"), _defineProperty(
|
|
60
|
+
}), "&".concat(componentCls, "-disabled"), _defineProperty(_defineProperty({
|
|
61
|
+
background: token.colorBgContainerDisabled
|
|
62
|
+
}, "p".concat(componentCls, "-drag-icon ").concat(iconCls, ",\n p").concat(componentCls, "-text,\n p").concat(componentCls, "-hint,\n "), {
|
|
63
|
+
color: token.colorTextDisabled
|
|
64
|
+
}), "".concat(componentCls, "-drag-wrapper"), _defineProperty(_defineProperty(_defineProperty({}, "".concat(componentCls, "-drag-icon-wrapper"), _defineProperty({}, iconCls, {
|
|
65
|
+
color: token.colorTextDisabled
|
|
66
|
+
})), "".concat(componentCls, "-drag-text"), {
|
|
67
|
+
color: token.colorTextDisabled
|
|
68
|
+
}), "".concat(componentCls, "-drag-desc"), {
|
|
48
69
|
color: token.colorTextDisabled
|
|
49
|
-
}))));
|
|
70
|
+
})))));
|
|
50
71
|
};
|
|
51
72
|
export default genDraggerStyle;
|
|
@@ -8,6 +8,7 @@ import { unit } from '@ant-design/cssinjs';
|
|
|
8
8
|
import { clearFix, textEllipsis } from '../../style';
|
|
9
9
|
var genListStyle = function genListStyle(token) {
|
|
10
10
|
var componentCls = token.componentCls,
|
|
11
|
+
antCls = token.antCls,
|
|
11
12
|
iconCls = token.iconCls,
|
|
12
13
|
fontSize = token.fontSize,
|
|
13
14
|
lineHeight = token.lineHeight,
|
|
@@ -15,6 +16,7 @@ var genListStyle = function genListStyle(token) {
|
|
|
15
16
|
var itemCls = "".concat(componentCls, "-list-item");
|
|
16
17
|
var actionsCls = "".concat(itemCls, "-actions");
|
|
17
18
|
var actionCls = "".concat(itemCls, "-action");
|
|
19
|
+
var listItemHeightSM = token.fontHeightSM;
|
|
18
20
|
return _defineProperty({}, "".concat(componentCls, "-wrapper"), _defineProperty({}, "".concat(componentCls, "-list"), _objectSpread(_objectSpread({}, clearFix()), {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
19
21
|
lineHeight: token.lineHeight
|
|
20
22
|
}, itemCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
@@ -25,7 +27,6 @@ var genListStyle = function genListStyle(token) {
|
|
|
25
27
|
display: 'flex',
|
|
26
28
|
alignItems: 'center',
|
|
27
29
|
transition: "background-color ".concat(token.motionDurationSlow),
|
|
28
|
-
borderRadius: token.borderRadiusSM,
|
|
29
30
|
'&:hover': {
|
|
30
31
|
backgroundColor: token.controlItemBgHover
|
|
31
32
|
}
|
|
@@ -34,7 +35,7 @@ var genListStyle = function genListStyle(token) {
|
|
|
34
35
|
lineHeight: lineHeight,
|
|
35
36
|
flex: 'auto',
|
|
36
37
|
transition: "all ".concat(token.motionDurationSlow)
|
|
37
|
-
})), actionsCls, _defineProperty(_defineProperty(_defineProperty({
|
|
38
|
+
})), actionsCls, _defineProperty(_defineProperty(_defineProperty(_defineProperty({
|
|
38
39
|
whiteSpace: 'nowrap'
|
|
39
40
|
}, actionCls, {
|
|
40
41
|
opacity: 0
|
|
@@ -43,6 +44,10 @@ var genListStyle = function genListStyle(token) {
|
|
|
43
44
|
transition: "all ".concat(token.motionDurationSlow)
|
|
44
45
|
}), "\n ".concat(actionCls, ":focus-visible,\n &.picture ").concat(actionCls, "\n "), {
|
|
45
46
|
opacity: 1
|
|
47
|
+
}), "".concat(actionCls).concat(antCls, "-btn"), {
|
|
48
|
+
height: listItemHeightSM,
|
|
49
|
+
border: 0,
|
|
50
|
+
lineHeight: 1
|
|
46
51
|
})), "".concat(componentCls, "-icon ").concat(iconCls), {
|
|
47
52
|
color: token.colorTextDescription,
|
|
48
53
|
fontSize: fontSize
|
package/lib/AppHolder/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _App from "@chaoswise/ui/lib/App";
|
|
2
|
+
import { memo } from "react";
|
|
2
3
|
var message;
|
|
3
4
|
var notification;
|
|
4
5
|
var modal;
|
|
@@ -9,7 +10,7 @@ var AppHolder = function AppHolder() {
|
|
|
9
10
|
notification = staticFunction.notification;
|
|
10
11
|
return null;
|
|
11
12
|
};
|
|
12
|
-
export default AppHolder;
|
|
13
|
+
export default /*#__PURE__*/memo(AppHolder);
|
|
13
14
|
// 这里的问题是 AppHolder 组件在首次定义的时候,message、modal 和 notification 还没有被赋值。当你在其他地方尝试访问 AppHolder.message 时,这些属性是 undefined 的。
|
|
14
15
|
// AppHolder.message = message;
|
|
15
16
|
// AppHolder.modal = modal;
|
|
@@ -4,6 +4,7 @@ import _Button from "@chaoswise/ui/lib/Button";
|
|
|
4
4
|
import _Space from "@chaoswise/ui/lib/Space";
|
|
5
5
|
import _Tabs from "@chaoswise/ui/lib/Tabs";
|
|
6
6
|
import _Input from "@chaoswise/ui/lib/Input";
|
|
7
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
7
8
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
9
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
10
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
@@ -30,7 +31,11 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
30
31
|
onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange,
|
|
31
32
|
showGradient = _ref.showGradient,
|
|
32
33
|
defaultValue = _ref.defaultValue,
|
|
33
|
-
colorRender = _ref.colorRender
|
|
34
|
+
colorRender = _ref.colorRender,
|
|
35
|
+
_ref$dropdownProps = _ref.dropdownProps,
|
|
36
|
+
dropdownProps = _ref$dropdownProps === void 0 ? {
|
|
37
|
+
trigger: ["click"]
|
|
38
|
+
} : _ref$dropdownProps;
|
|
34
39
|
var intl = useIntl();
|
|
35
40
|
var _useConfigContext = useConfigContext(),
|
|
36
41
|
getPrefixCls = _useConfigContext.getPrefixCls;
|
|
@@ -244,10 +249,9 @@ var ColorPicker = function ColorPicker(_ref) {
|
|
|
244
249
|
e.preventDefault();
|
|
245
250
|
e.stopPropagation();
|
|
246
251
|
}
|
|
247
|
-
}, /*#__PURE__*/React.createElement(_Dropdown, {
|
|
248
|
-
trigger: ["click"],
|
|
252
|
+
}, /*#__PURE__*/React.createElement(_Dropdown, _extends({}, dropdownProps, {
|
|
249
253
|
overlay: menu
|
|
250
|
-
}, colorRender ? colorRender() : /*#__PURE__*/React.createElement(_Button, null, /*#__PURE__*/React.createElement(_Space, null, /*#__PURE__*/React.createElement("div", {
|
|
254
|
+
}), colorRender ? colorRender() : /*#__PURE__*/React.createElement(_Button, null, /*#__PURE__*/React.createElement(_Space, null, /*#__PURE__*/React.createElement("div", {
|
|
251
255
|
className: "".concat(prefixCls, "-select-value"),
|
|
252
256
|
style: {
|
|
253
257
|
background: colorType === "single" ? colorInfo.color : gradientColorValue
|
package/lib/CWTree/index.js
CHANGED
|
@@ -177,7 +177,7 @@ function CWTree(_ref) {
|
|
|
177
177
|
className: "cw-tree-treenode-title"
|
|
178
178
|
}, useTooltipText ? /*#__PURE__*/React.createElement(_TooltipText, {
|
|
179
179
|
placement: tooltipPlacement ? tooltipPlacement : "bottomLeft"
|
|
180
|
-
}, title) : title), draggable &&
|
|
180
|
+
}, title) : title), draggable && /*#__PURE__*/React.createElement("span", {
|
|
181
181
|
className: "cw-tree-treenode-drag-icon"
|
|
182
182
|
}, /*#__PURE__*/React.createElement(_Tooltip, {
|
|
183
183
|
title: intl.get("5fe60774-0f08-450f-a9d9-998996485fec").d("拖拽移动")
|
|
@@ -264,14 +264,20 @@ function CWTree(_ref) {
|
|
|
264
264
|
}
|
|
265
265
|
return {};
|
|
266
266
|
}, [searchValue, expandedKeys]);
|
|
267
|
-
var
|
|
267
|
+
var handleMouseEnter = function handleMouseEnter(e) {
|
|
268
|
+
if (rest.onMouseEnter) {
|
|
269
|
+
rest.onMouseEnter(e);
|
|
270
|
+
}
|
|
268
271
|
// 显示扩展部分
|
|
269
272
|
if (e.node.key === _showExtend) {
|
|
270
273
|
return;
|
|
271
274
|
}
|
|
272
275
|
setShowExtend(e.node.key);
|
|
273
276
|
};
|
|
274
|
-
var
|
|
277
|
+
var handleMouseLeave = function handleMouseLeave(e) {
|
|
278
|
+
if (rest.onMouseLeave) {
|
|
279
|
+
rest.onMouseLeave(e); // 传递参数给外部的 onMouseLeave
|
|
280
|
+
}
|
|
275
281
|
setShowExtend("");
|
|
276
282
|
};
|
|
277
283
|
return wrapCSSVar(/*#__PURE__*/React.createElement("div", {
|
|
@@ -288,8 +294,6 @@ function CWTree(_ref) {
|
|
|
288
294
|
expandAction: false,
|
|
289
295
|
multiple: multiple,
|
|
290
296
|
className: classnames("cw-tree", className),
|
|
291
|
-
onMouseEnter: onMouseEnter,
|
|
292
|
-
onMouseLeave: onMouseLeave,
|
|
293
297
|
draggable: draggable ? {
|
|
294
298
|
icon: false,
|
|
295
299
|
nodeDraggable: function nodeDraggable() {
|
|
@@ -297,7 +301,10 @@ function CWTree(_ref) {
|
|
|
297
301
|
}
|
|
298
302
|
} : false,
|
|
299
303
|
onExpand: _onExpand
|
|
300
|
-
}, expandedConfig, rest
|
|
304
|
+
}, expandedConfig, rest, {
|
|
305
|
+
onMouseEnter: handleMouseEnter,
|
|
306
|
+
onMouseLeave: handleMouseLeave
|
|
307
|
+
}), children ? children : innerTreeNode))), /*#__PURE__*/React.createElement("div", {
|
|
301
308
|
className: "cw-tree-footer"
|
|
302
309
|
}, extraFooter)));
|
|
303
310
|
}
|
|
@@ -25,6 +25,8 @@ import intlContext from "./intlContext";
|
|
|
25
25
|
import { getDateLocal } from "./generate/dayjs";
|
|
26
26
|
import { legacyLogicalPropertiesTransformer, StyleProvider } from "@ant-design/cssinjs";
|
|
27
27
|
var Provider = intlContext.Provider;
|
|
28
|
+
// 导出intlContext与低版本ui组件同步,@chaoswise/business需要用到
|
|
29
|
+
export { intlContext };
|
|
28
30
|
var CWConfigProvider = function CWConfigProvider(_ref) {
|
|
29
31
|
var defaultLocale = _ref.defaultLocale,
|
|
30
32
|
theme = _ref.theme,
|
|
@@ -16,7 +16,9 @@ export var defaultComponentToken = {
|
|
|
16
16
|
headerColor: ["colorWhite"]
|
|
17
17
|
},
|
|
18
18
|
Breadcrumb: {
|
|
19
|
-
colorBgTextHover:
|
|
19
|
+
colorBgTextHover: "transparent",
|
|
20
|
+
// token变量 fff
|
|
21
|
+
linkHoverColor: ["colorPrimaryHover"]
|
|
20
22
|
},
|
|
21
23
|
Tooltip: {
|
|
22
24
|
colorBgSpotlight: ["colorWhite"],
|
|
@@ -33,7 +35,9 @@ export var defaultComponentToken = {
|
|
|
33
35
|
trackBgDisabled: "rgb(217, 217, 217)"
|
|
34
36
|
},
|
|
35
37
|
Select: {
|
|
36
|
-
|
|
38
|
+
optionSelectedBg: ["colorPrimaryBg"],
|
|
39
|
+
optionActiveBg: ["colorPrimaryBg"],
|
|
40
|
+
optionSelectedColor: ["colorPrimary"]
|
|
37
41
|
},
|
|
38
42
|
Tag: {
|
|
39
43
|
colorBorder: "rgba(0,0,0,0.09)"
|
|
@@ -67,6 +71,9 @@ export var defaultComponentToken = {
|
|
|
67
71
|
itemSelectedBg: "#F6F7F8",
|
|
68
72
|
subMenuItemBg: "transparent",
|
|
69
73
|
itemBg: ["colorWhite"]
|
|
74
|
+
},
|
|
75
|
+
DatePicker: {
|
|
76
|
+
cellHoverBg: ["colorPrimaryBg"]
|
|
70
77
|
}
|
|
71
78
|
};
|
|
72
79
|
|
|
@@ -108,7 +108,7 @@ var genCustomCWPaginationStyle = function genCustomCWPaginationStyle(token) {
|
|
|
108
108
|
backgroundColor: token.colorPrimary,
|
|
109
109
|
fontWeight: "500",
|
|
110
110
|
a: {
|
|
111
|
-
color: token.
|
|
111
|
+
color: token.colorWhite
|
|
112
112
|
}
|
|
113
113
|
}), "".concat(paginationPrefix, "-jump-wrapper"), _defineProperty({
|
|
114
114
|
display: "inline-block",
|
|
@@ -7,7 +7,7 @@ var genCustomSiderMenuStyle = function genCustomSiderMenuStyle(token) {
|
|
|
7
7
|
var prefixCls = token.antCls,
|
|
8
8
|
iconCls = token.iconCls;
|
|
9
9
|
var SiderMenuPrefix = "".concat(prefixCls, "-sider-menu");
|
|
10
|
-
return _defineProperty(_defineProperty({}, "".concat(SiderMenuPrefix, "-goup-label"), {
|
|
10
|
+
return _defineProperty(_defineProperty(_defineProperty({}, "".concat(SiderMenuPrefix, "-goup-label"), {
|
|
11
11
|
borderBottom: "1px solid rgb(246, 247, 248)",
|
|
12
12
|
width: "calc(100% + 14px)",
|
|
13
13
|
marginLeft: "-7px",
|
|
@@ -29,7 +29,9 @@ var genCustomSiderMenuStyle = function genCustomSiderMenuStyle(token) {
|
|
|
29
29
|
color: token.colorPrimary
|
|
30
30
|
}, iconCls, {
|
|
31
31
|
transform: "rotate(180deg)"
|
|
32
|
-
})))
|
|
32
|
+
}))), "".concat(SiderMenuPrefix, "-cw-menu-box-collapsed"), _defineProperty({}, "".concat(SiderMenuPrefix, "-expand-arrow"), {
|
|
33
|
+
display: "none"
|
|
34
|
+
}));
|
|
33
35
|
};
|
|
34
36
|
// ============================== Export ==============================
|
|
35
37
|
export default genStyleHooks("SiderMenu", function (token) {
|
|
@@ -51,7 +51,8 @@ var genCustomCWSliderStyle = function genCustomCWSliderStyle(token) {
|
|
|
51
51
|
backgroundSize: "contain",
|
|
52
52
|
boxShadow: "none !important",
|
|
53
53
|
borderRadius: "0",
|
|
54
|
-
position: "static"
|
|
54
|
+
position: "static",
|
|
55
|
+
outline: "none"
|
|
55
56
|
}
|
|
56
57
|
}, "&".concat(prefixCls, "-tooltip-open"), {
|
|
57
58
|
background: token.colorPrimaryHover,
|