ab-ui-library 1.56.3 → 1.57.0
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.
|
@@ -49,9 +49,10 @@ var CollapseGroup = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
49
49
|
content = _ref.content,
|
|
50
50
|
iconProps = _ref.iconProps,
|
|
51
51
|
disabled = _ref.disabled,
|
|
52
|
+
isHidden = _ref.isHidden,
|
|
52
53
|
reverse = _ref.reverse;
|
|
53
54
|
var isOpen = openValues.indexOf(value) !== -1;
|
|
54
|
-
return /*#__PURE__*/React.createElement(CollapseItem, {
|
|
55
|
+
return !isHidden && /*#__PURE__*/React.createElement(CollapseItem, {
|
|
55
56
|
className: 'collapse-group__item',
|
|
56
57
|
id: id,
|
|
57
58
|
isOpen: isOpen,
|
|
@@ -70,14 +70,16 @@ var notify = function notify(toastProps) {
|
|
|
70
70
|
closeSnackbar = toastProps.closeSnackbar,
|
|
71
71
|
actionProps = toastProps.actionProps,
|
|
72
72
|
_toastProps$duration = toastProps.duration,
|
|
73
|
-
duration = _toastProps$duration === void 0 ? DEFAULT_DURATION : _toastProps$duration
|
|
73
|
+
duration = _toastProps$duration === void 0 ? DEFAULT_DURATION : _toastProps$duration,
|
|
74
|
+
autoClose = toastProps.autoClose;
|
|
75
|
+
var shouldAutoClose = autoClose !== undefined ? autoClose : !actionProps;
|
|
74
76
|
toast(function () {
|
|
75
77
|
return CustomToast(toastProps);
|
|
76
78
|
}, {
|
|
77
79
|
bodyClassName: '__body',
|
|
78
80
|
className: '_container',
|
|
79
81
|
toastId: toastId,
|
|
80
|
-
autoClose:
|
|
82
|
+
autoClose: shouldAutoClose ? duration : false
|
|
81
83
|
});
|
|
82
84
|
toast.onChange(function (payload) {
|
|
83
85
|
if (payload.status === 'removed') {
|