acud 1.1.13 → 1.1.15

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 (55) hide show
  1. package/dist/acud.css +123 -34
  2. package/dist/acud.css.map +1 -1
  3. package/dist/acud.js +13029 -7326
  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 +3 -3
  8. package/dist/acud.min.js.map +1 -1
  9. package/es/form/style/index.css +1 -1
  10. package/es/form/style/index.less +2 -1
  11. package/es/input/Input.d.ts +1 -0
  12. package/es/input/Input.js +8 -2
  13. package/es/input/Label.d.ts +3 -1
  14. package/es/input/Label.js +12 -1
  15. package/es/input/TextArea.d.ts +1 -0
  16. package/es/input/TextArea.js +8 -2
  17. package/es/input/style/index.css +24 -23
  18. package/es/input/style/index.less +2 -1
  19. package/es/toast/base.js +1 -1
  20. package/es/toast/index.js +13 -8
  21. package/es/toast/style/index.css +9 -9
  22. package/es/toast/style/index.less +215 -206
  23. package/es/tree/style/index.css +44 -0
  24. package/es/tree/style/mixin.less +64 -0
  25. package/es/tree/tree.d.ts +5 -2
  26. package/es/tree/tree.js +3 -1
  27. package/es/tree/utils/iconHelper.d.ts +2 -2
  28. package/es/tree/utils/iconHelper.js +20 -5
  29. package/es/tree-select/index.js +1 -1
  30. package/es/tree-select/src/OptionList.js +35 -1
  31. package/es/tree-select/style/index.css +44 -0
  32. package/lib/form/style/index.css +1 -1
  33. package/lib/form/style/index.less +2 -1
  34. package/lib/input/Input.d.ts +1 -0
  35. package/lib/input/Input.js +8 -2
  36. package/lib/input/Label.d.ts +3 -1
  37. package/lib/input/Label.js +12 -1
  38. package/lib/input/TextArea.d.ts +1 -0
  39. package/lib/input/TextArea.js +8 -2
  40. package/lib/input/style/index.css +24 -23
  41. package/lib/input/style/index.less +2 -1
  42. package/lib/toast/base.js +1 -1
  43. package/lib/toast/index.js +12 -7
  44. package/lib/toast/style/index.css +9 -9
  45. package/lib/toast/style/index.less +215 -206
  46. package/lib/tree/style/index.css +44 -0
  47. package/lib/tree/style/mixin.less +64 -0
  48. package/lib/tree/tree.d.ts +5 -2
  49. package/lib/tree/tree.js +3 -1
  50. package/lib/tree/utils/iconHelper.d.ts +2 -2
  51. package/lib/tree/utils/iconHelper.js +20 -5
  52. package/lib/tree-select/index.js +1 -1
  53. package/lib/tree-select/src/OptionList.js +35 -1
  54. package/lib/tree-select/style/index.css +44 -0
  55. package/package.json +24 -24
@@ -1,14 +1,29 @@
1
1
  import React from 'react';
2
2
  import OutlinedDown from "acud-icon/es/icons/OutlinedDown";
3
- export function renderSwitcherIcon(prefixCls, nodeProps) {
4
- var switcherCls = "".concat(prefixCls, "-switcher-icon");
3
+ import classNames from 'classnames';
4
+ import { cloneElement, isValidElement } from '../../_util/reactNode';
5
+ export function renderSwitcherIcon(prefixCls, switcherIcon, showLine, nodeProps) {
5
6
  var isLeaf = nodeProps.isLeaf;
6
7
  if (isLeaf) {
7
- return null;
8
+ if (!showLine) {
9
+ return null;
10
+ }
11
+ return /*#__PURE__*/React.createElement("span", {
12
+ className: "".concat(prefixCls, "-switcher-leaf-line")
13
+ });
14
+ }
15
+ var switcherCls = "".concat(prefixCls, "-switcher-icon");
16
+ var switcher = typeof switcherIcon === 'function' ? switcherIcon(nodeProps) : switcherIcon;
17
+ if (isValidElement(switcher)) {
18
+ return cloneElement(switcher, {
19
+ className: classNames(switcher.props.className || '', switcherCls)
20
+ });
21
+ }
22
+ if (switcher) {
23
+ return switcher;
8
24
  }
9
25
  return /*#__PURE__*/React.createElement(OutlinedDown, {
10
- className: switcherCls,
11
- width: '16px'
26
+ className: switcherCls
12
27
  });
13
28
  }
14
29
  ;
@@ -139,7 +139,7 @@ var InternalTreeSelect = function InternalTreeSelect(_a, ref) {
139
139
  removeIcon: removeIcon,
140
140
  clearIcon: clearIcon,
141
141
  switcherIcon: function switcherIcon(nodeProps) {
142
- return renderSwitcherIcon(treePrefixCls, nodeProps);
142
+ return renderSwitcherIcon(treePrefixCls, null, false, nodeProps);
143
143
  },
144
144
  showTreeIcon: treeIcon,
145
145
  notFoundContent: mergedNotFound,
@@ -242,6 +242,40 @@ var OptionList = function OptionList(_, ref) {
242
242
  triggerChange([].concat(_toConsumableArray(allDisabledCheckedKeys), _toConsumableArray(allAbleKeys)));
243
243
  }
244
244
  }, [selectAllStatus, allAbleKeys, allDisabledCheckedKeys]);
245
+ var formatContent = React.useCallback(function (content, searchValue, prefixCls) {
246
+ if (typeof content !== 'string' && typeof content !== 'number') {
247
+ return /*#__PURE__*/React.createElement(React.Fragment, null, content);
248
+ }
249
+ var contentStr = content.toString();
250
+ var lowerContent = contentStr.toLowerCase();
251
+ var lowerSearch = searchValue.toLowerCase().trim();
252
+ var searchStartIndex = lowerContent.indexOf(lowerSearch);
253
+ var len = lowerSearch.length;
254
+ // 存在搜索值不在content的情况,比如key与children不一致时
255
+ if (searchStartIndex === -1) {
256
+ return /*#__PURE__*/React.createElement(React.Fragment, null, content);
257
+ }
258
+ return /*#__PURE__*/React.createElement(React.Fragment, null, contentStr.slice(0, searchStartIndex), /*#__PURE__*/React.createElement("span", {
259
+ className: "".concat(prefixCls, "-search-highlight")
260
+ }, contentStr.slice(searchStartIndex, searchStartIndex + len)), contentStr.slice(searchStartIndex + len));
261
+ }, []);
262
+ var formatTreeData = React.useMemo(function () {
263
+ if ((searchValue === null || searchValue === void 0 ? void 0 : searchValue.toString().trim()) === '') {
264
+ return memoTreeData;
265
+ }
266
+ var loopTree = function loopTree(arr) {
267
+ return arr.map(function (item) {
268
+ var newItem = _extends(_extends({}, item), {
269
+ title: formatContent(item.title, searchValue, prefixCls)
270
+ });
271
+ if (newItem.children && newItem.children.length) {
272
+ newItem.children = loopTree(newItem.children);
273
+ }
274
+ return newItem;
275
+ });
276
+ };
277
+ return loopTree(memoTreeData);
278
+ }, [memoTreeData, searchValue, prefixCls, formatContent]);
245
279
  // ========================== Render ==========================
246
280
  if (memoTreeData.length === 0) {
247
281
  return /*#__PURE__*/React.createElement("div", {
@@ -265,7 +299,7 @@ var OptionList = function OptionList(_, ref) {
265
299
  ref: treeRef,
266
300
  focusable: false,
267
301
  prefixCls: "".concat(prefixCls, "-tree"),
268
- treeData: memoTreeData,
302
+ treeData: formatTreeData,
269
303
  height: listHeight,
270
304
  itemHeight: listItemHeight,
271
305
  virtual: virtual !== false && dropdownMatchSelectWidth !== false,
@@ -404,6 +404,7 @@
404
404
  }
405
405
  .acud-select-tree-switcher .acud-tree-switcher-icon svg,
406
406
  .acud-select-tree-switcher .acud-select-tree-switcher-icon svg {
407
+ width: 16px!important;
407
408
  transition: transform 0.3s;
408
409
  }
409
410
  .acud-select-tree-switcher-noop {
@@ -412,6 +413,29 @@
412
413
  .acud-select-tree-switcher_close .acud-select-tree-switcher-icon svg {
413
414
  transform: rotate(-90deg);
414
415
  }
416
+ .acud-select-tree-switcher-leaf-line {
417
+ position: relative;
418
+ z-index: 1;
419
+ display: inline-block;
420
+ width: 100%;
421
+ height: 100%;
422
+ }
423
+ .acud-select-tree-switcher-leaf-line::before {
424
+ position: absolute;
425
+ top: 0;
426
+ right: 8px;
427
+ bottom: -4px;
428
+ margin-left: -1px;
429
+ border-right: 1px solid #B8BABF;
430
+ content: ' ';
431
+ }
432
+ .acud-select-tree-switcher-leaf-line::after {
433
+ position: absolute;
434
+ width: 10px;
435
+ height: 14px;
436
+ border-bottom: 1px solid #B8BABF;
437
+ content: ' ';
438
+ }
415
439
  .acud-select-tree .acud-select-tree-node-content-wrapper {
416
440
  position: relative;
417
441
  z-index: auto;
@@ -503,6 +527,26 @@
503
527
  .acud-select-tree-treenode:hover .acud-select-tree-draggable-icon {
504
528
  opacity: 0.45;
505
529
  }
530
+ .acud-select-tree-show-line .acud-select-tree-indent-unit {
531
+ position: relative;
532
+ height: 100%;
533
+ }
534
+ .acud-select-tree-show-line .acud-select-tree-indent-unit::before {
535
+ position: absolute;
536
+ top: 0;
537
+ right: 16px;
538
+ bottom: -4px;
539
+ border-right: 1px solid #B8BABF;
540
+ content: '';
541
+ }
542
+ .acud-select-tree-show-line .acud-select-tree-indent-unit-end::before {
543
+ display: none;
544
+ }
545
+ .acud-select-tree .acud-select-tree-treenode-leaf-last .acud-select-tree-switcher-leaf-line::before {
546
+ top: auto !important;
547
+ bottom: auto !important;
548
+ height: 14px !important;
549
+ }
506
550
  .acud-select-tree-checkbox {
507
551
  margin: 2px 0 0 8px;
508
552
  top: 0.1em;
@@ -765,7 +765,7 @@
765
765
  clear: both;
766
766
  margin: 4px 0 0;
767
767
  min-height: 1.6667;
768
- color: #B8BABF;
768
+ color: #84868C;
769
769
  font-size: 12px;
770
770
  line-height: 1.6667;
771
771
  transition: color 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
@@ -186,7 +186,8 @@
186
186
  clear: both;
187
187
  margin: @form-item-with-extra-margin;
188
188
  min-height: @form-line-height-base;
189
- color: @form-secondary-color;
189
+ // color: @form-secondary-color;
190
+ color: @G5;
190
191
  font-size: @form-font-size-base;
191
192
  line-height: @form-line-height-base;
192
193
  transition: color 0.3s @ease-out; // sync input color transition
@@ -38,6 +38,7 @@ export interface BaseInputProps extends Omit<React.InputHTMLAttributes<HTMLInput
38
38
  type?: string;
39
39
  handleClearAll?: () => void;
40
40
  style?: React.CSSProperties;
41
+ forbidIfLimit?: boolean;
41
42
  }
42
43
  export declare const resolveTargetValue: (event: React.ChangeEvent, value: any) => React.ChangeEvent;
43
44
  declare const Input: React.ForwardRefExoticComponent<BaseInputProps & React.RefAttributes<unknown>>;
@@ -65,7 +65,9 @@ var Input = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
65
65
  style = props.style,
66
66
  _props$hidden = props.hidden,
67
67
  hidden = _props$hidden === void 0 ? false : _props$hidden,
68
- rest = __rest(props, ["prefixCls", "size", "placeholder", "warning", "warningPopover", "warningText", "tips", "disabled", "readOnly", "defaultValue", "limitLength", "label", "prefix", "suffix", "addonBefore", "addonAfter", "className", "allowClear", "onPressEnter", "onKeyDown", "handleClearAll", "type", "style", "hidden"]);
68
+ _props$forbidIfLimit = props.forbidIfLimit,
69
+ forbidIfLimit = _props$forbidIfLimit === void 0 ? false : _props$forbidIfLimit,
70
+ rest = __rest(props, ["prefixCls", "size", "placeholder", "warning", "warningPopover", "warningText", "tips", "disabled", "readOnly", "defaultValue", "limitLength", "label", "prefix", "suffix", "addonBefore", "addonAfter", "className", "allowClear", "onPressEnter", "onKeyDown", "handleClearAll", "type", "style", "hidden", "forbidIfLimit"]);
69
71
  var _useState = (0, _react.useState)(props.value || defaultValue || ''),
70
72
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
71
73
  value = _useState2[0],
@@ -145,7 +147,11 @@ var Input = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
145
147
  }
146
148
  };
147
149
  var handleOnChange = function handleOnChange(e) {
148
- setValue(e.target.value);
150
+ if (forbidIfLimit && limitLength && e.target.value.length >= limitLength) {
151
+ setValue(e.target.value.slice(0, limitLength));
152
+ } else {
153
+ setValue(e.target.value);
154
+ }
149
155
  if (!e.target.value.length) {
150
156
  setShowClearIcon(false);
151
157
  }
@@ -1,8 +1,10 @@
1
1
  import React from 'react';
2
2
  import { BaseInputProps } from './Input';
3
- export interface InputLabelProps extends BaseInputProps {
3
+ import { Omit } from '../_util/type';
4
+ export interface InputLabelProps extends Omit<BaseInputProps, 'value'> {
4
5
  label?: string[];
5
6
  onPressEnter: (e: any) => void;
7
+ onLableChange: (value: any) => void;
6
8
  }
7
9
  declare const Label: React.FC<InputLabelProps>;
8
10
  export default Label;
@@ -20,7 +20,8 @@ var Label = function Label(_ref) {
20
20
  customizePrefixCls = _ref.prefixCls,
21
21
  _ref$placeholder = _ref.placeholder,
22
22
  placeholder = _ref$placeholder === void 0 ? '' : _ref$placeholder,
23
- disabled = _ref.disabled;
23
+ disabled = _ref.disabled,
24
+ onLableChange = _ref.onLableChange;
24
25
  var _useState = (0, _react.useState)(label || []),
25
26
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
26
27
  labelList = _useState2[0],
@@ -35,9 +36,15 @@ var Label = function Label(_ref) {
35
36
  var handleClearLabel = function handleClearLabel(index) {
36
37
  labelList.splice(index, 1);
37
38
  setLabelList((0, _toConsumableArray2["default"])(labelList));
39
+ if (onLableChange) {
40
+ onLableChange((0, _toConsumableArray2["default"])(labelList));
41
+ }
38
42
  };
39
43
  var handleClearAll = function handleClearAll() {
40
44
  setLabelList([]);
45
+ if (onLableChange) {
46
+ onLableChange([]);
47
+ }
41
48
  if (inputEl.current) {
42
49
  inputEl.current.focus();
43
50
  }
@@ -54,6 +61,9 @@ var Label = function Label(_ref) {
54
61
  }
55
62
  value && setLabelList([].concat((0, _toConsumableArray2["default"])(labelList), [value]));
56
63
  setInputValue('');
64
+ if (onLableChange) {
65
+ onLableChange([].concat((0, _toConsumableArray2["default"])(labelList), [value]));
66
+ }
57
67
  }
58
68
  if (e.key === 'Backspace' && !value) {
59
69
  var a = (0, _toConsumableArray2["default"])(labelList);
@@ -71,6 +81,7 @@ var Label = function Label(_ref) {
71
81
  };
72
82
  var handleInputBlur = function handleInputBlur() {
73
83
  acudInputEl.current.blur();
84
+ setInputValue('');
74
85
  };
75
86
  var handleMouseUp = function handleMouseUp(e) {
76
87
  e.preventDefault();
@@ -21,6 +21,7 @@ export interface TextAreaProps {
21
21
  onResize?: any;
22
22
  readonly?: boolean;
23
23
  allowClear?: boolean;
24
+ forbidIfLimit?: boolean;
24
25
  }
25
26
  declare const TextArea: React.ForwardRefExoticComponent<TextAreaProps & React.RefAttributes<unknown>>;
26
27
  export default TextArea;
@@ -48,7 +48,9 @@ var TextArea = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
48
48
  onBlur = props.onBlur,
49
49
  _props$allowClear = props.allowClear,
50
50
  allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
51
- rest = __rest(props, ["prefixCls", "placeholder", "className", "style", "width", "limitLength", "readonly", "autoSize", "onPressEnter", "onKeyDown", "onFocus", "onBlur", "allowClear"]);
51
+ _props$forbidIfLimit = props.forbidIfLimit,
52
+ forbidIfLimit = _props$forbidIfLimit === void 0 ? false : _props$forbidIfLimit,
53
+ rest = __rest(props, ["prefixCls", "placeholder", "className", "style", "width", "limitLength", "readonly", "autoSize", "onPressEnter", "onKeyDown", "onFocus", "onBlur", "allowClear", "forbidIfLimit"]);
52
54
  var _useMergedState = (0, _useMergedState3["default"])(props.defaultValue, {
53
55
  value: props.value
54
56
  }),
@@ -70,7 +72,11 @@ var TextArea = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
70
72
  if (readonly) {
71
73
  return;
72
74
  }
73
- setValue(e.target.value);
75
+ if (forbidIfLimit && limitLength && e.target.value.length >= limitLength) {
76
+ setValue(e.target.value.slice(0, limitLength));
77
+ } else {
78
+ setValue(e.target.value);
79
+ }
74
80
  if (props.onChange) {
75
81
  props.onChange(e);
76
82
  }
@@ -874,42 +874,43 @@
874
874
  .acud-input-textarea-autosize {
875
875
  min-height: 32px;
876
876
  }
877
- .acud-input-textarea-limit {
877
+ .acud-input-textarea-limit-box {
878
+ color: #84868C;
878
879
  background-color: #FFFFFF;
879
880
  border-color: #F33E3E;
880
881
  }
881
- .acud-input-textarea-limit:hover {
882
+ .acud-input-textarea-limit-box:hover {
882
883
  background-color: #FFFFFF;
883
884
  }
884
- .acud-input-textarea-limit:focus,
885
- .acud-input-textarea-limit:active {
885
+ .acud-input-textarea-limit-box:focus,
886
+ .acud-input-textarea-limit-box:active {
886
887
  background-color: #FFFFFF;
887
888
  }
888
- .acud-input-textarea-limit[disabled],
889
- .acud-input-textarea-limit[aria-disabled="true"],
890
- .acud-input-textarea-limit[disabled]:hover,
891
- .acud-input-textarea-limit[aria-disabled="true"]:hover,
892
- .acud-input-textarea-limit[disabled]:focus,
893
- .acud-input-textarea-limit[aria-disabled="true"]:focus,
894
- .acud-input-textarea-limit[disabled]:active,
895
- .acud-input-textarea-limit[aria-disabled="true"]:active {
889
+ .acud-input-textarea-limit-box[disabled],
890
+ .acud-input-textarea-limit-box[aria-disabled="true"],
891
+ .acud-input-textarea-limit-box[disabled]:hover,
892
+ .acud-input-textarea-limit-box[aria-disabled="true"]:hover,
893
+ .acud-input-textarea-limit-box[disabled]:focus,
894
+ .acud-input-textarea-limit-box[aria-disabled="true"]:focus,
895
+ .acud-input-textarea-limit-box[disabled]:active,
896
+ .acud-input-textarea-limit-box[aria-disabled="true"]:active {
896
897
  background-color: #FFFFFF;
897
898
  }
898
- .acud-input-textarea-limit:hover {
899
+ .acud-input-textarea-limit-box:hover {
899
900
  border-color: #F33E3E;
900
901
  }
901
- .acud-input-textarea-limit:focus,
902
- .acud-input-textarea-limit:active {
902
+ .acud-input-textarea-limit-box:focus,
903
+ .acud-input-textarea-limit-box:active {
903
904
  border-color: #F33E3E;
904
905
  }
905
- .acud-input-textarea-limit[disabled],
906
- .acud-input-textarea-limit[aria-disabled="true"],
907
- .acud-input-textarea-limit[disabled]:hover,
908
- .acud-input-textarea-limit[aria-disabled="true"]:hover,
909
- .acud-input-textarea-limit[disabled]:focus,
910
- .acud-input-textarea-limit[aria-disabled="true"]:focus,
911
- .acud-input-textarea-limit[disabled]:active,
912
- .acud-input-textarea-limit[aria-disabled="true"]:active {
906
+ .acud-input-textarea-limit-box[disabled],
907
+ .acud-input-textarea-limit-box[aria-disabled="true"],
908
+ .acud-input-textarea-limit-box[disabled]:hover,
909
+ .acud-input-textarea-limit-box[aria-disabled="true"]:hover,
910
+ .acud-input-textarea-limit-box[disabled]:focus,
911
+ .acud-input-textarea-limit-box[aria-disabled="true"]:focus,
912
+ .acud-input-textarea-limit-box[disabled]:active,
913
+ .acud-input-textarea-limit-box[aria-disabled="true"]:active {
913
914
  border-color: #F33E3E;
914
915
  }
915
916
  .acud-input-textarea-no-limit {
@@ -292,7 +292,8 @@
292
292
  &-autosize {
293
293
  min-height: 32px;
294
294
  }
295
- &-limit {
295
+ &-limit-box{
296
+ color: @G5;
296
297
  .basic-p-config(@input-enhance-p);
297
298
  }
298
299
  &-no-limit {
package/lib/toast/base.js CHANGED
@@ -144,7 +144,7 @@ function getNotificationInstance(args, callback) {
144
144
  customizePrefixCls = args.prefixCls;
145
145
  var _globalConfig = (0, _configProvider.globalConfig)(),
146
146
  getPrefixCls = _globalConfig.getPrefixCls;
147
- var prefixCls = getPrefixCls('notification', customizePrefixCls || defaultPrefixCls);
147
+ var prefixCls = getPrefixCls('', customizePrefixCls || defaultPrefixCls) + '-notification';
148
148
  var cacheKey = "".concat(prefixCls, "-").concat(placement);
149
149
  var cacheInstance = notificationInstance[cacheKey];
150
150
  if (cacheInstance) {
@@ -23,7 +23,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
23
23
  var _globalConfig = (0, _configProvider.globalConfig)(),
24
24
  getPrefixCls = _globalConfig.getPrefixCls;
25
25
  var PREFIX = 'notification-hastime';
26
- var defaultPrefixCls = '';
26
+ var defaultPrefixCls = _configProvider.defaultPrefixCls;
27
27
  var maxToastArrLength = 4; // 最多显示多少个toast
28
28
  /**
29
29
  * 代理对象
@@ -65,7 +65,7 @@ function ToastDom(props) {
65
65
  counter = _useState4[0],
66
66
  setCounter = _useState4[1];
67
67
  // const prefixCls = getPrefixCls('toast-wrap', '');
68
- var prefixCls = getPrefixCls('toast-wrap', customizePrefixCls || defaultPrefixCls);
68
+ var prefixCls = getPrefixCls('', customizePrefixCls || defaultPrefixCls) + '-toast-wrap';
69
69
  (0, _react.useEffect)(function () {
70
70
  if (counter !== undefined) {
71
71
  if (counter > 0) {
@@ -94,11 +94,11 @@ function ToastDom(props) {
94
94
  // }
95
95
  // }, []);
96
96
  return /*#__PURE__*/_react["default"].createElement("div", {
97
- className: getPrefixCls(undefined, customizePrefixCls || defaultPrefixCls) + '-toast-wrap'
97
+ className: getPrefixCls('', customizePrefixCls || defaultPrefixCls) + '-notification-toast-wrap'
98
98
  }, /*#__PURE__*/_react["default"].createElement("div", {
99
- className: (0, _classnames["default"])("".concat(getPrefixCls(undefined, customizePrefixCls || defaultPrefixCls), "-toast-wrap-left"), (0, _defineProperty2["default"])({}, prefixCls + '-no-description', !description))
99
+ className: (0, _classnames["default"])("".concat(getPrefixCls('', customizePrefixCls || defaultPrefixCls), "-notification-toast-wrap-left"), (0, _defineProperty2["default"])({}, prefixCls + '-no-description', !description))
100
100
  }, message), counter === undefined ? null : /*#__PURE__*/_react["default"].createElement("div", {
101
- className: getPrefixCls(undefined, customizePrefixCls || defaultPrefixCls) + '-toast-wrap-right'
101
+ className: getPrefixCls('', customizePrefixCls || defaultPrefixCls) + '-notification-toast-wrap-right'
102
102
  }, "(", counter, /*#__PURE__*/_react["default"].createElement("span", null, "s"), ")"));
103
103
  }
104
104
  function DescriptionDom(props) {
@@ -128,6 +128,10 @@ var handler = {
128
128
  if (name === 'config' && props.maxCount) {
129
129
  maxToastArrLength = props.maxCount;
130
130
  }
131
+ // 设置prefixcls 兼容antd
132
+ if (name === 'config' && props.prefixCls) {
133
+ defaultPrefixCls = props.prefixCls;
134
+ }
131
135
  // key相同时不重新渲染
132
136
  if (!~toastArr.indexOf(args.key)) {
133
137
  if (toastArr.length < maxToastArrLength) {
@@ -150,7 +154,7 @@ var handler = {
150
154
  // 设置样式 有描述和没描述间距不一样
151
155
  var tempClassName = (props === null || props === void 0 ? void 0 : props.className) + ' ' + PREFIX;
152
156
  if (args.description) {
153
- tempClassName += ' ' + getPrefixCls('notification') + '-has-description';
157
+ tempClassName += ' ' + getPrefixCls('', (props === null || props === void 0 ? void 0 : props.prefixCls) || defaultPrefixCls) + '-notification-has-description';
154
158
  }
155
159
  if (props && props.className) {
156
160
  args.className = props.className + ' ' + tempClassName;
@@ -163,7 +167,8 @@ var handler = {
163
167
  description: args.description,
164
168
  countdown: tempDuration,
165
169
  notificationKey: args.key,
166
- onClose: props === null || props === void 0 ? void 0 : props.onClose
170
+ onClose: props === null || props === void 0 ? void 0 : props.onClose,
171
+ prefixCls: props === null || props === void 0 ? void 0 : props.prefixCls
167
172
  });
168
173
  args.description = /*#__PURE__*/_react["default"].createElement(DescriptionDom, {
169
174
  description: args.description
@@ -73,23 +73,23 @@
73
73
  display: block;
74
74
  content: '';
75
75
  }
76
- .acud-notification-notice-message .acud-toast-wrap {
76
+ .acud-notification-notice-message .acud-notification-toast-wrap {
77
77
  display: flex;
78
78
  }
79
- .acud-notification-notice-message .acud-toast-wrap-left {
79
+ .acud-notification-notice-message .acud-notification-toast-wrap-left {
80
80
  flex: 1;
81
81
  font-size: 14px;
82
82
  color: #151B26;
83
83
  font-weight: 500;
84
84
  }
85
- .acud-notification-notice-message .acud-toast-wrap-right {
85
+ .acud-notification-notice-message .acud-notification-toast-wrap-right {
86
86
  font-size: 12px;
87
87
  color: #B8BABF;
88
88
  }
89
- .acud-notification-notice-message .acud-toast-wrap-right span {
89
+ .acud-notification-notice-message .acud-notification-toast-wrap-right span {
90
90
  font-size: 12px;
91
91
  }
92
- .acud-notification-notice-message .acud-toast-wrap-no-description {
92
+ .acud-notification-notice-message .acud-notification-toast-wrap-no-description {
93
93
  color: #151B26;
94
94
  font-size: 12px;
95
95
  font-weight: 400;
@@ -117,16 +117,16 @@
117
117
  line-height: 16px;
118
118
  top: 8px;
119
119
  }
120
- .acudicon.acud-notification-notice-icon-success path {
120
+ .acud-notification-notice .acud-notification-notice-icon-success path {
121
121
  fill: #30BF13;
122
122
  }
123
- .acudicon.acud-notification-notice-icon-info path {
123
+ .acud-notification-notice .acud-notification-notice-icon-info path {
124
124
  fill: #2468F2;
125
125
  }
126
- .acudicon.acud-notification-notice-icon-warning path {
126
+ .acud-notification-notice .acud-notification-notice-icon-warning path {
127
127
  fill: #FF9326;
128
128
  }
129
- .acudicon.acud-notification-notice-icon-error path {
129
+ .acud-notification-notice .acud-notification-notice-icon-error path {
130
130
  fill: #F33E3E;
131
131
  }
132
132
  .acud-notification-notice-close {