linkmore-design 1.0.54 → 1.0.57
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/Affix/demos/basic.d.ts +2 -0
- package/dist/Affix/index.d.ts +54 -0
- package/dist/Affix/style/index.d.ts +1 -0
- package/dist/Affix/utils.d.ts +15 -0
- package/dist/Button/index.d.ts +4 -0
- package/dist/CardTable/card/PictureTextRowOperate.d.ts +7 -0
- package/dist/CardTable/fns/index.d.ts +1 -5
- package/dist/CustomTableOption/cardSort.d.ts +4 -0
- package/dist/CustomTableOption/index.d.ts +1 -0
- package/dist/DatePicker/PickerButton.d.ts +2 -0
- package/dist/DatePicker/PickerTag.d.ts +2 -0
- package/dist/DatePicker/demos/basic.d.ts +2 -0
- package/dist/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
- package/dist/DatePicker/generatePicker/generateSinglePicker.d.ts +14 -0
- package/dist/DatePicker/generatePicker/index.d.ts +106 -0
- package/dist/DatePicker/generatePicker/interface.d.ts +12 -0
- package/dist/DatePicker/index.d.ts +17 -0
- package/dist/DatePicker/style/index.d.ts +1 -0
- package/dist/DatePicker/util.d.ts +14 -0
- package/dist/IconFont/index.d.ts +1 -1
- package/dist/LmEditTable/demos/basic copy.d.ts +2 -0
- package/dist/LmFilter/Controls/CheckboxTags.d.ts +6 -0
- package/dist/LmFilter/Controls/index.d.ts +2 -0
- package/dist/LmFilter/LmFilter.d.ts +4 -1
- package/dist/LmFilter/{components → baseFilter}/fuzzySearch.d.ts +0 -0
- package/dist/LmFilter/complexFilter/drawer.d.ts +4 -0
- package/dist/LmFilter/complexFilter/index.d.ts +3 -1
- package/dist/LmFilter/complexFilter/valueDrawer.d.ts +4 -0
- package/dist/LmFilter/localization.d.ts +8 -0
- package/dist/LmFilter/utils.d.ts +1 -0
- package/dist/QuickMenu/demos/basic.d.ts +2 -0
- package/dist/QuickMenu/index.d.ts +14 -0
- package/dist/QuickMenu/style/index.d.ts +1 -0
- package/dist/Switch/demos/table.d.ts +2 -0
- package/dist/Switch/index.d.ts +2 -1
- package/dist/Tag/demos/ExigencyTag.d.ts +2 -0
- package/dist/Tag/index.d.ts +4 -0
- package/dist/Upload/demos/picture-little.d.ts +3 -0
- package/dist/Upload/index.d.ts +5 -1
- package/dist/_util/domTarget.d.ts +7 -0
- package/dist/_util/motion.d.ts +8 -0
- package/dist/_util/statusUtils.d.ts +6 -0
- package/dist/_util/throttleByAnimationFrame.d.ts +8 -0
- package/dist/_util/type.d.ts +9 -0
- package/dist/_util/warning.d.ts +6 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.umd.js +10843 -131
- package/dist/index.umd.min.js +6 -6
- package/es/Affix/index.d.ts +54 -0
- package/es/Affix/index.js +326 -0
- package/es/Affix/style/index.css +505 -0
- package/es/Affix/style/index.d.ts +1 -0
- package/es/Affix/style/index.js +1 -0
- package/es/Affix/utils.d.ts +15 -0
- package/es/Affix/utils.js +83 -0
- package/es/Button/index.d.ts +4 -0
- package/es/Button/index.js +1 -1
- package/es/CardTable/body/TableBodyCell.js +3 -0
- package/es/CardTable/card/PictureTextRow.js +13 -50
- package/es/CardTable/card/PictureTextRowOperate.js +130 -0
- package/es/CardTable/fns/index.js +6 -5
- package/es/CardTable/style/index.css +158 -10
- package/es/CustomTableOption/cardSort.d.ts +4 -0
- package/es/CustomTableOption/cardSort.js +222 -0
- package/es/CustomTableOption/index.d.ts +1 -0
- package/es/CustomTableOption/index.js +35 -11
- package/es/CustomTableOption/style/index.css +3 -0
- package/es/DatePicker/PickerButton.d.ts +2 -0
- package/es/DatePicker/PickerButton.js +8 -0
- package/es/DatePicker/PickerTag.d.ts +2 -0
- package/es/DatePicker/PickerTag.js +7 -0
- package/es/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
- package/es/DatePicker/generatePicker/generateRangePicker.js +142 -0
- package/es/DatePicker/generatePicker/generateSinglePicker.d.ts +14 -0
- package/es/DatePicker/generatePicker/generateSinglePicker.js +170 -0
- package/es/DatePicker/generatePicker/index.d.ts +106 -0
- package/es/DatePicker/generatePicker/index.js +84 -0
- package/es/DatePicker/generatePicker/interface.d.ts +12 -0
- package/es/DatePicker/generatePicker/interface.js +1 -0
- package/es/DatePicker/index.d.ts +17 -0
- package/es/DatePicker/index.js +7 -0
- package/es/DatePicker/style/index.css +505 -0
- package/es/DatePicker/style/index.d.ts +1 -0
- package/es/DatePicker/style/index.js +1 -0
- package/es/DatePicker/util.d.ts +14 -0
- package/es/DatePicker/util.js +111 -0
- package/es/Descriptions/style/index.css +10 -8
- package/es/IconFont/index.js +3 -2
- package/es/LmEditTable/DragHandle.js +1 -1
- package/es/LmEditTable/EditTable.js +27 -35
- package/es/LmFilter/Controls/CheckboxTags.js +53 -0
- package/es/LmFilter/Controls/index.js +47 -0
- package/es/LmFilter/LmFilter.js +17 -5
- package/es/LmFilter/baseFilter/fuzzySearch.js +53 -0
- package/es/LmFilter/baseFilter/index.js +1 -1
- package/es/LmFilter/clearFilter/index.js +3 -1
- package/es/LmFilter/complexFilter/drawer.js +376 -0
- package/es/LmFilter/complexFilter/index.js +50 -3
- package/es/LmFilter/complexFilter/valueDrawer.js +238 -0
- package/es/LmFilter/components/CascaderFilter.js +17 -41
- package/es/LmFilter/components/DateFilter.js +12 -20
- package/es/LmFilter/components/DropdownFIlter.js +79 -12
- package/es/LmFilter/components/index.js +56 -13
- package/es/LmFilter/filterFns/index.js +22 -3
- package/es/LmFilter/hooks/useDelayedFn.js +8 -6
- package/es/LmFilter/localization.d.ts +8 -0
- package/es/LmFilter/localization.js +12 -0
- package/es/LmFilter/style/style.css +27 -4
- package/es/LmFilter/utils.js +16 -0
- package/es/LmFilter/wrapper/FilterRoot.js +62 -6
- package/es/LmTable/Table.js +9 -4
- package/es/QuickMenu/index.d.ts +14 -0
- package/es/QuickMenu/index.js +171 -0
- package/es/QuickMenu/style/index.css +560 -0
- package/es/QuickMenu/style/index.d.ts +1 -0
- package/es/QuickMenu/style/index.js +1 -0
- package/es/Switch/index.d.ts +2 -1
- package/es/Switch/index.js +33 -1
- package/es/Switch/style/index.css +41 -0
- package/es/Tag/index.d.ts +4 -0
- package/es/Tag/index.js +48 -2
- package/es/Tag/style/index.css +4 -1
- package/es/Upload/index.d.ts +5 -1
- package/es/Upload/index.js +7 -2
- package/es/Upload/style/index.css +35 -0
- package/es/_util/domTarget.d.ts +7 -0
- package/es/_util/domTarget.js +20 -0
- package/es/_util/motion.d.ts +8 -0
- package/es/_util/motion.js +60 -0
- package/es/_util/statusUtils.d.ts +6 -0
- package/es/_util/statusUtils.js +12 -0
- package/es/_util/throttleByAnimationFrame.d.ts +8 -0
- package/es/_util/throttleByAnimationFrame.js +58 -0
- package/es/_util/type.d.ts +9 -0
- package/es/_util/type.js +15 -0
- package/es/_util/warning.d.ts +6 -0
- package/es/_util/warning.js +17 -0
- package/es/index.d.ts +4 -0
- package/es/index.js +3 -1
- package/es/message/index.d.ts +5 -5
- package/lib/Affix/index.d.ts +54 -0
- package/lib/Affix/index.js +349 -0
- package/lib/Affix/style/index.css +505 -0
- package/lib/Affix/style/index.d.ts +1 -0
- package/lib/Affix/style/index.js +3 -0
- package/lib/Affix/utils.d.ts +15 -0
- package/lib/Affix/utils.js +104 -0
- package/lib/Button/index.d.ts +4 -0
- package/lib/Button/index.js +1 -1
- package/lib/CardTable/body/TableBodyCell.js +3 -0
- package/lib/CardTable/card/PictureTextRow.js +13 -50
- package/lib/CardTable/card/PictureTextRowOperate.js +130 -0
- package/lib/CardTable/fns/index.js +6 -5
- package/lib/CardTable/style/index.css +158 -10
- package/lib/CustomTableOption/cardSort.d.ts +4 -0
- package/lib/CustomTableOption/cardSort.js +242 -0
- package/lib/CustomTableOption/index.d.ts +1 -0
- package/lib/CustomTableOption/index.js +36 -11
- package/lib/CustomTableOption/style/index.css +3 -0
- package/lib/DatePicker/PickerButton.d.ts +2 -0
- package/lib/DatePicker/PickerButton.js +19 -0
- package/lib/DatePicker/PickerTag.d.ts +2 -0
- package/lib/DatePicker/PickerTag.js +18 -0
- package/lib/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
- package/lib/DatePicker/generatePicker/generateRangePicker.js +168 -0
- package/lib/DatePicker/generatePicker/generateSinglePicker.d.ts +14 -0
- package/lib/DatePicker/generatePicker/generateSinglePicker.js +196 -0
- package/lib/DatePicker/generatePicker/index.d.ts +106 -0
- package/lib/DatePicker/generatePicker/index.js +102 -0
- package/lib/DatePicker/generatePicker/interface.d.ts +12 -0
- package/lib/DatePicker/generatePicker/interface.js +5 -0
- package/lib/DatePicker/index.d.ts +17 -0
- package/lib/DatePicker/index.js +21 -0
- package/lib/DatePicker/style/index.css +505 -0
- package/lib/DatePicker/style/index.d.ts +1 -0
- package/lib/DatePicker/style/index.js +3 -0
- package/lib/DatePicker/util.d.ts +14 -0
- package/lib/DatePicker/util.js +122 -0
- package/lib/Descriptions/style/index.css +10 -8
- package/lib/IconFont/index.js +3 -2
- package/lib/LmEditTable/DragHandle.js +1 -1
- package/lib/LmEditTable/EditTable.js +26 -36
- package/lib/LmFilter/Controls/CheckboxTags.js +53 -0
- package/lib/LmFilter/Controls/index.js +47 -0
- package/lib/LmFilter/LmFilter.js +17 -5
- package/lib/LmFilter/baseFilter/fuzzySearch.js +53 -0
- package/lib/LmFilter/baseFilter/index.js +1 -1
- package/lib/LmFilter/clearFilter/index.js +3 -1
- package/lib/LmFilter/complexFilter/drawer.js +376 -0
- package/lib/LmFilter/complexFilter/index.js +50 -3
- package/lib/LmFilter/complexFilter/valueDrawer.js +238 -0
- package/lib/LmFilter/components/CascaderFilter.js +17 -41
- package/lib/LmFilter/components/DateFilter.js +12 -20
- package/lib/LmFilter/components/DropdownFIlter.js +79 -12
- package/lib/LmFilter/components/index.js +56 -13
- package/lib/LmFilter/filterFns/index.js +22 -3
- package/lib/LmFilter/hooks/useDelayedFn.js +8 -6
- package/lib/LmFilter/localization.d.ts +8 -0
- package/lib/LmFilter/localization.js +19 -0
- package/lib/LmFilter/style/style.css +27 -4
- package/lib/LmFilter/utils.js +16 -0
- package/lib/LmFilter/wrapper/FilterRoot.js +62 -6
- package/lib/LmTable/Table.js +9 -4
- package/lib/QuickMenu/index.d.ts +14 -0
- package/lib/QuickMenu/index.js +189 -0
- package/lib/QuickMenu/style/index.css +560 -0
- package/lib/QuickMenu/style/index.d.ts +1 -0
- package/lib/QuickMenu/style/index.js +3 -0
- package/lib/Switch/index.d.ts +2 -1
- package/lib/Switch/index.js +34 -1
- package/lib/Switch/style/index.css +41 -0
- package/lib/Tag/index.d.ts +4 -0
- package/lib/Tag/index.js +48 -1
- package/lib/Tag/style/index.css +4 -1
- package/lib/Upload/index.d.ts +5 -1
- package/lib/Upload/index.js +8 -2
- package/lib/Upload/style/index.css +35 -0
- package/lib/_util/domTarget.d.ts +7 -0
- package/lib/_util/domTarget.js +31 -0
- package/lib/_util/motion.d.ts +8 -0
- package/lib/_util/motion.js +71 -0
- package/lib/_util/statusUtils.d.ts +6 -0
- package/lib/_util/statusUtils.js +29 -0
- package/lib/_util/throttleByAnimationFrame.d.ts +8 -0
- package/lib/_util/throttleByAnimationFrame.js +72 -0
- package/lib/_util/type.d.ts +9 -0
- package/lib/_util/type.js +27 -0
- package/lib/_util/warning.d.ts +6 -0
- package/lib/_util/warning.js +35 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +17 -1
- package/lib/message/index.d.ts +5 -5
- package/package.json +5 -2
- package/es/LmFilter/components/fuzzySearch.js +0 -37
- package/lib/LmFilter/components/fuzzySearch.js +0 -37
package/es/Tag/index.js
CHANGED
|
@@ -14,7 +14,9 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
14
14
|
return t;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
import React, { forwardRef } from 'react';
|
|
17
|
+
import React, { forwardRef, useMemo, useRef } from 'react';
|
|
18
|
+
import hexToRgba from 'hex-to-rgba';
|
|
19
|
+
var CheckableTag = _Tag.CheckableTag;
|
|
18
20
|
import classNames from 'classnames';
|
|
19
21
|
export var PresetColorTypes = ['pink', 'red', 'yellow', 'orange', 'cyan', 'green', 'blue', 'purple', 'geekblue', 'magenta', 'volcano', 'gold', 'lime', 'theme'];
|
|
20
22
|
var prefixCls = 'lm_tag';
|
|
@@ -32,5 +34,49 @@ var LmTag = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
32
34
|
}, className, PresetColorTypes.includes(color) && "lm_tag_main_color lm_tag_main_".concat(color))
|
|
33
35
|
}));
|
|
34
36
|
});
|
|
35
|
-
|
|
37
|
+
var checkPreFixCls = 'lm_check_tag';
|
|
38
|
+
|
|
39
|
+
LmTag.CheckableTag = function (props) {
|
|
40
|
+
var className = props.className,
|
|
41
|
+
color = props.color,
|
|
42
|
+
checked = props.checked,
|
|
43
|
+
rest = __rest(props, ["className", "color", "checked"]);
|
|
44
|
+
|
|
45
|
+
var checkTagRef = useRef(null);
|
|
46
|
+
var colorProps = useMemo(function () {
|
|
47
|
+
if (color) {
|
|
48
|
+
try {
|
|
49
|
+
return {
|
|
50
|
+
style: {
|
|
51
|
+
color: checked ? '#fff' : hexToRgba(color),
|
|
52
|
+
background: checked ? color : hexToRgba(color, 0.15)
|
|
53
|
+
},
|
|
54
|
+
onMouseEnter: function onMouseEnter() {
|
|
55
|
+
checkTagRef.current.firstChild.style.background = checked ? color : hexToRgba(color, 0.25);
|
|
56
|
+
},
|
|
57
|
+
onMouseLeave: function onMouseLeave() {
|
|
58
|
+
checkTagRef.current.firstChild.style.background = checked ? color : hexToRgba(color, 0.15);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
} catch (_a) {
|
|
62
|
+
return {
|
|
63
|
+
style: {
|
|
64
|
+
color: hexToRgba(color),
|
|
65
|
+
background: hexToRgba(color, 0.15)
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
} else {
|
|
70
|
+
return {};
|
|
71
|
+
}
|
|
72
|
+
}, [color, checked]);
|
|
73
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
74
|
+
ref: checkTagRef
|
|
75
|
+
}, /*#__PURE__*/React.createElement(CheckableTag, Object.assign({}, rest, {
|
|
76
|
+
checked: checked
|
|
77
|
+
}, colorProps, {
|
|
78
|
+
className: classNames(checkPreFixCls, className, color && 'lm_custom_color_tag')
|
|
79
|
+
})));
|
|
80
|
+
};
|
|
81
|
+
|
|
36
82
|
export default LmTag;
|
package/es/Tag/style/index.css
CHANGED
|
@@ -513,8 +513,8 @@ html {
|
|
|
513
513
|
margin-left: 6px;
|
|
514
514
|
}
|
|
515
515
|
.lm_tag.ant-tag.lm_tag_main_theme {
|
|
516
|
-
background: var(--tree-select-bg);
|
|
517
516
|
color: var(--primary-color);
|
|
517
|
+
background: var(--tree-select-bg);
|
|
518
518
|
}
|
|
519
519
|
.lm_tag.lm_tag_noborder {
|
|
520
520
|
border-color: transparent;
|
|
@@ -564,3 +564,6 @@ html {
|
|
|
564
564
|
.ant-tag-checkable.ant-tag-checkable-checked {
|
|
565
565
|
background-color: var(--primary-color);
|
|
566
566
|
}
|
|
567
|
+
.lm_check_tag.lm_custom_color_tag.ant-tag-checkable-checked {
|
|
568
|
+
color: #fff !important;
|
|
569
|
+
}
|
package/es/Upload/index.d.ts
CHANGED
|
@@ -5,5 +5,9 @@ import type { RcFile as AntdRcFile } from 'antd/es/upload';
|
|
|
5
5
|
export declare type UploadProps = AntdUploadProps;
|
|
6
6
|
export declare type UploadFile = AntdUploadFile;
|
|
7
7
|
export declare type RcFile = AntdRcFile;
|
|
8
|
-
|
|
8
|
+
export interface LMUploadProps extends UploadProps {
|
|
9
|
+
className?: string;
|
|
10
|
+
sizeType?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const LMUpload: React.FC<LMUploadProps>;
|
|
9
13
|
export default LMUpload;
|
package/es/Upload/index.js
CHANGED
|
@@ -3,19 +3,24 @@ import _Upload from "antd/es/upload";
|
|
|
3
3
|
import "antd/es/tooltip/style";
|
|
4
4
|
import _Tooltip from "antd/es/tooltip";
|
|
5
5
|
import React from 'react';
|
|
6
|
+
import classNames from 'classnames';
|
|
6
7
|
|
|
7
8
|
var LMUpload = function LMUpload(props) {
|
|
8
|
-
var
|
|
9
|
+
var className = props.className,
|
|
10
|
+
sizeType = props.sizeType,
|
|
11
|
+
listType = props.listType;
|
|
9
12
|
|
|
10
13
|
var renderUploadItem = function renderUploadItem(originNode, file) {
|
|
11
14
|
return !listType ? /*#__PURE__*/React.createElement(_Tooltip, {
|
|
12
|
-
placement:
|
|
15
|
+
placement: "bottom",
|
|
13
16
|
title: file.name
|
|
14
17
|
}, originNode.props.children) : originNode;
|
|
15
18
|
};
|
|
16
19
|
|
|
17
20
|
return /*#__PURE__*/React.createElement(_Upload, Object.assign({
|
|
21
|
+
className: classNames(className, sizeType == 'small' && 'little-upload'),
|
|
18
22
|
itemRender: renderUploadItem,
|
|
23
|
+
sizeType: sizeType,
|
|
19
24
|
listType: listType
|
|
20
25
|
}, props));
|
|
21
26
|
};
|
|
@@ -503,3 +503,38 @@ html {
|
|
|
503
503
|
.card_cell_content:hover .card_cell_body .card_cell_checkbox {
|
|
504
504
|
opacity: 1;
|
|
505
505
|
}
|
|
506
|
+
.ant-upload-select-picture-card div {
|
|
507
|
+
margin-top: 8px;
|
|
508
|
+
}
|
|
509
|
+
.little-upload .ant-upload-list-picture-card-container {
|
|
510
|
+
width: 64px;
|
|
511
|
+
height: 64px;
|
|
512
|
+
}
|
|
513
|
+
.little-upload .ant-upload-list-picture-card-container .ant-upload-list-item {
|
|
514
|
+
padding: 0 !important;
|
|
515
|
+
}
|
|
516
|
+
.little-upload .ant-upload-list-picture-card-container .ant-upload-list-item .ant-upload-list-item-thumbnail {
|
|
517
|
+
font-size: 12px;
|
|
518
|
+
}
|
|
519
|
+
.little-upload .ant-upload-list-picture-card-container .ant-upload-list-item .ant-upload-list-item-progress {
|
|
520
|
+
bottom: 5px;
|
|
521
|
+
left: 7px;
|
|
522
|
+
}
|
|
523
|
+
.little-upload .ant-upload-list-picture-card-container .ant-upload-list-item .ant-upload-list-item-name {
|
|
524
|
+
bottom: 5px;
|
|
525
|
+
font-size: 12px;
|
|
526
|
+
}
|
|
527
|
+
.little-upload .ant-upload.ant-upload-select-picture-card {
|
|
528
|
+
width: 64px;
|
|
529
|
+
height: 64px;
|
|
530
|
+
font-size: 12px;
|
|
531
|
+
}
|
|
532
|
+
.little-upload .ant-upload.ant-upload-select-picture-card .anticon svg {
|
|
533
|
+
width: 24px;
|
|
534
|
+
height: 24px;
|
|
535
|
+
margin-top: 8px;
|
|
536
|
+
}
|
|
537
|
+
.little-upload .ant-upload.ant-upload-select-picture-card div {
|
|
538
|
+
margin-top: 0;
|
|
539
|
+
font-size: 12px;
|
|
540
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MutableRefObject } from 'react';
|
|
2
|
+
export declare const isFunction: (value: unknown) => value is Function;
|
|
3
|
+
declare type TargetValue<T> = T | undefined | null;
|
|
4
|
+
declare type TargetType = HTMLElement | Element | Window | Document;
|
|
5
|
+
export declare type BasicTarget<T extends TargetType = Element> = (() => TargetValue<T>) | TargetValue<T> | MutableRefObject<TargetValue<T>>;
|
|
6
|
+
export declare function getTargetElement<T extends TargetType>(target: BasicTarget<T>, defaultElement?: T): T;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export var isFunction = function isFunction(value) {
|
|
2
|
+
return typeof value === 'function';
|
|
3
|
+
};
|
|
4
|
+
export function getTargetElement(target, defaultElement) {
|
|
5
|
+
if (!target) {
|
|
6
|
+
return defaultElement;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
var targetElement;
|
|
10
|
+
|
|
11
|
+
if (isFunction(target)) {
|
|
12
|
+
targetElement = target();
|
|
13
|
+
} else if ('current' in target) {
|
|
14
|
+
targetElement = target.current;
|
|
15
|
+
} else {
|
|
16
|
+
targetElement = target;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return targetElement;
|
|
20
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CSSMotionProps } from 'rc-motion';
|
|
2
|
+
declare const collapseMotion: CSSMotionProps;
|
|
3
|
+
declare const SelectPlacements: ["bottomLeft", "bottomRight", "topLeft", "topRight"];
|
|
4
|
+
export declare type SelectCommonPlacement = typeof SelectPlacements[number];
|
|
5
|
+
declare const getTransitionDirection: (placement: SelectCommonPlacement | undefined) => "slide-down" | "slide-up";
|
|
6
|
+
declare const getTransitionName: (rootPrefixCls: string, motion: string, transitionName?: string) => string;
|
|
7
|
+
export { getTransitionName, getTransitionDirection };
|
|
8
|
+
export default collapseMotion;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { tuple } from './type'; // ================== Collapse Motion ==================
|
|
2
|
+
|
|
3
|
+
var getCollapsedHeight = function getCollapsedHeight() {
|
|
4
|
+
return {
|
|
5
|
+
height: 0,
|
|
6
|
+
opacity: 0
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
var getRealHeight = function getRealHeight(node) {
|
|
11
|
+
var scrollHeight = node.scrollHeight;
|
|
12
|
+
return {
|
|
13
|
+
height: scrollHeight,
|
|
14
|
+
opacity: 1
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
var getCurrentHeight = function getCurrentHeight(node) {
|
|
19
|
+
return {
|
|
20
|
+
height: node ? node.offsetHeight : 0
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var skipOpacityTransition = function skipOpacityTransition(_, event) {
|
|
25
|
+
return (event === null || event === void 0 ? void 0 : event.deadline) === true || event.propertyName === 'height';
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var collapseMotion = {
|
|
29
|
+
motionName: 'ant-motion-collapse',
|
|
30
|
+
onAppearStart: getCollapsedHeight,
|
|
31
|
+
onEnterStart: getCollapsedHeight,
|
|
32
|
+
onAppearActive: getRealHeight,
|
|
33
|
+
onEnterActive: getRealHeight,
|
|
34
|
+
onLeaveStart: getCurrentHeight,
|
|
35
|
+
onLeaveActive: getCollapsedHeight,
|
|
36
|
+
onAppearEnd: skipOpacityTransition,
|
|
37
|
+
onEnterEnd: skipOpacityTransition,
|
|
38
|
+
onLeaveEnd: skipOpacityTransition,
|
|
39
|
+
motionDeadline: 500
|
|
40
|
+
};
|
|
41
|
+
var SelectPlacements = tuple('bottomLeft', 'bottomRight', 'topLeft', 'topRight');
|
|
42
|
+
|
|
43
|
+
var getTransitionDirection = function getTransitionDirection(placement) {
|
|
44
|
+
if (placement !== undefined && (placement === 'topLeft' || placement === 'topRight')) {
|
|
45
|
+
return "slide-down";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return "slide-up";
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
var getTransitionName = function getTransitionName(rootPrefixCls, motion, transitionName) {
|
|
52
|
+
if (transitionName !== undefined) {
|
|
53
|
+
return transitionName;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return "".concat(rootPrefixCls, "-").concat(motion);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export { getTransitionName, getTransitionDirection };
|
|
60
|
+
export default collapseMotion;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ValidateStatus } from 'antd/es/form/FormItem';
|
|
2
|
+
declare const InputStatuses: ["warning", "error", ""];
|
|
3
|
+
export declare type InputStatus = typeof InputStatuses[number];
|
|
4
|
+
export declare function getStatusClassNames(prefixCls: string, status?: ValidateStatus, hasFeedback?: boolean): string;
|
|
5
|
+
export declare const getMergedStatus: (contextStatus?: ValidateStatus, customStatus?: InputStatus) => "" | "warning" | "error" | "success" | "validating";
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { tuple } from './type';
|
|
4
|
+
var InputStatuses = tuple('warning', 'error', '');
|
|
5
|
+
export function getStatusClassNames(prefixCls, status, hasFeedback) {
|
|
6
|
+
var _classNames;
|
|
7
|
+
|
|
8
|
+
return classNames((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-status-success"), status === 'success'), _defineProperty(_classNames, "".concat(prefixCls, "-status-warning"), status === 'warning'), _defineProperty(_classNames, "".concat(prefixCls, "-status-error"), status === 'error'), _defineProperty(_classNames, "".concat(prefixCls, "-status-validating"), status === 'validating'), _defineProperty(_classNames, "".concat(prefixCls, "-has-feedback"), hasFeedback), _classNames));
|
|
9
|
+
}
|
|
10
|
+
export var getMergedStatus = function getMergedStatus(contextStatus, customStatus) {
|
|
11
|
+
return customStatus || contextStatus;
|
|
12
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function throttleByAnimationFrame<T extends unknown[]>(fn: (...args: T) => void): {
|
|
2
|
+
(...args: T): void;
|
|
3
|
+
cancel: () => void;
|
|
4
|
+
};
|
|
5
|
+
export declare function throttleByAnimationFrameDecorator(): (target: any, key: string, descriptor: any) => {
|
|
6
|
+
configurable: boolean;
|
|
7
|
+
get(): any;
|
|
8
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
|
+
import raf from 'rc-util/lib/raf';
|
|
3
|
+
export function throttleByAnimationFrame(fn) {
|
|
4
|
+
var requestId;
|
|
5
|
+
|
|
6
|
+
var later = function later(args) {
|
|
7
|
+
return function () {
|
|
8
|
+
requestId = null;
|
|
9
|
+
fn.apply(void 0, _toConsumableArray(args));
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
var throttled = function throttled() {
|
|
14
|
+
if (requestId == null) {
|
|
15
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
16
|
+
args[_key] = arguments[_key];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
requestId = raf(later(args));
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
throttled.cancel = function () {
|
|
24
|
+
raf.cancel(requestId);
|
|
25
|
+
requestId = null;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return throttled;
|
|
29
|
+
}
|
|
30
|
+
export function throttleByAnimationFrameDecorator() {
|
|
31
|
+
return function throttle(target, key, descriptor) {
|
|
32
|
+
var fn = descriptor.value;
|
|
33
|
+
var definingProperty = false;
|
|
34
|
+
return {
|
|
35
|
+
configurable: true,
|
|
36
|
+
get: function get() {
|
|
37
|
+
// In IE11 calling Object.defineProperty has a side-effect of evaluating the
|
|
38
|
+
// getter for the property which is being replaced. This causes infinite
|
|
39
|
+
// recursion and an "Out of stack space" error.
|
|
40
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
41
|
+
if (definingProperty || this === target.prototype || this.hasOwnProperty(key)) {
|
|
42
|
+
/* istanbul ignore next */
|
|
43
|
+
return fn;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
var boundFn = throttleByAnimationFrame(fn.bind(this));
|
|
47
|
+
definingProperty = true;
|
|
48
|
+
Object.defineProperty(this, key, {
|
|
49
|
+
value: boundFn,
|
|
50
|
+
configurable: true,
|
|
51
|
+
writable: true
|
|
52
|
+
});
|
|
53
|
+
definingProperty = false;
|
|
54
|
+
return boundFn;
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const tuple: <T extends string[]>(...args: T) => T;
|
|
2
|
+
export declare const tupleNum: <T extends number[]>(...args: T) => T;
|
|
3
|
+
/**
|
|
4
|
+
* https://stackoverflow.com/a/59187769 Extract the type of an element of an array/tuple without
|
|
5
|
+
* performing indexing
|
|
6
|
+
*/
|
|
7
|
+
export declare type ElementOf<T> = T extends (infer E)[] ? E : T extends readonly (infer F)[] ? F : never;
|
|
8
|
+
/** https://github.com/Microsoft/TypeScript/issues/29729 */
|
|
9
|
+
export declare type LiteralUnion<T extends U, U> = T | (U & {});
|
package/es/_util/type.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead
|
|
2
|
+
export var tuple = function tuple() {
|
|
3
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
4
|
+
args[_key] = arguments[_key];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
return args;
|
|
8
|
+
};
|
|
9
|
+
export var tupleNum = function tupleNum() {
|
|
10
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
11
|
+
args[_key2] = arguments[_key2];
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return args;
|
|
15
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import rcWarning, { resetWarned } from 'rc-util/lib/warning';
|
|
2
|
+
export { resetWarned };
|
|
3
|
+
export function noop() {} // eslint-disable-next-line import/no-mutable-exports
|
|
4
|
+
|
|
5
|
+
var warning = noop;
|
|
6
|
+
|
|
7
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
8
|
+
warning = function warning(valid, component, message) {
|
|
9
|
+
rcWarning(valid, "[antd: ".concat(component, "] ").concat(message)); // StrictMode will inject console which will not throw warning in React 17.
|
|
10
|
+
|
|
11
|
+
if (process.env.NODE_ENV === 'test') {
|
|
12
|
+
resetWarned();
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default warning;
|
package/es/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export { default as Tree } from './Tree';
|
|
|
35
35
|
export { default as UploadOss } from './UploadOss';
|
|
36
36
|
export { default as VirtualList } from './VirtualList';
|
|
37
37
|
export { default as Tag } from './Tag';
|
|
38
|
+
export type { ILMTagProps } from './Tag';
|
|
38
39
|
export { default as message } from './message';
|
|
39
40
|
export { default as Tabs } from './Tabs';
|
|
40
41
|
export { default as Table } from './Table';
|
|
@@ -48,3 +49,6 @@ export { default as Form } from './Form';
|
|
|
48
49
|
export { default as Spin } from './Spin';
|
|
49
50
|
export { default as LmEditTable } from './LmEditTable';
|
|
50
51
|
export { default as List } from './List';
|
|
52
|
+
export { default as LMQuickMenu } from './QuickMenu';
|
|
53
|
+
export { default as DatePicker } from './DatePicker';
|
|
54
|
+
export type { DatePickerProps, MonthPickerProps, WeekPickerProps, RangePickerProps } from './DatePicker';
|
package/es/index.js
CHANGED
|
@@ -46,4 +46,6 @@ export { default as Tooltip } from './Tooltip';
|
|
|
46
46
|
export { default as Form } from './Form';
|
|
47
47
|
export { default as Spin } from './Spin';
|
|
48
48
|
export { default as LmEditTable } from './LmEditTable';
|
|
49
|
-
export { default as List } from './List';
|
|
49
|
+
export { default as List } from './List';
|
|
50
|
+
export { default as LMQuickMenu } from './QuickMenu';
|
|
51
|
+
export { default as DatePicker } from './DatePicker';
|