acud 0.0.69 → 0.0.72

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 (62) hide show
  1. package/dist/acud.css +58 -3
  2. package/dist/acud.css.map +1 -1
  3. package/dist/acud.js +1444 -1281
  4. package/dist/acud.js.map +1 -1
  5. package/dist/acud.min.css +1 -1
  6. package/dist/acud.min.css.map +1 -1
  7. package/dist/acud.min.js +9 -6
  8. package/dist/acud.min.js.map +1 -1
  9. package/es/cascader/index.js +7 -6
  10. package/es/date-picker/generatePicker/generateSinglePicker.js +7 -5
  11. package/es/date-picker/src/PickerPanel.js +0 -1
  12. package/es/date-picker/src/RangePicker.js +0 -1
  13. package/es/input/AutoComplete.d.ts +12 -0
  14. package/es/input/AutoComplete.js +53 -0
  15. package/es/input/TextArea.d.ts +1 -1
  16. package/es/input/TextArea.js +4 -4
  17. package/es/input/index.d.ts +2 -0
  18. package/es/input/index.js +2 -0
  19. package/es/input/style/index.css +56 -1
  20. package/es/input/style/index.less +66 -1
  21. package/es/input-number/src/hooks/useFrame.d.ts +1 -1
  22. package/es/input-number/src/hooks/useLayoutEffect.d.ts +1 -1
  23. package/es/locale/en_US.js +2 -0
  24. package/es/locale/zh_CN.js +2 -0
  25. package/es/select/index.d.ts +1 -1
  26. package/es/toast/index.js +2 -2
  27. package/es/upload/Upload.js +2 -0
  28. package/es/upload/UploadList/ListItem.d.ts +1 -0
  29. package/es/upload/UploadList/ListItem.js +3 -1
  30. package/es/upload/UploadList/index.js +6 -2
  31. package/es/upload/interface.d.ts +2 -0
  32. package/es/upload/style/index.css +1 -1
  33. package/es/upload/style/index.less +1 -1
  34. package/es/virtual-list/List.js +0 -7
  35. package/lib/cascader/index.js +7 -6
  36. package/lib/date-picker/generatePicker/generateSinglePicker.js +7 -5
  37. package/lib/date-picker/src/PickerPanel.js +0 -1
  38. package/lib/date-picker/src/RangePicker.js +0 -1
  39. package/lib/input/AutoComplete.d.ts +12 -0
  40. package/lib/input/AutoComplete.js +72 -0
  41. package/lib/input/TextArea.d.ts +1 -1
  42. package/lib/input/TextArea.js +4 -2
  43. package/lib/input/index.d.ts +2 -0
  44. package/lib/input/index.js +3 -0
  45. package/lib/input/style/index.css +56 -1
  46. package/lib/input/style/index.less +66 -1
  47. package/lib/input-number/src/hooks/useFrame.d.ts +1 -1
  48. package/lib/input-number/src/hooks/useLayoutEffect.d.ts +1 -1
  49. package/lib/locale/en_US.js +5 -0
  50. package/lib/locale/zh_CN.js +5 -0
  51. package/lib/select/index.d.ts +1 -1
  52. package/lib/toast/index.js +2 -2
  53. package/lib/upload/Upload.js +2 -0
  54. package/lib/upload/UploadList/ListItem.d.ts +1 -0
  55. package/lib/upload/UploadList/ListItem.js +3 -1
  56. package/lib/upload/UploadList/index.js +6 -2
  57. package/lib/upload/interface.d.ts +2 -0
  58. package/lib/upload/style/index.css +1 -1
  59. package/lib/upload/style/index.less +1 -1
  60. package/lib/virtual-list/List.js +0 -7
  61. package/package.json +1 -1
  62. package/CHANGELOG.md +0 -4
@@ -86,11 +86,13 @@ function generatePicker(generateConfig) {
86
86
 
87
87
  (0, _classCallCheck2["default"])(this, Picker);
88
88
  _this = _super.call(this, props);
89
- _this.pickerRef = /*#__PURE__*/React.createRef(); // focus = () => {
90
- // if (this.pickerRef.current) {
91
- // this.pickerRef.current.focus();
92
- // }
93
- // };
89
+ _this.pickerRef = /*#__PURE__*/React.createRef();
90
+
91
+ _this.focus = function () {
92
+ if (_this.pickerRef.current) {
93
+ _this.pickerRef.current.focus();
94
+ }
95
+ };
94
96
 
95
97
  _this.blur = function () {
96
98
  if (_this.pickerRef.current) {
@@ -159,7 +159,6 @@ function PickerPanel(props) {
159
159
  var now = generateConfig.getNow();
160
160
  if (!date) return now; // When value is null and set showTime
161
161
 
162
- // When value is null and set showTime
163
162
  if (!mergedValue && showTime) {
164
163
  if ((0, _typeof2["default"])(showTime) === 'object') {
165
164
  return (0, _timeUtil.setDateTime)(generateConfig, date, showTime.defaultValue || now);
@@ -212,7 +212,6 @@ function InnerRangePicker(props) {
212
212
  } // Fill disabled unit
213
213
 
214
214
 
215
- // Fill disabled unit
216
215
  for (var i = 0; i < 2; i += 1) {
217
216
  if (mergedDisabled[i] && !(0, _miscUtil.getValue)(postValues, i) && !(0, _miscUtil.getValue)(allowEmpty, i)) {
218
217
  postValues = (0, _miscUtil.updateValues)(postValues, generateConfig.getNow(), i);
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { InternalSelectProps, SelectInterface } from '../select';
3
+ export interface AutoCompleteProps<ValueType = any> extends Omit<InternalSelectProps<ValueType>, 'inputIcon' | 'loading' | 'mode' | 'optionLabelProp' | 'labelInValue'> {
4
+ }
5
+ declare const RefAutoComplete: (<ValueType = any>(props: AutoCompleteProps<ValueType> & {
6
+ children?: React.ReactNode;
7
+ } & {
8
+ ref?: React.Ref<SelectInterface>;
9
+ }) => React.ReactElement) & {
10
+ Option: import("../select/src/Option").OptionFC;
11
+ };
12
+ export default RefAutoComplete;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
+
14
+ var _react = _interopRequireDefault(require("react"));
15
+
16
+ var _classnames = _interopRequireDefault(require("classnames"));
17
+
18
+ var _select = _interopRequireDefault(require("../select"));
19
+
20
+ var _reactNode = require("../_util/reactNode");
21
+
22
+ var _toArray = _interopRequireDefault(require("rc-util/lib/Children/toArray"));
23
+
24
+ var Option = _select["default"].Option;
25
+
26
+ function isSelectOptionOrSelectOptGroup(child) {
27
+ return child && child.type && (child.type.isSelectOption || child.type.isSelectOptGroup);
28
+ }
29
+
30
+ var AutoComplete = function AutoComplete(props, ref) {
31
+ var _props$prefixCls = props.prefixCls,
32
+ prefixCls = _props$prefixCls === void 0 ? 'acud-select' : _props$prefixCls,
33
+ className = props.className,
34
+ children = props.children;
35
+ var childNodes = (0, _toArray["default"])(children); // ============================= Input =============================
36
+
37
+ var customizeInput;
38
+
39
+ if (childNodes.length === 1 && (0, _reactNode.isValidElement)(childNodes[0]) && !isSelectOptionOrSelectOptGroup(childNodes[0])) {
40
+ var _childNodes = (0, _slicedToArray2["default"])(childNodes, 1);
41
+
42
+ customizeInput = _childNodes[0];
43
+ }
44
+
45
+ var getInputElement = customizeInput ? function () {
46
+ return customizeInput;
47
+ } : undefined; // ============================ Options ============================
48
+
49
+ var optionChildren;
50
+
51
+ if (childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0])) {
52
+ optionChildren = children;
53
+ } else {
54
+ optionChildren = [];
55
+ }
56
+
57
+ return /*#__PURE__*/_react["default"].createElement(_select["default"], (0, _extends2["default"])({
58
+ ref: ref
59
+ }, props, {
60
+ prefixCls: prefixCls,
61
+ className: (0, _classnames["default"])("".concat(prefixCls, "-auto-complete"), className),
62
+ mode: _select["default"].SECRET_COMBOBOX_MODE_DO_NOT_USE,
63
+ getInputElement: getInputElement
64
+ }), optionChildren);
65
+ };
66
+
67
+ var RefAutoComplete = /*#__PURE__*/_react["default"].forwardRef(AutoComplete);
68
+
69
+ RefAutoComplete.Option = Option;
70
+ var _default = RefAutoComplete; // export default AutoComplete;
71
+
72
+ exports["default"] = _default;
@@ -17,5 +17,5 @@ export interface TextAreaProps {
17
17
  readonly?: boolean;
18
18
  allowClear?: boolean;
19
19
  }
20
- declare const TextArea: React.FC<TextAreaProps>;
20
+ declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<unknown>>;
21
21
  export default TextArea;
@@ -49,7 +49,8 @@ var __rest = void 0 && (void 0).__rest || function (s, e) {
49
49
  */
50
50
 
51
51
 
52
- var TextArea = function TextArea(props) {
52
+ // const TextArea:React.FC<TextAreaProps> = props => {
53
+ var TextArea = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
53
54
  var _classNames;
54
55
 
55
56
  var _props$prefixCls = props.prefixCls,
@@ -157,6 +158,7 @@ var TextArea = function TextArea(props) {
157
158
  className: "".concat(prefixCls, "-outer"),
158
159
  style: style
159
160
  }, /*#__PURE__*/_react["default"].createElement(_rcTextarea["default"], (0, _extends2["default"])({}, rest, {
161
+ ref: ref,
160
162
  placeholder: placeholder,
161
163
  className: (0, _classnames["default"])(classes),
162
164
  onChange: handleOnChange,
@@ -178,7 +180,7 @@ var TextArea = function TextArea(props) {
178
180
  }, /*#__PURE__*/_react["default"].createElement("span", {
179
181
  className: (0, _classnames["default"])(limitClassName, 'limit')
180
182
  }, currentLength, "/", limitLength)));
181
- };
183
+ });
182
184
 
183
185
  var _default = TextArea;
184
186
  exports["default"] = _default;
@@ -4,11 +4,13 @@ import Label from './Label';
4
4
  import TextArea from './TextArea';
5
5
  import Password from './Password';
6
6
  import MultiSelectInput from './MultiSelectInput';
7
+ import AutoComplete from './AutoComplete';
7
8
  interface CompoundedComponent extends React.ForwardRefExoticComponent<BaseInputProps & React.RefAttributes<HTMLInputElement>> {
8
9
  Label: typeof Label;
9
10
  TextArea: typeof TextArea;
10
11
  Password: typeof Password;
11
12
  MultiSelectInput: typeof MultiSelectInput;
13
+ AutoComplete: typeof AutoComplete;
12
14
  __ACUD_CHECKBOX: boolean;
13
15
  }
14
16
  declare const Input: CompoundedComponent;
@@ -17,10 +17,13 @@ var _Password = _interopRequireDefault(require("./Password"));
17
17
 
18
18
  var _MultiSelectInput = _interopRequireDefault(require("./MultiSelectInput"));
19
19
 
20
+ var _AutoComplete = _interopRequireDefault(require("./AutoComplete"));
21
+
20
22
  var Input = _Input["default"];
21
23
  Input.Label = _Label["default"];
22
24
  Input.TextArea = _TextArea["default"];
23
25
  Input.Password = _Password["default"];
24
26
  Input.MultiSelectInput = _MultiSelectInput["default"];
27
+ Input.AutoComplete = _AutoComplete["default"];
25
28
  var _default = Input;
26
29
  exports["default"] = _default;
@@ -682,7 +682,6 @@
682
682
  padding-top: 6px;
683
683
  padding-right: 24px;
684
684
  padding-bottom: 24px;
685
- min-height: 100px;
686
685
  border-radius: 4px;
687
686
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text", "Helvetica Neue", Helvetica, "PingFang SC", Roboto, 'Arial', 'microsoft yahei ui', "Microsoft YaHei", SimSun, sans-serif;
688
687
  color: #151B26;
@@ -862,6 +861,9 @@
862
861
  top: 2px;
863
862
  right: 12px;
864
863
  cursor: pointer;
864
+ display: flex;
865
+ align-items: center;
866
+ bottom: 2px;
865
867
  }
866
868
  .acud-input-password-outer-icon .acuicon svg {
867
869
  fill: #84868C;
@@ -884,3 +886,56 @@
884
886
  .acud-input-select-tags .acud-select-clear {
885
887
  right: 12px;
886
888
  }
889
+ .acud-select-auto-complete .acud-select-selector {
890
+ width: 100%;
891
+ display: flex;
892
+ cursor: text;
893
+ position: relative;
894
+ }
895
+ .acud-select-auto-complete {
896
+ width: 100%;
897
+ display: block;
898
+ }
899
+ .acud-select-auto-complete:not(.acud-select-customize-input) .acud-select-selector {
900
+ position: relative;
901
+ background-color: #fff;
902
+ border-radius: 2px;
903
+ transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
904
+ }
905
+ .acud-select-auto-complete:not(.acud-select-customize-input) .acud-select-selector .acud-select-selection-search .acud-select-selection-search-input {
906
+ cursor: auto;
907
+ margin: 0;
908
+ padding: 0;
909
+ background: 0 0;
910
+ border: none;
911
+ outline: none;
912
+ -webkit-appearance: none;
913
+ -moz-appearance: none;
914
+ appearance: none;
915
+ }
916
+ .acud-select-auto-complete .acud-select-selector {
917
+ width: 100%;
918
+ display: flex;
919
+ cursor: text;
920
+ position: relative;
921
+ }
922
+ .acud-select-auto-complete .acud-select-selector .acud-select-selection-search {
923
+ position: absolute;
924
+ inset: 0 12px;
925
+ z-index: 2;
926
+ }
927
+ .acud-select-auto-complete .acud-select-selector .acud-select-selection-search .acud-select-selection-search-input {
928
+ width: 100%;
929
+ }
930
+ .acud-select-auto-complete .acud-select-selector .acud-select-selection-placeholder {
931
+ flex: 1;
932
+ transition: none;
933
+ pointer-events: none;
934
+ overflow: hidden;
935
+ color: #bfbfbf;
936
+ white-space: nowrap;
937
+ text-overflow: ellipsis;
938
+ padding-left: 12px;
939
+ padding-right: 12px;
940
+ z-index: 1;
941
+ }
@@ -8,6 +8,10 @@
8
8
 
9
9
  @input-password-outer-prefix-cls: ~'@{acud-prefix}-input-password-outer';
10
10
  @input-password-prefix-cls: ~'@{acud-prefix}-input-password';
11
+ @select-auto-complete-prefix-cls: ~'@{acud-prefix}-select-auto-complete';
12
+
13
+ @select-prefix-cls: ~'@{acud-prefix}-select';
14
+
11
15
  // basic logic - line hight, font size
12
16
  // content layer - 只处理文字 Icon, 没有开关config,对应四种交互状态配置
13
17
  // background layer - 背景层 填色、描边、阴影,可以通过开关config配置, 对应四种交互状态
@@ -254,7 +258,7 @@
254
258
  padding-top: 1.5*@padding-xsm;
255
259
  padding-right: 2*@padding-m;
256
260
  padding-bottom: 6*@padding-xsm;
257
- min-height: 100px;
261
+ // min-height: 100px;
258
262
  border-radius: @input-border-lg-radius;
259
263
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text", "Helvetica Neue", Helvetica, "PingFang SC", Roboto, 'Arial', 'microsoft yahei ui', "Microsoft YaHei", SimSun, sans-serif;
260
264
  &::-webkit-input-placeholder {
@@ -337,6 +341,9 @@
337
341
  top: 2px;
338
342
  right: @padding-m;
339
343
  cursor: pointer;
344
+ display: flex;
345
+ align-items: center;
346
+ bottom: 2px;
340
347
  .acuicon{
341
348
  svg{
342
349
  fill:@G5;
@@ -376,4 +383,62 @@
376
383
  right:12px;
377
384
  }
378
385
  }
386
+ .acud-select-auto-complete{
387
+ .acud-select-selector{
388
+ width:100%;
389
+ display: flex;
390
+ cursor: text;
391
+ position: relative;
392
+ }
393
+ }
394
+ .@{select-auto-complete-prefix-cls}{
395
+ width:100%;
396
+ display: block;
397
+ &:not(.acud-select-customize-input) {
398
+ .acud-select-selector{
399
+ position: relative;
400
+ background-color: #fff;
401
+ border-radius: 2px;
402
+ transition: all .3s cubic-bezier(.645,.045,.355,1);
403
+ .acud-select-selection-search{
404
+ .acud-select-selection-search-input{
405
+ cursor: auto;
406
+ margin: 0;
407
+ padding: 0;
408
+ background: 0 0;
409
+ border: none;
410
+ outline: none;
411
+ appearance: none;
412
+ }
413
+ }
414
+ }
415
+
416
+ }
417
+ .@{select-prefix-cls}-selector{
418
+ width:100%;
419
+ display: flex;
420
+ cursor: text;
421
+ position: relative;
422
+ .@{select-prefix-cls}-selection-search{
423
+ position: absolute;
424
+ inset: 0 12px;
425
+ z-index: 2;
426
+ .@{select-prefix-cls}-selection-search-input{
427
+ width:100%;
428
+ }
429
+ }
430
+ .@{select-prefix-cls}-selection-placeholder{
431
+ flex:1;
432
+ transition: none;
433
+ pointer-events: none;
434
+ overflow: hidden;
435
+ color: #bfbfbf;
436
+ white-space: nowrap;
437
+ text-overflow: ellipsis;
438
+ padding-left: 12px;
439
+ padding-right: 12px;
440
+ z-index: 1;
441
+ }
379
442
 
443
+ }
444
+ }
@@ -1,5 +1,5 @@
1
- declare const _default: () => (callback: () => void) => void;
2
1
  /**
3
2
  * Always trigger latest once when call multiple time
4
3
  */
4
+ declare const _default: () => (callback: () => void) => void;
5
5
  export default _default;
@@ -1,2 +1,2 @@
1
1
  import * as React from 'react';
2
- export declare const useLayoutEffect: typeof React.useEffect;
2
+ export declare const useLayoutEffect: typeof React.useLayoutEffect;
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports["default"] = void 0;
7
9
 
10
+ var _en_US = _interopRequireDefault(require("../date-picker/locale/en_US"));
11
+
8
12
  /* eslint-disable no-template-curly-in-string */
9
13
  // import {Locale} from '../locale-provider';
10
14
  var typeTemplate = '${label} is not a valid ${type}'; // const localeValues: Locale = {
@@ -14,6 +18,7 @@ var localeValues = {
14
18
  global: {
15
19
  placeholder: 'Please select'
16
20
  },
21
+ DatePicker: _en_US["default"],
17
22
  Table: {
18
23
  filterTitle: 'Filter menu',
19
24
  filterConfirm: 'OK',
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
6
8
  exports["default"] = void 0;
7
9
 
10
+ var _zh_CN = _interopRequireDefault(require("../date-picker/locale/zh_CN"));
11
+
8
12
  /* eslint-disable no-template-curly-in-string */
9
13
  // import {Locale} from '../locale-provider';
10
14
  var typeTemplate = '${label}不是一个有效的${type}'; // const localeValues: Locale = {
@@ -15,6 +19,7 @@ var localeValues = {
15
19
  global: {
16
20
  placeholder: '请选择'
17
21
  },
22
+ DatePicker: _zh_CN["default"],
18
23
  Table: {
19
24
  filterTitle: '筛选',
20
25
  filterConfirm: '确定',
@@ -29,7 +29,7 @@ declare const SelectRef: <VT extends SelectValue = SelectValue>(props: SelectPro
29
29
  ref?: React.Ref<RefSelectProps>;
30
30
  }) => React.ReactElement;
31
31
  declare type InternalSelectType = typeof SelectRef;
32
- interface SelectInterface extends InternalSelectType {
32
+ export interface SelectInterface extends InternalSelectType {
33
33
  SECRET_COMBOBOX_MODE_DO_NOT_USE: string;
34
34
  Option: typeof Option;
35
35
  OptGroup: typeof OptGroup;
@@ -73,8 +73,8 @@ function ToastDom(props) {
73
73
  onClose = _props$onClose === void 0 ? null : _props$onClose;
74
74
 
75
75
  var _useState = (0, _react.useState)(null),
76
- _useState2 = (0, _slicedToArray2["default"])(_useState, 1),
77
- setTimerID = _useState2[0];
76
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
77
+ setTimerID = _useState2[1];
78
78
 
79
79
  var _useState3 = (0, _react.useState)(countdown),
80
80
  _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
@@ -107,6 +107,7 @@ var InternalUpload = function InternalUpload(props, ref) {
107
107
  type = props.type,
108
108
  children = props.children,
109
109
  style = props.style,
110
+ motionDeadline = props.motionDeadline,
110
111
  itemRender = props.itemRender,
111
112
  maxCount = props.maxCount,
112
113
  description = props.description,
@@ -447,6 +448,7 @@ var InternalUpload = function InternalUpload(props, ref) {
447
448
  return /*#__PURE__*/React.createElement(_UploadList["default"], {
448
449
  listType: listType,
449
450
  items: mergedFileList,
451
+ motionDeadline: motionDeadline,
450
452
  previewFile: previewFile,
451
453
  onPreview: onPreview,
452
454
  onDownload: onDownload,
@@ -3,6 +3,7 @@ import { ItemRender, UploadFile, UploadListProgressProps, UploadListType, Upload
3
3
  export interface ListItemProps {
4
4
  prefixCls: string;
5
5
  className?: string;
6
+ motionDeadline?: number;
6
7
  style?: React.CSSProperties;
7
8
  locale: UploadLocale;
8
9
  file: UploadFile;
@@ -60,6 +60,8 @@ var ListItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
60
60
  actionIconRender = _ref.actionIconRender,
61
61
  itemRender = _ref.itemRender,
62
62
  isImgUrl = _ref.isImgUrl,
63
+ _ref$motionDeadline = _ref.motionDeadline,
64
+ motionDeadline = _ref$motionDeadline === void 0 ? 2000 : _ref$motionDeadline,
63
65
  showPreviewIcon = _ref.showPreviewIcon,
64
66
  showRemoveIcon = _ref.showRemoveIcon,
65
67
  showDownloadIcon = _ref.showDownloadIcon,
@@ -214,7 +216,7 @@ var ListItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
214
216
  }, iconAndPreview), actions, showProgress && /*#__PURE__*/React.createElement(_rcMotion["default"], {
215
217
  motionName: "".concat(rootPrefixCls, "-fade"),
216
218
  visible: file.status === 'uploading',
217
- motionDeadline: 2000
219
+ motionDeadline: motionDeadline
218
220
  }, function (_ref2) {
219
221
  var motionClassName = _ref2.className;
220
222
  // show loading icon if upload progress listener is disabled
@@ -119,6 +119,8 @@ var InternalUploadList = function InternalUploadList(_ref, ref) {
119
119
  downloadIcon = _ref.downloadIcon,
120
120
  uploadIcon = _ref.uploadIcon,
121
121
  progress = _ref.progress,
122
+ _ref$motionDeadline = _ref.motionDeadline,
123
+ motionDeadline = _ref$motionDeadline === void 0 ? 2000 : _ref$motionDeadline,
122
124
  appendAction = _ref.appendAction,
123
125
  itemRender = _ref.itemRender;
124
126
  var forceUpdate = (0, _useForceUpdate["default"])();
@@ -254,7 +256,7 @@ var InternalUploadList = function InternalUploadList(_ref, ref) {
254
256
  var animationDirection = listType === 'picture-card' ? 'animate-inline' : 'animate'; // const transitionName = list.length === 0 ? '' : `${prefixCls}-${animationDirection}`;
255
257
 
256
258
  var motionConfig = {
257
- motionDeadline: 2000,
259
+ motionDeadline: motionDeadline,
258
260
  motionName: "".concat(prefixCls, "-").concat(animationDirection),
259
261
  keys: motionKeyList,
260
262
  motionAppear: motionAppear
@@ -307,7 +309,8 @@ var InternalUploadList = function InternalUploadList(_ref, ref) {
307
309
  onPreview: onInternalPreview,
308
310
  onDownload: onInternalDownload,
309
311
  onClose: onInternalClose,
310
- onUpload: onInternalUpload
312
+ onUpload: onInternalUpload,
313
+ motionDeadline: motionDeadline
311
314
  });
312
315
  }));
313
316
  };
@@ -320,6 +323,7 @@ UploadList.defaultProps = {
320
323
  // showInfo: false
321
324
  },
322
325
  showUploadIcon: true,
326
+ motionDeadline: 2000,
323
327
  showRemoveIcon: true,
324
328
  showDownloadIcon: false,
325
329
  showPreviewIcon: true,
@@ -69,6 +69,7 @@ declare type BeforeUploadValueType = void | boolean | string | Blob | File;
69
69
  export interface UploadProps<T = any> {
70
70
  type?: UploadType;
71
71
  name?: string;
72
+ motionDeadline?: number;
72
73
  defaultFileList?: Array<UploadFile<T>>;
73
74
  fileList?: Array<UploadFile<T>>;
74
75
  action?: string | ((file: RcFile) => string) | ((file: RcFile) => PromiseLike<string>);
@@ -122,6 +123,7 @@ export interface UploadListProps<T = any> {
122
123
  items?: Array<UploadFile<T>>;
123
124
  progress?: UploadListProgressProps;
124
125
  prefixCls?: string;
126
+ motionDeadline?: number;
125
127
  showRemoveIcon?: boolean;
126
128
  showDownloadIcon?: boolean;
127
129
  showPreviewIcon?: boolean;
@@ -355,7 +355,7 @@
355
355
  position: relative;
356
356
  height: 66px;
357
357
  padding: 0;
358
- border: 1px 1px #d9d9d9;
358
+ border: 1px solid #d9d9d9;
359
359
  border-radius: 0px;
360
360
  }
361
361
  .acud-upload-list-picture .acud-upload-list-item:hover,
@@ -321,7 +321,7 @@
321
321
  position: relative;
322
322
  height: 66px;
323
323
  padding: 0;
324
- border: @border-width-base @upload-picture-card-border-style @border-color-base;
324
+ border: @border-width-base solid @border-color-base;
325
325
  border-radius: @border-radius-base;
326
326
 
327
327
  &:hover {
@@ -165,7 +165,6 @@ function RawList(props, ref) {
165
165
  } // Always use virtual scroll bar in avoid shaking
166
166
 
167
167
 
168
- // Always use virtual scroll bar in avoid shaking
169
168
  if (!inVirtual) {
170
169
  return {
171
170
  scrollHeight: ((_a = fillerInnerRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight) || 0,
@@ -187,14 +186,12 @@ function RawList(props, ref) {
187
186
  var cacheHeight = heights.get(key);
188
187
  var currentItemBottom = itemTop + (cacheHeight === undefined ? itemHeight : cacheHeight); // Check item top in the range
189
188
 
190
- // Check item top in the range
191
189
  if (currentItemBottom >= scrollTop && startIndex === undefined) {
192
190
  startIndex = i;
193
191
  startOffset = itemTop;
194
192
  } // Check item bottom in the range. We will render additional one item for motion usage
195
193
 
196
194
 
197
- // Check item bottom in the range. We will render additional one item for motion usage
198
195
  if (currentItemBottom > scrollTop + height && endIndex === undefined) {
199
196
  endIndex = i;
200
197
  }
@@ -205,9 +202,6 @@ function RawList(props, ref) {
205
202
  /* istanbul ignore next */
206
203
 
207
204
 
208
- // Fallback to normal if not match. This code should never reach
209
-
210
- /* istanbul ignore next */
211
205
  if (startIndex === undefined) {
212
206
  startIndex = 0;
213
207
  startOffset = 0;
@@ -218,7 +212,6 @@ function RawList(props, ref) {
218
212
  } // Give cache to improve scroll experience
219
213
 
220
214
 
221
- // Give cache to improve scroll experience
222
215
  endIndex = Math.min(endIndex + 1, mergedData.length);
223
216
  return {
224
217
  scrollHeight: itemTop,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acud",
3
- "version": "0.0.69",
3
+ "version": "0.0.72",
4
4
  "description": "acg react 组件库",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
package/CHANGELOG.md DELETED
@@ -1,4 +0,0 @@
1
- # 0.0.16
2
- `2021-12-24`
3
- 1. fix input、textarea的clear不触发上层的onchange的bug
4
- 2. fix textarea的length 在有值得情况下初始化的时候展示0的bug