acud 0.0.68 → 0.0.69

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 (67) hide show
  1. package/dist/acud.css +47 -37
  2. package/dist/acud.css.map +1 -1
  3. package/dist/acud.js +235 -219
  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 +6 -6
  8. package/dist/acud.min.js.map +1 -1
  9. package/es/cascader/Cascader.js +2 -1
  10. package/es/cascader/MenuItem.js +7 -13
  11. package/es/cascader/Menus.d.ts +3 -2
  12. package/es/cascader/Menus.js +30 -24
  13. package/es/cascader/index.js +14 -8
  14. package/es/cascader/style/index.css +15 -11
  15. package/es/cascader/style/index.less +21 -14
  16. package/es/dropdown/dropdown.js +2 -3
  17. package/es/form/style/horizontal.less +3 -2
  18. package/es/form/style/index.css +2 -3
  19. package/es/menu/menu.d.ts +2 -1
  20. package/es/radio/Radio.d.ts +1 -0
  21. package/es/radio/Radio.js +3 -2
  22. package/es/radio/RadioButton.js +3 -2
  23. package/es/radio/RadioGroup.d.ts +1 -0
  24. package/es/radio/RadioGroup.js +4 -1
  25. package/es/radio/context.d.ts +1 -0
  26. package/es/toast/index.js +7 -8
  27. package/es/toast/style/index.css +1 -1
  28. package/es/toast/style/index.less +3 -3
  29. package/es/transfer/SourceList.js +1 -0
  30. package/es/transfer/index.js +3 -7
  31. package/es/transfer/style/index.css +3 -0
  32. package/es/transfer/style/index.less +3 -0
  33. package/es/upload/Upload.js +4 -1
  34. package/es/upload/UploadList/ListItem.js +2 -2
  35. package/es/upload/UploadList/index.js +1 -1
  36. package/es/upload/style/index.css +25 -21
  37. package/es/upload/style/index.less +28 -21
  38. package/lib/cascader/Cascader.js +2 -1
  39. package/lib/cascader/MenuItem.js +7 -13
  40. package/lib/cascader/Menus.d.ts +3 -2
  41. package/lib/cascader/Menus.js +31 -24
  42. package/lib/cascader/index.js +15 -8
  43. package/lib/cascader/style/index.css +15 -11
  44. package/lib/cascader/style/index.less +21 -14
  45. package/lib/dropdown/dropdown.js +2 -3
  46. package/lib/form/style/horizontal.less +3 -2
  47. package/lib/form/style/index.css +2 -3
  48. package/lib/menu/menu.d.ts +2 -1
  49. package/lib/radio/Radio.d.ts +1 -0
  50. package/lib/radio/Radio.js +3 -2
  51. package/lib/radio/RadioButton.js +3 -2
  52. package/lib/radio/RadioGroup.d.ts +1 -0
  53. package/lib/radio/RadioGroup.js +5 -1
  54. package/lib/radio/context.d.ts +1 -0
  55. package/lib/toast/index.js +7 -8
  56. package/lib/toast/style/index.css +1 -1
  57. package/lib/toast/style/index.less +3 -3
  58. package/lib/transfer/SourceList.js +1 -0
  59. package/lib/transfer/index.js +3 -7
  60. package/lib/transfer/style/index.css +3 -0
  61. package/lib/transfer/style/index.less +3 -0
  62. package/lib/upload/Upload.js +4 -1
  63. package/lib/upload/UploadList/ListItem.js +2 -2
  64. package/lib/upload/UploadList/index.js +1 -1
  65. package/lib/upload/style/index.css +25 -21
  66. package/lib/upload/style/index.less +28 -21
  67. package/package.json +1 -1
@@ -170,11 +170,12 @@ var Cascader = /*#__PURE__*/function (_React$Component) {
170
170
  }, e);
171
171
  }
172
172
 
173
+ loadData(activeOptions);
174
+
173
175
  _this.setState({
174
176
  activeValue: activeValue
175
177
  });
176
178
 
177
- loadData(activeOptions);
178
179
  return;
179
180
  }
180
181
 
@@ -38,16 +38,12 @@ var MenuItem = function MenuItem(props) {
38
38
  var handleMouseEnter = useCallback(function (e) {
39
39
  onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(e);
40
40
  var ele = targetRef.current;
41
-
42
- if (isMulti) {
43
- ele = ele === null || ele === void 0 ? void 0 : ele.parentNode;
44
- }
45
-
46
41
  var overflow = (ele === null || ele === void 0 ? void 0 : ele.scrollWidth) > (ele === null || ele === void 0 ? void 0 : ele.clientWidth);
47
42
  setOverflow(overflow);
48
- }, [isMulti, onMouseEnter]);
43
+ }, [onMouseEnter]);
49
44
  return /*#__PURE__*/React.createElement(Tooltip, {
50
- title: title
45
+ title: title,
46
+ overlayClassName: "".concat(prefixCls, "-menu-item-tooltip")
51
47
  }, /*#__PURE__*/React.createElement("li", _extends({
52
48
  className: menuItemCls
53
49
  }, expandProps, {
@@ -57,21 +53,19 @@ var MenuItem = function MenuItem(props) {
57
53
  return e.preventDefault();
58
54
  },
59
55
  onMouseEnter: handleMouseEnter
60
- }), /*#__PURE__*/React.createElement("div", _extends({}, isMulti ? {} : {
61
- ref: targetRef
62
- }, {
56
+ }), /*#__PURE__*/React.createElement("div", {
63
57
  className: "".concat(prefixCls, "-menu-item-content"),
64
58
  disabled: option.disabled
65
- }), isMulti ? /*#__PURE__*/React.createElement(Checkbox, {
59
+ }, isMulti && /*#__PURE__*/React.createElement(Checkbox, {
66
60
  className: "".concat(prefixCls, "-menu-item-checkbox"),
67
61
  disabled: option.disabled,
68
62
  checked: checked,
69
63
  indeterminate: indeterminate,
70
64
  onChange: onMultiSelect,
71
65
  onClick: handleMultiClick
72
- }, /*#__PURE__*/React.cloneElement(labelContent, {
66
+ }), /*#__PURE__*/React.cloneElement(labelContent, {
73
67
  ref: targetRef
74
- })) : labelContent), expandIconNode, loadingIconNode));
68
+ })), expandIconNode, loadingIconNode));
75
69
  };
76
70
 
77
71
  export default MenuItem;
@@ -52,11 +52,12 @@ declare class Menus extends React.Component<MenusProps, MenusState> {
52
52
  saveMenuWrap: (menuWrap: any) => void;
53
53
  saveMenus: (menuIndex: any) => (menus: any) => void;
54
54
  saveMenuItems: (index: any) => (node: any) => void;
55
- openMenuScroll(): void;
56
55
  scrollActiveItemToView(): void;
57
56
  setMenuPosition(callback?: () => void): void;
57
+ handleMenuScrollChange(menuScrollOpen: any): void;
58
58
  handleMenuScroll: (menuIndex: any) => () => void;
59
- onShowPrepare: () => Promise<unknown>;
59
+ onShowActive: () => void;
60
+ onShowEnd: () => void;
60
61
  render(): JSX.Element;
61
62
  }
62
63
  export default Menus;
@@ -7,6 +7,7 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
7
7
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
8
8
  import some from 'lodash/some';
9
9
  import isEqual from 'lodash/isEqual';
10
+ import isEmpty from 'lodash/isEmpty';
10
11
  import map from 'lodash/map';
11
12
  import every from 'lodash/every';
12
13
  import React from 'react';
@@ -62,18 +63,20 @@ var Menus = /*#__PURE__*/function (_React$Component) {
62
63
  };
63
64
  };
64
65
 
65
- _this.onShowPrepare = function () {
66
+ _this.onShowActive = function () {
66
67
  _this.scrollActiveItemToView();
67
68
 
68
- return new Promise(function (resolve) {
69
- _this.delayOnEvent(function () {
70
- _this.setMenuPosition();
69
+ window.setTimeout(function () {
70
+ _this.setMenuPosition();
71
71
 
72
- _this.openMenuScroll();
72
+ window.setTimeout(function () {
73
+ _this.handleMenuScrollChange(true);
74
+ }, 0);
75
+ }, 0);
76
+ };
73
77
 
74
- _this.delayOnEvent(resolve);
75
- });
76
- });
78
+ _this.onShowEnd = function () {
79
+ _this.handleMenuScrollChange(false);
77
80
  };
78
81
 
79
82
  _this.state = {
@@ -138,7 +141,7 @@ var Menus = /*#__PURE__*/function (_React$Component) {
138
141
  var onItemDoubleClick = this.props.onItemDoubleClick.bind(this, option, menuIndex);
139
142
 
140
143
  var handleClick = function handleClick(e) {
141
- isMulti && !(hasChildren || option.isLeaf === false) ? undefined : onSelect(e);
144
+ isMulti && !hasLeaf ? undefined : onSelect(e);
142
145
  };
143
146
 
144
147
  var handleMultiClick = function handleMultiClick(e) {
@@ -296,9 +299,9 @@ var Menus = /*#__PURE__*/function (_React$Component) {
296
299
  checked: checked,
297
300
  indeterminate: indeterminate,
298
301
  onChange: onMultiSelectAll
299
- }, /*#__PURE__*/React.createElement("span", {
302
+ }), /*#__PURE__*/React.createElement("span", {
300
303
  className: "".concat(prefixCls, "-menu-item-label")
301
- }, "\u5168\u9009"))));
304
+ }, "\u5168\u9009")));
302
305
  }
303
306
  }, {
304
307
  key: "getActiveOptions",
@@ -322,7 +325,7 @@ var Menus = /*#__PURE__*/function (_React$Component) {
322
325
  var result = this.getActiveOptions().map(function (activeOption) {
323
326
  return activeOption[_this4.getFieldName('children')];
324
327
  }).filter(function (activeOption) {
325
- return !!activeOption;
328
+ return !isEmpty(activeOption);
326
329
  });
327
330
  result.unshift(options);
328
331
  return result;
@@ -348,13 +351,6 @@ var Menus = /*#__PURE__*/function (_React$Component) {
348
351
  }, 150);
349
352
  }
350
353
  }
351
- }, {
352
- key: "openMenuScroll",
353
- value: function openMenuScroll() {
354
- this.setState({
355
- menuScrollOpen: true
356
- });
357
- }
358
354
  }, {
359
355
  key: "scrollActiveItemToView",
360
356
  value: function scrollActiveItemToView() {
@@ -362,10 +358,12 @@ var Menus = /*#__PURE__*/function (_React$Component) {
362
358
  var optionsLength = this.getShowOptions().length; // eslint-disable-next-line no-plusplus
363
359
 
364
360
  for (var i = 0; i < optionsLength; i++) {
365
- var itemComponent = this.menuItems[i];
361
+ var menuItem = this.menuItems[i];
362
+ var menuItemParent = menuItem && menuItem.parentElement;
366
363
 
367
- if (itemComponent && itemComponent.parentElement) {
368
- itemComponent.parentElement.scrollTop = itemComponent.offsetTop;
364
+ if (menuItemParent) {
365
+ var paddingTop = Number(getElementStyle(menuItemParent).paddingTop.replace('px', ''));
366
+ menuItemParent.scrollTop = menuItem.offsetTop - paddingTop;
369
367
  }
370
368
  }
371
369
  }
@@ -426,6 +424,13 @@ var Menus = /*#__PURE__*/function (_React$Component) {
426
424
  callback();
427
425
  }
428
426
  }
427
+ }, {
428
+ key: "handleMenuScrollChange",
429
+ value: function handleMenuScrollChange(menuScrollOpen) {
430
+ this.setState({
431
+ menuScrollOpen: menuScrollOpen
432
+ });
433
+ }
429
434
  }, {
430
435
  key: "render",
431
436
  value: function render() {
@@ -447,8 +452,9 @@ var Menus = /*#__PURE__*/function (_React$Component) {
447
452
  motionName: transitionName,
448
453
  removeOnLeave: false,
449
454
  leavedClassName: "".concat(prefixCls, "-menu-wrap-hidden"),
450
- onAppearPrepare: this.onShowPrepare,
451
- onEnterPrepare: this.onShowPrepare
455
+ onAppearActive: this.onShowActive,
456
+ onEnterActive: this.onShowActive,
457
+ onLeaveEnd: this.onShowEnd
452
458
  }, function (_ref2) {
453
459
  var _classnames2;
454
460
 
@@ -22,6 +22,7 @@ var __rest = this && this.__rest || function (s, e) {
22
22
 
23
23
  import get from 'lodash/get';
24
24
  import first from 'lodash/first';
25
+ import isEqual from 'lodash/isEqual';
25
26
  import React, { useImperativeHandle, forwardRef, useRef, useCallback, useMemo, useState, useEffect, useLayoutEffect, Fragment } from 'react';
26
27
  import classnames from 'classnames';
27
28
  import KeyCode from "rc-util/es/KeyCode";
@@ -29,7 +30,7 @@ import omit from "rc-util/es/omit";
29
30
  import arrayTreeFilter from 'array-tree-filter';
30
31
  import OutlinedLeft from "acud-icon/es/icons/OutlinedLeft";
31
32
  import OutlinedRight from "acud-icon/es/icons/OutlinedRight";
32
- import OutlinedRefresh from "acud-icon/es/icons/OutlinedRefresh";
33
+ import OutlinedLoading from "acud-icon/es/icons/OutlinedLoading";
33
34
  import OutlinedDown from "acud-icon/es/icons/OutlinedDown";
34
35
  import Input from '../input';
35
36
  import Tag from '../tag';
@@ -272,9 +273,7 @@ var Cascader = function Cascader(props, ref) {
272
273
  (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, value, selectedOptions);
273
274
  }, [props]);
274
275
  var handleMouseDown = useCallback(function (e) {
275
- if (e.target !== inputRef.current) {
276
- e.preventDefault();
277
- }
276
+ e.preventDefault();
278
277
  }, []);
279
278
  var handlePickerLabelHover = useCallback(function () {
280
279
  var ele = pickerLabelRef.current;
@@ -493,7 +492,7 @@ var Cascader = function Cascader(props, ref) {
493
492
  var expandIconNode = expandIcon || (isRtlLayout ? /*#__PURE__*/React.createElement(OutlinedLeft, null) : /*#__PURE__*/React.createElement(OutlinedRight, null));
494
493
  var loadingIcon = /*#__PURE__*/React.createElement("span", {
495
494
  className: "".concat(prefixCls, "-menu-item-loading-icon")
496
- }, /*#__PURE__*/React.createElement(OutlinedRefresh, {
495
+ }, /*#__PURE__*/React.createElement(OutlinedLoading, {
497
496
  animation: "spin"
498
497
  }));
499
498
  var clearIcon = allowClear && !disabled && value.length > 0 || inputValue ? /*#__PURE__*/React.createElement(Clear, {
@@ -539,7 +538,8 @@ var Cascader = function Cascader(props, ref) {
539
538
  className: "".concat(prefixCls, "-tag-wrap"),
540
539
  key: labelIndex
541
540
  }, /*#__PURE__*/React.createElement(Tooltip, {
542
- title: labelItem
541
+ title: labelItem,
542
+ overlayClassName: "".concat(prefixCls, "-tag-tooltip")
543
543
  }, /*#__PURE__*/React.createElement(Tag, {
544
544
  className: "".concat(prefixCls, "-tag"),
545
545
  disabled: disabled,
@@ -625,8 +625,9 @@ var Cascader = function Cascader(props, ref) {
625
625
  style: style,
626
626
  className: pickerCls,
627
627
  disabled: disabled
628
- }, /*#__PURE__*/React.createElement(Tooltip, {
629
- title: pickerLabelOverflow ? label : undefined
628
+ }, label && /*#__PURE__*/React.createElement(Tooltip, {
629
+ title: pickerLabelOverflow ? label : undefined,
630
+ overlayClassName: "".concat(prefixCls, "-picker-label-tooltip")
630
631
  }, /*#__PURE__*/React.createElement("span", {
631
632
  ref: pickerLabelRef,
632
633
  className: "".concat(prefixCls, "-picker-label"),
@@ -695,6 +696,11 @@ var Cascader = function Cascader(props, ref) {
695
696
  }
696
697
  };
697
698
  }, []);
699
+ useEffect(function () {
700
+ if ('value' in props && !isEqual(value, props.value)) {
701
+ setValue(props.value);
702
+ }
703
+ }, [props.value]);
698
704
  return /*#__PURE__*/React.createElement(ConfigConsumer, null, function (context) {
699
705
  return /*#__PURE__*/React.createElement(LocaleReceiver, null, function (locale) {
700
706
  return /*#__PURE__*/React.createElement(SizeContext.Consumer, null, function (size) {
@@ -183,7 +183,7 @@
183
183
  color: #B8BABF;
184
184
  }
185
185
  .acud-cascader-picker-arrow-expand {
186
- transform: rotate(-180deg);
186
+ transform: rotate(180deg);
187
187
  }
188
188
  .acud-cascader-picker-arrow > svg {
189
189
  width: 16px;
@@ -331,7 +331,9 @@
331
331
  color: #151B26;
332
332
  background-color: #FFFFFF;
333
333
  border-color: transparent;
334
- padding: 0 8px 0 12px;
334
+ display: flex;
335
+ justify-content: space-between;
336
+ padding: 0 12px;
335
337
  height: 32px;
336
338
  line-height: 32px;
337
339
  cursor: pointer;
@@ -379,17 +381,18 @@
379
381
  border-color: transparent;
380
382
  }
381
383
  .acud-cascader-menu-item-content {
382
- width: calc(100% - 3 * 4px);
384
+ display: flex;
383
385
  overflow: hidden;
384
386
  text-overflow: ellipsis;
385
387
  }
386
- .acud-cascader-menu-item-checkbox {
388
+ .acud-cascader-menu-item-checkbox.acud-checkbox-wrapper {
387
389
  vertical-align: middle;
390
+ margin-right: 8px;
388
391
  }
389
- .acud-cascader-menu-item-checkbox .acud-checkbox {
392
+ .acud-cascader-menu-item-checkbox.acud-checkbox-wrapper .acud-checkbox {
390
393
  top: 0;
391
394
  }
392
- .acud-cascader-menu-item-checkbox .acud-checkbox + span {
395
+ .acud-cascader-menu-item-label {
393
396
  overflow: hidden;
394
397
  text-overflow: ellipsis;
395
398
  }
@@ -411,15 +414,11 @@
411
414
  }
412
415
  .acud-cascader-menu-item-expand {
413
416
  position: relative;
417
+ padding-right: 8px;
414
418
  }
415
419
  .acud-cascader-menu-item-expand .acud-cascader-menu-item-expand-icon,
416
420
  .acud-cascader-menu-item-loading-icon {
417
421
  color: #84868C;
418
- position: absolute;
419
- right: 8px;
420
- top: 50%;
421
- transform: translateY(-50%);
422
- line-height: 0;
423
422
  }
424
423
  .acud-cascader-menu-item-expand .acud-cascader-menu-item-expand-icon:hover,
425
424
  .acud-cascader-menu-item-loading-icon:hover {
@@ -444,3 +443,8 @@
444
443
  .acud-cascader-menu-item .acud-cascader-menu-item-keyword {
445
444
  color: #2468F2;
446
445
  }
446
+ .acud-cascader-tag-tooltip.acud-tooltip,
447
+ .acud-cascader-picker-label-tooltip.acud-tooltip,
448
+ .acud-cascader-menu-item-tooltip.acud-tooltip {
449
+ max-width: initial;
450
+ }
@@ -120,7 +120,7 @@
120
120
  transition: transform .48s;
121
121
 
122
122
  &-expand {
123
- transform: rotate(-180deg);
123
+ transform: rotate(180deg);
124
124
  }
125
125
 
126
126
  & > svg {
@@ -302,7 +302,9 @@
302
302
  &-menu-item {
303
303
  .basic-config(@cascader-menu-item-tp, @cascader-menu-item-p);
304
304
 
305
- padding: 0 @padding-sm 0 @padding-m;
305
+ display: flex;
306
+ justify-content: space-between;
307
+ padding: 0 3 * @P;
306
308
  height: @cascader-menu-item-height;
307
309
  line-height: @cascader-menu-item-height;
308
310
  cursor: pointer;
@@ -311,24 +313,25 @@
311
313
  transition: all .3s;
312
314
 
313
315
  &-content {
314
- width: calc(100% - 3 * @P);
316
+ display: flex;
315
317
  overflow: hidden;
316
318
  text-overflow: ellipsis;
317
319
  }
318
320
 
319
- &-checkbox {
321
+ &-checkbox.@{acud-prefix}-checkbox-wrapper {
320
322
  vertical-align: middle;
323
+ margin-right: 2 * @P;
321
324
 
322
325
  .@{acud-prefix}-checkbox {
323
326
  top: 0;
324
-
325
- & + span {
326
- overflow: hidden;
327
- text-overflow: ellipsis;
328
- }
329
327
  }
330
328
  }
331
329
 
330
+ &-label {
331
+ overflow: hidden;
332
+ text-overflow: ellipsis;
333
+ }
334
+
332
335
  &-disabled {
333
336
  cursor: not-allowed;
334
337
 
@@ -352,22 +355,26 @@
352
355
 
353
356
  &-expand {
354
357
  position: relative;
358
+ padding-right: 2 * @P;
355
359
  }
356
360
 
357
361
  &-expand &-expand-icon,
358
362
  &-loading-icon {
359
363
  .basic-tp-config(tp7);
360
- position: absolute;
361
- right: 2 * @P;
362
- top: 50%;
363
- transform: translateY(-50%);
364
- line-height: 0;
365
364
  }
366
365
 
367
366
  & &-keyword {
368
367
  color: @B6;
369
368
  }
370
369
  }
370
+
371
+ &-tag-tooltip,
372
+ &-picker-label-tooltip,
373
+ &-menu-item-tooltip {
374
+ &.@{acud-prefix}-tooltip {
375
+ max-width: initial;
376
+ }
377
+ }
371
378
  }
372
379
 
373
380
  // @import './rtl';
@@ -111,12 +111,11 @@ var Dropdown = function Dropdown(props) {
111
111
  return fixedModeOverlay;
112
112
  };
113
113
 
114
- return /*#__PURE__*/React.createElement(RcDropdown, _extends({
114
+ return /*#__PURE__*/React.createElement(RcDropdown, _extends({}, rest, {
115
115
  prefixCls: prefixCls,
116
116
  trigger: triggerActions,
117
117
  onVisibleChange: onVisibleChange,
118
- visible: mergedVisible
119
- }, rest, {
118
+ visible: mergedVisible,
120
119
  overlay: function overlay() {
121
120
  return renderOverlay();
122
121
  },
@@ -9,16 +9,17 @@
9
9
  .@{form-item-prefix-cls}-label {
10
10
  flex-grow: 0;
11
11
  line-height: @form-line-height-base;
12
+ padding-left: ~"calc(.5em + @{P})";
13
+ box-sizing: content-box;
12
14
 
13
15
  &:not([class*=~"' @{acud-prefix}-col-'"]) {
14
16
  margin-right: 4 * @P;
15
17
  }
16
18
 
17
19
  > label {
18
- padding-left: ~"calc(.5em + 4px)";
19
20
  &.@{form-item-prefix-cls}-required:not(.@{form-item-prefix-cls}-required-mark-optional)::before {
20
21
  text-indent: -.5em;
21
- margin-left: -4px;
22
+ margin-left: -@P;
22
23
  }
23
24
  }
24
25
  }
@@ -111,13 +111,12 @@
111
111
  .acud-form-horizontal .acud-form-item-label {
112
112
  flex-grow: 0;
113
113
  line-height: 1.6667;
114
+ padding-left: calc(.5em + 4px);
115
+ box-sizing: content-box;
114
116
  }
115
117
  .acud-form-horizontal .acud-form-item-label:not([class*=' acud-col-']) {
116
118
  margin-right: 16px;
117
119
  }
118
- .acud-form-horizontal .acud-form-item-label > label {
119
- padding-left: calc(.5em + 4px);
120
- }
121
120
  .acud-form-horizontal .acud-form-item-label > label.acud-form-item-required:not(.acud-form-item-required-mark-optional)::before {
122
121
  text-indent: -0.5em;
123
122
  margin-left: -4px;
package/es/menu/menu.d.ts CHANGED
@@ -8,8 +8,9 @@ import { MenuItemInterface } from './MenuItem';
8
8
  import { SubMenuInterface } from './SubMenu';
9
9
  import { MenuHeadInterface } from './MenuHead';
10
10
  import { HeaderMenuProps } from './header';
11
+ import { GlobalSiderBarProps } from './globalSilderBar';
11
12
  import { BaseMenuProps } from './baseMenu';
12
- export interface MenuProps extends RcMenuProps, HeaderMenuProps, BaseMenuProps {
13
+ export interface MenuProps extends RcMenuProps, HeaderMenuProps, BaseMenuProps, GlobalSiderBarProps {
13
14
  iconList?: React.ReactNode[];
14
15
  scope?: 'global' | 'local';
15
16
  mode?: 'inline' | 'horizontal' | 'inline';
@@ -7,6 +7,7 @@ export interface RadioProps {
7
7
  disabled?: boolean | undefined;
8
8
  children?: React.ReactNode;
9
9
  label?: string;
10
+ className?: string;
10
11
  onChange?: (e: Event) => {} | void;
11
12
  value?: any;
12
13
  }
package/es/radio/Radio.js CHANGED
@@ -26,9 +26,10 @@ var InternalRadio = function InternalRadio(props, ref) {
26
26
  var _props$prefixCls = props.prefixCls,
27
27
  prefixCls = _props$prefixCls === void 0 ? 'acud-radio' : _props$prefixCls,
28
28
  children = props.children,
29
+ className = props.className,
29
30
  onChange = props.onChange,
30
31
  label = props.label,
31
- restProps = __rest(props, ["prefixCls", "children", "onChange", "label"]);
32
+ restProps = __rest(props, ["prefixCls", "children", "className", "onChange", "label"]);
32
33
 
33
34
  var radioRef = /*#__PURE__*/React.createRef();
34
35
  React.useImperativeHandle(ref, function () {
@@ -43,7 +44,7 @@ var InternalRadio = function InternalRadio(props, ref) {
43
44
  radioProps.disabled = props.disabled || (context === null || context === void 0 ? void 0 : context.disabled);
44
45
  }
45
46
 
46
- var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), radioProps.disabled), _defineProperty(_classNames, "".concat(prefixCls, "-checked"), radioProps.checked), _classNames));
47
+ var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), radioProps.disabled), _defineProperty(_classNames, "".concat(prefixCls, "-checked"), radioProps.checked), _classNames), className);
47
48
  var handleClick = useCallback(function (e) {
48
49
  var _a;
49
50
 
@@ -24,9 +24,10 @@ export default (function (props) {
24
24
  var _props$prefixCls = props.prefixCls,
25
25
  prefixCls = _props$prefixCls === void 0 ? 'acud-radio-button' : _props$prefixCls,
26
26
  children = props.children,
27
+ className = props.className,
27
28
  onChange = props.onChange,
28
29
  label = props.label,
29
- restProps = __rest(props, ["prefixCls", "children", "onChange", "label"]);
30
+ restProps = __rest(props, ["prefixCls", "children", "className", "onChange", "label"]);
30
31
 
31
32
  var context = useContext(RadioGroupContext);
32
33
 
@@ -37,7 +38,7 @@ export default (function (props) {
37
38
  radioProps.disabled = props.disabled || (context === null || context === void 0 ? void 0 : context.disabled);
38
39
  }
39
40
 
40
- var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), radioProps.disabled), _defineProperty(_classNames, "".concat(prefixCls, "-checked"), radioProps.checked), _classNames));
41
+ var classes = classNames(prefixCls, (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-disabled"), radioProps.disabled), _defineProperty(_classNames, "".concat(prefixCls, "-checked"), radioProps.checked), _classNames), className);
41
42
  var handleClick = useCallback(function (e) {
42
43
  var _a;
43
44
 
@@ -8,6 +8,7 @@ export interface BaseRadioGourpProps {
8
8
  optionType?: string;
9
9
  options?: RadioProps[];
10
10
  children?: React.ReactNode;
11
+ className?: string;
11
12
  onChange?: (e: Event) => {} | void;
12
13
  }
13
14
  declare const _default: (props: BaseRadioGourpProps) => JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import React, { Fragment, useCallback } from 'react';
4
+ import classnames from 'classnames';
4
5
  import useMergedState from '../_util/hooks/useMergedState';
5
6
  import Radio from './Radio';
6
7
  import Context from './context';
@@ -12,6 +13,7 @@ export default (function (props) {
12
13
  optionType = _props$optionType === void 0 ? 'default' : _props$optionType,
13
14
  options = props.options,
14
15
  children = props.children,
16
+ className = props.className,
15
17
  onChange = props.onChange;
16
18
 
17
19
  var _useMergedState = useMergedState(props.defaultValue, {
@@ -35,8 +37,9 @@ export default (function (props) {
35
37
  }
36
38
  }, [value, disabled, onChange]);
37
39
  var Compo = optionType === 'default' ? Radio : Radio.Button;
40
+ var classNames = classnames(prefixCls, className);
38
41
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
39
- className: prefixCls
42
+ className: classNames
40
43
  }, /*#__PURE__*/React.createElement(Context.Provider, {
41
44
  value: {
42
45
  value: value,
@@ -4,6 +4,7 @@ export interface ContextProps {
4
4
  value: any;
5
5
  disabled?: boolean;
6
6
  name?: string;
7
+ className?: string;
7
8
  }
8
9
  declare const RadioGroupContext: import("react").Context<ContextProps>;
9
10
  export default RadioGroupContext;
package/es/toast/index.js CHANGED
@@ -53,9 +53,8 @@ function ToastDom(props) {
53
53
  onClose = _props$onClose === void 0 ? null : _props$onClose;
54
54
 
55
55
  var _useState = useState(null),
56
- _useState2 = _slicedToArray(_useState, 2),
57
- timerID = _useState2[0],
58
- setTimerID = _useState2[1];
56
+ _useState2 = _slicedToArray(_useState, 1),
57
+ setTimerID = _useState2[0];
59
58
 
60
59
  var _useState3 = useState(countdown),
61
60
  _useState4 = _slicedToArray(_useState3, 2),
@@ -80,9 +79,9 @@ function ToastDom(props) {
80
79
  }
81
80
 
82
81
  return function () {
83
- if (timerID) {
84
- setTimerID(null);
85
- }
82
+ // destory时可能timerID并没有 但是计时器存在 设置值时react会警告
83
+ // if (timerID) {
84
+ setTimerID(null); // }
86
85
  };
87
86
  }, [counter]);
88
87
  return /*#__PURE__*/React.createElement("div", {
@@ -135,7 +134,7 @@ var handler = {
135
134
  var tempDuration = args.duration;
136
135
  args.duration = 0; // 设置样式 有描述和没描述间距不一样
137
136
 
138
- var tempClassName = props.className + ' ' + PREFIX;
137
+ var tempClassName = (props === null || props === void 0 ? void 0 : props.className) + ' ' + PREFIX;
139
138
 
140
139
  if (args.description) {
141
140
  tempClassName += ' ' + getPrefixCls('notification') + '-has-description';
@@ -153,7 +152,7 @@ var handler = {
153
152
  description: args.description,
154
153
  countdown: tempDuration,
155
154
  notificationKey: key,
156
- onClose: props.onClose
155
+ onClose: props === null || props === void 0 ? void 0 : props.onClose
157
156
  });
158
157
  args.description = /*#__PURE__*/React.createElement(DescriptionDom, {
159
158
  description: args.description
@@ -106,7 +106,7 @@
106
106
  }
107
107
  .acud-notification-notice-with-icon .acud-notification-notice-message {
108
108
  margin: 0 calc(8px + 4px * 4) 0 calc(8px + 18px);
109
- font-size: 16px;
109
+ font-size: 14px;
110
110
  }
111
111
  .acud-notification-notice-with-icon .acud-notification-notice-description {
112
112
  margin: 0 calc(8px + 4px * 4) 0 calc(8px + 18px);
@@ -3,7 +3,7 @@
3
3
 
4
4
  @toast-padding-vertical: @P;
5
5
  @toast-padding-horizontal: 4 * @P;
6
- @font-size-base: @T3;
6
+ @toast-font-size-base: @T3;
7
7
  @line-height-base: 1.5715;
8
8
  @notification-bg: #fff;
9
9
  @heading-color: #000;
@@ -103,7 +103,7 @@
103
103
  }
104
104
 
105
105
  &-description {
106
- font-size: @font-size-base;
106
+ font-size: @toast-font-size-base;
107
107
  .description-wrap {
108
108
  margin: @P 0 0 0;
109
109
  color: @G2;
@@ -123,7 +123,7 @@
123
123
 
124
124
  &-with-icon &-description {
125
125
  margin: 0 ~'calc(@{toast-title-margin} + @{P} * 4)' 0 ~'calc(@{toast-title-margin} + @{T5})';
126
- font-size: @font-size-base;
126
+ font-size: @toast-font-size-base;
127
127
  }
128
128
 
129
129
  &-icon {