linkmore-design 1.1.13-alpha.1 → 1.1.13-alpha.10
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/CHANGELOG.md +118 -0
- package/dist/Button/demos/ghost.d.ts +2 -0
- package/dist/ConfigProvider/context.d.ts +1 -0
- package/dist/Descriptions/Cell.d.ts +1 -0
- package/dist/Descriptions/Item.d.ts +1 -0
- package/dist/Descriptions/index.d.ts +1 -1
- package/dist/Form/FormWrapper.d.ts +3 -0
- package/dist/Form/WrapperItem.d.ts +4 -0
- package/dist/Form/demos/disabled.d.ts +2 -0
- package/dist/Form/demos/responsive.d.ts +0 -1
- package/dist/Form/index.d.ts +2 -0
- package/dist/Form/interface.d.ts +12 -0
- package/dist/IconFont/demos/ConfigProvider.d.ts +2 -0
- package/dist/IconFont/index.d.ts +1 -2
- 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 +16 -3
- package/dist/LmEditTable/components/QuickOpetate.d.ts +12 -0
- package/dist/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
- package/dist/LmEditTable/components/index.d.ts +3 -1
- package/dist/LmFilter/LmFilter.d.ts +2 -6
- package/dist/LmTable/demos/summuy.d.ts +2 -0
- package/dist/LmTable/expression.d.ts +1 -0
- package/dist/LmTable/hooks/useGroupDataSource.d.ts +7 -0
- package/dist/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/dist/LmUpload/fns/index.d.ts +1 -0
- package/dist/QuickMenu/demos/useInDraw.d.ts +2 -0
- package/dist/QuickMenu/index.d.ts +3 -1
- package/dist/Select/index.d.ts +3 -0
- package/dist/TreeSelect/demos/treedata.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.umd.js +2645 -1500
- package/dist/index.umd.min.js +17 -17
- package/dist/variables.css +263 -120
- 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/Cascader/index.js +31 -3
- package/es/Cascader/style/index.css +1 -0
- package/es/Cascader/style/variables.css +1 -0
- package/es/ConfigProvider/context.d.ts +1 -0
- package/es/ConfigProvider/index.js +5 -3
- 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/Descriptions/index.d.ts +1 -1
- package/es/Descriptions/index.js +3 -3
- package/es/Descriptions/style/index.css +3 -0
- package/es/Descriptions/style/variables.css +3 -0
- package/es/Form/Form.js +13 -4
- package/es/Form/FormItem/ItemHolder.js +1 -10
- package/es/Form/FormWrapper.d.ts +3 -0
- package/es/Form/FormWrapper.js +22 -0
- package/es/Form/WrapperItem.d.ts +4 -0
- package/es/Form/WrapperItem.js +217 -0
- package/es/Form/container.js +1 -13
- package/es/Form/images/icon_collapse.svg +1 -0
- package/es/Form/index.d.ts +2 -0
- package/es/Form/index.js +2 -0
- package/es/Form/interface.d.ts +12 -0
- package/es/Form/style/index.css +34 -41
- package/es/Form/style/variables.css +34 -41
- package/es/IconFont/index.d.ts +1 -2
- package/es/IconFont/index.js +18 -4
- package/es/ImageViewer/components/Operate.js +4 -7
- package/es/Input/index.js +47 -10
- package/es/InputNumber/index.js +23 -11
- package/es/InputNumber/style/index.css +7 -0
- package/es/InputNumber/style/variables.css +7 -0
- 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 +16 -3
- package/es/LmEditTable/EditTable.js +275 -234
- package/es/LmEditTable/components/QuickOpetate.d.ts +12 -0
- package/es/LmEditTable/components/QuickOpetate.js +82 -0
- package/es/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
- package/es/LmEditTable/components/bottomOpetateComponent.js +23 -0
- package/es/LmEditTable/components/index.d.ts +3 -1
- package/es/LmEditTable/components/index.js +3 -1
- package/es/LmEditTable/sortableItemCol.js +40 -10
- package/es/LmEditTable/style/index.css +20 -0
- package/es/LmEditTable/style/variables.css +20 -0
- package/es/LmEditTable/util.js +38 -12
- package/es/LmFilter/LmFilter.js +6 -6
- package/es/LmFilter/components/CheckboxFilter.js +9 -4
- package/es/LmFilter/components/DropdownFIlter.js +186 -111
- package/es/LmFilter/components/SelectFilter.js +4 -3
- package/es/LmFilter/filterFns/index.js +4 -6
- package/es/LmFilter/index.js +0 -3
- package/es/LmFilter/style/index.css +82 -54
- package/es/LmFilter/style/variables.css +82 -54
- package/es/LmFilter/utils.js +6 -6
- package/es/LmSelect/style/index.css +1 -0
- package/es/LmSelect/style/variables.css +1 -0
- package/es/LmTable/Table.js +24 -15
- package/es/LmTable/expression.d.ts +1 -0
- package/es/LmTable/expression.js +31 -0
- package/es/LmTable/hooks/useGroupDataSource.js +50 -0
- package/es/LmTable/style/index.css +39 -0
- package/es/LmTable/style/variables.css +39 -0
- package/es/LmUpload/LmUpload.js +6 -3
- package/es/LmUpload/UploadList/ItemPicture.js +2 -1
- package/es/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/es/LmUpload/UploadList/ItemPictureCard.js +15 -5
- package/es/LmUpload/UploadList/ItemText.js +7 -2
- package/es/LmUpload/UploadList/index.js +53 -2
- package/es/LmUpload/body/UploadCore.js +4 -1
- package/es/LmUpload/fns/index.d.ts +1 -0
- package/es/LmUpload/fns/index.js +27 -6
- package/es/LmUpload/style/index.css +17 -0
- package/es/LmUpload/style/variables.css +17 -0
- package/es/QuickMenu/index.d.ts +3 -1
- package/es/QuickMenu/index.js +22 -19
- package/es/Select/index.d.ts +3 -0
- package/es/Select/index.js +44 -7
- package/es/Select/style/index.css +28 -0
- package/es/Select/style/variables.css +28 -0
- package/es/TreeSelect/index.js +17 -2
- package/es/TreeSelect/style/index.css +3 -0
- package/es/TreeSelect/style/variables.css +3 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -1
- package/es/styles/variables.css +263 -120
- 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/Cascader/index.js +35 -3
- package/lib/Cascader/style/index.css +1 -0
- package/lib/Cascader/style/variables.css +1 -0
- package/lib/ConfigProvider/context.d.ts +1 -0
- package/lib/ConfigProvider/index.js +5 -3
- 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/Descriptions/index.d.ts +1 -1
- package/lib/Descriptions/index.js +3 -3
- package/lib/Descriptions/style/index.css +3 -0
- package/lib/Descriptions/style/variables.css +3 -0
- package/lib/Form/Form.js +13 -4
- package/lib/Form/FormItem/ItemHolder.js +1 -10
- package/lib/Form/FormWrapper.d.ts +3 -0
- package/lib/Form/FormWrapper.js +34 -0
- package/lib/Form/WrapperItem.d.ts +4 -0
- package/lib/Form/WrapperItem.js +235 -0
- package/lib/Form/container.js +1 -13
- package/lib/Form/images/icon_collapse.svg +1 -0
- package/lib/Form/index.d.ts +2 -0
- package/lib/Form/index.js +3 -0
- package/lib/Form/interface.d.ts +12 -0
- package/lib/Form/style/index.css +34 -41
- package/lib/Form/style/variables.css +34 -41
- package/lib/IconFont/index.d.ts +1 -2
- package/lib/IconFont/index.js +25 -4
- package/lib/ImageViewer/components/Operate.js +4 -8
- package/lib/Input/index.js +52 -10
- package/lib/InputNumber/index.js +29 -11
- package/lib/InputNumber/style/index.css +7 -0
- package/lib/InputNumber/style/variables.css +7 -0
- 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 +16 -3
- package/lib/LmEditTable/EditTable.js +271 -230
- package/lib/LmEditTable/components/QuickOpetate.d.ts +12 -0
- package/lib/LmEditTable/components/QuickOpetate.js +96 -0
- package/lib/LmEditTable/components/bottomOpetateComponent.d.ts +13 -0
- package/lib/LmEditTable/components/bottomOpetateComponent.js +34 -0
- package/lib/LmEditTable/components/index.d.ts +3 -1
- package/lib/LmEditTable/components/index.js +16 -0
- package/lib/LmEditTable/sortableItemCol.js +37 -8
- package/lib/LmEditTable/style/index.css +20 -0
- package/lib/LmEditTable/style/variables.css +20 -0
- package/lib/LmEditTable/util.js +37 -11
- package/lib/LmFilter/LmFilter.js +6 -6
- package/lib/LmFilter/components/CheckboxFilter.js +9 -4
- package/lib/LmFilter/components/DropdownFIlter.js +186 -111
- package/lib/LmFilter/components/SelectFilter.js +4 -3
- package/lib/LmFilter/filterFns/index.js +4 -6
- package/lib/LmFilter/index.js +0 -3
- package/lib/LmFilter/style/index.css +82 -54
- package/lib/LmFilter/style/variables.css +82 -54
- package/lib/LmFilter/utils.js +6 -6
- package/lib/LmSelect/style/index.css +1 -0
- package/lib/LmSelect/style/variables.css +1 -0
- package/lib/LmTable/Table.js +24 -15
- package/lib/LmTable/expression.d.ts +1 -0
- package/lib/LmTable/expression.js +41 -0
- package/lib/LmTable/hooks/useGroupDataSource.js +50 -0
- package/lib/LmTable/style/index.css +39 -0
- package/lib/LmTable/style/variables.css +39 -0
- package/lib/LmUpload/LmUpload.js +9 -3
- package/lib/LmUpload/UploadList/ItemPicture.js +2 -1
- package/lib/LmUpload/UploadList/ItemPictureCard.d.ts +2 -1
- package/lib/LmUpload/UploadList/ItemPictureCard.js +15 -5
- package/lib/LmUpload/UploadList/ItemText.js +7 -2
- package/lib/LmUpload/UploadList/index.js +54 -2
- package/lib/LmUpload/body/UploadCore.js +5 -1
- package/lib/LmUpload/fns/index.d.ts +1 -0
- package/lib/LmUpload/fns/index.js +27 -6
- package/lib/LmUpload/style/index.css +17 -0
- package/lib/LmUpload/style/variables.css +17 -0
- package/lib/QuickMenu/index.d.ts +3 -1
- package/lib/QuickMenu/index.js +21 -18
- package/lib/Select/index.d.ts +3 -0
- package/lib/Select/index.js +47 -7
- package/lib/Select/style/index.css +28 -0
- package/lib/Select/style/variables.css +28 -0
- package/lib/TreeSelect/index.js +21 -2
- package/lib/TreeSelect/style/index.css +3 -0
- package/lib/TreeSelect/style/variables.css +3 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +15 -1
- package/lib/styles/variables.css +263 -120
- package/package.json +5 -1
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import React, { useEffect, useRef, useState, useMemo } from 'react';
|
|
4
|
+
import { throttle } from 'lodash';
|
|
5
|
+
import Row from '../Row';
|
|
6
|
+
import Col from '../Col';
|
|
7
|
+
|
|
8
|
+
var icon = require('./images/icon_collapse.svg'); // 行个数 => 在24份中占用的分数
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
var rowMap = new Map([[5, [4, 1]], [4, [5, 1]], [3, [7, 1]]]);
|
|
12
|
+
|
|
13
|
+
var Title = function Title(props) {
|
|
14
|
+
var title = props.title,
|
|
15
|
+
onToggle = props.onToggle;
|
|
16
|
+
|
|
17
|
+
var _useState = useState(true),
|
|
18
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
19
|
+
visible = _useState2[0],
|
|
20
|
+
setVisible = _useState2[1];
|
|
21
|
+
|
|
22
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
className: "form_responsive_group_title",
|
|
24
|
+
onClick: function onClick() {
|
|
25
|
+
setVisible(!visible);
|
|
26
|
+
onToggle && onToggle(!visible);
|
|
27
|
+
}
|
|
28
|
+
}, /*#__PURE__*/React.createElement("h3", null, title), /*#__PURE__*/React.createElement("img", {
|
|
29
|
+
src: icon,
|
|
30
|
+
className: !visible ? 'open' : '',
|
|
31
|
+
alt: ""
|
|
32
|
+
}));
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
var List = function List(props) {
|
|
36
|
+
var customizeChildren = props.children,
|
|
37
|
+
countPerRow = props.countPerRow,
|
|
38
|
+
title = props.title,
|
|
39
|
+
user = props.user;
|
|
40
|
+
|
|
41
|
+
var _rowMap$get = rowMap.get(countPerRow),
|
|
42
|
+
_rowMap$get2 = _slicedToArray(_rowMap$get, 2),
|
|
43
|
+
colSpan = _rowMap$get2[0],
|
|
44
|
+
colSpace = _rowMap$get2[1];
|
|
45
|
+
|
|
46
|
+
var _useState3 = useState(true),
|
|
47
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
48
|
+
visible = _useState4[0],
|
|
49
|
+
setVisible = _useState4[1]; // 最终的结果
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
var rowlist = useMemo(function () {
|
|
53
|
+
var _a;
|
|
54
|
+
|
|
55
|
+
var children = []; // 收集(满了就重置)
|
|
56
|
+
|
|
57
|
+
var collection = [];
|
|
58
|
+
var result = [];
|
|
59
|
+
|
|
60
|
+
if (!Array.isArray(customizeChildren)) {
|
|
61
|
+
children = [customizeChildren];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
children = Array.prototype.slice.call(customizeChildren).flat();
|
|
65
|
+
|
|
66
|
+
if (user) {
|
|
67
|
+
result.push( /*#__PURE__*/React.createElement(Title, {
|
|
68
|
+
title: title,
|
|
69
|
+
onToggle: function onToggle(value) {
|
|
70
|
+
setVisible(value);
|
|
71
|
+
}
|
|
72
|
+
}));
|
|
73
|
+
} // 一行
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
function generatorRow() {
|
|
77
|
+
var node = /*#__PURE__*/React.createElement(Row, null, collection.map(function (child, index) {
|
|
78
|
+
if (index !== collection.length - 1) {
|
|
79
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
80
|
+
key: index
|
|
81
|
+
}, /*#__PURE__*/React.createElement(Col, {
|
|
82
|
+
span: colSpan
|
|
83
|
+
}, child), /*#__PURE__*/React.createElement(Col, {
|
|
84
|
+
span: colSpace
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return /*#__PURE__*/React.createElement(Col, {
|
|
89
|
+
span: colSpan,
|
|
90
|
+
key: index
|
|
91
|
+
}, child);
|
|
92
|
+
}));
|
|
93
|
+
result.push(node);
|
|
94
|
+
collection.length = 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
for (var i = 0; i < children.length; i += 1) {
|
|
98
|
+
var child = children[i]; // 过滤掉React.Fragment
|
|
99
|
+
|
|
100
|
+
while (child.type === Symbol.for('react.fragment')) {
|
|
101
|
+
if (Array.isArray(child.props.children)) {
|
|
102
|
+
var _children;
|
|
103
|
+
|
|
104
|
+
(_children = children).splice.apply(_children, [i, 1].concat(_toConsumableArray(child.props.children)));
|
|
105
|
+
|
|
106
|
+
child = children[i];
|
|
107
|
+
} else {
|
|
108
|
+
child = child.props.children;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (child) {
|
|
113
|
+
if ((_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.responsive) {
|
|
114
|
+
collection.push(child);
|
|
115
|
+
|
|
116
|
+
if (collection.length && collection.length === countPerRow) {
|
|
117
|
+
generatorRow();
|
|
118
|
+
}
|
|
119
|
+
} else if (collection.length) {
|
|
120
|
+
generatorRow();
|
|
121
|
+
result.push(child);
|
|
122
|
+
} else {
|
|
123
|
+
result.push(child);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (collection.length) {
|
|
129
|
+
generatorRow();
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return result;
|
|
133
|
+
}, [customizeChildren, countPerRow, user, title]);
|
|
134
|
+
var needRenderList = rowlist;
|
|
135
|
+
|
|
136
|
+
if (!visible && needRenderList.length) {
|
|
137
|
+
needRenderList = [needRenderList[0]];
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, needRenderList.map(function (child, index) {
|
|
141
|
+
return /*#__PURE__*/React.createElement(React.Fragment, {
|
|
142
|
+
key: index
|
|
143
|
+
}, child);
|
|
144
|
+
}));
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
var WrapperItem = function WrapperItem(props) {
|
|
148
|
+
var user = props.user;
|
|
149
|
+
var targetRef = useRef(null);
|
|
150
|
+
|
|
151
|
+
var _useState5 = useState({
|
|
152
|
+
width: '100%',
|
|
153
|
+
height: '100%'
|
|
154
|
+
}),
|
|
155
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
156
|
+
containerSize = _useState6[0],
|
|
157
|
+
setContainerSize = _useState6[1]; // 每行的个数
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
var _useState7 = useState(5),
|
|
161
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
162
|
+
countPerRow = _useState8[0],
|
|
163
|
+
setCountPerRow = _useState8[1];
|
|
164
|
+
|
|
165
|
+
var changeSize = function changeSize() {
|
|
166
|
+
var _a;
|
|
167
|
+
|
|
168
|
+
var maxWidth = 1824;
|
|
169
|
+
|
|
170
|
+
var _ref = ((_a = targetRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || {},
|
|
171
|
+
_ref$width = _ref.width,
|
|
172
|
+
width = _ref$width === void 0 ? '100%' : _ref$width;
|
|
173
|
+
|
|
174
|
+
if (width < 990) {
|
|
175
|
+
setCountPerRow(3);
|
|
176
|
+
} else if (width < 1390) {
|
|
177
|
+
setCountPerRow(4);
|
|
178
|
+
} else {
|
|
179
|
+
setCountPerRow(5);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
if (width !== '100%') {
|
|
183
|
+
width -= 32;
|
|
184
|
+
|
|
185
|
+
if (width > maxWidth) {
|
|
186
|
+
if (user) {
|
|
187
|
+
width = maxWidth - 64;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
setContainerSize({
|
|
193
|
+
width: width
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
var handResize = throttle(changeSize, 600);
|
|
198
|
+
useEffect(function () {
|
|
199
|
+
changeSize();
|
|
200
|
+
window.addEventListener('resize', handResize);
|
|
201
|
+
return function () {
|
|
202
|
+
window.removeEventListener('resize', handResize);
|
|
203
|
+
};
|
|
204
|
+
}, []);
|
|
205
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
206
|
+
className: "lm_container_wrapper",
|
|
207
|
+
ref: targetRef
|
|
208
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
209
|
+
style: Object.assign(Object.assign({}, containerSize), {
|
|
210
|
+
margin: '0 auto'
|
|
211
|
+
})
|
|
212
|
+
}, /*#__PURE__*/React.createElement(List, Object.assign({}, props, {
|
|
213
|
+
countPerRow: countPerRow
|
|
214
|
+
})))));
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
export default WrapperItem;
|
package/es/Form/container.js
CHANGED
|
@@ -38,19 +38,7 @@ var LMContainer = function LMContainer(props) {
|
|
|
38
38
|
var width = containerSize.width,
|
|
39
39
|
height = containerSize.height;
|
|
40
40
|
var responsiveCls = responsive && width !== '100%' ? 'responsive' : '';
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
if (responsiveCls) {
|
|
44
|
-
if (parseInt(width) < 990) {
|
|
45
|
-
lm_col = 'lm_col_3';
|
|
46
|
-
} else if (parseInt(width) < 1390) {
|
|
47
|
-
lm_col = 'lm_col_4';
|
|
48
|
-
} else {
|
|
49
|
-
lm_col = 'lm_col_5';
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
var classes = classNames(className, prefixCls, responsiveCls, lm_col);
|
|
41
|
+
var classes = classNames(className, prefixCls, responsiveCls);
|
|
54
42
|
return /*#__PURE__*/React.createElement("div", Object.assign({
|
|
55
43
|
className: classes
|
|
56
44
|
}, others, {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' fill='none' version='1.1' width='16' height='16' viewBox='0 0 16 16'><defs><clipPath id='master_svg0_sa1497_9860'><rect x='0' y='0' width='16' height='16' rx='0'/></clipPath></defs><g clipPath='url(#master_svg0_sa1497_9860)'><g style='mix-blend-mode:passthrough'><path d='M13.4609,5.384111L9.22915,10.462240000000001Q8.7494,11.03795,8,11.03795Q7.2506,11.03795,6.770849999999999,10.462240000000001L2.539067,5.384111L3.460933,4.615889L7.69271,9.69402Q7.81265,9.83795,8,9.83795Q8.18735,9.83795,8.30729,9.69402L12.53907,4.615889L13.4609,5.384111ZM13.6,5Q13.6,5.0590948000000004,13.5885,5.117054Q13.5769,5.175014,13.5543,5.22961Q13.5317,5.284207,13.4989,5.333342Q13.4661,5.382478,13.4243,5.424264Q13.3825,5.46605,13.3333,5.498882Q13.2842,5.531713,13.2296,5.554328Q13.175,5.576942,13.1171,5.588471Q13.0591,5.6,13,5.6Q12.94091,5.6,12.88295,5.588471Q12.82499,5.576942,12.77039,5.554328Q12.71579,5.531713,12.66666,5.498882Q12.61752,5.46605,12.57573,5.424264Q12.53395,5.382478,12.50112,5.333342Q12.46828,5.284207,12.44567,5.22961Q12.42306,5.175014,12.41153,5.117054Q12.4,5.0590948000000004,12.4,5Q12.4,4.9409051999999996,12.41153,4.882946Q12.42306,4.824986,12.44567,4.77039Q12.46828,4.715793,12.50112,4.666658Q12.53395,4.617522,12.57574,4.575736Q12.61752,4.53395,12.66666,4.501118Q12.71579,4.468287,12.77039,4.445672Q12.82499,4.423058,12.88295,4.411529Q12.94091,4.4,13,4.4Q13.0591,4.4,13.1171,4.411529Q13.175,4.423058,13.2296,4.445672Q13.2842,4.468287,13.3333,4.501118Q13.3825,4.53395,13.4243,4.575736Q13.4661,4.617522,13.4989,4.666658Q13.5317,4.715793,13.5543,4.77039Q13.5769,4.824986,13.5885,4.882946Q13.6,4.9409051999999996,13.6,5ZM3.6,5Q3.6,5.0590948000000004,3.588471,5.117054Q3.576942,5.175014,3.554328,5.22961Q3.531713,5.284207,3.498882,5.333342Q3.46605,5.382478,3.424264,5.424264Q3.382478,5.46605,3.333342,5.498882Q3.284207,5.531713,3.22961,5.554328Q3.175014,5.576942,3.117054,5.588471Q3.0590948,5.6,3,5.6Q2.9409052,5.6,2.882946,5.588471Q2.824986,5.576942,2.77039,5.554328Q2.715793,5.531713,2.666658,5.498882Q2.617522,5.46605,2.575736,5.424264Q2.53395,5.382478,2.501118,5.333342Q2.468287,5.284207,2.445672,5.22961Q2.423058,5.175014,2.411529,5.117054Q2.4,5.0590948000000004,2.4,5Q2.4,4.9409051999999996,2.411529,4.882946Q2.423058,4.824986,2.445672,4.77039Q2.468287,4.715793,2.501118,4.666658Q2.53395,4.617522,2.575736,4.575736Q2.617522,4.53395,2.666658,4.501118Q2.715793,4.468287,2.77039,4.445672Q2.824986,4.423058,2.882946,4.411529Q2.9409052,4.4,3,4.4Q3.0590948,4.4,3.117054,4.411529Q3.175014,4.423058,3.22961,4.445672Q3.284207,4.468287,3.333342,4.501118Q3.382478,4.53395,3.424264,4.575736Q3.46605,4.617522,3.498882,4.666658Q3.531713,4.715793,3.554328,4.77039Q3.576942,4.824986,3.588471,4.882946Q3.6,4.9409051999999996,3.6,5Z' fill='#262626' fillOpacity='1'/></g></g></svg>
|
package/es/Form/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ import type { FormItemProps } from './FormItem';
|
|
|
9
9
|
import List from './FormList';
|
|
10
10
|
import type { FormListFieldData, FormListOperation, FormListProps } from './FormList';
|
|
11
11
|
import useFormInstance from './hooks/useFormInstance';
|
|
12
|
+
import Wrapper from './FormWrapper';
|
|
12
13
|
declare type InternalFormType = typeof InternalForm;
|
|
13
14
|
interface FormInterface extends InternalFormType {
|
|
14
15
|
useForm: typeof useForm;
|
|
@@ -18,6 +19,7 @@ interface FormInterface extends InternalFormType {
|
|
|
18
19
|
List: typeof List;
|
|
19
20
|
ErrorList: typeof ErrorList;
|
|
20
21
|
Provider: typeof FormProvider;
|
|
22
|
+
Wrapper: typeof Wrapper;
|
|
21
23
|
/** @deprecated Only for warning usage. Do not use. */
|
|
22
24
|
create: () => void;
|
|
23
25
|
}
|
package/es/Form/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import InternalForm, { useForm, useWatch } from './Form';
|
|
|
5
5
|
import Item from './FormItem';
|
|
6
6
|
import List from './FormList';
|
|
7
7
|
import useFormInstance from './hooks/useFormInstance';
|
|
8
|
+
import Wrapper from './FormWrapper';
|
|
8
9
|
var Form = InternalForm;
|
|
9
10
|
Form.Item = Item;
|
|
10
11
|
Form.List = List;
|
|
@@ -18,4 +19,5 @@ Form.create = function () {
|
|
|
18
19
|
warning(false, 'Form', 'antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.');
|
|
19
20
|
};
|
|
20
21
|
|
|
22
|
+
Form.Wrapper = Wrapper;
|
|
21
23
|
export default Form;
|
package/es/Form/interface.d.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
import { FormInstance, Store } from 'rc-field-form/lib/interface';
|
|
2
|
+
import React from 'react';
|
|
1
3
|
export { InternalNamePath, NamePath, Store, StoreValue } from 'rc-field-form/lib/interface';
|
|
2
4
|
export { Options as ScrollOptions } from 'scroll-into-view-if-needed';
|
|
3
5
|
export declare type FormLabelAlign = 'left' | 'right';
|
|
6
|
+
export declare type RenderProps = (values: Store, form: FormInstance) => JSX.Element | React.ReactNode;
|
|
7
|
+
export interface ISize {
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface IWrapper {
|
|
12
|
+
children: React.ReactNode | RenderProps;
|
|
13
|
+
title?: string;
|
|
14
|
+
user?: boolean;
|
|
15
|
+
}
|
package/es/Form/style/index.css
CHANGED
|
@@ -6613,55 +6613,48 @@ p {
|
|
|
6613
6613
|
.lm_form.ant-form.ant-form-inline .ant-form-item-label {
|
|
6614
6614
|
text-align: left;
|
|
6615
6615
|
}
|
|
6616
|
-
.
|
|
6617
|
-
|
|
6618
|
-
}
|
|
6619
|
-
.lm_container_wrapper .lm_container.responsive {
|
|
6620
|
-
min-width: 990px;
|
|
6621
|
-
}
|
|
6622
|
-
.lm_container_wrapper .lm_container.responsive .lm_form.ant-form {
|
|
6623
|
-
display: flex;
|
|
6624
|
-
flex-direction: row;
|
|
6625
|
-
flex-wrap: wrap;
|
|
6626
|
-
}
|
|
6627
|
-
.lm_container_wrapper .lm_container.responsive .lm_form.ant-form .ant-form-item-responsive {
|
|
6628
|
-
margin-right: 24px;
|
|
6629
|
-
}
|
|
6630
|
-
.lm_container_wrapper .lm_container.responsive .lm_form.ant-form .ant-form-item-responsive .ant-form-item-control {
|
|
6631
|
-
width: 100%;
|
|
6616
|
+
.lm_form_responsive_box .lm_form {
|
|
6617
|
+
background: #f0f0f0;
|
|
6632
6618
|
}
|
|
6633
|
-
.
|
|
6634
|
-
|
|
6635
|
-
margin-
|
|
6636
|
-
|
|
6637
|
-
|
|
6638
|
-
width: calc(33.3333% - 16px);
|
|
6639
|
-
margin-right: 24px;
|
|
6619
|
+
.lm_form_responsive_box .lm_form > .lm_container_wrapper {
|
|
6620
|
+
background: #f0f0f0;
|
|
6621
|
+
margin-bottom: 0;
|
|
6622
|
+
border-radius: 0;
|
|
6623
|
+
padding: 16px;
|
|
6640
6624
|
}
|
|
6641
|
-
.lm_container_wrapper
|
|
6642
|
-
|
|
6625
|
+
.lm_container_wrapper {
|
|
6626
|
+
overflow: auto;
|
|
6627
|
+
background: #fff;
|
|
6628
|
+
margin-bottom: 16px;
|
|
6629
|
+
border-radius: 2px;
|
|
6630
|
+
padding: 0;
|
|
6643
6631
|
}
|
|
6644
|
-
.lm_container_wrapper .
|
|
6632
|
+
.lm_container_wrapper .ant-cascader {
|
|
6645
6633
|
width: 100%;
|
|
6646
|
-
margin-right: 0;
|
|
6647
|
-
}
|
|
6648
|
-
.lm_container_wrapper .lm_container.responsive.lm_col_4 .ant-form-item-responsive {
|
|
6649
|
-
width: calc(25% - 18px);
|
|
6650
|
-
margin-right: 24px;
|
|
6651
6634
|
}
|
|
6652
|
-
.
|
|
6653
|
-
|
|
6635
|
+
.form_responsive_group_title {
|
|
6636
|
+
display: flex;
|
|
6637
|
+
font-size: 14px;
|
|
6638
|
+
line-height: 22px;
|
|
6639
|
+
margin: 0;
|
|
6640
|
+
padding-top: 16px;
|
|
6641
|
+
color: var(--color-85);
|
|
6642
|
+
flex-basis: 100%;
|
|
6643
|
+
align-items: center;
|
|
6654
6644
|
}
|
|
6655
|
-
.
|
|
6656
|
-
|
|
6657
|
-
|
|
6645
|
+
.form_responsive_group_title h3 {
|
|
6646
|
+
flex: 1;
|
|
6647
|
+
font-weight: medium;
|
|
6648
|
+
font-size: 14px;
|
|
6658
6649
|
}
|
|
6659
|
-
.
|
|
6660
|
-
|
|
6661
|
-
|
|
6650
|
+
.form_responsive_group_title img {
|
|
6651
|
+
cursor: pointer;
|
|
6652
|
+
width: 16px;
|
|
6653
|
+
height: 16px;
|
|
6654
|
+
transition: transform 0.24s;
|
|
6662
6655
|
}
|
|
6663
|
-
.
|
|
6664
|
-
|
|
6656
|
+
.form_responsive_group_title img.open {
|
|
6657
|
+
transform: rotate(180deg);
|
|
6665
6658
|
}
|
|
6666
6659
|
.lm_form-item-tip-error .ant-form-item-explain {
|
|
6667
6660
|
width: 100%;
|
|
@@ -6101,55 +6101,48 @@
|
|
|
6101
6101
|
.lm_form.ant-form.ant-form-inline .ant-form-item-label {
|
|
6102
6102
|
text-align: left;
|
|
6103
6103
|
}
|
|
6104
|
-
.
|
|
6105
|
-
|
|
6106
|
-
}
|
|
6107
|
-
.lm_container_wrapper .lm_container.responsive {
|
|
6108
|
-
min-width: 990px;
|
|
6109
|
-
}
|
|
6110
|
-
.lm_container_wrapper .lm_container.responsive .lm_form.ant-form {
|
|
6111
|
-
display: flex;
|
|
6112
|
-
flex-direction: row;
|
|
6113
|
-
flex-wrap: wrap;
|
|
6104
|
+
.lm_form_responsive_box .lm_form {
|
|
6105
|
+
background: #f0f0f0;
|
|
6114
6106
|
}
|
|
6115
|
-
.
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
}
|
|
6121
|
-
.lm_container_wrapper .lm_container.responsive.lm_col_3 .ant-form-item {
|
|
6122
|
-
width: 100%;
|
|
6123
|
-
margin-right: 0;
|
|
6124
|
-
}
|
|
6125
|
-
.lm_container_wrapper .lm_container.responsive.lm_col_3 .ant-form-item-responsive {
|
|
6126
|
-
width: calc(33.3333% - 16px);
|
|
6127
|
-
margin-right: 24px;
|
|
6107
|
+
.lm_form_responsive_box .lm_form > .lm_container_wrapper {
|
|
6108
|
+
background: #f0f0f0;
|
|
6109
|
+
margin-bottom: 0;
|
|
6110
|
+
border-radius: 0;
|
|
6111
|
+
padding: 16px;
|
|
6128
6112
|
}
|
|
6129
|
-
.lm_container_wrapper
|
|
6130
|
-
|
|
6113
|
+
.lm_container_wrapper {
|
|
6114
|
+
overflow: auto;
|
|
6115
|
+
background: #fff;
|
|
6116
|
+
margin-bottom: 16px;
|
|
6117
|
+
border-radius: 2px;
|
|
6118
|
+
padding: 0;
|
|
6131
6119
|
}
|
|
6132
|
-
.lm_container_wrapper .
|
|
6120
|
+
.lm_container_wrapper .ant-cascader {
|
|
6133
6121
|
width: 100%;
|
|
6134
|
-
margin-right: 0;
|
|
6135
|
-
}
|
|
6136
|
-
.lm_container_wrapper .lm_container.responsive.lm_col_4 .ant-form-item-responsive {
|
|
6137
|
-
width: calc(25% - 18px);
|
|
6138
|
-
margin-right: 24px;
|
|
6139
6122
|
}
|
|
6140
|
-
.
|
|
6141
|
-
|
|
6123
|
+
.form_responsive_group_title {
|
|
6124
|
+
display: flex;
|
|
6125
|
+
font-size: 14px;
|
|
6126
|
+
line-height: 22px;
|
|
6127
|
+
margin: 0;
|
|
6128
|
+
padding-top: 16px;
|
|
6129
|
+
color: var(--color-85);
|
|
6130
|
+
flex-basis: 100%;
|
|
6131
|
+
align-items: center;
|
|
6142
6132
|
}
|
|
6143
|
-
.
|
|
6144
|
-
|
|
6145
|
-
|
|
6133
|
+
.form_responsive_group_title h3 {
|
|
6134
|
+
flex: 1;
|
|
6135
|
+
font-weight: medium;
|
|
6136
|
+
font-size: 14px;
|
|
6146
6137
|
}
|
|
6147
|
-
.
|
|
6148
|
-
|
|
6149
|
-
|
|
6138
|
+
.form_responsive_group_title img {
|
|
6139
|
+
cursor: pointer;
|
|
6140
|
+
width: 16px;
|
|
6141
|
+
height: 16px;
|
|
6142
|
+
transition: transform 0.24s;
|
|
6150
6143
|
}
|
|
6151
|
-
.
|
|
6152
|
-
|
|
6144
|
+
.form_responsive_group_title img.open {
|
|
6145
|
+
transform: rotate(180deg);
|
|
6153
6146
|
}
|
|
6154
6147
|
.lm_form-item-tip-error .ant-form-item-explain {
|
|
6155
6148
|
width: 100%;
|
package/es/IconFont/index.d.ts
CHANGED
package/es/IconFont/index.js
CHANGED
|
@@ -1,7 +1,21 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
1
3
|
import { createFromIconfontCN } from '@ant-design/icons';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
import ConfigProvider from '../ConfigProvider';
|
|
5
|
+
var ConfigContext = ConfigProvider.ConfigContext;
|
|
6
|
+
|
|
7
|
+
var IconFont = function IconFont(props) {
|
|
8
|
+
var _React$useContext = React.useContext(ConfigContext),
|
|
9
|
+
iconUrl = _React$useContext.iconUrl;
|
|
10
|
+
|
|
11
|
+
var resetUrl = useMemo(function () {
|
|
12
|
+
if (!iconUrl) return [];
|
|
13
|
+
return Array.isArray(iconUrl) ? iconUrl : [iconUrl];
|
|
14
|
+
}, [iconUrl]);
|
|
15
|
+
var Component = createFromIconfontCN({
|
|
16
|
+
scriptUrl: ['//at.alicdn.com/t/c/font_2966019_ac9pzkeuo0e.js'].concat(_toConsumableArray(resetUrl))
|
|
17
|
+
});
|
|
18
|
+
return /*#__PURE__*/React.createElement(Component, Object.assign({}, props));
|
|
19
|
+
};
|
|
5
20
|
|
|
6
|
-
});
|
|
7
21
|
export default IconFont;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconFont } from 'linkmore-design';
|
|
3
|
-
import { ZoomOutOutlined } from '@ant-design/icons';
|
|
4
3
|
|
|
5
4
|
var Operate = function Operate(_ref) {
|
|
6
5
|
var instance = _ref.instance;
|
|
@@ -20,20 +19,18 @@ var Operate = function Operate(_ref) {
|
|
|
20
19
|
onClick: function onClick(e) {
|
|
21
20
|
return handleTranform(e, 'zoomIn');
|
|
22
21
|
}
|
|
23
|
-
}), /*#__PURE__*/React.createElement(
|
|
22
|
+
}), /*#__PURE__*/React.createElement(IconFont, {
|
|
23
|
+
type: "lmweb-icon_m_narrow",
|
|
24
24
|
onClick: function onClick(e) {
|
|
25
25
|
return handleTranform(e, 'zoomOut');
|
|
26
|
-
},
|
|
27
|
-
style: {
|
|
28
|
-
fontSize: 22
|
|
29
26
|
}
|
|
30
27
|
}), /*#__PURE__*/React.createElement(IconFont, {
|
|
31
|
-
type: "lmweb-
|
|
28
|
+
type: "lmweb-icon_m_turnleft-01",
|
|
32
29
|
onClick: function onClick(e) {
|
|
33
30
|
return handleTranform(e, 'rotateLeft');
|
|
34
31
|
}
|
|
35
32
|
}), /*#__PURE__*/React.createElement(IconFont, {
|
|
36
|
-
type: "lmweb-
|
|
33
|
+
type: "lmweb-reload",
|
|
37
34
|
onClick: function onClick(e) {
|
|
38
35
|
return handleTranform(e, 'rotateRight');
|
|
39
36
|
}
|
package/es/Input/index.js
CHANGED
|
@@ -16,17 +16,27 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
16
16
|
|
|
17
17
|
import React, { forwardRef } from 'react';
|
|
18
18
|
import IconFont from '../IconFont';
|
|
19
|
+
import cn from 'classnames';
|
|
19
20
|
import SizeContext from '../ConfigProvider/SizeContext';
|
|
21
|
+
import DisabledContext from '../ConfigProvider/DisabledContext';
|
|
20
22
|
var LmInput = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
21
|
-
var
|
|
23
|
+
var className = props.className,
|
|
24
|
+
customSize = props.size,
|
|
25
|
+
customDisabled = props.disabled,
|
|
26
|
+
_props$allowClear = props.allowClear,
|
|
22
27
|
allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
rest = __rest(props // ===================== Size =====================
|
|
29
|
+
, ["className", "size", "disabled", "allowClear"]); // ===================== Size =====================
|
|
25
30
|
|
|
26
|
-
|
|
31
|
+
|
|
32
|
+
var size = customSize || React.useContext(SizeContext) || 'middle'; // ===================== Disabled =====================
|
|
33
|
+
|
|
34
|
+
var disabled = React.useContext(DisabledContext);
|
|
35
|
+
var mergedDisabled = customDisabled || disabled;
|
|
27
36
|
return /*#__PURE__*/React.createElement(_Input, Object.assign({
|
|
28
37
|
ref: ref,
|
|
29
|
-
className:
|
|
38
|
+
className: cn('lm_input', className),
|
|
39
|
+
disabled: mergedDisabled || undefined,
|
|
30
40
|
size: size
|
|
31
41
|
}, rest, {
|
|
32
42
|
allowClear: allowClear
|
|
@@ -36,27 +46,54 @@ LmInput.Group = _Input.Group;
|
|
|
36
46
|
LmInput.Search = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
37
47
|
var _props$allowClear2 = props.allowClear,
|
|
38
48
|
allowClear = _props$allowClear2 === void 0 ? true : _props$allowClear2,
|
|
39
|
-
|
|
49
|
+
className = props.className,
|
|
50
|
+
customSize = props.size,
|
|
51
|
+
customDisabled = props.disabled,
|
|
52
|
+
rest = __rest(props // ===================== Size =====================
|
|
53
|
+
, ["allowClear", "className", "size", "disabled"]); // ===================== Size =====================
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
var size = customSize || React.useContext(SizeContext) || 'middle'; // ===================== Disabled =====================
|
|
40
57
|
|
|
58
|
+
var disabled = React.useContext(DisabledContext);
|
|
59
|
+
var mergedDisabled = customDisabled || disabled;
|
|
41
60
|
return /*#__PURE__*/React.createElement(_Input.Search, Object.assign({
|
|
42
61
|
enterButton: /*#__PURE__*/React.createElement(IconFont, {
|
|
43
62
|
type: "lmweb-search"
|
|
44
63
|
})
|
|
45
64
|
}, rest, {
|
|
46
65
|
ref: ref,
|
|
66
|
+
disabled: mergedDisabled || undefined,
|
|
47
67
|
allowClear: allowClear,
|
|
48
|
-
|
|
68
|
+
size: size,
|
|
69
|
+
className: cn('lm_input_search', className)
|
|
49
70
|
}));
|
|
50
71
|
});
|
|
51
|
-
LmInput.TextArea =
|
|
72
|
+
LmInput.TextArea = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
73
|
+
var customSize = props.size,
|
|
74
|
+
customDisabled = props.disabled,
|
|
75
|
+
rest = __rest(props // ===================== Size =====================
|
|
76
|
+
, ["size", "disabled"]); // ===================== Size =====================
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
var size = customSize || React.useContext(SizeContext) || 'middle'; // ===================== Disabled =====================
|
|
80
|
+
|
|
81
|
+
var disabled = React.useContext(DisabledContext);
|
|
82
|
+
var mergedDisabled = customDisabled || disabled;
|
|
83
|
+
return /*#__PURE__*/React.createElement(_Input.TextArea, Object.assign({
|
|
84
|
+
size: size,
|
|
85
|
+
disabled: mergedDisabled || undefined
|
|
86
|
+
}, rest));
|
|
87
|
+
});
|
|
52
88
|
|
|
53
89
|
LmInput.Password = function (props) {
|
|
54
90
|
var _props$allowClear3 = props.allowClear,
|
|
55
91
|
allowClear = _props$allowClear3 === void 0 ? true : _props$allowClear3,
|
|
56
|
-
|
|
92
|
+
className = props.className,
|
|
93
|
+
rest = __rest(props, ["allowClear", "className"]);
|
|
57
94
|
|
|
58
95
|
return /*#__PURE__*/React.createElement(_Input.Password, Object.assign({
|
|
59
|
-
className:
|
|
96
|
+
className: cn('lm_input_password', className),
|
|
60
97
|
iconRender: function iconRender(visible) {
|
|
61
98
|
return visible ? /*#__PURE__*/React.createElement(IconFont, {
|
|
62
99
|
type: "lmweb-eye"
|