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.
Files changed (235) hide show
  1. package/dist/Affix/demos/basic.d.ts +2 -0
  2. package/dist/Affix/index.d.ts +54 -0
  3. package/dist/Affix/style/index.d.ts +1 -0
  4. package/dist/Affix/utils.d.ts +15 -0
  5. package/dist/Button/index.d.ts +4 -0
  6. package/dist/CardTable/card/PictureTextRowOperate.d.ts +7 -0
  7. package/dist/CardTable/fns/index.d.ts +1 -5
  8. package/dist/CustomTableOption/cardSort.d.ts +4 -0
  9. package/dist/CustomTableOption/index.d.ts +1 -0
  10. package/dist/DatePicker/PickerButton.d.ts +2 -0
  11. package/dist/DatePicker/PickerTag.d.ts +2 -0
  12. package/dist/DatePicker/demos/basic.d.ts +2 -0
  13. package/dist/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
  14. package/dist/DatePicker/generatePicker/generateSinglePicker.d.ts +14 -0
  15. package/dist/DatePicker/generatePicker/index.d.ts +106 -0
  16. package/dist/DatePicker/generatePicker/interface.d.ts +12 -0
  17. package/dist/DatePicker/index.d.ts +17 -0
  18. package/dist/DatePicker/style/index.d.ts +1 -0
  19. package/dist/DatePicker/util.d.ts +14 -0
  20. package/dist/IconFont/index.d.ts +1 -1
  21. package/dist/LmEditTable/demos/basic copy.d.ts +2 -0
  22. package/dist/LmFilter/Controls/CheckboxTags.d.ts +6 -0
  23. package/dist/LmFilter/Controls/index.d.ts +2 -0
  24. package/dist/LmFilter/LmFilter.d.ts +4 -1
  25. package/dist/LmFilter/{components → baseFilter}/fuzzySearch.d.ts +0 -0
  26. package/dist/LmFilter/complexFilter/drawer.d.ts +4 -0
  27. package/dist/LmFilter/complexFilter/index.d.ts +3 -1
  28. package/dist/LmFilter/complexFilter/valueDrawer.d.ts +4 -0
  29. package/dist/LmFilter/localization.d.ts +8 -0
  30. package/dist/LmFilter/utils.d.ts +1 -0
  31. package/dist/QuickMenu/demos/basic.d.ts +2 -0
  32. package/dist/QuickMenu/index.d.ts +14 -0
  33. package/dist/QuickMenu/style/index.d.ts +1 -0
  34. package/dist/Switch/demos/table.d.ts +2 -0
  35. package/dist/Switch/index.d.ts +2 -1
  36. package/dist/Tag/demos/ExigencyTag.d.ts +2 -0
  37. package/dist/Tag/index.d.ts +4 -0
  38. package/dist/Upload/demos/picture-little.d.ts +3 -0
  39. package/dist/Upload/index.d.ts +5 -1
  40. package/dist/_util/domTarget.d.ts +7 -0
  41. package/dist/_util/motion.d.ts +8 -0
  42. package/dist/_util/statusUtils.d.ts +6 -0
  43. package/dist/_util/throttleByAnimationFrame.d.ts +8 -0
  44. package/dist/_util/type.d.ts +9 -0
  45. package/dist/_util/warning.d.ts +6 -0
  46. package/dist/index.d.ts +4 -0
  47. package/dist/index.umd.js +10843 -131
  48. package/dist/index.umd.min.js +6 -6
  49. package/es/Affix/index.d.ts +54 -0
  50. package/es/Affix/index.js +326 -0
  51. package/es/Affix/style/index.css +505 -0
  52. package/es/Affix/style/index.d.ts +1 -0
  53. package/es/Affix/style/index.js +1 -0
  54. package/es/Affix/utils.d.ts +15 -0
  55. package/es/Affix/utils.js +83 -0
  56. package/es/Button/index.d.ts +4 -0
  57. package/es/Button/index.js +1 -1
  58. package/es/CardTable/body/TableBodyCell.js +3 -0
  59. package/es/CardTable/card/PictureTextRow.js +13 -50
  60. package/es/CardTable/card/PictureTextRowOperate.js +130 -0
  61. package/es/CardTable/fns/index.js +6 -5
  62. package/es/CardTable/style/index.css +158 -10
  63. package/es/CustomTableOption/cardSort.d.ts +4 -0
  64. package/es/CustomTableOption/cardSort.js +222 -0
  65. package/es/CustomTableOption/index.d.ts +1 -0
  66. package/es/CustomTableOption/index.js +35 -11
  67. package/es/CustomTableOption/style/index.css +3 -0
  68. package/es/DatePicker/PickerButton.d.ts +2 -0
  69. package/es/DatePicker/PickerButton.js +8 -0
  70. package/es/DatePicker/PickerTag.d.ts +2 -0
  71. package/es/DatePicker/PickerTag.js +7 -0
  72. package/es/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
  73. package/es/DatePicker/generatePicker/generateRangePicker.js +142 -0
  74. package/es/DatePicker/generatePicker/generateSinglePicker.d.ts +14 -0
  75. package/es/DatePicker/generatePicker/generateSinglePicker.js +170 -0
  76. package/es/DatePicker/generatePicker/index.d.ts +106 -0
  77. package/es/DatePicker/generatePicker/index.js +84 -0
  78. package/es/DatePicker/generatePicker/interface.d.ts +12 -0
  79. package/es/DatePicker/generatePicker/interface.js +1 -0
  80. package/es/DatePicker/index.d.ts +17 -0
  81. package/es/DatePicker/index.js +7 -0
  82. package/es/DatePicker/style/index.css +505 -0
  83. package/es/DatePicker/style/index.d.ts +1 -0
  84. package/es/DatePicker/style/index.js +1 -0
  85. package/es/DatePicker/util.d.ts +14 -0
  86. package/es/DatePicker/util.js +111 -0
  87. package/es/Descriptions/style/index.css +10 -8
  88. package/es/IconFont/index.js +3 -2
  89. package/es/LmEditTable/DragHandle.js +1 -1
  90. package/es/LmEditTable/EditTable.js +27 -35
  91. package/es/LmFilter/Controls/CheckboxTags.js +53 -0
  92. package/es/LmFilter/Controls/index.js +47 -0
  93. package/es/LmFilter/LmFilter.js +17 -5
  94. package/es/LmFilter/baseFilter/fuzzySearch.js +53 -0
  95. package/es/LmFilter/baseFilter/index.js +1 -1
  96. package/es/LmFilter/clearFilter/index.js +3 -1
  97. package/es/LmFilter/complexFilter/drawer.js +376 -0
  98. package/es/LmFilter/complexFilter/index.js +50 -3
  99. package/es/LmFilter/complexFilter/valueDrawer.js +238 -0
  100. package/es/LmFilter/components/CascaderFilter.js +17 -41
  101. package/es/LmFilter/components/DateFilter.js +12 -20
  102. package/es/LmFilter/components/DropdownFIlter.js +79 -12
  103. package/es/LmFilter/components/index.js +56 -13
  104. package/es/LmFilter/filterFns/index.js +22 -3
  105. package/es/LmFilter/hooks/useDelayedFn.js +8 -6
  106. package/es/LmFilter/localization.d.ts +8 -0
  107. package/es/LmFilter/localization.js +12 -0
  108. package/es/LmFilter/style/style.css +27 -4
  109. package/es/LmFilter/utils.js +16 -0
  110. package/es/LmFilter/wrapper/FilterRoot.js +62 -6
  111. package/es/LmTable/Table.js +9 -4
  112. package/es/QuickMenu/index.d.ts +14 -0
  113. package/es/QuickMenu/index.js +171 -0
  114. package/es/QuickMenu/style/index.css +560 -0
  115. package/es/QuickMenu/style/index.d.ts +1 -0
  116. package/es/QuickMenu/style/index.js +1 -0
  117. package/es/Switch/index.d.ts +2 -1
  118. package/es/Switch/index.js +33 -1
  119. package/es/Switch/style/index.css +41 -0
  120. package/es/Tag/index.d.ts +4 -0
  121. package/es/Tag/index.js +48 -2
  122. package/es/Tag/style/index.css +4 -1
  123. package/es/Upload/index.d.ts +5 -1
  124. package/es/Upload/index.js +7 -2
  125. package/es/Upload/style/index.css +35 -0
  126. package/es/_util/domTarget.d.ts +7 -0
  127. package/es/_util/domTarget.js +20 -0
  128. package/es/_util/motion.d.ts +8 -0
  129. package/es/_util/motion.js +60 -0
  130. package/es/_util/statusUtils.d.ts +6 -0
  131. package/es/_util/statusUtils.js +12 -0
  132. package/es/_util/throttleByAnimationFrame.d.ts +8 -0
  133. package/es/_util/throttleByAnimationFrame.js +58 -0
  134. package/es/_util/type.d.ts +9 -0
  135. package/es/_util/type.js +15 -0
  136. package/es/_util/warning.d.ts +6 -0
  137. package/es/_util/warning.js +17 -0
  138. package/es/index.d.ts +4 -0
  139. package/es/index.js +3 -1
  140. package/es/message/index.d.ts +5 -5
  141. package/lib/Affix/index.d.ts +54 -0
  142. package/lib/Affix/index.js +349 -0
  143. package/lib/Affix/style/index.css +505 -0
  144. package/lib/Affix/style/index.d.ts +1 -0
  145. package/lib/Affix/style/index.js +3 -0
  146. package/lib/Affix/utils.d.ts +15 -0
  147. package/lib/Affix/utils.js +104 -0
  148. package/lib/Button/index.d.ts +4 -0
  149. package/lib/Button/index.js +1 -1
  150. package/lib/CardTable/body/TableBodyCell.js +3 -0
  151. package/lib/CardTable/card/PictureTextRow.js +13 -50
  152. package/lib/CardTable/card/PictureTextRowOperate.js +130 -0
  153. package/lib/CardTable/fns/index.js +6 -5
  154. package/lib/CardTable/style/index.css +158 -10
  155. package/lib/CustomTableOption/cardSort.d.ts +4 -0
  156. package/lib/CustomTableOption/cardSort.js +242 -0
  157. package/lib/CustomTableOption/index.d.ts +1 -0
  158. package/lib/CustomTableOption/index.js +36 -11
  159. package/lib/CustomTableOption/style/index.css +3 -0
  160. package/lib/DatePicker/PickerButton.d.ts +2 -0
  161. package/lib/DatePicker/PickerButton.js +19 -0
  162. package/lib/DatePicker/PickerTag.d.ts +2 -0
  163. package/lib/DatePicker/PickerTag.js +18 -0
  164. package/lib/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
  165. package/lib/DatePicker/generatePicker/generateRangePicker.js +168 -0
  166. package/lib/DatePicker/generatePicker/generateSinglePicker.d.ts +14 -0
  167. package/lib/DatePicker/generatePicker/generateSinglePicker.js +196 -0
  168. package/lib/DatePicker/generatePicker/index.d.ts +106 -0
  169. package/lib/DatePicker/generatePicker/index.js +102 -0
  170. package/lib/DatePicker/generatePicker/interface.d.ts +12 -0
  171. package/lib/DatePicker/generatePicker/interface.js +5 -0
  172. package/lib/DatePicker/index.d.ts +17 -0
  173. package/lib/DatePicker/index.js +21 -0
  174. package/lib/DatePicker/style/index.css +505 -0
  175. package/lib/DatePicker/style/index.d.ts +1 -0
  176. package/lib/DatePicker/style/index.js +3 -0
  177. package/lib/DatePicker/util.d.ts +14 -0
  178. package/lib/DatePicker/util.js +122 -0
  179. package/lib/Descriptions/style/index.css +10 -8
  180. package/lib/IconFont/index.js +3 -2
  181. package/lib/LmEditTable/DragHandle.js +1 -1
  182. package/lib/LmEditTable/EditTable.js +26 -36
  183. package/lib/LmFilter/Controls/CheckboxTags.js +53 -0
  184. package/lib/LmFilter/Controls/index.js +47 -0
  185. package/lib/LmFilter/LmFilter.js +17 -5
  186. package/lib/LmFilter/baseFilter/fuzzySearch.js +53 -0
  187. package/lib/LmFilter/baseFilter/index.js +1 -1
  188. package/lib/LmFilter/clearFilter/index.js +3 -1
  189. package/lib/LmFilter/complexFilter/drawer.js +376 -0
  190. package/lib/LmFilter/complexFilter/index.js +50 -3
  191. package/lib/LmFilter/complexFilter/valueDrawer.js +238 -0
  192. package/lib/LmFilter/components/CascaderFilter.js +17 -41
  193. package/lib/LmFilter/components/DateFilter.js +12 -20
  194. package/lib/LmFilter/components/DropdownFIlter.js +79 -12
  195. package/lib/LmFilter/components/index.js +56 -13
  196. package/lib/LmFilter/filterFns/index.js +22 -3
  197. package/lib/LmFilter/hooks/useDelayedFn.js +8 -6
  198. package/lib/LmFilter/localization.d.ts +8 -0
  199. package/lib/LmFilter/localization.js +19 -0
  200. package/lib/LmFilter/style/style.css +27 -4
  201. package/lib/LmFilter/utils.js +16 -0
  202. package/lib/LmFilter/wrapper/FilterRoot.js +62 -6
  203. package/lib/LmTable/Table.js +9 -4
  204. package/lib/QuickMenu/index.d.ts +14 -0
  205. package/lib/QuickMenu/index.js +189 -0
  206. package/lib/QuickMenu/style/index.css +560 -0
  207. package/lib/QuickMenu/style/index.d.ts +1 -0
  208. package/lib/QuickMenu/style/index.js +3 -0
  209. package/lib/Switch/index.d.ts +2 -1
  210. package/lib/Switch/index.js +34 -1
  211. package/lib/Switch/style/index.css +41 -0
  212. package/lib/Tag/index.d.ts +4 -0
  213. package/lib/Tag/index.js +48 -1
  214. package/lib/Tag/style/index.css +4 -1
  215. package/lib/Upload/index.d.ts +5 -1
  216. package/lib/Upload/index.js +8 -2
  217. package/lib/Upload/style/index.css +35 -0
  218. package/lib/_util/domTarget.d.ts +7 -0
  219. package/lib/_util/domTarget.js +31 -0
  220. package/lib/_util/motion.d.ts +8 -0
  221. package/lib/_util/motion.js +71 -0
  222. package/lib/_util/statusUtils.d.ts +6 -0
  223. package/lib/_util/statusUtils.js +29 -0
  224. package/lib/_util/throttleByAnimationFrame.d.ts +8 -0
  225. package/lib/_util/throttleByAnimationFrame.js +72 -0
  226. package/lib/_util/type.d.ts +9 -0
  227. package/lib/_util/type.js +27 -0
  228. package/lib/_util/warning.d.ts +6 -0
  229. package/lib/_util/warning.js +35 -0
  230. package/lib/index.d.ts +4 -0
  231. package/lib/index.js +17 -1
  232. package/lib/message/index.d.ts +5 -5
  233. package/package.json +5 -2
  234. package/es/LmFilter/components/fuzzySearch.js +0 -37
  235. package/lib/LmFilter/components/fuzzySearch.js +0 -37
package/lib/Tag/index.js CHANGED
@@ -15,6 +15,8 @@ var _tag = _interopRequireDefault(require("antd/es/tag"));
15
15
 
16
16
  var _react = _interopRequireWildcard(require("react"));
17
17
 
18
+ var _hexToRgba = _interopRequireDefault(require("hex-to-rgba"));
19
+
18
20
  var _classnames = _interopRequireDefault(require("classnames"));
19
21
 
20
22
  var __rest = void 0 && (void 0).__rest || function (s, e) {
@@ -30,6 +32,7 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
30
32
  return t;
31
33
  };
32
34
 
35
+ var CheckableTag = _tag.default.CheckableTag;
33
36
  var PresetColorTypes = ['pink', 'red', 'yellow', 'orange', 'cyan', 'green', 'blue', 'purple', 'geekblue', 'magenta', 'volcano', 'gold', 'lime', 'theme'];
34
37
  exports.PresetColorTypes = PresetColorTypes;
35
38
  var prefixCls = 'lm_tag';
@@ -47,6 +50,50 @@ var LmTag = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
47
50
  }, className, PresetColorTypes.includes(color) && "lm_tag_main_color lm_tag_main_".concat(color))
48
51
  }));
49
52
  });
50
- LmTag.CheckableTag = _tag.default.CheckableTag;
53
+ var checkPreFixCls = 'lm_check_tag';
54
+
55
+ LmTag.CheckableTag = function (props) {
56
+ var className = props.className,
57
+ color = props.color,
58
+ checked = props.checked,
59
+ rest = __rest(props, ["className", "color", "checked"]);
60
+
61
+ var checkTagRef = (0, _react.useRef)(null);
62
+ var colorProps = (0, _react.useMemo)(function () {
63
+ if (color) {
64
+ try {
65
+ return {
66
+ style: {
67
+ color: checked ? '#fff' : (0, _hexToRgba.default)(color),
68
+ background: checked ? color : (0, _hexToRgba.default)(color, 0.15)
69
+ },
70
+ onMouseEnter: function onMouseEnter() {
71
+ checkTagRef.current.firstChild.style.background = checked ? color : (0, _hexToRgba.default)(color, 0.25);
72
+ },
73
+ onMouseLeave: function onMouseLeave() {
74
+ checkTagRef.current.firstChild.style.background = checked ? color : (0, _hexToRgba.default)(color, 0.15);
75
+ }
76
+ };
77
+ } catch (_a) {
78
+ return {
79
+ style: {
80
+ color: (0, _hexToRgba.default)(color),
81
+ background: (0, _hexToRgba.default)(color, 0.15)
82
+ }
83
+ };
84
+ }
85
+ } else {
86
+ return {};
87
+ }
88
+ }, [color, checked]);
89
+ return /*#__PURE__*/_react.default.createElement("span", {
90
+ ref: checkTagRef
91
+ }, /*#__PURE__*/_react.default.createElement(CheckableTag, Object.assign({}, rest, {
92
+ checked: checked
93
+ }, colorProps, {
94
+ className: (0, _classnames.default)(checkPreFixCls, className, color && 'lm_custom_color_tag')
95
+ })));
96
+ };
97
+
51
98
  var _default = LmTag;
52
99
  exports.default = _default;
@@ -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
+ }
@@ -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
- declare const LMUpload: React.FC<UploadProps>;
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;
@@ -17,18 +17,24 @@ var _tooltip = _interopRequireDefault(require("antd/es/tooltip"));
17
17
 
18
18
  var _react = _interopRequireDefault(require("react"));
19
19
 
20
+ var _classnames = _interopRequireDefault(require("classnames"));
21
+
20
22
  var LMUpload = function LMUpload(props) {
21
- var listType = props.listType;
23
+ var className = props.className,
24
+ sizeType = props.sizeType,
25
+ listType = props.listType;
22
26
 
23
27
  var renderUploadItem = function renderUploadItem(originNode, file) {
24
28
  return !listType ? /*#__PURE__*/_react.default.createElement(_tooltip.default, {
25
- placement: 'bottom',
29
+ placement: "bottom",
26
30
  title: file.name
27
31
  }, originNode.props.children) : originNode;
28
32
  };
29
33
 
30
34
  return /*#__PURE__*/_react.default.createElement(_upload.default, Object.assign({
35
+ className: (0, _classnames.default)(className, sizeType == 'small' && 'little-upload'),
31
36
  itemRender: renderUploadItem,
37
+ sizeType: sizeType,
32
38
  listType: listType
33
39
  }, props));
34
40
  };
@@ -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,31 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getTargetElement = getTargetElement;
7
+ exports.isFunction = void 0;
8
+
9
+ var isFunction = function isFunction(value) {
10
+ return typeof value === 'function';
11
+ };
12
+
13
+ exports.isFunction = isFunction;
14
+
15
+ function getTargetElement(target, defaultElement) {
16
+ if (!target) {
17
+ return defaultElement;
18
+ }
19
+
20
+ var targetElement;
21
+
22
+ if (isFunction(target)) {
23
+ targetElement = target();
24
+ } else if ('current' in target) {
25
+ targetElement = target.current;
26
+ } else {
27
+ targetElement = target;
28
+ }
29
+
30
+ return targetElement;
31
+ }
@@ -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,71 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getTransitionName = exports.getTransitionDirection = exports.default = void 0;
7
+
8
+ var _type = require("./type");
9
+
10
+ // ================== Collapse Motion ==================
11
+ var getCollapsedHeight = function getCollapsedHeight() {
12
+ return {
13
+ height: 0,
14
+ opacity: 0
15
+ };
16
+ };
17
+
18
+ var getRealHeight = function getRealHeight(node) {
19
+ var scrollHeight = node.scrollHeight;
20
+ return {
21
+ height: scrollHeight,
22
+ opacity: 1
23
+ };
24
+ };
25
+
26
+ var getCurrentHeight = function getCurrentHeight(node) {
27
+ return {
28
+ height: node ? node.offsetHeight : 0
29
+ };
30
+ };
31
+
32
+ var skipOpacityTransition = function skipOpacityTransition(_, event) {
33
+ return (event === null || event === void 0 ? void 0 : event.deadline) === true || event.propertyName === 'height';
34
+ };
35
+
36
+ var collapseMotion = {
37
+ motionName: 'ant-motion-collapse',
38
+ onAppearStart: getCollapsedHeight,
39
+ onEnterStart: getCollapsedHeight,
40
+ onAppearActive: getRealHeight,
41
+ onEnterActive: getRealHeight,
42
+ onLeaveStart: getCurrentHeight,
43
+ onLeaveActive: getCollapsedHeight,
44
+ onAppearEnd: skipOpacityTransition,
45
+ onEnterEnd: skipOpacityTransition,
46
+ onLeaveEnd: skipOpacityTransition,
47
+ motionDeadline: 500
48
+ };
49
+ var SelectPlacements = (0, _type.tuple)('bottomLeft', 'bottomRight', 'topLeft', 'topRight');
50
+
51
+ var getTransitionDirection = function getTransitionDirection(placement) {
52
+ if (placement !== undefined && (placement === 'topLeft' || placement === 'topRight')) {
53
+ return "slide-down";
54
+ }
55
+
56
+ return "slide-up";
57
+ };
58
+
59
+ exports.getTransitionDirection = getTransitionDirection;
60
+
61
+ var getTransitionName = function getTransitionName(rootPrefixCls, motion, transitionName) {
62
+ if (transitionName !== undefined) {
63
+ return transitionName;
64
+ }
65
+
66
+ return "".concat(rootPrefixCls, "-").concat(motion);
67
+ };
68
+
69
+ exports.getTransitionName = getTransitionName;
70
+ var _default = collapseMotion;
71
+ exports.default = _default;
@@ -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,29 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.getMergedStatus = void 0;
9
+ exports.getStatusClassNames = getStatusClassNames;
10
+
11
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
12
+
13
+ var _classnames = _interopRequireDefault(require("classnames"));
14
+
15
+ var _type = require("./type");
16
+
17
+ var InputStatuses = (0, _type.tuple)('warning', 'error', '');
18
+
19
+ function getStatusClassNames(prefixCls, status, hasFeedback) {
20
+ var _classNames;
21
+
22
+ return (0, _classnames.default)((_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-status-success"), status === 'success'), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-status-warning"), status === 'warning'), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-status-error"), status === 'error'), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-status-validating"), status === 'validating'), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-has-feedback"), hasFeedback), _classNames));
23
+ }
24
+
25
+ var getMergedStatus = function getMergedStatus(contextStatus, customStatus) {
26
+ return customStatus || contextStatus;
27
+ };
28
+
29
+ exports.getMergedStatus = getMergedStatus;
@@ -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,72 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.throttleByAnimationFrame = throttleByAnimationFrame;
9
+ exports.throttleByAnimationFrameDecorator = throttleByAnimationFrameDecorator;
10
+
11
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
12
+
13
+ var _raf = _interopRequireDefault(require("rc-util/lib/raf"));
14
+
15
+ function throttleByAnimationFrame(fn) {
16
+ var requestId;
17
+
18
+ var later = function later(args) {
19
+ return function () {
20
+ requestId = null;
21
+ fn.apply(void 0, (0, _toConsumableArray2.default)(args));
22
+ };
23
+ };
24
+
25
+ var throttled = function throttled() {
26
+ if (requestId == null) {
27
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
28
+ args[_key] = arguments[_key];
29
+ }
30
+
31
+ requestId = (0, _raf.default)(later(args));
32
+ }
33
+ };
34
+
35
+ throttled.cancel = function () {
36
+ _raf.default.cancel(requestId);
37
+
38
+ requestId = null;
39
+ };
40
+
41
+ return throttled;
42
+ }
43
+
44
+ function throttleByAnimationFrameDecorator() {
45
+ return function throttle(target, key, descriptor) {
46
+ var fn = descriptor.value;
47
+ var definingProperty = false;
48
+ return {
49
+ configurable: true,
50
+ get: function get() {
51
+ // In IE11 calling Object.defineProperty has a side-effect of evaluating the
52
+ // getter for the property which is being replaced. This causes infinite
53
+ // recursion and an "Out of stack space" error.
54
+ // eslint-disable-next-line no-prototype-builtins
55
+ if (definingProperty || this === target.prototype || this.hasOwnProperty(key)) {
56
+ /* istanbul ignore next */
57
+ return fn;
58
+ }
59
+
60
+ var boundFn = throttleByAnimationFrame(fn.bind(this));
61
+ definingProperty = true;
62
+ Object.defineProperty(this, key, {
63
+ value: boundFn,
64
+ configurable: true,
65
+ writable: true
66
+ });
67
+ definingProperty = false;
68
+ return boundFn;
69
+ }
70
+ };
71
+ };
72
+ }
@@ -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 & {});
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.tupleNum = exports.tuple = void 0;
7
+
8
+ // https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead
9
+ var tuple = function tuple() {
10
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
11
+ args[_key] = arguments[_key];
12
+ }
13
+
14
+ return args;
15
+ };
16
+
17
+ exports.tuple = tuple;
18
+
19
+ var tupleNum = function tupleNum() {
20
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
21
+ args[_key2] = arguments[_key2];
22
+ }
23
+
24
+ return args;
25
+ };
26
+
27
+ exports.tupleNum = tupleNum;
@@ -0,0 +1,6 @@
1
+ import { resetWarned } from 'rc-util/lib/warning';
2
+ export { resetWarned };
3
+ export declare function noop(): void;
4
+ declare type Warning = (valid: boolean, component: string, message: string) => void;
5
+ declare let warning: Warning;
6
+ export default warning;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+ exports.noop = noop;
10
+ Object.defineProperty(exports, "resetWarned", {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _warning.resetWarned;
14
+ }
15
+ });
16
+
17
+ var _warning = _interopRequireWildcard(require("rc-util/lib/warning"));
18
+
19
+ function noop() {} // eslint-disable-next-line import/no-mutable-exports
20
+
21
+
22
+ var warning = noop;
23
+
24
+ if (process.env.NODE_ENV !== 'production') {
25
+ warning = function warning(valid, component, message) {
26
+ (0, _warning.default)(valid, "[antd: ".concat(component, "] ").concat(message)); // StrictMode will inject console which will not throw warning in React 17.
27
+
28
+ if (process.env.NODE_ENV === 'test') {
29
+ (0, _warning.resetWarned)();
30
+ }
31
+ };
32
+ }
33
+
34
+ var _default = warning;
35
+ exports.default = _default;
package/lib/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/lib/index.js CHANGED
@@ -53,6 +53,12 @@ Object.defineProperty(exports, "CustomerService", {
53
53
  return _CustomerService.default;
54
54
  }
55
55
  });
56
+ Object.defineProperty(exports, "DatePicker", {
57
+ enumerable: true,
58
+ get: function get() {
59
+ return _DatePicker.default;
60
+ }
61
+ });
56
62
  Object.defineProperty(exports, "Drawer", {
57
63
  enumerable: true,
58
64
  get: function get() {
@@ -131,6 +137,12 @@ Object.defineProperty(exports, "InputNumber", {
131
137
  return _InputNumber.default;
132
138
  }
133
139
  });
140
+ Object.defineProperty(exports, "LMQuickMenu", {
141
+ enumerable: true,
142
+ get: function get() {
143
+ return _QuickMenu.default;
144
+ }
145
+ });
134
146
  Object.defineProperty(exports, "LeftTable", {
135
147
  enumerable: true,
136
148
  get: function get() {
@@ -396,4 +408,8 @@ var _Spin = _interopRequireDefault(require("./Spin"));
396
408
 
397
409
  var _LmEditTable = _interopRequireDefault(require("./LmEditTable"));
398
410
 
399
- var _List = _interopRequireDefault(require("./List"));
411
+ var _List = _interopRequireDefault(require("./List"));
412
+
413
+ var _QuickMenu = _interopRequireDefault(require("./QuickMenu"));
414
+
415
+ var _DatePicker = _interopRequireDefault(require("./DatePicker"));