linkmore-design 1.1.13-alpha.4 → 1.1.13-alpha.5
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/dist/Button/demos/ghost.d.ts +2 -0
- package/dist/Descriptions/Cell.d.ts +1 -0
- package/dist/Descriptions/Item.d.ts +1 -0
- package/dist/LmDrag/LmDrag.d.ts +4 -0
- package/dist/LmDrag/components/DndContainer.d.ts +3 -0
- package/dist/LmDrag/components/sortableBox.d.ts +5 -0
- package/dist/LmDrag/components/sortableItem.d.ts +7 -0
- package/dist/LmDrag/demos/basic.d.ts +2 -0
- package/dist/LmDrag/index.d.ts +10 -0
- package/dist/LmDrag/style/index.d.ts +1 -0
- package/dist/LmDrag/style/variables.d.ts +1 -0
- package/dist/LmDrag/wrapper/Root.d.ts +3 -0
- package/dist/LmEditTable/EditTable.d.ts +15 -3
- package/dist/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/dist/LmUpload/fns/index.d.ts +1 -0
- package/dist/QuickMenu/index.d.ts +2 -1
- package/dist/Select/index.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.umd.js +699 -99
- package/dist/index.umd.min.js +9 -9
- package/dist/variables.css +67 -25
- package/es/Button/index.js +4 -3
- package/es/Button/style/index.css +28 -25
- package/es/Button/style/variables.css +28 -25
- package/es/Descriptions/Cell.d.ts +1 -0
- package/es/Descriptions/Cell.js +5 -2
- package/es/Descriptions/Item.d.ts +1 -0
- package/es/Descriptions/Row.js +6 -1
- package/es/InputNumber/index.js +7 -9
- package/es/LmDrag/LmDrag.d.ts +4 -0
- package/es/LmDrag/LmDrag.js +30 -0
- package/es/LmDrag/components/DndContainer.d.ts +3 -0
- package/es/LmDrag/components/DndContainer.js +121 -0
- package/es/LmDrag/components/sortableBox.d.ts +5 -0
- package/es/LmDrag/components/sortableBox.js +23 -0
- package/es/LmDrag/components/sortableItem.d.ts +7 -0
- package/es/LmDrag/components/sortableItem.js +41 -0
- package/es/LmDrag/index.d.ts +10 -0
- package/es/LmDrag/index.js +3 -0
- package/es/LmDrag/style/index.css +0 -0
- package/es/LmDrag/style/index.d.ts +1 -0
- package/es/LmDrag/style/index.js +1 -0
- package/es/LmDrag/style/variables.css +0 -0
- package/es/LmDrag/style/variables.d.ts +1 -0
- package/es/LmDrag/style/variables.js +1 -0
- package/es/LmDrag/wrapper/Root.d.ts +3 -0
- package/es/LmDrag/wrapper/Root.js +12 -0
- package/es/LmEditTable/EditTable.d.ts +15 -3
- package/es/LmEditTable/EditTable.js +86 -55
- package/es/LmEditTable/sortableItemCol.js +3 -1
- package/es/LmFilter/components/DropdownFIlter.js +27 -6
- package/es/LmFilter/style/index.css +12 -0
- package/es/LmFilter/style/variables.css +12 -0
- package/es/LmUpload/LmUpload.js +2 -1
- package/es/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/es/LmUpload/UploadList/ItemPictureCard.js +4 -3
- package/es/LmUpload/UploadList/index.js +52 -2
- package/es/LmUpload/fns/index.d.ts +1 -0
- package/es/LmUpload/fns/index.js +19 -3
- package/es/QuickMenu/index.d.ts +2 -1
- package/es/QuickMenu/index.js +11 -12
- package/es/Select/index.d.ts +3 -0
- package/es/Select/index.js +28 -1
- package/es/Select/style/index.css +27 -0
- package/es/Select/style/variables.css +27 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -1
- package/es/styles/variables.css +67 -25
- package/lib/Button/index.js +4 -3
- package/lib/Button/style/index.css +28 -25
- package/lib/Button/style/variables.css +28 -25
- package/lib/Descriptions/Cell.d.ts +1 -0
- package/lib/Descriptions/Cell.js +5 -2
- package/lib/Descriptions/Item.d.ts +1 -0
- package/lib/Descriptions/Row.js +6 -1
- package/lib/InputNumber/index.js +9 -9
- package/lib/LmDrag/LmDrag.d.ts +4 -0
- package/lib/LmDrag/LmDrag.js +44 -0
- package/lib/LmDrag/components/DndContainer.d.ts +3 -0
- package/lib/LmDrag/components/DndContainer.js +138 -0
- package/lib/LmDrag/components/sortableBox.d.ts +5 -0
- package/lib/LmDrag/components/sortableBox.js +37 -0
- package/lib/LmDrag/components/sortableItem.d.ts +7 -0
- package/lib/LmDrag/components/sortableItem.js +54 -0
- package/lib/LmDrag/index.d.ts +10 -0
- package/lib/LmDrag/index.js +19 -0
- package/lib/LmDrag/style/index.css +0 -0
- package/lib/LmDrag/style/index.d.ts +1 -0
- package/lib/LmDrag/style/index.js +3 -0
- package/lib/LmDrag/style/variables.css +0 -0
- package/lib/LmDrag/style/variables.d.ts +1 -0
- package/lib/LmDrag/style/variables.js +3 -0
- package/lib/LmDrag/wrapper/Root.d.ts +3 -0
- package/lib/LmDrag/wrapper/Root.js +26 -0
- package/lib/LmEditTable/EditTable.d.ts +15 -3
- package/lib/LmEditTable/EditTable.js +85 -54
- package/lib/LmEditTable/sortableItemCol.js +4 -1
- package/lib/LmFilter/components/DropdownFIlter.js +27 -6
- package/lib/LmFilter/style/index.css +12 -0
- package/lib/LmFilter/style/variables.css +12 -0
- package/lib/LmUpload/LmUpload.js +2 -1
- package/lib/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/lib/LmUpload/UploadList/ItemPictureCard.js +4 -3
- package/lib/LmUpload/UploadList/index.js +53 -2
- package/lib/LmUpload/fns/index.d.ts +1 -0
- package/lib/LmUpload/fns/index.js +19 -3
- package/lib/QuickMenu/index.d.ts +2 -1
- package/lib/QuickMenu/index.js +11 -12
- package/lib/Select/index.d.ts +3 -0
- package/lib/Select/index.js +29 -1
- package/lib/Select/style/index.css +27 -0
- package/lib/Select/style/variables.css +27 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +15 -1
- package/lib/styles/variables.css +67 -25
- package/package.json +1 -1
|
@@ -108,6 +108,18 @@
|
|
|
108
108
|
.lm_filter_basic_item .filter_item_icon.addon_before {
|
|
109
109
|
color: var(--font-color);
|
|
110
110
|
}
|
|
111
|
+
.lm_filter_basic_item .filter_item_icon .icon_clear {
|
|
112
|
+
display: none;
|
|
113
|
+
opacity: 0;
|
|
114
|
+
}
|
|
115
|
+
.lm_filter_basic_item .filter_item_icon:hover .icon_down {
|
|
116
|
+
display: none;
|
|
117
|
+
opacity: 0;
|
|
118
|
+
}
|
|
119
|
+
.lm_filter_basic_item .filter_item_icon:hover .icon_clear {
|
|
120
|
+
display: inline-block;
|
|
121
|
+
opacity: 1;
|
|
122
|
+
}
|
|
111
123
|
.lm_filter_basic_item.expand .filter_item_icon.addon_after {
|
|
112
124
|
transform: rotateX(180deg);
|
|
113
125
|
}
|
package/es/LmUpload/LmUpload.js
CHANGED
|
@@ -73,7 +73,7 @@ var LmUpload = function LmUpload(_a, ref) {
|
|
|
73
73
|
size: 100,
|
|
74
74
|
fileSize: 10,
|
|
75
75
|
fileSizeType: 'M',
|
|
76
|
-
uid: '
|
|
76
|
+
uid: 'fileName',
|
|
77
77
|
accept: '',
|
|
78
78
|
type: ['jpg', 'jpeg', 'png'],
|
|
79
79
|
listType: 'card',
|
|
@@ -88,6 +88,7 @@ var LmUpload = function LmUpload(_a, ref) {
|
|
|
88
88
|
itemRender: null,
|
|
89
89
|
enabledPreview: true,
|
|
90
90
|
enabledCrop: false,
|
|
91
|
+
enableDrag: false,
|
|
91
92
|
enabledOss: false,
|
|
92
93
|
// oss配置
|
|
93
94
|
ossConfig: function ossConfig() {
|
|
@@ -64,7 +64,8 @@ var renderThumb = function renderThumb(file) {
|
|
|
64
64
|
var PictureItem = function PictureItem(_ref) {
|
|
65
65
|
var file = _ref.file,
|
|
66
66
|
index = _ref.index,
|
|
67
|
-
instance = _ref.instance
|
|
67
|
+
instance = _ref.instance,
|
|
68
|
+
listeners = _ref.listeners;
|
|
68
69
|
var dispatch = instance.dispatch,
|
|
69
70
|
readOnly = instance.readOnly,
|
|
70
71
|
size = instance.size,
|
|
@@ -121,13 +122,13 @@ var PictureItem = function PictureItem(_ref) {
|
|
|
121
122
|
});
|
|
122
123
|
};
|
|
123
124
|
|
|
124
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
125
|
+
return /*#__PURE__*/React.createElement("div", Object.assign({
|
|
125
126
|
className: cn('lm_upload_item', 'lm_upload_item_card', isError && 'lm_upload_item_error'),
|
|
126
127
|
style: {
|
|
127
128
|
height: size,
|
|
128
129
|
width: size
|
|
129
130
|
}
|
|
130
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
131
|
+
}, listeners || {}), /*#__PURE__*/React.createElement("div", {
|
|
131
132
|
className: "lm_upload_item_thumb"
|
|
132
133
|
}, isError || !isImg ? renderThumb(resetFile) : /*#__PURE__*/React.createElement(Image, {
|
|
133
134
|
width: resetSize.width,
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
+
import { LmDrag } from 'linkmore-design';
|
|
2
3
|
import { render } from '../utils';
|
|
3
4
|
import RenderItem from './RenderItem';
|
|
4
5
|
|
|
5
6
|
var LmUploadList = function LmUploadList(_ref) {
|
|
6
7
|
var instance = _ref.instance;
|
|
7
|
-
var
|
|
8
|
+
var uid = instance.uid,
|
|
9
|
+
getFileHasValue = instance.getFileHasValue,
|
|
8
10
|
getFileList = instance.getFileList,
|
|
9
11
|
itemRender = instance.itemRender,
|
|
10
12
|
listType = instance.listType,
|
|
11
|
-
showUploadList = instance.showUploadList
|
|
13
|
+
showUploadList = instance.showUploadList,
|
|
14
|
+
enableDrag = instance.enableDrag,
|
|
15
|
+
fileNames = instance.fileNames,
|
|
16
|
+
move = instance.move;
|
|
12
17
|
if (!showUploadList) return null;
|
|
13
18
|
var fileList = useMemo(function () {
|
|
14
19
|
var _a;
|
|
@@ -17,6 +22,51 @@ var LmUploadList = function LmUploadList(_ref) {
|
|
|
17
22
|
return a.seq - b.seq;
|
|
18
23
|
});
|
|
19
24
|
}, [getFileList]);
|
|
25
|
+
|
|
26
|
+
var handleMove = function handleMove(active, over, fileList) {
|
|
27
|
+
try {
|
|
28
|
+
var fileMap = fileList.map(function (v) {
|
|
29
|
+
if (getFileHasValue(v) === getFileHasValue(active)) {
|
|
30
|
+
return Object.assign(Object.assign({}, v), {
|
|
31
|
+
seq: over[fileNames.seq]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (getFileHasValue(v) === getFileHasValue(over)) {
|
|
36
|
+
return Object.assign(Object.assign({}, v), {
|
|
37
|
+
seq: active[fileNames.seq]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return v;
|
|
42
|
+
});
|
|
43
|
+
move(active, over, fileMap);
|
|
44
|
+
} catch (error) {
|
|
45
|
+
console.log('移动出现了错误', error);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
if (enableDrag) {
|
|
50
|
+
return /*#__PURE__*/React.createElement(LmDrag, {
|
|
51
|
+
options: fileList,
|
|
52
|
+
rowKey: uid,
|
|
53
|
+
move: handleMove
|
|
54
|
+
}, function (_ref2) {
|
|
55
|
+
var item = _ref2.item,
|
|
56
|
+
listeners = _ref2.listeners,
|
|
57
|
+
index = _ref2.index;
|
|
58
|
+
return render(itemRender || RenderItem, {
|
|
59
|
+
type: listType,
|
|
60
|
+
key: getFileHasValue(item) || index,
|
|
61
|
+
index: index,
|
|
62
|
+
file: item,
|
|
63
|
+
fileList: fileList,
|
|
64
|
+
instance: instance,
|
|
65
|
+
listeners: listeners
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
20
70
|
return /*#__PURE__*/React.createElement(React.Fragment, null, fileList === null || fileList === void 0 ? void 0 : fileList.map(function (file, idx) {
|
|
21
71
|
return render(itemRender || RenderItem, {
|
|
22
72
|
type: listType,
|
|
@@ -15,6 +15,7 @@ declare const useCoreOptions: ({ state, dispatch, props }: {
|
|
|
15
15
|
remove: (file: any) => Promise<void>;
|
|
16
16
|
preview: (file: any) => void;
|
|
17
17
|
download: (file: any) => void;
|
|
18
|
+
move: (active: any, over: any, fileList: any) => void;
|
|
18
19
|
};
|
|
19
20
|
RefMethods: {
|
|
20
21
|
getState: () => any;
|
package/es/LmUpload/fns/index.js
CHANGED
|
@@ -66,10 +66,11 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
66
66
|
}, [uid]); // 从对象中读取存在的指定属性
|
|
67
67
|
|
|
68
68
|
var getFileHasValue = useCallback(function (obj) {
|
|
69
|
+
if (!obj) return '';
|
|
69
70
|
var extend = [uid, 'fileName'];
|
|
70
71
|
var val = '';
|
|
71
72
|
extend.forEach(function (v) {
|
|
72
|
-
if (!val) val = obj[v];
|
|
73
|
+
if (!val && obj[v]) val = obj[v];
|
|
73
74
|
});
|
|
74
75
|
return val;
|
|
75
76
|
}, [uid]); // 获取当前的文件列表
|
|
@@ -470,7 +471,21 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
470
471
|
var _a;
|
|
471
472
|
|
|
472
473
|
(_a = props.onDownload) === null || _a === void 0 ? void 0 : _a.call(props, file);
|
|
473
|
-
}, [props.onDownload]);
|
|
474
|
+
}, [props.onDownload]); // 拖拽移动事件
|
|
475
|
+
|
|
476
|
+
var move = useCallback(function (active, over, fileList) {
|
|
477
|
+
var _a;
|
|
478
|
+
|
|
479
|
+
(_a = props.onMove) === null || _a === void 0 ? void 0 : _a.call(props, active, over, fileList);
|
|
480
|
+
onChange === null || onChange === void 0 ? void 0 : onChange({
|
|
481
|
+
file: active,
|
|
482
|
+
fileList: fileList
|
|
483
|
+
});
|
|
484
|
+
dispatch({
|
|
485
|
+
type: 'changeFileList',
|
|
486
|
+
fileList: fileList
|
|
487
|
+
});
|
|
488
|
+
}, [props.onMove, onChange, dispatch]);
|
|
474
489
|
var CoreMethods = {
|
|
475
490
|
getIsMaxCount: getIsMaxCount,
|
|
476
491
|
getFileHasValue: getFileHasValue,
|
|
@@ -480,7 +495,8 @@ var useCoreOptions = function useCoreOptions(_ref) {
|
|
|
480
495
|
getUploadStatus: getUploadStatus,
|
|
481
496
|
remove: remove,
|
|
482
497
|
preview: preview,
|
|
483
|
-
download: download
|
|
498
|
+
download: download,
|
|
499
|
+
move: move
|
|
484
500
|
};
|
|
485
501
|
var RefMethods = {
|
|
486
502
|
getState: function getState() {
|
package/es/QuickMenu/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface IMenuData {
|
|
2
|
+
export interface IMenuData {
|
|
3
3
|
menuId: string;
|
|
4
4
|
title: string | React.ReactNode;
|
|
5
5
|
hidden?: boolean;
|
|
@@ -10,6 +10,7 @@ export interface IQuickMenuProps {
|
|
|
10
10
|
top?: number;
|
|
11
11
|
menuData: IMenuData[];
|
|
12
12
|
warpElement: any;
|
|
13
|
+
root?: IntersectionObserver['root'] | undefined;
|
|
13
14
|
}
|
|
14
15
|
declare const LMQuickMenu: React.FC<IQuickMenuProps>;
|
|
15
16
|
export default LMQuickMenu;
|
package/es/QuickMenu/index.js
CHANGED
|
@@ -12,7 +12,8 @@ var LMQuickMenu = function LMQuickMenu(props) {
|
|
|
12
12
|
top = _props$top === void 0 ? '104px' : _props$top,
|
|
13
13
|
_props$menuData = props.menuData,
|
|
14
14
|
menuData = _props$menuData === void 0 ? [] : _props$menuData,
|
|
15
|
-
warpElement = props.warpElement
|
|
15
|
+
warpElement = props.warpElement,
|
|
16
|
+
root = props.root;
|
|
16
17
|
var idTopInfo = useRef({});
|
|
17
18
|
|
|
18
19
|
var _useState = useState(false),
|
|
@@ -70,11 +71,13 @@ var LMQuickMenu = function LMQuickMenu(props) {
|
|
|
70
71
|
var scrollama = require('scrollama');
|
|
71
72
|
|
|
72
73
|
menuTimeEventRef.current = scrollama();
|
|
74
|
+
console.log(getTargetElement(warpElement || document), '--getTargetElement(warpElement || document)');
|
|
73
75
|
(_c = (_b = menuTimeEventRef.current) === null || _b === void 0 ? void 0 : _b.setup({
|
|
74
76
|
step: filterMenuData.map(function (item) {
|
|
75
77
|
return document.getElementById("".concat(item.menuId));
|
|
76
78
|
}).filter(Boolean),
|
|
77
|
-
container: getTargetElement(warpElement || document)
|
|
79
|
+
container: getTargetElement(warpElement || document),
|
|
80
|
+
root: root ? getTargetElement(root) : undefined
|
|
78
81
|
})) === null || _c === void 0 ? void 0 : _c.onStepEnter(function (_ref) {
|
|
79
82
|
var element = _ref.element;
|
|
80
83
|
updateActiveToc(element.id);
|
|
@@ -106,12 +109,6 @@ var LMQuickMenu = function LMQuickMenu(props) {
|
|
|
106
109
|
wait: 50
|
|
107
110
|
});
|
|
108
111
|
|
|
109
|
-
var bindDom = function bindDom() {
|
|
110
|
-
if (!Object.keys(idTopInfo.current).length) {
|
|
111
|
-
setKeysDom();
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
|
|
115
112
|
var handleScroll = function handleScroll() {
|
|
116
113
|
setScrollOpenStatus(true);
|
|
117
114
|
};
|
|
@@ -126,10 +123,6 @@ var LMQuickMenu = function LMQuickMenu(props) {
|
|
|
126
123
|
var _a; // bindScroller();
|
|
127
124
|
|
|
128
125
|
|
|
129
|
-
setTimeout(function () {
|
|
130
|
-
bindDom();
|
|
131
|
-
bindScroller();
|
|
132
|
-
}, 200);
|
|
133
126
|
(_a = getTargetElement(warpElement || document)) === null || _a === void 0 ? void 0 : _a.addEventListener('scroll', handleScroll, {
|
|
134
127
|
once: true
|
|
135
128
|
});
|
|
@@ -139,6 +132,12 @@ var LMQuickMenu = function LMQuickMenu(props) {
|
|
|
139
132
|
(_a = getTargetElement(warpElement || document)) === null || _a === void 0 ? void 0 : _a.removeEventListener('scroll', handleScroll);
|
|
140
133
|
};
|
|
141
134
|
}, []);
|
|
135
|
+
useEffect(function () {
|
|
136
|
+
setTimeout(function () {
|
|
137
|
+
setKeysDom();
|
|
138
|
+
bindScroller();
|
|
139
|
+
}, 200);
|
|
140
|
+
}, [filterMenuData]);
|
|
142
141
|
return /*#__PURE__*/React.createElement("div", {
|
|
143
142
|
className: classNames(prefixCls),
|
|
144
143
|
onMouseEnter: function onMouseEnter() {
|
package/es/Select/index.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ export interface ISelectProps extends SelectProps {
|
|
|
6
6
|
Option?: typeof Select.Option;
|
|
7
7
|
OptGroup?: typeof Select.OptGroup;
|
|
8
8
|
defaultLabel?: string;
|
|
9
|
+
suffix?: React.ReactNode;
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
iconClick?: () => void;
|
|
9
12
|
}
|
|
10
13
|
declare type SelectType = typeof Select & typeof Select.Option & typeof Select.OptGroup;
|
|
11
14
|
declare const LMSelect: SelectType;
|
package/es/Select/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
import React, { forwardRef, useMemo } from 'react';
|
|
18
|
+
import Button from '../Button';
|
|
18
19
|
import classNames from 'classnames';
|
|
19
20
|
import SizeContext from '../ConfigProvider/SizeContext';
|
|
20
21
|
import DisabledContext from '../ConfigProvider/DisabledContext';
|
|
@@ -28,8 +29,11 @@ var CLMSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
28
29
|
options = props.options,
|
|
29
30
|
value = props.value,
|
|
30
31
|
defaultLabel = props.defaultLabel,
|
|
32
|
+
suffix = props.suffix,
|
|
33
|
+
icon = props.icon,
|
|
34
|
+
iconClick = props.iconClick,
|
|
31
35
|
rest = __rest(props // ===================== Size =====================
|
|
32
|
-
, ["children", "className", "size", "disabled", "dropdownClassName", "options", "value", "defaultLabel"]); // ===================== Size =====================
|
|
36
|
+
, ["children", "className", "size", "disabled", "dropdownClassName", "options", "value", "defaultLabel", "suffix", "icon", "iconClick"]); // ===================== Size =====================
|
|
33
37
|
|
|
34
38
|
|
|
35
39
|
var size = customizeSize || React.useContext(SizeContext) || 'middle'; // ===================== Disabled =====================
|
|
@@ -67,6 +71,29 @@ var CLMSelect = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
67
71
|
if (value && !hasOption) return defaultLabel !== null && defaultLabel !== void 0 ? defaultLabel : value;
|
|
68
72
|
return value;
|
|
69
73
|
}, [value, defaultLabel, hasOption]);
|
|
74
|
+
|
|
75
|
+
if (icon) {
|
|
76
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
77
|
+
className: 'lm_select_has_icon',
|
|
78
|
+
style: props.style
|
|
79
|
+
}, /*#__PURE__*/React.createElement(_Select, Object.assign({
|
|
80
|
+
className: classNames(className, prefixCls),
|
|
81
|
+
size: size,
|
|
82
|
+
ref: ref,
|
|
83
|
+
value: resetValue,
|
|
84
|
+
options: options,
|
|
85
|
+
disabled: mergedDisabled || undefined
|
|
86
|
+
}, rest, {
|
|
87
|
+
dropdownClassName: classNames('lm_select_dropdown', dropdownClassName)
|
|
88
|
+
}), children), /*#__PURE__*/React.createElement(Button, {
|
|
89
|
+
size: size,
|
|
90
|
+
onClick: iconClick,
|
|
91
|
+
className: 'lm_select_icon_button',
|
|
92
|
+
disabled: mergedDisabled || undefined,
|
|
93
|
+
icon: icon
|
|
94
|
+
}));
|
|
95
|
+
}
|
|
96
|
+
|
|
70
97
|
return /*#__PURE__*/React.createElement(_Select, Object.assign({
|
|
71
98
|
className: classNames(className, prefixCls),
|
|
72
99
|
size: size,
|
|
@@ -526,3 +526,30 @@ p {
|
|
|
526
526
|
.lm_select_dropdown .ant-select-item-option-disabled {
|
|
527
527
|
color: var(--disabled-font-color);
|
|
528
528
|
}
|
|
529
|
+
.lm_select_has_icon {
|
|
530
|
+
width: 100%;
|
|
531
|
+
display: flex;
|
|
532
|
+
flex-direction: row;
|
|
533
|
+
align-items: center;
|
|
534
|
+
justify-content: flex-start;
|
|
535
|
+
position: relative;
|
|
536
|
+
}
|
|
537
|
+
.lm_select_has_icon .ant-select {
|
|
538
|
+
border-top-right-radius: 0;
|
|
539
|
+
border-bottom-right-radius: 0;
|
|
540
|
+
z-index: 3;
|
|
541
|
+
}
|
|
542
|
+
.lm_select_has_icon .ant-select .ant-select-selector {
|
|
543
|
+
border-top-right-radius: 0 !important;
|
|
544
|
+
border-bottom-right-radius: 0 !important;
|
|
545
|
+
}
|
|
546
|
+
.lm_select_has_icon .lm_select_icon_button {
|
|
547
|
+
margin-left: -1px;
|
|
548
|
+
border-top-left-radius: 0;
|
|
549
|
+
border-bottom-left-radius: 0;
|
|
550
|
+
z-index: 2;
|
|
551
|
+
}
|
|
552
|
+
.lm_select_has_icon .lm_select_icon_button:hover,
|
|
553
|
+
.lm_select_has_icon .lm_select_icon_button:focus {
|
|
554
|
+
z-index: 5;
|
|
555
|
+
}
|
|
@@ -14,3 +14,30 @@
|
|
|
14
14
|
.lm_select_dropdown .ant-select-item-option-disabled {
|
|
15
15
|
color: var(--disabled-font-color);
|
|
16
16
|
}
|
|
17
|
+
.lm_select_has_icon {
|
|
18
|
+
width: 100%;
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: row;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: flex-start;
|
|
23
|
+
position: relative;
|
|
24
|
+
}
|
|
25
|
+
.lm_select_has_icon .ant-select {
|
|
26
|
+
border-top-right-radius: 0;
|
|
27
|
+
border-bottom-right-radius: 0;
|
|
28
|
+
z-index: 3;
|
|
29
|
+
}
|
|
30
|
+
.lm_select_has_icon .ant-select .ant-select-selector {
|
|
31
|
+
border-top-right-radius: 0 !important;
|
|
32
|
+
border-bottom-right-radius: 0 !important;
|
|
33
|
+
}
|
|
34
|
+
.lm_select_has_icon .lm_select_icon_button {
|
|
35
|
+
margin-left: -1px;
|
|
36
|
+
border-top-left-radius: 0;
|
|
37
|
+
border-bottom-left-radius: 0;
|
|
38
|
+
z-index: 2;
|
|
39
|
+
}
|
|
40
|
+
.lm_select_has_icon .lm_select_icon_button:hover,
|
|
41
|
+
.lm_select_has_icon .lm_select_icon_button:focus {
|
|
42
|
+
z-index: 5;
|
|
43
|
+
}
|
package/es/index.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export type { TooltipProps } from './Tooltip';
|
|
|
51
51
|
export { default as Form } from './Form';
|
|
52
52
|
export { default as Spin } from './Spin';
|
|
53
53
|
export { default as LmEditTable } from './LmEditTable';
|
|
54
|
+
export type { TLmEditTable, CountdownHandle } from './LmEditTable/EditTable';
|
|
54
55
|
export { default as List } from './List';
|
|
55
56
|
export { default as LMQuickMenu } from './QuickMenu';
|
|
56
57
|
export { default as DatePicker } from './DatePicker';
|
|
@@ -125,3 +126,4 @@ export { default as CropImg } from './CropImg';
|
|
|
125
126
|
export type { CropImgProps } from './CropImg';
|
|
126
127
|
export { default as ImageViewer } from './ImageViewer';
|
|
127
128
|
export type { ImageViewerProps } from './ImageViewer';
|
|
129
|
+
export * from './LmDrag';
|
package/es/index.js
CHANGED
|
@@ -82,4 +82,5 @@ export { default as FullScreen } from './FullScreen';
|
|
|
82
82
|
export * from './LmImgList';
|
|
83
83
|
export { default as LmImgList } from './LmImgList';
|
|
84
84
|
export { default as CropImg } from './CropImg';
|
|
85
|
-
export { default as ImageViewer } from './ImageViewer';
|
|
85
|
+
export { default as ImageViewer } from './ImageViewer';
|
|
86
|
+
export * from './LmDrag';
|
package/es/styles/variables.css
CHANGED
|
@@ -746,12 +746,13 @@ p {
|
|
|
746
746
|
padding: 0 var(--gap);
|
|
747
747
|
}
|
|
748
748
|
.ant-btn.lm-button {
|
|
749
|
-
border: 0;
|
|
750
749
|
display: inline-flex !important;
|
|
751
750
|
flex-direction: row;
|
|
752
751
|
align-items: center;
|
|
753
752
|
justify-content: center;
|
|
753
|
+
color: var(--font-color);
|
|
754
754
|
vertical-align: middle;
|
|
755
|
+
border: 1px solid var(--stroke-color);
|
|
755
756
|
box-shadow: none;
|
|
756
757
|
}
|
|
757
758
|
.ant-btn.lm-button .anticon {
|
|
@@ -769,12 +770,24 @@ p {
|
|
|
769
770
|
white-space: nowrap;
|
|
770
771
|
}
|
|
771
772
|
.ant-btn.lm-button::before {
|
|
772
|
-
|
|
773
|
+
position: absolute;
|
|
774
|
+
z-index: 1;
|
|
775
|
+
display: none;
|
|
776
|
+
background: #fff;
|
|
777
|
+
border-radius: inherit;
|
|
778
|
+
opacity: 0.35;
|
|
779
|
+
transition: opacity 0.2s;
|
|
780
|
+
content: '';
|
|
781
|
+
pointer-events: none;
|
|
782
|
+
inset: -1px;
|
|
783
|
+
}
|
|
784
|
+
.ant-btn.lm-button.ant-btn-loading::before {
|
|
785
|
+
display: block;
|
|
773
786
|
}
|
|
774
787
|
.ant-btn.lm-button:disabled {
|
|
788
|
+
color: var(--disabled-font-color) !important;
|
|
775
789
|
background: var(--disabled-bg-color) !important;
|
|
776
790
|
border: 1px solid var(--disabled-border-color) !important;
|
|
777
|
-
color: var(--disabled-font-color) !important;
|
|
778
791
|
}
|
|
779
792
|
.ant-btn.lm-button > span:not(.anticon) {
|
|
780
793
|
font-size: 12px;
|
|
@@ -795,57 +808,46 @@ p {
|
|
|
795
808
|
.ant-btn.lm-button-middle .anticon {
|
|
796
809
|
font-size: 16px;
|
|
797
810
|
}
|
|
798
|
-
.ant-btn.lm-button-default {
|
|
799
|
-
border: 1px solid var(--stroke-color);
|
|
800
|
-
color: var(--font-color);
|
|
801
|
-
}
|
|
802
|
-
.ant-btn.lm-button-default-hover,
|
|
803
|
-
.ant-btn.lm-button-default:hover {
|
|
804
|
-
border: 1px solid var(--primary-hover-color);
|
|
805
|
-
color: var(--primary-hover-color);
|
|
806
|
-
}
|
|
807
|
-
.ant-btn.lm-button-default.ant-btn-loading {
|
|
808
|
-
border-color: rgba(0, 0, 0, 0.15);
|
|
809
|
-
color: rgba(0, 0, 0, 0.15);
|
|
810
|
-
}
|
|
811
811
|
.ant-btn.lm-button-primary {
|
|
812
|
-
background: var(--primary-color);
|
|
813
812
|
color: #fff;
|
|
813
|
+
background: var(--primary-color);
|
|
814
|
+
border-color: var(--primary-color);
|
|
814
815
|
}
|
|
815
|
-
.ant-btn.lm-button-primary-hover,
|
|
816
816
|
.ant-btn.lm-button-primary:hover {
|
|
817
817
|
background: var(--primary-hover-color);
|
|
818
818
|
}
|
|
819
|
+
.ant-btn.lm-button-primary:active {
|
|
820
|
+
background-color: var(--primary-click-color);
|
|
821
|
+
}
|
|
819
822
|
.ant-btn.lm-button-primary.ant-btn-loading {
|
|
820
823
|
background: var(--primary-loading-color);
|
|
821
824
|
}
|
|
822
825
|
.ant-btn.lm-button-ghost {
|
|
823
826
|
color: var(--font-color);
|
|
824
|
-
border-color: var(--color-15);
|
|
825
827
|
background: transparent;
|
|
828
|
+
border: 1px solid var(--color-15);
|
|
826
829
|
}
|
|
827
830
|
.ant-btn.lm-button-danger {
|
|
828
|
-
border: 1px solid var(--error-color);
|
|
829
831
|
color: var(--error-color);
|
|
830
832
|
text-shadow: none;
|
|
833
|
+
border: 1px solid var(--error-color);
|
|
831
834
|
box-shadow: none;
|
|
832
835
|
}
|
|
833
|
-
.ant-btn.lm-button-danger-hover,
|
|
834
836
|
.ant-btn.lm-button-danger:hover {
|
|
835
|
-
border-color: var(--error-hover-color);
|
|
836
837
|
color: var(--error-hover-color);
|
|
838
|
+
border-color: var(--error-hover-color);
|
|
837
839
|
}
|
|
838
840
|
.ant-btn.lm-button-danger.ant-btn-loading {
|
|
839
|
-
border-color: var(--error-loading-color);
|
|
840
841
|
color: var(--error-hover-color);
|
|
842
|
+
border-color: var(--error-loading-color);
|
|
841
843
|
}
|
|
842
844
|
.ant-btn.lm-button-dashed {
|
|
843
845
|
border: 1px dashed var(--color-15);
|
|
844
846
|
}
|
|
845
847
|
.ant-btn.lm-button-link {
|
|
846
848
|
color: var(--primary-color);
|
|
849
|
+
border-color: transparent;
|
|
847
850
|
}
|
|
848
|
-
.ant-btn.lm-button-link-hover,
|
|
849
851
|
.ant-btn.lm-button-link:hover {
|
|
850
852
|
color: var(--primary-hover-color);
|
|
851
853
|
}
|
|
@@ -853,11 +855,12 @@ p {
|
|
|
853
855
|
color: var(--primary-loading-color);
|
|
854
856
|
}
|
|
855
857
|
.ant-btn.lm-button-link[disabled] {
|
|
856
|
-
border: 0 !important;
|
|
857
858
|
background: transparent !important;
|
|
859
|
+
border: 0 !important;
|
|
858
860
|
}
|
|
859
861
|
.ant-btn.ant-btn-text {
|
|
860
862
|
background: transparent;
|
|
863
|
+
border-color: transparent;
|
|
861
864
|
}
|
|
862
865
|
.ant-btn.lm-button-icon-only .anticon {
|
|
863
866
|
font-size: 16px;
|
|
@@ -9963,6 +9966,18 @@ p {
|
|
|
9963
9966
|
.lm_filter_basic_item .filter_item_icon.addon_before {
|
|
9964
9967
|
color: var(--font-color);
|
|
9965
9968
|
}
|
|
9969
|
+
.lm_filter_basic_item .filter_item_icon .icon_clear {
|
|
9970
|
+
display: none;
|
|
9971
|
+
opacity: 0;
|
|
9972
|
+
}
|
|
9973
|
+
.lm_filter_basic_item .filter_item_icon:hover .icon_down {
|
|
9974
|
+
display: none;
|
|
9975
|
+
opacity: 0;
|
|
9976
|
+
}
|
|
9977
|
+
.lm_filter_basic_item .filter_item_icon:hover .icon_clear {
|
|
9978
|
+
display: inline-block;
|
|
9979
|
+
opacity: 1;
|
|
9980
|
+
}
|
|
9966
9981
|
.lm_filter_basic_item.expand .filter_item_icon.addon_after {
|
|
9967
9982
|
transform: rotateX(180deg);
|
|
9968
9983
|
}
|
|
@@ -12433,6 +12448,33 @@ button.ant-table-row-expand-icon::after {
|
|
|
12433
12448
|
.lm_select_dropdown .ant-select-item-option-disabled {
|
|
12434
12449
|
color: var(--disabled-font-color);
|
|
12435
12450
|
}
|
|
12451
|
+
.lm_select_has_icon {
|
|
12452
|
+
width: 100%;
|
|
12453
|
+
display: flex;
|
|
12454
|
+
flex-direction: row;
|
|
12455
|
+
align-items: center;
|
|
12456
|
+
justify-content: flex-start;
|
|
12457
|
+
position: relative;
|
|
12458
|
+
}
|
|
12459
|
+
.lm_select_has_icon .ant-select {
|
|
12460
|
+
border-top-right-radius: 0;
|
|
12461
|
+
border-bottom-right-radius: 0;
|
|
12462
|
+
z-index: 3;
|
|
12463
|
+
}
|
|
12464
|
+
.lm_select_has_icon .ant-select .ant-select-selector {
|
|
12465
|
+
border-top-right-radius: 0 !important;
|
|
12466
|
+
border-bottom-right-radius: 0 !important;
|
|
12467
|
+
}
|
|
12468
|
+
.lm_select_has_icon .lm_select_icon_button {
|
|
12469
|
+
margin-left: -1px;
|
|
12470
|
+
border-top-left-radius: 0;
|
|
12471
|
+
border-bottom-left-radius: 0;
|
|
12472
|
+
z-index: 2;
|
|
12473
|
+
}
|
|
12474
|
+
.lm_select_has_icon .lm_select_icon_button:hover,
|
|
12475
|
+
.lm_select_has_icon .lm_select_icon_button:focus {
|
|
12476
|
+
z-index: 5;
|
|
12477
|
+
}
|
|
12436
12478
|
.ant-switch.lm-switch {
|
|
12437
12479
|
width: 48px;
|
|
12438
12480
|
height: 24px;
|
package/lib/Button/index.js
CHANGED
|
@@ -40,7 +40,8 @@ var LMButton = function LMButton(props) {
|
|
|
40
40
|
type = _props$type === void 0 ? 'default' : _props$type,
|
|
41
41
|
_props$hover = props.hover,
|
|
42
42
|
hover = _props$hover === void 0 ? false : _props$hover,
|
|
43
|
-
|
|
43
|
+
danger = props.danger,
|
|
44
|
+
restProps = __rest(props, ["children", "className", "size", "type", "hover", "danger"]);
|
|
44
45
|
|
|
45
46
|
var globalSize = customizeSize || _react.default.useContext(_SizeContext.default) || 'middle';
|
|
46
47
|
|
|
@@ -51,12 +52,12 @@ var LMButton = function LMButton(props) {
|
|
|
51
52
|
|
|
52
53
|
var classs = (0, _classnames.default)('lm-button', className, {
|
|
53
54
|
'lm-button-icon-only': !children
|
|
54
|
-
}, (0, _defineProperty2.default)({}, "lm-button-".concat(size), size), (0, _defineProperty2.default)({}, "lm-button-".concat(type), type), (0, _defineProperty2.default)({}, "lm-button-".concat(type, "-hover"), type && hover));
|
|
55
|
+
}, (0, _defineProperty2.default)({}, "lm-button-danger", danger), (0, _defineProperty2.default)({}, "lm-button-".concat(size), size), (0, _defineProperty2.default)({}, "lm-button-".concat(type), type), (0, _defineProperty2.default)({}, "lm-button-".concat(type, "-hover"), type && hover));
|
|
55
56
|
return /*#__PURE__*/_react.default.createElement(_button.default, Object.assign({}, restProps, {
|
|
56
57
|
className: classs,
|
|
57
58
|
size: size,
|
|
58
59
|
type: type,
|
|
59
|
-
danger: !!
|
|
60
|
+
danger: !!danger
|
|
60
61
|
}), children);
|
|
61
62
|
};
|
|
62
63
|
|