linkmore-design 1.1.13-alpha.0 → 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 +2660 -1507
- 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 +276 -235
- 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 +51 -15
- 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 +272 -231
- 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 +50 -14
- 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
package/es/Button/index.js
CHANGED
|
@@ -27,7 +27,8 @@ var LMButton = function LMButton(props) {
|
|
|
27
27
|
type = _props$type === void 0 ? 'default' : _props$type,
|
|
28
28
|
_props$hover = props.hover,
|
|
29
29
|
hover = _props$hover === void 0 ? false : _props$hover,
|
|
30
|
-
|
|
30
|
+
danger = props.danger,
|
|
31
|
+
restProps = __rest(props, ["children", "className", "size", "type", "hover", "danger"]);
|
|
31
32
|
|
|
32
33
|
var globalSize = customizeSize || React.useContext(SizeContext) || 'middle';
|
|
33
34
|
var size = React.useMemo(function () {
|
|
@@ -36,12 +37,12 @@ var LMButton = function LMButton(props) {
|
|
|
36
37
|
|
|
37
38
|
var classs = cls('lm-button', className, {
|
|
38
39
|
'lm-button-icon-only': !children
|
|
39
|
-
}, _defineProperty({}, "lm-button-".concat(size), size), _defineProperty({}, "lm-button-".concat(type), type), _defineProperty({}, "lm-button-".concat(type, "-hover"), type && hover));
|
|
40
|
+
}, _defineProperty({}, "lm-button-danger", danger), _defineProperty({}, "lm-button-".concat(size), size), _defineProperty({}, "lm-button-".concat(type), type), _defineProperty({}, "lm-button-".concat(type, "-hover"), type && hover));
|
|
40
41
|
return /*#__PURE__*/React.createElement(_Button, Object.assign({}, restProps, {
|
|
41
42
|
className: classs,
|
|
42
43
|
size: size,
|
|
43
44
|
type: type,
|
|
44
|
-
danger: !!
|
|
45
|
+
danger: !!danger
|
|
45
46
|
}), children);
|
|
46
47
|
};
|
|
47
48
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
.ant-btn.lm-button {
|
|
2
|
-
border: 0;
|
|
3
2
|
display: inline-flex !important;
|
|
4
3
|
flex-direction: row;
|
|
5
4
|
align-items: center;
|
|
6
5
|
justify-content: center;
|
|
6
|
+
color: var(--font-color);
|
|
7
7
|
vertical-align: middle;
|
|
8
|
+
border: 1px solid var(--stroke-color);
|
|
8
9
|
box-shadow: none;
|
|
9
10
|
}
|
|
10
11
|
.ant-btn.lm-button .anticon {
|
|
@@ -22,12 +23,24 @@
|
|
|
22
23
|
white-space: nowrap;
|
|
23
24
|
}
|
|
24
25
|
.ant-btn.lm-button::before {
|
|
25
|
-
|
|
26
|
+
position: absolute;
|
|
27
|
+
z-index: 1;
|
|
28
|
+
display: none;
|
|
29
|
+
background: #fff;
|
|
30
|
+
border-radius: inherit;
|
|
31
|
+
opacity: 0.35;
|
|
32
|
+
transition: opacity 0.2s;
|
|
33
|
+
content: '';
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
inset: -1px;
|
|
36
|
+
}
|
|
37
|
+
.ant-btn.lm-button.ant-btn-loading::before {
|
|
38
|
+
display: block;
|
|
26
39
|
}
|
|
27
40
|
.ant-btn.lm-button:disabled {
|
|
41
|
+
color: var(--disabled-font-color) !important;
|
|
28
42
|
background: var(--disabled-bg-color) !important;
|
|
29
43
|
border: 1px solid var(--disabled-border-color) !important;
|
|
30
|
-
color: var(--disabled-font-color) !important;
|
|
31
44
|
}
|
|
32
45
|
.ant-btn.lm-button > span:not(.anticon) {
|
|
33
46
|
font-size: 12px;
|
|
@@ -48,57 +61,46 @@
|
|
|
48
61
|
.ant-btn.lm-button-middle .anticon {
|
|
49
62
|
font-size: 16px;
|
|
50
63
|
}
|
|
51
|
-
.ant-btn.lm-button-default {
|
|
52
|
-
border: 1px solid var(--stroke-color);
|
|
53
|
-
color: var(--font-color);
|
|
54
|
-
}
|
|
55
|
-
.ant-btn.lm-button-default-hover,
|
|
56
|
-
.ant-btn.lm-button-default:hover {
|
|
57
|
-
border: 1px solid var(--primary-hover-color);
|
|
58
|
-
color: var(--primary-hover-color);
|
|
59
|
-
}
|
|
60
|
-
.ant-btn.lm-button-default.ant-btn-loading {
|
|
61
|
-
border-color: rgba(0, 0, 0, 0.15);
|
|
62
|
-
color: rgba(0, 0, 0, 0.15);
|
|
63
|
-
}
|
|
64
64
|
.ant-btn.lm-button-primary {
|
|
65
|
-
background: var(--primary-color);
|
|
66
65
|
color: #fff;
|
|
66
|
+
background: var(--primary-color);
|
|
67
|
+
border-color: var(--primary-color);
|
|
67
68
|
}
|
|
68
|
-
.ant-btn.lm-button-primary-hover,
|
|
69
69
|
.ant-btn.lm-button-primary:hover {
|
|
70
70
|
background: var(--primary-hover-color);
|
|
71
71
|
}
|
|
72
|
+
.ant-btn.lm-button-primary:active {
|
|
73
|
+
background-color: var(--primary-click-color);
|
|
74
|
+
}
|
|
72
75
|
.ant-btn.lm-button-primary.ant-btn-loading {
|
|
73
76
|
background: var(--primary-loading-color);
|
|
74
77
|
}
|
|
75
78
|
.ant-btn.lm-button-ghost {
|
|
76
79
|
color: var(--font-color);
|
|
77
|
-
border-color: var(--color-15);
|
|
78
80
|
background: transparent;
|
|
81
|
+
border: 1px solid var(--color-15);
|
|
79
82
|
}
|
|
80
83
|
.ant-btn.lm-button-danger {
|
|
81
|
-
border: 1px solid var(--error-color);
|
|
82
84
|
color: var(--error-color);
|
|
83
85
|
text-shadow: none;
|
|
86
|
+
border: 1px solid var(--error-color);
|
|
84
87
|
box-shadow: none;
|
|
85
88
|
}
|
|
86
|
-
.ant-btn.lm-button-danger-hover,
|
|
87
89
|
.ant-btn.lm-button-danger:hover {
|
|
88
|
-
border-color: var(--error-hover-color);
|
|
89
90
|
color: var(--error-hover-color);
|
|
91
|
+
border-color: var(--error-hover-color);
|
|
90
92
|
}
|
|
91
93
|
.ant-btn.lm-button-danger.ant-btn-loading {
|
|
92
|
-
border-color: var(--error-loading-color);
|
|
93
94
|
color: var(--error-hover-color);
|
|
95
|
+
border-color: var(--error-loading-color);
|
|
94
96
|
}
|
|
95
97
|
.ant-btn.lm-button-dashed {
|
|
96
98
|
border: 1px dashed var(--color-15);
|
|
97
99
|
}
|
|
98
100
|
.ant-btn.lm-button-link {
|
|
99
101
|
color: var(--primary-color);
|
|
102
|
+
border-color: transparent;
|
|
100
103
|
}
|
|
101
|
-
.ant-btn.lm-button-link-hover,
|
|
102
104
|
.ant-btn.lm-button-link:hover {
|
|
103
105
|
color: var(--primary-hover-color);
|
|
104
106
|
}
|
|
@@ -106,11 +108,12 @@
|
|
|
106
108
|
color: var(--primary-loading-color);
|
|
107
109
|
}
|
|
108
110
|
.ant-btn.lm-button-link[disabled] {
|
|
109
|
-
border: 0 !important;
|
|
110
111
|
background: transparent !important;
|
|
112
|
+
border: 0 !important;
|
|
111
113
|
}
|
|
112
114
|
.ant-btn.ant-btn-text {
|
|
113
115
|
background: transparent;
|
|
116
|
+
border-color: transparent;
|
|
114
117
|
}
|
|
115
118
|
.ant-btn.lm-button-icon-only .anticon {
|
|
116
119
|
font-size: 16px;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
.ant-btn.lm-button {
|
|
2
|
-
border: 0;
|
|
3
2
|
display: inline-flex !important;
|
|
4
3
|
flex-direction: row;
|
|
5
4
|
align-items: center;
|
|
6
5
|
justify-content: center;
|
|
6
|
+
color: var(--font-color);
|
|
7
7
|
vertical-align: middle;
|
|
8
|
+
border: 1px solid var(--stroke-color);
|
|
8
9
|
box-shadow: none;
|
|
9
10
|
}
|
|
10
11
|
.ant-btn.lm-button .anticon {
|
|
@@ -22,12 +23,24 @@
|
|
|
22
23
|
white-space: nowrap;
|
|
23
24
|
}
|
|
24
25
|
.ant-btn.lm-button::before {
|
|
25
|
-
|
|
26
|
+
position: absolute;
|
|
27
|
+
z-index: 1;
|
|
28
|
+
display: none;
|
|
29
|
+
background: #fff;
|
|
30
|
+
border-radius: inherit;
|
|
31
|
+
opacity: 0.35;
|
|
32
|
+
transition: opacity 0.2s;
|
|
33
|
+
content: '';
|
|
34
|
+
pointer-events: none;
|
|
35
|
+
inset: -1px;
|
|
36
|
+
}
|
|
37
|
+
.ant-btn.lm-button.ant-btn-loading::before {
|
|
38
|
+
display: block;
|
|
26
39
|
}
|
|
27
40
|
.ant-btn.lm-button:disabled {
|
|
41
|
+
color: var(--disabled-font-color) !important;
|
|
28
42
|
background: var(--disabled-bg-color) !important;
|
|
29
43
|
border: 1px solid var(--disabled-border-color) !important;
|
|
30
|
-
color: var(--disabled-font-color) !important;
|
|
31
44
|
}
|
|
32
45
|
.ant-btn.lm-button > span:not(.anticon) {
|
|
33
46
|
font-size: 12px;
|
|
@@ -48,57 +61,46 @@
|
|
|
48
61
|
.ant-btn.lm-button-middle .anticon {
|
|
49
62
|
font-size: 16px;
|
|
50
63
|
}
|
|
51
|
-
.ant-btn.lm-button-default {
|
|
52
|
-
border: 1px solid var(--stroke-color);
|
|
53
|
-
color: var(--font-color);
|
|
54
|
-
}
|
|
55
|
-
.ant-btn.lm-button-default-hover,
|
|
56
|
-
.ant-btn.lm-button-default:hover {
|
|
57
|
-
border: 1px solid var(--primary-hover-color);
|
|
58
|
-
color: var(--primary-hover-color);
|
|
59
|
-
}
|
|
60
|
-
.ant-btn.lm-button-default.ant-btn-loading {
|
|
61
|
-
border-color: rgba(0, 0, 0, 0.15);
|
|
62
|
-
color: rgba(0, 0, 0, 0.15);
|
|
63
|
-
}
|
|
64
64
|
.ant-btn.lm-button-primary {
|
|
65
|
-
background: var(--primary-color);
|
|
66
65
|
color: #fff;
|
|
66
|
+
background: var(--primary-color);
|
|
67
|
+
border-color: var(--primary-color);
|
|
67
68
|
}
|
|
68
|
-
.ant-btn.lm-button-primary-hover,
|
|
69
69
|
.ant-btn.lm-button-primary:hover {
|
|
70
70
|
background: var(--primary-hover-color);
|
|
71
71
|
}
|
|
72
|
+
.ant-btn.lm-button-primary:active {
|
|
73
|
+
background-color: var(--primary-click-color);
|
|
74
|
+
}
|
|
72
75
|
.ant-btn.lm-button-primary.ant-btn-loading {
|
|
73
76
|
background: var(--primary-loading-color);
|
|
74
77
|
}
|
|
75
78
|
.ant-btn.lm-button-ghost {
|
|
76
79
|
color: var(--font-color);
|
|
77
|
-
border-color: var(--color-15);
|
|
78
80
|
background: transparent;
|
|
81
|
+
border: 1px solid var(--color-15);
|
|
79
82
|
}
|
|
80
83
|
.ant-btn.lm-button-danger {
|
|
81
|
-
border: 1px solid var(--error-color);
|
|
82
84
|
color: var(--error-color);
|
|
83
85
|
text-shadow: none;
|
|
86
|
+
border: 1px solid var(--error-color);
|
|
84
87
|
box-shadow: none;
|
|
85
88
|
}
|
|
86
|
-
.ant-btn.lm-button-danger-hover,
|
|
87
89
|
.ant-btn.lm-button-danger:hover {
|
|
88
|
-
border-color: var(--error-hover-color);
|
|
89
90
|
color: var(--error-hover-color);
|
|
91
|
+
border-color: var(--error-hover-color);
|
|
90
92
|
}
|
|
91
93
|
.ant-btn.lm-button-danger.ant-btn-loading {
|
|
92
|
-
border-color: var(--error-loading-color);
|
|
93
94
|
color: var(--error-hover-color);
|
|
95
|
+
border-color: var(--error-loading-color);
|
|
94
96
|
}
|
|
95
97
|
.ant-btn.lm-button-dashed {
|
|
96
98
|
border: 1px dashed var(--color-15);
|
|
97
99
|
}
|
|
98
100
|
.ant-btn.lm-button-link {
|
|
99
101
|
color: var(--primary-color);
|
|
102
|
+
border-color: transparent;
|
|
100
103
|
}
|
|
101
|
-
.ant-btn.lm-button-link-hover,
|
|
102
104
|
.ant-btn.lm-button-link:hover {
|
|
103
105
|
color: var(--primary-hover-color);
|
|
104
106
|
}
|
|
@@ -106,11 +108,12 @@
|
|
|
106
108
|
color: var(--primary-loading-color);
|
|
107
109
|
}
|
|
108
110
|
.ant-btn.lm-button-link[disabled] {
|
|
109
|
-
border: 0 !important;
|
|
110
111
|
background: transparent !important;
|
|
112
|
+
border: 0 !important;
|
|
111
113
|
}
|
|
112
114
|
.ant-btn.ant-btn-text {
|
|
113
115
|
background: transparent;
|
|
116
|
+
border-color: transparent;
|
|
114
117
|
}
|
|
115
118
|
.ant-btn.lm-button-icon-only .anticon {
|
|
116
119
|
font-size: 16px;
|
package/es/Cascader/index.js
CHANGED
|
@@ -16,6 +16,8 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
16
16
|
|
|
17
17
|
import React from 'react';
|
|
18
18
|
import classNames from 'classnames';
|
|
19
|
+
import DisabledContext from '../ConfigProvider/DisabledContext';
|
|
20
|
+
import SizeContext from '../ConfigProvider/SizeContext';
|
|
19
21
|
var prefixCls = 'lm_cascader';
|
|
20
22
|
var prefixDropdownCls = 'lm_cascader_dropdown';
|
|
21
23
|
|
|
@@ -25,13 +27,39 @@ var LMCascader = function LMCascader(props) {
|
|
|
25
27
|
dropdownClassName = props.dropdownClassName,
|
|
26
28
|
_props$placeholder = props.placeholder,
|
|
27
29
|
placeholder = _props$placeholder === void 0 ? '请选择' : _props$placeholder,
|
|
28
|
-
|
|
30
|
+
defaultLabel = props.defaultLabel,
|
|
31
|
+
customDisabled = props.disabled,
|
|
32
|
+
customizeSize = props.size,
|
|
33
|
+
others = __rest(props // ===================== Disabled =====================
|
|
34
|
+
, ["children", "className", "dropdownClassName", "placeholder", "defaultLabel", "disabled", "size"]); // ===================== Disabled =====================
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
var disabled = React.useContext(DisabledContext);
|
|
38
|
+
var size = React.useContext(SizeContext);
|
|
39
|
+
var mergeSize = customizeSize || size;
|
|
40
|
+
var mergedDisabled = customDisabled || disabled;
|
|
41
|
+
|
|
42
|
+
var displayRender = function displayRender(label, selectedOptions) {
|
|
43
|
+
var hasUndefined = selectedOptions.some(function (v) {
|
|
44
|
+
return !v;
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
if (hasUndefined && defaultLabel) {
|
|
48
|
+
return defaultLabel;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return label.join('/');
|
|
52
|
+
};
|
|
29
53
|
|
|
30
54
|
return /*#__PURE__*/React.createElement(_Cascader, Object.assign({
|
|
31
55
|
placeholder: placeholder,
|
|
32
56
|
className: classNames(prefixCls, className),
|
|
33
|
-
dropdownClassName: classNames(prefixDropdownCls, dropdownClassName)
|
|
34
|
-
|
|
57
|
+
dropdownClassName: classNames(prefixDropdownCls, dropdownClassName),
|
|
58
|
+
displayRender: displayRender
|
|
59
|
+
}, others, {
|
|
60
|
+
size: mergeSize,
|
|
61
|
+
disabled: mergedDisabled
|
|
62
|
+
}));
|
|
35
63
|
};
|
|
36
64
|
|
|
37
65
|
export default LMCascader;
|
|
@@ -44,6 +44,7 @@ export interface ConfigConsumerProps {
|
|
|
44
44
|
requiredMark?: RequiredMark;
|
|
45
45
|
colon?: boolean;
|
|
46
46
|
};
|
|
47
|
+
iconUrl?: string | Array<string>;
|
|
47
48
|
}
|
|
48
49
|
export declare const ConfigContext: React.Context<ConfigConsumerProps>;
|
|
49
50
|
export declare const ConfigConsumer: React.Consumer<ConfigConsumerProps>;
|
|
@@ -14,7 +14,7 @@ import { registerTheme } from './cssVariables';
|
|
|
14
14
|
import { DisabledContextProvider } from './DisabledContext';
|
|
15
15
|
import SizeContext, { SizeContextProvider } from './SizeContext';
|
|
16
16
|
export { ConfigContext, ConfigConsumer };
|
|
17
|
-
export var configConsumerProps = ['getTargetContainer', 'getPopupContainer', 'rootPrefixCls', 'getPrefixCls', 'renderEmpty', 'csp', 'autoInsertSpaceInButton', 'locale', 'pageHeader']; // These props is used by `useContext` directly in sub component
|
|
17
|
+
export var configConsumerProps = ['getTargetContainer', 'getPopupContainer', 'rootPrefixCls', 'getPrefixCls', 'renderEmpty', 'csp', 'autoInsertSpaceInButton', 'locale', 'pageHeader', 'iconUrl']; // These props is used by `useContext` directly in sub component
|
|
18
18
|
|
|
19
19
|
var PASSED_PROPS = ['getTargetContainer', 'getPopupContainer', 'renderEmpty', 'pageHeader', 'input', 'pagination', 'form'];
|
|
20
20
|
export var defaultPrefixCls = ''; //'ant';
|
|
@@ -94,7 +94,8 @@ var ProviderChildren = function ProviderChildren(props) {
|
|
|
94
94
|
legacyLocale = props.legacyLocale,
|
|
95
95
|
parentContext = props.parentContext,
|
|
96
96
|
iconPrefixCls = props.iconPrefixCls,
|
|
97
|
-
componentDisabled = props.componentDisabled
|
|
97
|
+
componentDisabled = props.componentDisabled,
|
|
98
|
+
iconUrl = props.iconUrl;
|
|
98
99
|
var getPrefixCls = React.useCallback(function (suffixCls, customizePrefixCls) {
|
|
99
100
|
var prefixCls = props.prefixCls;
|
|
100
101
|
if (customizePrefixCls) return customizePrefixCls;
|
|
@@ -109,7 +110,8 @@ var ProviderChildren = function ProviderChildren(props) {
|
|
|
109
110
|
space: space,
|
|
110
111
|
virtual: virtual,
|
|
111
112
|
dropdownMatchSelectWidth: dropdownMatchSelectWidth,
|
|
112
|
-
getPrefixCls: getPrefixCls
|
|
113
|
+
getPrefixCls: getPrefixCls,
|
|
114
|
+
iconUrl: iconUrl
|
|
113
115
|
}); // Pass the props used by `useContext` directly with child component.
|
|
114
116
|
// These props should merged into `config`.
|
|
115
117
|
|
package/es/Descriptions/Cell.js
CHANGED
|
@@ -10,6 +10,7 @@ var Cell = function Cell(_ref) {
|
|
|
10
10
|
var itemPrefixCls = _ref.itemPrefixCls,
|
|
11
11
|
component = _ref.component,
|
|
12
12
|
span = _ref.span,
|
|
13
|
+
rowSpan = _ref.rowSpan,
|
|
13
14
|
className = _ref.className,
|
|
14
15
|
style = _ref.style,
|
|
15
16
|
labelStyle = _ref.labelStyle,
|
|
@@ -26,7 +27,8 @@ var Cell = function Cell(_ref) {
|
|
|
26
27
|
return /*#__PURE__*/React.createElement(Component, {
|
|
27
28
|
className: classNames((_classNames = {}, _defineProperty(_classNames, "".concat(itemPrefixCls, "-item-label"), notEmpty(label)), _defineProperty(_classNames, "".concat(itemPrefixCls, "-item-content"), notEmpty(content)), _classNames), className),
|
|
28
29
|
style: style,
|
|
29
|
-
colSpan: span
|
|
30
|
+
colSpan: span,
|
|
31
|
+
rowSpan: rowSpan
|
|
30
32
|
}, notEmpty(label) && /*#__PURE__*/React.createElement("span", {
|
|
31
33
|
style: labelStyle
|
|
32
34
|
}, label), notEmpty(content) && /*#__PURE__*/React.createElement("span", {
|
|
@@ -37,7 +39,8 @@ var Cell = function Cell(_ref) {
|
|
|
37
39
|
return /*#__PURE__*/React.createElement(Component, {
|
|
38
40
|
className: classNames("".concat(itemPrefixCls, "-item"), className),
|
|
39
41
|
style: style,
|
|
40
|
-
colSpan: span
|
|
42
|
+
colSpan: span,
|
|
43
|
+
rowSpan: rowSpan
|
|
41
44
|
}, /*#__PURE__*/React.createElement("div", {
|
|
42
45
|
className: "".concat(itemPrefixCls, "-item-container")
|
|
43
46
|
}, (label || label === 0) && /*#__PURE__*/React.createElement("span", {
|
package/es/Descriptions/Row.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { DescriptionsContext } from
|
|
2
|
+
import { DescriptionsContext } from ".";
|
|
3
3
|
import Cell from './Cell';
|
|
4
4
|
|
|
5
5
|
function renderCells(items, _ref, _ref2) {
|
|
@@ -24,6 +24,8 @@ function renderCells(items, _ref, _ref2) {
|
|
|
24
24
|
contentStyle = _ref3$props.contentStyle,
|
|
25
25
|
_ref3$props$span = _ref3$props.span,
|
|
26
26
|
span = _ref3$props$span === void 0 ? 1 : _ref3$props$span,
|
|
27
|
+
_ref3$props$rowSpan = _ref3$props.rowSpan,
|
|
28
|
+
rowSpan = _ref3$props$rowSpan === void 0 ? 1 : _ref3$props$rowSpan,
|
|
27
29
|
key = _ref3.key;
|
|
28
30
|
|
|
29
31
|
if (typeof component === 'string') {
|
|
@@ -34,6 +36,7 @@ function renderCells(items, _ref, _ref2) {
|
|
|
34
36
|
labelStyle: Object.assign(Object.assign({}, rootLabelStyle), labelStyle),
|
|
35
37
|
contentStyle: Object.assign(Object.assign({}, rootContentStyle), contentStyle),
|
|
36
38
|
span: span,
|
|
39
|
+
rowSpan: rowSpan,
|
|
37
40
|
colon: colon,
|
|
38
41
|
component: component,
|
|
39
42
|
itemPrefixCls: itemPrefixCls,
|
|
@@ -48,6 +51,7 @@ function renderCells(items, _ref, _ref2) {
|
|
|
48
51
|
className: className,
|
|
49
52
|
style: Object.assign(Object.assign(Object.assign({}, rootLabelStyle), style), labelStyle),
|
|
50
53
|
span: 1,
|
|
54
|
+
rowSpan: rowSpan,
|
|
51
55
|
colon: colon,
|
|
52
56
|
component: component[0],
|
|
53
57
|
itemPrefixCls: itemPrefixCls,
|
|
@@ -58,6 +62,7 @@ function renderCells(items, _ref, _ref2) {
|
|
|
58
62
|
className: className,
|
|
59
63
|
style: Object.assign(Object.assign(Object.assign({}, rootContentStyle), style), contentStyle),
|
|
60
64
|
span: span * 2 - 1,
|
|
65
|
+
rowSpan: rowSpan,
|
|
61
66
|
component: component[1],
|
|
62
67
|
itemPrefixCls: itemPrefixCls,
|
|
63
68
|
bordered: bordered,
|
|
@@ -21,7 +21,7 @@ export interface DescriptionsProps {
|
|
|
21
21
|
contentStyle?: React.CSSProperties;
|
|
22
22
|
containerType?: 'default' | 'drawer' | 'modal';
|
|
23
23
|
}
|
|
24
|
-
declare function Descriptions({ prefixCls: customizePrefixCls, title, extra, column, colon, bordered, layout, children, className, style, size, labelStyle, contentStyle, containerType }: DescriptionsProps): JSX.Element;
|
|
24
|
+
declare function Descriptions({ prefixCls: customizePrefixCls, title, extra, column, colon, bordered, layout, children, className, style, size, labelStyle, contentStyle, containerType, }: DescriptionsProps): JSX.Element;
|
|
25
25
|
declare namespace Descriptions {
|
|
26
26
|
var Item: React.FC<import("./Item").DescriptionsItemProps>;
|
|
27
27
|
}
|
package/es/Descriptions/index.js
CHANGED
|
@@ -143,9 +143,9 @@ function Descriptions(_ref) {
|
|
|
143
143
|
value: contextValue
|
|
144
144
|
}, /*#__PURE__*/React.createElement("div", {
|
|
145
145
|
className: classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-").concat(size), size && size !== 'default'), _defineProperty(_classNames, "".concat(prefixCls, "-bordered"), !!bordered), _defineProperty(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className, 'lm_descriptions', {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
lm_descriptions_default: containerType === 'default',
|
|
147
|
+
lm_descriptions_drawer: containerType === 'drawer',
|
|
148
|
+
lm_descriptions_modal: containerType === 'modal'
|
|
149
149
|
}),
|
|
150
150
|
style: style
|
|
151
151
|
}, (title || extra) && /*#__PURE__*/React.createElement("div", {
|
|
@@ -665,6 +665,9 @@ p {
|
|
|
665
665
|
padding-right: 24px;
|
|
666
666
|
padding-bottom: 8px;
|
|
667
667
|
}
|
|
668
|
+
.lm_descriptions .ant-descriptions-item:last-child {
|
|
669
|
+
padding-right: 0;
|
|
670
|
+
}
|
|
668
671
|
.lm_descriptions .ant-descriptions-item .ant-descriptions-item-container {
|
|
669
672
|
color: var(--color-85);
|
|
670
673
|
font-size: 12px;
|
|
@@ -153,6 +153,9 @@
|
|
|
153
153
|
padding-right: 24px;
|
|
154
154
|
padding-bottom: 8px;
|
|
155
155
|
}
|
|
156
|
+
.lm_descriptions .ant-descriptions-item:last-child {
|
|
157
|
+
padding-right: 0;
|
|
158
|
+
}
|
|
156
159
|
.lm_descriptions .ant-descriptions-item .ant-descriptions-item-container {
|
|
157
160
|
color: var(--color-85);
|
|
158
161
|
font-size: 12px;
|
package/es/Form/Form.js
CHANGED
|
@@ -24,7 +24,7 @@ import DisabledContext, { DisabledContextProvider } from '../ConfigProvider/Disa
|
|
|
24
24
|
import SizeContext, { SizeContextProvider } from '../ConfigProvider/SizeContext';
|
|
25
25
|
import { FormContext } from './context';
|
|
26
26
|
import useForm from './hooks/useForm';
|
|
27
|
-
import
|
|
27
|
+
import WrapperItem from './WrapperItem';
|
|
28
28
|
|
|
29
29
|
var InternalForm = function InternalForm(props, ref) {
|
|
30
30
|
var _classNames;
|
|
@@ -58,8 +58,10 @@ var InternalForm = function InternalForm(props, ref) {
|
|
|
58
58
|
onFinishFailed = props.onFinishFailed,
|
|
59
59
|
name = props.name,
|
|
60
60
|
responsive = props.responsive,
|
|
61
|
-
|
|
61
|
+
customizeChildren = props.children,
|
|
62
|
+
restFormProps = __rest(props, ["prefixCls", "className", "size", "disabled", "form", "colon", "labelAlign", "labelWrap", "labelCol", "wrapperCol", "hideRequiredMark", "layout", "scrollToFirstError", "requiredMark", "onFinishFailed", "name", "responsive", "children"]);
|
|
62
63
|
|
|
64
|
+
var children = customizeChildren;
|
|
63
65
|
var mergedRequiredMark = useMemo(function () {
|
|
64
66
|
if (requiredMark !== undefined) {
|
|
65
67
|
return requiredMark;
|
|
@@ -118,6 +120,12 @@ var InternalForm = function InternalForm(props, ref) {
|
|
|
118
120
|
}
|
|
119
121
|
};
|
|
120
122
|
|
|
123
|
+
if (responsive) {
|
|
124
|
+
children = /*#__PURE__*/React.createElement(WrapperItem, {
|
|
125
|
+
children: children
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
|
|
121
129
|
var formNode = /*#__PURE__*/React.createElement(DisabledContextProvider, {
|
|
122
130
|
disabled: disabled
|
|
123
131
|
}, /*#__PURE__*/React.createElement(SizeContextProvider, {
|
|
@@ -127,6 +135,7 @@ var InternalForm = function InternalForm(props, ref) {
|
|
|
127
135
|
}, /*#__PURE__*/React.createElement(FieldForm, Object.assign({
|
|
128
136
|
id: name
|
|
129
137
|
}, restFormProps, {
|
|
138
|
+
children: children,
|
|
130
139
|
name: name,
|
|
131
140
|
onFinishFailed: onInternalFinishFailed,
|
|
132
141
|
form: wrapForm,
|
|
@@ -134,8 +143,8 @@ var InternalForm = function InternalForm(props, ref) {
|
|
|
134
143
|
})))));
|
|
135
144
|
|
|
136
145
|
if (responsive) {
|
|
137
|
-
return /*#__PURE__*/React.createElement(
|
|
138
|
-
|
|
146
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
147
|
+
className: "lm_form_responsive_box"
|
|
139
148
|
}, formNode);
|
|
140
149
|
}
|
|
141
150
|
|
|
@@ -119,17 +119,8 @@ export default function ItemHolder(props) {
|
|
|
119
119
|
}, [mergedValidateStatus, hasFeedback]); // ======================== Render ========================
|
|
120
120
|
|
|
121
121
|
var itemClassName = (_itemClassName = {}, _defineProperty(_itemClassName, itemPrefixCls, true), _defineProperty(_itemClassName, "".concat(itemPrefixCls, "-with-help"), hasHelp || debounceErrors.length || debounceWarnings.length), _defineProperty(_itemClassName, "".concat(className), !!className), _defineProperty(_itemClassName, "".concat(itemPrefixCls, "-has-feedback"), mergedValidateStatus && hasFeedback), _defineProperty(_itemClassName, "".concat(itemPrefixCls, "-has-success"), mergedValidateStatus === 'success'), _defineProperty(_itemClassName, "".concat(itemPrefixCls, "-has-warning"), mergedValidateStatus === 'warning'), _defineProperty(_itemClassName, "".concat(itemPrefixCls, "-has-error"), mergedValidateStatus === 'error'), _defineProperty(_itemClassName, "".concat(itemPrefixCls, "-is-validating"), mergedValidateStatus === 'validating'), _defineProperty(_itemClassName, "".concat(itemPrefixCls, "-hidden"), hidden), _defineProperty(_itemClassName, 'lm_form-item-tip-error lm_form-item-tip-error-top', errorPlacement === 'top'), _defineProperty(_itemClassName, 'lm_form-item-tip-error lm_form-item-tip-error-left', errorPlacement === 'left'), _defineProperty(_itemClassName, 'lm_form-item-tip-error lm_form-item-tip-error-right', errorPlacement === 'right'), _defineProperty(_itemClassName, 'lm_form-item-tip-error lm_form-item-tip-error-bottom', errorPlacement === 'bottom'), _defineProperty(_itemClassName, 'ant-form-item-responsive', responsive), _itemClassName);
|
|
122
|
-
var nthCls = '';
|
|
123
|
-
|
|
124
|
-
if (itemRef.current && itemRef.current.classList) {
|
|
125
|
-
var list = itemRef.current.classList;
|
|
126
|
-
if (list.contains('nth-three')) nthCls = 'nth-three';
|
|
127
|
-
if (list.contains('nth-four')) nthCls = 'nth-four';
|
|
128
|
-
if (list.contains('nth-five')) nthCls = 'nth-five';
|
|
129
|
-
}
|
|
130
|
-
|
|
131
122
|
return /*#__PURE__*/React.createElement("div", {
|
|
132
|
-
className: classNames(itemClassName
|
|
123
|
+
className: classNames(itemClassName),
|
|
133
124
|
style: style,
|
|
134
125
|
ref: itemRef
|
|
135
126
|
}, /*#__PURE__*/React.createElement(Row, Object.assign({
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import WrapperItem from './WrapperItem';
|
|
3
|
+
|
|
4
|
+
function withComponent(WrappedComponent) {
|
|
5
|
+
var WithComponent = function WithComponent(props) {
|
|
6
|
+
return /*#__PURE__*/React.createElement(WrappedComponent, Object.assign({}, props, {
|
|
7
|
+
with: true
|
|
8
|
+
}));
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
|
12
|
+
WithComponent.displayName = "withComponent(".concat(wrappedComponentName, ")");
|
|
13
|
+
return WithComponent;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
var FormWrapper = function FormWrapper(props) {
|
|
17
|
+
return /*#__PURE__*/React.createElement(WrapperItem, Object.assign({}, props, {
|
|
18
|
+
user: true
|
|
19
|
+
}));
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default withComponent(FormWrapper);
|