acud 0.0.70 → 0.0.73

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/CHANGELOG.md +4 -0
  2. package/dist/acud.css +2062 -2007
  3. package/dist/acud.css.map +1 -1
  4. package/dist/acud.js +272 -402
  5. package/dist/acud.js.map +1 -1
  6. package/dist/acud.min.css +1 -1
  7. package/dist/acud.min.css.map +1 -1
  8. package/dist/acud.min.js +6 -6
  9. package/dist/acud.min.js.map +1 -1
  10. package/es/cascader/index.js +7 -6
  11. package/es/cascader/style/css.js +5 -1
  12. package/es/cascader/style/index.d.ts +4 -0
  13. package/es/cascader/style/index.js +5 -1
  14. package/es/input/AutoComplete.d.ts +12 -0
  15. package/es/input/AutoComplete.js +53 -0
  16. package/es/input/TextArea.d.ts +1 -1
  17. package/es/input/TextArea.js +4 -4
  18. package/es/input/index.d.ts +2 -0
  19. package/es/input/index.js +2 -0
  20. package/es/input/style/index.css +56 -1
  21. package/es/input/style/index.less +66 -1
  22. package/es/modal/style/css.js +3 -1
  23. package/es/modal/style/index.d.ts +1 -0
  24. package/es/modal/style/index.js +3 -1
  25. package/es/select/index.d.ts +1 -1
  26. package/es/select/style/css.js +2 -1
  27. package/es/select/style/index.d.ts +1 -0
  28. package/es/select/style/index.js +2 -1
  29. package/es/upload/Upload.js +2 -0
  30. package/es/upload/UploadList/ListItem.d.ts +1 -0
  31. package/es/upload/UploadList/ListItem.js +3 -1
  32. package/es/upload/UploadList/index.js +6 -2
  33. package/es/upload/interface.d.ts +2 -0
  34. package/es/upload/style/index.css +1 -1
  35. package/es/upload/style/index.less +1 -1
  36. package/lib/cascader/index.js +7 -6
  37. package/lib/cascader/style/css.js +9 -1
  38. package/lib/cascader/style/index.d.ts +4 -0
  39. package/lib/cascader/style/index.js +9 -1
  40. package/lib/input/AutoComplete.d.ts +12 -0
  41. package/lib/input/AutoComplete.js +72 -0
  42. package/lib/input/TextArea.d.ts +1 -1
  43. package/lib/input/TextArea.js +4 -2
  44. package/lib/input/index.d.ts +2 -0
  45. package/lib/input/index.js +3 -0
  46. package/lib/input/style/index.css +56 -1
  47. package/lib/input/style/index.less +66 -1
  48. package/lib/modal/style/css.js +3 -1
  49. package/lib/modal/style/index.d.ts +1 -0
  50. package/lib/modal/style/index.js +3 -1
  51. package/lib/select/index.d.ts +1 -1
  52. package/lib/select/style/css.js +3 -1
  53. package/lib/select/style/index.d.ts +1 -0
  54. package/lib/select/style/index.js +3 -1
  55. package/lib/upload/Upload.js +2 -0
  56. package/lib/upload/UploadList/ListItem.d.ts +1 -0
  57. package/lib/upload/UploadList/ListItem.js +3 -1
  58. package/lib/upload/UploadList/index.js +6 -2
  59. package/lib/upload/interface.d.ts +2 -0
  60. package/lib/upload/style/index.css +1 -1
  61. package/lib/upload/style/index.less +1 -1
  62. package/package.json +1 -1
@@ -78,7 +78,8 @@ var flattenTree = function flattenTree(options, props) {
78
78
  return flattenOptions;
79
79
  };
80
80
 
81
- var defaultDisplayRender = function defaultDisplayRender(label) {
81
+ var defaultDisplayRender = function defaultDisplayRender() {
82
+ var label = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
82
83
  return label.join('>');
83
84
  };
84
85
 
@@ -135,7 +136,7 @@ var Cascader = function Cascader(props, ref) {
135
136
  var pickerLabelRef = useRef();
136
137
  var tagsRef = useRef();
137
138
 
138
- var _useState = useState(props.value || props.defaultValue || []),
139
+ var _useState = useState(props.value || props.defaultValue),
139
140
  _useState2 = _slicedToArray(_useState, 2),
140
141
  value = _useState2[0],
141
142
  setValue = _useState2[1];
@@ -311,7 +312,7 @@ var Cascader = function Cascader(props, ref) {
311
312
  var selectedOptionFirst = isMulti ? {} : selectedOptions[0];
312
313
 
313
314
  if (selectedOptionFirst === null || selectedOptionFirst === void 0 ? void 0 : selectedOptionFirst.__IS_FILTERED_OPTION) {
314
- var unwrappedValue = selectedOptionFirst[keepFilteredValueField] === undefined ? value[0] : selectedOptionFirst[keepFilteredValueField];
315
+ var unwrappedValue = selectedOptionFirst[keepFilteredValueField] === undefined ? first(value) : selectedOptionFirst[keepFilteredValueField];
315
316
  var unwrappedSelectedOptions = selectedOptionFirst.path;
316
317
  updateValue(unwrappedValue, unwrappedSelectedOptions);
317
318
  return;
@@ -418,9 +419,9 @@ var Cascader = function Cascader(props, ref) {
418
419
  });
419
420
  }
420
421
 
421
- var unwrappedValue = Array.isArray(value[0]) ? value[0] : value;
422
+ var unwrappedValue = Array.isArray(first(value)) ? first(value) : value;
422
423
  var selectedOptions = arrayTreeFilter(options, function (o, level) {
423
- return o[names.value] === unwrappedValue[level];
424
+ return o[names.value] === get(unwrappedValue, level);
424
425
  }, {
425
426
  childrenKeyName: names.children
426
427
  });
@@ -495,7 +496,7 @@ var Cascader = function Cascader(props, ref) {
495
496
  }, /*#__PURE__*/React.createElement(OutlinedLoading, {
496
497
  animation: "spin"
497
498
  }));
498
- var clearIcon = allowClear && !disabled && value.length > 0 || inputValue ? /*#__PURE__*/React.createElement(Clear, {
499
+ var clearIcon = allowClear && !disabled && get(value, 'length') > 0 || inputValue ? /*#__PURE__*/React.createElement(Clear, {
499
500
  className: "".concat(prefixCls, "-picker-clear"),
500
501
  onClick: handleSelectionClear
501
502
  }) : null;
@@ -2,4 +2,8 @@ import '../../style/index.css';
2
2
  import './index.css'; // style dependencies
3
3
 
4
4
  import '../../empty/style/css';
5
- import '../../input/style/css';
5
+ import '../../input/style/css';
6
+ import '../../tag/style/css';
7
+ import '../../tooltip/style/css';
8
+ import '../../clear/style/css';
9
+ import '../../checkbox/style/css';
@@ -2,3 +2,7 @@ import '../../style/index.less';
2
2
  import './index.less';
3
3
  import '../../empty/style';
4
4
  import '../../input/style';
5
+ import '../../tag/style';
6
+ import '../../tooltip/style';
7
+ import '../../clear/style';
8
+ import '../../checkbox/style';
@@ -2,4 +2,8 @@ import '../../style/index.less';
2
2
  import './index.less'; // style dependencies
3
3
 
4
4
  import '../../empty/style';
5
- import '../../input/style';
5
+ import '../../input/style';
6
+ import '../../tag/style';
7
+ import '../../tooltip/style';
8
+ import '../../clear/style';
9
+ import '../../checkbox/style';
@@ -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,53 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
+ import React from 'react';
4
+ import classNames from 'classnames';
5
+ import Select from '../select';
6
+ import { isValidElement } from '../_util/reactNode';
7
+ import toArray from "rc-util/es/Children/toArray";
8
+ var Option = Select.Option;
9
+
10
+ function isSelectOptionOrSelectOptGroup(child) {
11
+ return child && child.type && (child.type.isSelectOption || child.type.isSelectOptGroup);
12
+ }
13
+
14
+ var AutoComplete = function AutoComplete(props, ref) {
15
+ var _props$prefixCls = props.prefixCls,
16
+ prefixCls = _props$prefixCls === void 0 ? 'acud-select' : _props$prefixCls,
17
+ className = props.className,
18
+ children = props.children;
19
+ var childNodes = toArray(children); // ============================= Input =============================
20
+
21
+ var customizeInput;
22
+
23
+ if (childNodes.length === 1 && isValidElement(childNodes[0]) && !isSelectOptionOrSelectOptGroup(childNodes[0])) {
24
+ var _childNodes = _slicedToArray(childNodes, 1);
25
+
26
+ customizeInput = _childNodes[0];
27
+ }
28
+
29
+ var getInputElement = customizeInput ? function () {
30
+ return customizeInput;
31
+ } : undefined; // ============================ Options ============================
32
+
33
+ var optionChildren;
34
+
35
+ if (childNodes.length && isSelectOptionOrSelectOptGroup(childNodes[0])) {
36
+ optionChildren = children;
37
+ } else {
38
+ optionChildren = [];
39
+ }
40
+
41
+ return /*#__PURE__*/React.createElement(Select, _extends({
42
+ ref: ref
43
+ }, props, {
44
+ prefixCls: prefixCls,
45
+ className: classNames("".concat(prefixCls, "-auto-complete"), className),
46
+ mode: Select.SECRET_COMBOBOX_MODE_DO_NOT_USE,
47
+ getInputElement: getInputElement
48
+ }), optionChildren);
49
+ };
50
+
51
+ var RefAutoComplete = /*#__PURE__*/React.forwardRef(AutoComplete);
52
+ RefAutoComplete.Option = Option;
53
+ export default RefAutoComplete; // export default AutoComplete;
@@ -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;
@@ -25,9 +25,9 @@ import classNames from 'classnames';
25
25
  import { MultiToneClear } from 'acud-icon';
26
26
  import React, { useState, useMemo } from 'react';
27
27
  import useMergedState from '../_util/hooks/useMergedState';
28
- import { resolveTargetValue } from './Input';
28
+ import { resolveTargetValue } from './Input'; // const TextArea:React.FC<TextAreaProps> = props => {
29
29
 
30
- var TextArea = function TextArea(props) {
30
+ var TextArea = /*#__PURE__*/React.forwardRef(function (props, ref) {
31
31
  var _classNames;
32
32
 
33
33
  var _props$prefixCls = props.prefixCls,
@@ -135,6 +135,7 @@ var TextArea = function TextArea(props) {
135
135
  className: "".concat(prefixCls, "-outer"),
136
136
  style: style
137
137
  }, /*#__PURE__*/React.createElement(RcTextArea, _extends({}, rest, {
138
+ ref: ref,
138
139
  placeholder: placeholder,
139
140
  className: classNames(classes),
140
141
  onChange: handleOnChange,
@@ -156,6 +157,5 @@ var TextArea = function TextArea(props) {
156
157
  }, /*#__PURE__*/React.createElement("span", {
157
158
  className: classNames(limitClassName, 'limit')
158
159
  }, currentLength, "/", limitLength)));
159
- };
160
-
160
+ });
161
161
  export default TextArea;
@@ -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;
package/es/input/index.js CHANGED
@@ -3,9 +3,11 @@ import Label from './Label';
3
3
  import TextArea from './TextArea';
4
4
  import Password from './Password';
5
5
  import MultiSelectInput from './MultiSelectInput';
6
+ import AutoComplete from './AutoComplete';
6
7
  var Input = InputComponent;
7
8
  Input.Label = Label;
8
9
  Input.TextArea = TextArea;
9
10
  Input.Password = Password;
10
11
  Input.MultiSelectInput = MultiSelectInput;
12
+ Input.AutoComplete = AutoComplete;
11
13
  export default Input;
@@ -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,2 +1,4 @@
1
1
  import '../../style/index.css';
2
- import './index.css';
2
+ import './index.css'; // style dependencies
3
+
4
+ import '../../button/style/css';
@@ -1,2 +1,3 @@
1
1
  import '../../style/index.less';
2
2
  import './index.less';
3
+ import '../../button/style';
@@ -1,2 +1,4 @@
1
1
  import '../../style/index.less';
2
- import './index.less';
2
+ import './index.less'; // style dependencies
3
+
4
+ import '../../button/style';
@@ -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;
@@ -1,4 +1,5 @@
1
1
  import '../../style/index.css';
2
2
  import './index.css'; // style dependencies
3
3
 
4
- import '../../empty/style/css';
4
+ import '../../empty/style/css';
5
+ import '../../checkbox/style/css';
@@ -1,3 +1,4 @@
1
1
  import '../../style/index.less';
2
2
  import './index.less';
3
3
  import '../../empty/style';
4
+ import '../../checkbox/style';
@@ -1,4 +1,5 @@
1
1
  import '../../style/index.less';
2
2
  import './index.less'; // style dependencies
3
3
 
4
- import '../../empty/style';
4
+ import '../../empty/style';
5
+ import '../../checkbox/style';
@@ -77,6 +77,7 @@ var InternalUpload = function InternalUpload(props, ref) {
77
77
  type = props.type,
78
78
  children = props.children,
79
79
  style = props.style,
80
+ motionDeadline = props.motionDeadline,
80
81
  itemRender = props.itemRender,
81
82
  maxCount = props.maxCount,
82
83
  description = props.description,
@@ -421,6 +422,7 @@ var InternalUpload = function InternalUpload(props, ref) {
421
422
  return /*#__PURE__*/React.createElement(UploadList, {
422
423
  listType: listType,
423
424
  items: mergedFileList,
425
+ motionDeadline: motionDeadline,
424
426
  previewFile: previewFile,
425
427
  onPreview: onPreview,
426
428
  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;
@@ -32,6 +32,8 @@ var ListItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
32
32
  actionIconRender = _ref.actionIconRender,
33
33
  itemRender = _ref.itemRender,
34
34
  isImgUrl = _ref.isImgUrl,
35
+ _ref$motionDeadline = _ref.motionDeadline,
36
+ motionDeadline = _ref$motionDeadline === void 0 ? 2000 : _ref$motionDeadline,
35
37
  showPreviewIcon = _ref.showPreviewIcon,
36
38
  showRemoveIcon = _ref.showRemoveIcon,
37
39
  showDownloadIcon = _ref.showDownloadIcon,
@@ -186,7 +188,7 @@ var ListItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
186
188
  }, iconAndPreview), actions, showProgress && /*#__PURE__*/React.createElement(CSSMotion, {
187
189
  motionName: "".concat(rootPrefixCls, "-fade"),
188
190
  visible: file.status === 'uploading',
189
- motionDeadline: 2000
191
+ motionDeadline: motionDeadline
190
192
  }, function (_ref2) {
191
193
  var motionClassName = _ref2.className;
192
194
  // show loading icon if upload progress listener is disabled
@@ -85,6 +85,8 @@ var InternalUploadList = function InternalUploadList(_ref, ref) {
85
85
  downloadIcon = _ref.downloadIcon,
86
86
  uploadIcon = _ref.uploadIcon,
87
87
  progress = _ref.progress,
88
+ _ref$motionDeadline = _ref.motionDeadline,
89
+ motionDeadline = _ref$motionDeadline === void 0 ? 2000 : _ref$motionDeadline,
88
90
  appendAction = _ref.appendAction,
89
91
  itemRender = _ref.itemRender;
90
92
  var forceUpdate = useForceUpdate();
@@ -221,7 +223,7 @@ var InternalUploadList = function InternalUploadList(_ref, ref) {
221
223
  var animationDirection = listType === 'picture-card' ? 'animate-inline' : 'animate'; // const transitionName = list.length === 0 ? '' : `${prefixCls}-${animationDirection}`;
222
224
 
223
225
  var motionConfig = {
224
- motionDeadline: 2000,
226
+ motionDeadline: motionDeadline,
225
227
  motionName: "".concat(prefixCls, "-").concat(animationDirection),
226
228
  keys: motionKeyList,
227
229
  motionAppear: motionAppear
@@ -274,7 +276,8 @@ var InternalUploadList = function InternalUploadList(_ref, ref) {
274
276
  onPreview: onInternalPreview,
275
277
  onDownload: onInternalDownload,
276
278
  onClose: onInternalClose,
277
- onUpload: onInternalUpload
279
+ onUpload: onInternalUpload,
280
+ motionDeadline: motionDeadline
278
281
  });
279
282
  }));
280
283
  };
@@ -287,6 +290,7 @@ UploadList.defaultProps = {
287
290
  // showInfo: false
288
291
  },
289
292
  showUploadIcon: true,
293
+ motionDeadline: 2000,
290
294
  showRemoveIcon: true,
291
295
  showDownloadIcon: false,
292
296
  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 {
@@ -122,7 +122,8 @@ var flattenTree = function flattenTree(options, props) {
122
122
  return flattenOptions;
123
123
  };
124
124
 
125
- var defaultDisplayRender = function defaultDisplayRender(label) {
125
+ var defaultDisplayRender = function defaultDisplayRender() {
126
+ var label = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
126
127
  return label.join('>');
127
128
  };
128
129
 
@@ -179,7 +180,7 @@ var Cascader = function Cascader(props, ref) {
179
180
  var pickerLabelRef = (0, _react.useRef)();
180
181
  var tagsRef = (0, _react.useRef)();
181
182
 
182
- var _useState = (0, _react.useState)(props.value || props.defaultValue || []),
183
+ var _useState = (0, _react.useState)(props.value || props.defaultValue),
183
184
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
184
185
  value = _useState2[0],
185
186
  setValue = _useState2[1];
@@ -355,7 +356,7 @@ var Cascader = function Cascader(props, ref) {
355
356
  var selectedOptionFirst = isMulti ? {} : selectedOptions[0];
356
357
 
357
358
  if (selectedOptionFirst === null || selectedOptionFirst === void 0 ? void 0 : selectedOptionFirst.__IS_FILTERED_OPTION) {
358
- var unwrappedValue = selectedOptionFirst[keepFilteredValueField] === undefined ? value[0] : selectedOptionFirst[keepFilteredValueField];
359
+ var unwrappedValue = selectedOptionFirst[keepFilteredValueField] === undefined ? (0, _first["default"])(value) : selectedOptionFirst[keepFilteredValueField];
359
360
  var unwrappedSelectedOptions = selectedOptionFirst.path;
360
361
  updateValue(unwrappedValue, unwrappedSelectedOptions);
361
362
  return;
@@ -462,9 +463,9 @@ var Cascader = function Cascader(props, ref) {
462
463
  });
463
464
  }
464
465
 
465
- var unwrappedValue = Array.isArray(value[0]) ? value[0] : value;
466
+ var unwrappedValue = Array.isArray((0, _first["default"])(value)) ? (0, _first["default"])(value) : value;
466
467
  var selectedOptions = (0, _arrayTreeFilter["default"])(options, function (o, level) {
467
- return o[names.value] === unwrappedValue[level];
468
+ return o[names.value] === (0, _get["default"])(unwrappedValue, level);
468
469
  }, {
469
470
  childrenKeyName: names.children
470
471
  });
@@ -541,7 +542,7 @@ var Cascader = function Cascader(props, ref) {
541
542
  animation: "spin"
542
543
  }));
543
544
 
544
- var clearIcon = allowClear && !disabled && value.length > 0 || inputValue ? /*#__PURE__*/_react["default"].createElement(_clear["default"], {
545
+ var clearIcon = allowClear && !disabled && (0, _get["default"])(value, 'length') > 0 || inputValue ? /*#__PURE__*/_react["default"].createElement(_clear["default"], {
545
546
  className: "".concat(prefixCls, "-picker-clear"),
546
547
  onClick: handleSelectionClear
547
548
  }) : null;
@@ -6,4 +6,12 @@ require("./index.css");
6
6
 
7
7
  require("../../empty/style/css");
8
8
 
9
- require("../../input/style/css");
9
+ require("../../input/style/css");
10
+
11
+ require("../../tag/style/css");
12
+
13
+ require("../../tooltip/style/css");
14
+
15
+ require("../../clear/style/css");
16
+
17
+ require("../../checkbox/style/css");
@@ -2,3 +2,7 @@ import '../../style/index.less';
2
2
  import './index.less';
3
3
  import '../../empty/style';
4
4
  import '../../input/style';
5
+ import '../../tag/style';
6
+ import '../../tooltip/style';
7
+ import '../../clear/style';
8
+ import '../../checkbox/style';
@@ -6,4 +6,12 @@ require("./index.less");
6
6
 
7
7
  require("../../empty/style");
8
8
 
9
- require("../../input/style");
9
+ require("../../input/style");
10
+
11
+ require("../../tag/style");
12
+
13
+ require("../../tooltip/style");
14
+
15
+ require("../../clear/style");
16
+
17
+ require("../../checkbox/style");
@@ -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;