acud 1.0.0 → 1.0.3

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 (88) hide show
  1. package/CHANGELOG.md +183 -0
  2. package/dist/acud.css +70 -36
  3. package/dist/acud.css.map +1 -1
  4. package/dist/acud.js +19837 -31243
  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 +8 -86
  9. package/dist/acud.min.js.map +1 -1
  10. package/es/button/style/index.css +3 -0
  11. package/es/button/style/mixin.less +1 -0
  12. package/es/config-provider/renderEmpty.js +8 -0
  13. package/es/empty/style/index.css +1 -1
  14. package/es/empty/style/index.less +1 -1
  15. package/es/locale/en_US.js +3 -1
  16. package/es/locale/zh_CN.js +3 -1
  17. package/es/locale-provider/index.d.ts +2 -0
  18. package/es/locale-provider/index.js +13 -2
  19. package/es/menu/MenuHead.js +2 -1
  20. package/es/menu/globalSilderBar.d.ts +1 -0
  21. package/es/menu/globalSilderBar.js +4 -2
  22. package/es/menu/style/index.css +34 -18
  23. package/es/menu/style/index.less +32 -15
  24. package/es/menu/style/sider.less +1 -0
  25. package/es/modal/DialogBox.js +27 -2
  26. package/es/modal/Modal.js +10 -4
  27. package/es/modal/dialog.js +4 -12
  28. package/es/modal/index.d.ts +4 -1
  29. package/es/modal/locale.d.ts +9 -0
  30. package/es/modal/locale.js +11 -0
  31. package/es/pagination/style/index.css +3 -0
  32. package/es/radio/Radio.d.ts +1 -0
  33. package/es/radio/RadioButton.js +12 -3
  34. package/es/select/src/OptionList.d.ts +1 -0
  35. package/es/select/src/OptionList.js +17 -8
  36. package/es/select/src/generate.d.ts +1 -0
  37. package/es/select/src/generate.js +4 -2
  38. package/es/select/style/index.css +18 -6
  39. package/es/select/style/index.less +16 -9
  40. package/es/select/style/multiple.less +4 -1
  41. package/es/style/themes/default/components/menu.less +4 -4
  42. package/es/table/hooks/useFilter/FilterDropdown.js +25 -15
  43. package/es/table/style/base.less +7 -2
  44. package/es/table/style/index.css +9 -5
  45. package/es/table/style/index.less +4 -3
  46. package/es/tree/tree.d.ts +1 -4
  47. package/es/upload/style/index.css +1 -5
  48. package/es/upload/style/index.less +3 -2
  49. package/lib/button/style/index.css +3 -0
  50. package/lib/button/style/mixin.less +1 -0
  51. package/lib/config-provider/renderEmpty.js +9 -0
  52. package/lib/empty/style/index.css +1 -1
  53. package/lib/empty/style/index.less +1 -1
  54. package/lib/locale/en_US.js +3 -1
  55. package/lib/locale/zh_CN.js +3 -1
  56. package/lib/locale-provider/index.d.ts +2 -0
  57. package/lib/locale-provider/index.js +14 -2
  58. package/lib/menu/MenuHead.js +2 -1
  59. package/lib/menu/globalSilderBar.d.ts +1 -0
  60. package/lib/menu/globalSilderBar.js +4 -2
  61. package/lib/menu/style/index.css +34 -18
  62. package/lib/menu/style/index.less +32 -15
  63. package/lib/menu/style/sider.less +1 -0
  64. package/lib/modal/DialogBox.js +29 -2
  65. package/lib/modal/Modal.js +12 -4
  66. package/lib/modal/dialog.js +4 -12
  67. package/lib/modal/index.d.ts +4 -1
  68. package/lib/modal/locale.d.ts +9 -0
  69. package/lib/modal/locale.js +26 -0
  70. package/lib/pagination/style/index.css +3 -0
  71. package/lib/radio/Radio.d.ts +1 -0
  72. package/lib/radio/RadioButton.js +12 -3
  73. package/lib/select/src/OptionList.d.ts +1 -0
  74. package/lib/select/src/OptionList.js +17 -8
  75. package/lib/select/src/generate.d.ts +1 -0
  76. package/lib/select/src/generate.js +4 -2
  77. package/lib/select/style/index.css +18 -6
  78. package/lib/select/style/index.less +16 -9
  79. package/lib/select/style/multiple.less +4 -1
  80. package/lib/style/themes/default/components/menu.less +4 -4
  81. package/lib/table/hooks/useFilter/FilterDropdown.js +25 -15
  82. package/lib/table/style/base.less +7 -2
  83. package/lib/table/style/index.css +9 -5
  84. package/lib/table/style/index.less +4 -3
  85. package/lib/tree/tree.d.ts +1 -4
  86. package/lib/upload/style/index.css +1 -5
  87. package/lib/upload/style/index.less +3 -2
  88. package/package.json +14 -4
@@ -637,6 +637,7 @@
637
637
  }
638
638
  .acud-pagination-options-quick-jumper button-has-icon > .acudicon {
639
639
  height: 16px;
640
+ font-size: 16px;
640
641
  }
641
642
  .acud-pagination-options-quick-jumper button-lg {
642
643
  height: 40px;
@@ -657,6 +658,7 @@
657
658
  }
658
659
  .acud-pagination-options-quick-jumper button-lg-has-icon > .acudicon {
659
660
  height: 16px;
661
+ font-size: 16px;
660
662
  }
661
663
  .acud-pagination-options-quick-jumper button-sm {
662
664
  height: 24px;
@@ -677,6 +679,7 @@
677
679
  }
678
680
  .acud-pagination-options-quick-jumper button-sm-has-icon > .acudicon {
679
681
  height: 16px;
682
+ font-size: 16px;
680
683
  }
681
684
  .acud-pagination-options-quick-jumper button,
682
685
  .acud-pagination-options-quick-jumper button:active,
@@ -10,6 +10,7 @@ export interface RadioProps {
10
10
  className?: string;
11
11
  onChange?: (e: Event) => {} | void;
12
12
  value?: any;
13
+ limit?: number | boolean;
13
14
  }
14
15
  interface CompoundedComponent extends React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLElement>> {
15
16
  Group: typeof RadioGroup;
@@ -27,7 +27,9 @@ export default (function (props) {
27
27
  className = props.className,
28
28
  onChange = props.onChange,
29
29
  label = props.label,
30
- restProps = __rest(props, ["prefixCls", "children", "className", "onChange", "label"]);
30
+ _props$limit = props.limit,
31
+ limit = _props$limit === void 0 ? 8 : _props$limit,
32
+ restProps = __rest(props, ["prefixCls", "children", "className", "onChange", "label", "limit"]);
31
33
 
32
34
  var context = useContext(RadioGroupContext);
33
35
 
@@ -53,8 +55,15 @@ export default (function (props) {
53
55
  onChange === null || onChange === void 0 ? void 0 : onChange(e);
54
56
  e.target.value = value;
55
57
  (_a = context === null || context === void 0 ? void 0 : context.onChange) === null || _a === void 0 ? void 0 : _a.call(context, e);
56
- }, [radioProps]);
57
- var labelInfo = typeof (children || label) === 'string' ? lengthLimit(children || label) : children || lengthLimit(label);
58
+ }, [radioProps]); // 1.值为false或0时,不做处理,自适应宽度; 2.非零整数,超过指定个数省略展示; 3.其他情况,默认限制8字符。
59
+
60
+ var labelInfo = children;
61
+
62
+ if (limit) {
63
+ var limitLength = typeof limit === 'number' && limit > 0 ? limit : 8;
64
+ labelInfo = typeof (children || label) === 'string' ? lengthLimit(children || label, limitLength) : children || lengthLimit(label, limitLength);
65
+ }
66
+
58
67
  return /*#__PURE__*/React.createElement("span", _extends({
59
68
  className: classes,
60
69
  onClick: handleClick
@@ -20,6 +20,7 @@ export interface OptionListProps<OptionsType extends object[]> {
20
20
  virtual?: boolean;
21
21
  keepExpand?: boolean;
22
22
  defaultExpandGroupKey?: string[] | string | number[] | number | boolean;
23
+ showTitle?: boolean;
23
24
  renderEmpty?: (componentName?: string, des?: string | undefined) => React.ReactNode;
24
25
  onSelect: (value: RawValueType, option: {
25
26
  selected: boolean;
@@ -65,6 +65,8 @@ var OptionList = function OptionList(_ref, ref) {
65
65
  keepExpand = _ref$keepExpand === void 0 ? false : _ref$keepExpand,
66
66
  _ref$defaultExpandGro = _ref.defaultExpandGroupKey,
67
67
  defaultExpandGroupKey = _ref$defaultExpandGro === void 0 ? false : _ref$defaultExpandGro,
68
+ _ref$showTitle = _ref.showTitle,
69
+ showTitle = _ref$showTitle === void 0 ? false : _ref$showTitle,
68
70
  renderEmpty = _ref.renderEmpty,
69
71
  onSelect = _ref.onSelect,
70
72
  onToggleOpen = _ref.onToggleOpen,
@@ -426,10 +428,14 @@ var OptionList = function OptionList(_ref, ref) {
426
428
  var mergedLabel = childrenAsData ? children : label; // const iconVisible = !menuItemSelectedIcon || typeof menuItemSelectedIcon === 'function' || selected;
427
429
 
428
430
  var content = mergedLabel || value;
429
- var optionTitle = typeof content === 'string' || typeof content === 'number' ? content.toString() : undefined;
431
+ var optionTitle;
430
432
 
431
- if (title !== undefined) {
432
- optionTitle = title;
433
+ if (showTitle) {
434
+ optionTitle = typeof content === 'string' || typeof content === 'number' ? content.toString() : undefined;
435
+
436
+ if (title !== undefined) {
437
+ optionTitle = title;
438
+ }
433
439
  }
434
440
 
435
441
  var fContent = (typeof content === 'string' || typeof content === 'number') && searchValue ? formatContent(content, searchValue, prefixCls) : content;
@@ -473,6 +479,11 @@ var OptionList = function OptionList(_ref, ref) {
473
479
  }, mergedNotFound);
474
480
  }
475
481
 
482
+ var disabledVirtual = React.useMemo(function () {
483
+ return !virtual || (mode === 'multiple' || mode !== 'multiple' && !keepExpand) && memoFlattenOptions.some(function (option) {
484
+ return option.group;
485
+ });
486
+ }, [virtual, mode, keepExpand, memoFlattenOptions]);
476
487
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
477
488
  role: "listbox",
478
489
  id: "".concat(id, "_list"),
@@ -482,7 +493,7 @@ var OptionList = function OptionList(_ref, ref) {
482
493
  overflow: 'hidden'
483
494
  }
484
495
  }, renderItem(activeIndex - 1), renderItem(activeIndex), renderItem(activeIndex + 1)), multiple && /*#__PURE__*/React.createElement("div", {
485
- className: classNames("".concat(itemPrefixCls, "-checkall"), _defineProperty({}, "".concat(itemPrefixCls, "-checkall-can-active"), !selectAllChecked)),
496
+ className: classNames("".concat(itemPrefixCls, "-checkall")),
486
497
  onClick: handleCheckAll
487
498
  }, /*#__PURE__*/React.createElement(Checkbox, {
488
499
  indeterminate: indeterminate,
@@ -498,7 +509,7 @@ var OptionList = function OptionList(_ref, ref) {
498
509
  fullHeight: false,
499
510
  onMouseDown: onListMouseDown,
500
511
  onScroll: onScroll,
501
- virtual: virtual,
512
+ virtual: !disabledVirtual,
502
513
  onMouseEnter: onMouseEnter
503
514
  }, function (_ref3, itemIndex) {
504
515
  var group = _ref3.group,
@@ -509,10 +520,8 @@ var OptionList = function OptionList(_ref, ref) {
509
520
  key = data.key; // Group
510
521
 
511
522
  if (group) {
512
- var _classNames3;
513
-
514
523
  return /*#__PURE__*/React.createElement("div", {
515
- className: classNames(itemPrefixCls, "".concat(itemPrefixCls, "-group"), (_classNames3 = {}, _defineProperty(_classNames3, "".concat(itemPrefixCls, "-group-keep-expand"), isKeepExpand), _defineProperty(_classNames3, "".concat(itemPrefixCls, "-group-can-active"), getCheckStatus(key, 'all') === false), _classNames3)),
524
+ className: classNames(itemPrefixCls, "".concat(itemPrefixCls, "-group"), _defineProperty({}, "".concat(itemPrefixCls, "-group-keep-expand"), isKeepExpand)),
516
525
  onClick: function onClick() {
517
526
  return handleCheckGroup(key);
518
527
  }
@@ -47,6 +47,7 @@ export interface SelectProps<OptionsType extends object[], ValueType> extends Re
47
47
  allowClear?: boolean;
48
48
  clearIcon?: React.ReactNode;
49
49
  showArrow?: boolean;
50
+ showTitle?: boolean;
50
51
  inputIcon?: RenderNode;
51
52
  removeIcon?: React.ReactNode;
52
53
  menuItemSelectedIcon?: RenderNode;
@@ -115,6 +115,7 @@ export default function generateSelector(config) {
115
115
  dropdownAlign = props.dropdownAlign,
116
116
  _props$showAction = props.showAction,
117
117
  showAction = _props$showAction === void 0 ? [] : _props$showAction,
118
+ showTitle = props.showTitle,
118
119
  direction = props.direction,
119
120
  tokenSeparators = props.tokenSeparators,
120
121
  groupSelectorRender = props.groupSelectorRender,
@@ -135,7 +136,7 @@ export default function generateSelector(config) {
135
136
  onClear = props.onClear,
136
137
  _props$internalProps = props.internalProps,
137
138
  internalProps = _props$internalProps === void 0 ? {} : _props$internalProps,
138
- restProps = __rest(props, ["prefixCls", "className", "id", "open", "defaultOpen", "options", "children", "mode", "value", "defaultValue", "labelInValue", "showSearch", "inputValue", "searchValue", "filterOption", "filterSort", "optionFilterProp", "autoClearSearchValue", "onSearch", "suffixIconPre", "removeIcon", "allowClear", "clearIcon", "showArrow", "menuItemSelectedIcon", "disabled", "loading", "defaultActiveFirstOption", "notFoundContent", "optionLabelProp", "backfill", "tabIndex", "getInputElement", "getPopupContainer", "listHeight", "listItemHeight", "animation", "transitionName", "virtual", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "direction", "tokenSeparators", "groupSelectorRender", "tagRender", "renderEmpty", "keepExpand", "defaultExpandGroupKey", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown", "onChange", "onSelect", "onDeselect", "onClear", "internalProps"]);
139
+ restProps = __rest(props, ["prefixCls", "className", "id", "open", "defaultOpen", "options", "children", "mode", "value", "defaultValue", "labelInValue", "showSearch", "inputValue", "searchValue", "filterOption", "filterSort", "optionFilterProp", "autoClearSearchValue", "onSearch", "suffixIconPre", "removeIcon", "allowClear", "clearIcon", "showArrow", "menuItemSelectedIcon", "disabled", "loading", "defaultActiveFirstOption", "notFoundContent", "optionLabelProp", "backfill", "tabIndex", "getInputElement", "getPopupContainer", "listHeight", "listItemHeight", "animation", "transitionName", "virtual", "dropdownStyle", "dropdownClassName", "dropdownMatchSelectWidth", "dropdownRender", "dropdownAlign", "showAction", "showTitle", "direction", "tokenSeparators", "groupSelectorRender", "tagRender", "renderEmpty", "keepExpand", "defaultExpandGroupKey", "onPopupScroll", "onDropdownVisibleChange", "onFocus", "onBlur", "onKeyUp", "onKeyDown", "onMouseDown", "onChange", "onSelect", "onDeselect", "onClear", "internalProps"]);
139
140
 
140
141
  var useInternalProps = internalProps.mark === INTERNAL_PROPS_MARK;
141
142
  var domProps = omitDOMProps ? omitDOMProps(restProps) : restProps;
@@ -793,7 +794,8 @@ export default function generateSelector(config) {
793
794
  virtual: virtual !== false && dropdownMatchSelectWidth !== false,
794
795
  onMouseEnter: onPopupMouseEnter,
795
796
  triggerChange: triggerChange,
796
- setInnerOpen: setInnerOpen
797
+ setInnerOpen: setInnerOpen,
798
+ showTitle: showTitle
797
799
  }); // ============================= Clear ==============================
798
800
 
799
801
  var clearNode;
@@ -348,7 +348,7 @@
348
348
  line-height: 22px;
349
349
  cursor: pointer;
350
350
  }
351
- .acud-select-dropdown-multiple .acud-select-item-checkall-can-active:hover {
351
+ .acud-select-dropdown-multiple .acud-select-item-checkall:hover {
352
352
  background-color: #E6F0FF;
353
353
  }
354
354
  .acud-select-dropdown-multiple .acud-select-item-option-content {
@@ -357,6 +357,9 @@
357
357
  .acud-select-dropdown-multiple .acud-select-item-option-grouped {
358
358
  padding-left: 48px;
359
359
  }
360
+ .acud-select-dropdown-multiple .acud-select-item-group {
361
+ cursor: pointer;
362
+ }
360
363
  /* Reset search input style */
361
364
  .acud-select {
362
365
  margin: 0;
@@ -651,7 +654,7 @@
651
654
  .acud-select-item-group {
652
655
  color: #151B26;
653
656
  font-size: 12px;
654
- cursor: pointer;
657
+ cursor: default;
655
658
  }
656
659
  .acud-select-item-group:hover {
657
660
  color: #151B26;
@@ -669,6 +672,7 @@
669
672
  .acud-select-item-group-arrow {
670
673
  margin-right: 8px;
671
674
  display: flex;
675
+ cursor: pointer;
672
676
  }
673
677
  .acud-select-item-group-arrow .acudicon {
674
678
  display: flex;
@@ -678,9 +682,14 @@
678
682
  margin-right: 8px;
679
683
  }
680
684
  .acud-select-item-group-keep-expand {
685
+ cursor: default;
681
686
  color: #B8BABF;
682
687
  }
683
- .acud-select-item-group-can-active:hover {
688
+ .acud-select-item-group-keep-expand:hover {
689
+ color: #B8BABF;
690
+ background-color: #E6F0FF;
691
+ }
692
+ .acud-select-item-group:hover {
684
693
  background-color: #E6F0FF;
685
694
  }
686
695
  .acud-select-item-option {
@@ -695,9 +704,6 @@
695
704
  .acud-select-item-option-state {
696
705
  flex: none;
697
706
  }
698
- .acud-select-item-option-active:not(.acud-select-item-option-disabled) {
699
- background-color: #E6F0FF;
700
- }
701
707
  .acud-select-item-option-selected:not(.acud-select-item-option-disabled) {
702
708
  color: #2468F2;
703
709
  background-color: #FFFFFF;
@@ -706,6 +712,9 @@
706
712
  .acud-select-item-option-selected:not(.acud-select-item-option-disabled) .acud-select-item-option-state {
707
713
  color: #151B26;
708
714
  }
715
+ .acud-select-item-option-active:not(.acud-select-item-option-disabled) {
716
+ background-color: #E6F0FF;
717
+ }
709
718
  .acud-select-item-option-disabled {
710
719
  color: #B8BABF;
711
720
  cursor: not-allowed;
@@ -727,3 +736,6 @@
727
736
  .acud-select-search-highlight {
728
737
  color: #2468F2;
729
738
  }
739
+ .acud-select-dropdown-multiple .acud-select-item-option-selected:not(.acud-select-item-option-disabled) {
740
+ color: inherit;
741
+ }
@@ -275,10 +275,11 @@
275
275
  &-group {
276
276
  .basic-tp-config(@select-item-group-tp);
277
277
  font-size: @T2;
278
- cursor: pointer;
278
+ cursor: default;
279
279
  &-arrow {
280
280
  margin-right: 2 * @P;
281
281
  display: flex;
282
+ cursor: pointer;
282
283
  .@{acud-prefix}icon {
283
284
  display: flex;
284
285
  color: @G5;
@@ -288,9 +289,14 @@
288
289
  margin-right: 2 * @P;
289
290
  }
290
291
  &-keep-expand {
292
+ cursor: default;
291
293
  color: @G6;
294
+ &:hover {
295
+ color: @G6;
296
+ background-color: @B1;
297
+ }
292
298
  }
293
- &-can-active:hover {
299
+ &:hover {
294
300
  background-color: ~'@{@{select-dropdown-default-p}-hover-background-color}';
295
301
  }
296
302
  }
@@ -310,14 +316,7 @@
310
316
  flex: none;
311
317
  }
312
318
 
313
- &-active:not(&-disabled) {
314
- background-color: ~'@{@{select-dropdown-default-p}-hover-background-color}';
315
- }
316
-
317
319
  &-selected:not(&-disabled) {
318
- // color: @select-item-selected-color;
319
- // font-weight: @select-item-selected-font-weight;
320
- // background-color: @select-item-selected-bg;
321
320
  color: ~'@{@{select-dropdown-default-tp}-click-color}';
322
321
  background-color: ~'@{@{select-dropdown-default-p}-default-background-color}';
323
322
  border-color: ~'@{@{select-dropdown-default-p}-click-border-color}';
@@ -327,6 +326,10 @@
327
326
  }
328
327
  }
329
328
 
329
+ &-active:not(&-disabled) {
330
+ background-color: ~'@{@{select-dropdown-default-p}-hover-background-color}';
331
+ }
332
+
330
333
  &-disabled {
331
334
  color: ~'@{@{select-dropdown-default-tp}-disabled-color}';
332
335
  cursor: not-allowed;
@@ -359,3 +362,7 @@
359
362
  color: ~'@{@{select-dropdown-default-tp}-click-color}';;
360
363
  }
361
364
  }
365
+
366
+ .@{select-prefix-cls}-dropdown-multiple .@{select-prefix-cls}-item-option-selected:not(.acud-select-item-option-disabled) {
367
+ color: inherit;
368
+ }
@@ -251,7 +251,7 @@
251
251
  display: flex;
252
252
  line-height: 5.5 * @P;
253
253
  cursor: pointer;
254
- &-can-active:hover {
254
+ &:hover {
255
255
  background-color: ~'@{@{select-dropdown-default-p}-hover-background-color}';
256
256
  }
257
257
  }
@@ -262,4 +262,7 @@
262
262
  .@{select-prefix-cls}-item-option-grouped {
263
263
  padding-left: 12 * @P;
264
264
  }
265
+ .@{select-prefix-cls}-item-group {
266
+ cursor: pointer;
267
+ }
265
268
  }
@@ -33,7 +33,7 @@
33
33
  @menu-item-active-color: @B6;
34
34
 
35
35
  // horizontal
36
- @menu-horizontal-line-height: 12 * @P;
36
+ @menu-horizontal-line-height: 14 * @P;
37
37
  @menu-horizontal-item-margin: 0 4 * @P;
38
38
 
39
39
  // horizontal - with icon
@@ -42,10 +42,10 @@
42
42
  @menu-horizontal-withicon-margin-right: 6 * @P;
43
43
 
44
44
  // horizontal - global
45
- @headermenu-height: 12 * @P;
45
+ @headermenu-height: 14 * @P;
46
46
  @headermenu-background: @G11;
47
47
  @headermenu-zindex: @zindex-range-3;
48
- @headermenu-logo-height: 12 * @P;
48
+ @headermenu-logo-height: 14 * @P;
49
49
  @headermenu-logo-margin-right: 4 * @P;
50
50
  @headermenu-iconlist-height: 4 * @P;
51
51
  @headermenu-iconlist-margin-right: 6 * @P;
@@ -53,7 +53,7 @@
53
53
  @headermenu-iconlist-tp: tp29;
54
54
  @headermenu-title-margin-left: 2 * @P;
55
55
  @headermenu-title-color: @G5;
56
- @headermenu-title-line-height: 12 * @P;
56
+ @headermenu-title-line-height: 14 * @P;
57
57
  @headermenu-item-margin: 0 3 * @P;
58
58
 
59
59
  // inline
@@ -22,9 +22,8 @@ function searchValueMatched(searchValue, text) {
22
22
  }
23
23
 
24
24
  return false;
25
- }
25
+ } // let preKeys: React.Key[];
26
26
 
27
- var preKeys;
28
27
 
29
28
  function FilterDropdown(props) {
30
29
  var _a;
@@ -61,8 +60,7 @@ function FilterDropdown(props) {
61
60
 
62
61
  var mergedVisible = typeof filterDropdownVisible === 'boolean' ? filterDropdownVisible : visible; // ===================== Select Keys =====================
63
62
 
64
- var propFilteredKeys = filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys;
65
- preKeys = propFilteredKeys;
63
+ var propFilteredKeys = filterState === null || filterState === void 0 ? void 0 : filterState.filteredKeys; // preKeys = propFilteredKeys;
66
64
 
67
65
  var _useSyncState = useSyncState(propFilteredKeys || []),
68
66
  _useSyncState2 = _slicedToArray(_useSyncState, 2),
@@ -70,10 +68,10 @@ function FilterDropdown(props) {
70
68
  setFilteredKeysSync = _useSyncState2[1]; // eslint-disable-next-line react-hooks/exhaustive-deps
71
69
 
72
70
 
73
- var onSelectKeys = function onSelectKeys(_ref) {
71
+ var onSelectKeys = React.useCallback(function (_ref) {
74
72
  var selectedKeys = _ref.selectedKeys;
75
73
  setFilteredKeysSync(selectedKeys);
76
- };
74
+ }, []);
77
75
 
78
76
  var onCheck = function onCheck(keys, _ref2) {
79
77
  var node = _ref2.node,
@@ -107,7 +105,7 @@ function FilterDropdown(props) {
107
105
  onSelectKeys({
108
106
  selectedKeys: propFilteredKeys || []
109
107
  });
110
- }, [onSelectKeys, propFilteredKeys, visible]); // search in tree mode column filter
108
+ }, [propFilteredKeys, visible]); // search in tree mode column filter
111
109
 
112
110
  var _React$useState3 = React.useState(''),
113
111
  _React$useState4 = _slicedToArray(_React$useState3, 2),
@@ -151,8 +149,8 @@ function FilterDropdown(props) {
151
149
 
152
150
  var onReset = function onReset() {
153
151
  setSearchValue('');
154
- setFilteredKeysSync(preKeys);
155
- internalTriggerFilter(preKeys); // triggerVisible(false);
152
+ setFilteredKeysSync([]); // internalTriggerFilter([]);
153
+ // triggerVisible(false);
156
154
  };
157
155
 
158
156
  var doFilter = function doFilter() {
@@ -205,7 +203,7 @@ function FilterDropdown(props) {
205
203
  onConfirm();
206
204
  };
207
205
 
208
- var getTreeData = function getTreeData(_ref4) {
206
+ var getTreeChildrenData = function getTreeChildrenData(_ref4) {
209
207
  var filters = _ref4.filters;
210
208
  return (filters || []).map(function (filter, index) {
211
209
  var key = String(filter.value);
@@ -215,7 +213,7 @@ function FilterDropdown(props) {
215
213
  };
216
214
 
217
215
  if (filter.children) {
218
- item.children = getTreeData({
216
+ item.children = getTreeChildrenData({
219
217
  filters: filter.children
220
218
  });
221
219
  }
@@ -224,6 +222,21 @@ function FilterDropdown(props) {
224
222
  });
225
223
  };
226
224
 
225
+ var getTreeData = function getTreeData(_ref5) {
226
+ var filters = _ref5.filters;
227
+ var treeDataArr = [];
228
+ var treeData = {
229
+ title: locale.filterCheckall,
230
+ key: 'checkall',
231
+ children: []
232
+ };
233
+ treeData.children = getTreeChildrenData({
234
+ filters: filters
235
+ });
236
+ treeDataArr.push(treeData);
237
+ return treeDataArr;
238
+ };
239
+
227
240
  var dropdownContent;
228
241
 
229
242
  if (typeof column.filterDropdown === 'function') {
@@ -265,10 +278,7 @@ function FilterDropdown(props) {
265
278
  locale: locale
266
279
  }), /*#__PURE__*/React.createElement("div", {
267
280
  className: "".concat(tablePrefixCls, "-filter-dropdown-tree")
268
- }, filterMultiple ? /*#__PURE__*/React.createElement(Checkbox, {
269
- className: "".concat(tablePrefixCls, "-filter-dropdown-checkall"),
270
- onChange: onCheckAll
271
- }, locale.filterCheckall) : null, /*#__PURE__*/React.createElement(Tree, {
281
+ }, /*#__PURE__*/React.createElement(Tree, {
272
282
  checkable: true,
273
283
  selectable: false,
274
284
  multiple: filterMultiple,
@@ -169,8 +169,13 @@ each(.size-padding-map(), .(@value, @key, @index) {
169
169
  }
170
170
  .@{acud-prefix}-checkbox-wrapper {
171
171
  display: flex;
172
- padding-left: @P * 2;
173
- padding-right: @P * 2;
172
+ padding-left: @P * 3;
173
+ padding-right: @P * 3;
174
+ }
175
+ .@{table-prefix-cls}-filter-dropdown-tree {
176
+ .@{acud-prefix}-checkbox-wrapper {
177
+ padding-left: 0;
178
+ }
174
179
  }
175
180
  }
176
181
  }
@@ -324,10 +324,12 @@ div.acud-table-summary {
324
324
  flex-direction: column;
325
325
  align-items: center;
326
326
  }
327
+ .acud-table-column-sorter-default,
327
328
  .acud-table-column-sorter-up,
328
329
  .acud-table-column-sorter-down {
329
- font-size: 11px;
330
+ font-size: 16px;
330
331
  }
332
+ .acud-table-column-sorter-default.active,
331
333
  .acud-table-column-sorter-up.active,
332
334
  .acud-table-column-sorter-down.active {
333
335
  color: #D4E5FF;
@@ -355,7 +357,7 @@ div.acud-table-summary {
355
357
  margin-left: 4px;
356
358
  padding: 0 4px;
357
359
  color: #bfbfbf;
358
- font-size: 12px;
360
+ font-size: 16px;
359
361
  border-radius: 0px;
360
362
  cursor: pointer;
361
363
  transition: all 0.3s;
@@ -403,7 +405,6 @@ div.acud-table-summary {
403
405
  .acud-table-filter-dropdown-checkall {
404
406
  width: 100%;
405
407
  margin-bottom: 4px;
406
- margin-left: 4px;
407
408
  }
408
409
  .acud-table-filter-dropdown-submenu > ul {
409
410
  max-height: calc(100vh - 130px);
@@ -1012,8 +1013,11 @@ tr.acud-table-expanded-row .acud-descriptions-view table {
1012
1013
  }
1013
1014
  .acud-table-filter-dropdown-box .acud-checkbox-wrapper {
1014
1015
  display: flex;
1015
- padding-left: 8px;
1016
- padding-right: 8px;
1016
+ padding-left: 12px;
1017
+ padding-right: 12px;
1018
+ }
1019
+ .acud-table-filter-dropdown-box .acud-table-filter-dropdown-tree .acud-checkbox-wrapper {
1020
+ padding-left: 0;
1017
1021
  }
1018
1022
  .acud-table-filter-dropdown-menu {
1019
1023
  max-height: 264px;
@@ -365,9 +365,10 @@
365
365
  align-items: center;
366
366
  }
367
367
 
368
+ &-default,
368
369
  &-up,
369
370
  &-down {
370
- font-size: 11px;
371
+ font-size: 16px;
371
372
 
372
373
  &.active {
373
374
  color: @primary-color;
@@ -402,7 +403,7 @@
402
403
  margin-left: @P;
403
404
  padding: 0 4px;
404
405
  color: @table-header-icon-color;
405
- font-size: @font-size-sm;
406
+ font-size: 16px;
406
407
  border-radius: @border-radius-base;
407
408
  cursor: pointer;
408
409
  transition: all 0.3s;
@@ -479,7 +480,7 @@
479
480
  &-checkall {
480
481
  width: 100%;
481
482
  margin-bottom: 4px;
482
- margin-left: 4px;
483
+ // margin-left: 4px;
483
484
  }
484
485
 
485
486
  &-submenu > ul {
package/es/tree/tree.d.ts CHANGED
@@ -4,10 +4,7 @@ import type { EventDataNode as RcEventDataNode, DataNode as RcDataNode, Key } fr
4
4
  export interface DataNode extends RcDataNode {
5
5
  isEditable?: boolean;
6
6
  }
7
- declare type EventDataNode = RcEventDataNode<{
8
- children?: any;
9
- }>;
10
- export { EventDataNode };
7
+ export declare type EventDataNode = RcEventDataNode<DataNode>;
11
8
  export interface TreeProps extends Partial<RcTreeProps> {
12
9
  treeData?: DataNode[];
13
10
  className?: string;
@@ -369,6 +369,7 @@
369
369
  .acud-upload-list-picture .acud-upload-list-item-info,
370
370
  .acud-upload-list-picture-card .acud-upload-list-item-info {
371
371
  padding: 0;
372
+ height: 56px;
372
373
  }
373
374
  .acud-upload-list-picture .acud-upload-list-item:hover .acud-upload-list-item-info,
374
375
  .acud-upload-list-picture-card .acud-upload-list-item:hover .acud-upload-list-item-info {
@@ -384,7 +385,6 @@
384
385
  }
385
386
  .acud-upload-list-picture .acud-upload-list-item-thumbnail .acudicon,
386
387
  .acud-upload-list-picture-card .acud-upload-list-item-thumbnail .acudicon {
387
- margin-top: 24px;
388
388
  font-size: 26px;
389
389
  }
390
390
  .acud-upload-list-picture .acud-upload-list-item-error .acud-upload-list-item-thumbnail .acudicon svg path[fill='#e6f7ff'],
@@ -432,10 +432,6 @@
432
432
  text-overflow: ellipsis;
433
433
  transition: all 0.3s;
434
434
  }
435
- .acud-upload-list-picture .acud-upload-list-item-uploading .acud-upload-list-item-name,
436
- .acud-upload-list-picture-card .acud-upload-list-item-uploading .acud-upload-list-item-name {
437
- margin-bottom: 12px;
438
- }
439
435
  .acud-upload-list-picture .acudicon-outlined-close,
440
436
  .acud-upload-list-picture-card .acudicon-outlined-close {
441
437
  position: absolute;
@@ -334,6 +334,7 @@
334
334
 
335
335
  .@{upload-item}-info {
336
336
  padding: 0;
337
+ height: 56px;
337
338
  }
338
339
 
339
340
  .@{upload-item}:hover .@{upload-item}-info {
@@ -352,7 +353,7 @@
352
353
  opacity: .8;
353
354
 
354
355
  .@{iconfont-css-prefix} {
355
- margin-top: 24px;
356
+ // margin-top: 24px;
356
357
  font-size: 26px;
357
358
  }
358
359
  }
@@ -410,7 +411,7 @@
410
411
  }
411
412
 
412
413
  .@{upload-item}-uploading .@{upload-item}-name {
413
- margin-bottom: 12px;
414
+ // margin-bottom: 12px;
414
415
  }
415
416
 
416
417
  .@{iconfont-css-prefix}-outlined-close {
@@ -39,6 +39,7 @@
39
39
  }
40
40
  .acud-btn-has-icon > .acudicon {
41
41
  height: 16px;
42
+ font-size: 16px;
42
43
  }
43
44
  .acud-btn-lg {
44
45
  height: 40px;
@@ -59,6 +60,7 @@
59
60
  }
60
61
  .acud-btn-lg-has-icon > .acudicon {
61
62
  height: 16px;
63
+ font-size: 16px;
62
64
  }
63
65
  .acud-btn-sm {
64
66
  height: 24px;
@@ -79,6 +81,7 @@
79
81
  }
80
82
  .acud-btn-sm-has-icon > .acudicon {
81
83
  height: 16px;
84
+ font-size: 16px;
82
85
  }
83
86
  .acud-btn,
84
87
  .acud-btn:active,
@@ -45,6 +45,7 @@
45
45
  // 强制修改ICON的span
46
46
  &-has-icon > .@{iconfont-css-prefix} {
47
47
  height: 4 * @P;
48
+ font-size: 4 * @P;
48
49
  }
49
50
 
50
51
  .btn-size(@@heightLabel; @@fontLabel; @@borderRdsLabel; @btn-border-width);