@pushwoosh/kit-helpers 4.16.1 → 4.17.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.
- package/expand.js +3 -4
- package/index.d.ts +1 -1
- package/package.json +2 -2
package/expand.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { createElement as _createElement } from "react";
|
|
2
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
2
|
import { useEffect, useRef, useState } from 'react';
|
|
4
3
|
import { CSSTransition, TransitionGroup } from 'react-transition-group';
|
|
@@ -64,9 +63,9 @@ export const Collapse = ({
|
|
|
64
63
|
...rest
|
|
65
64
|
}) => _jsx(TransitionGroup, {
|
|
66
65
|
component: null,
|
|
67
|
-
children: expanded &&
|
|
66
|
+
children: expanded && _jsx(CollapseTransition, {
|
|
68
67
|
...rest,
|
|
69
68
|
externalClassName: className,
|
|
70
|
-
|
|
71
|
-
},
|
|
69
|
+
children: typeof children === 'function' ? children() : children
|
|
70
|
+
}, 0)
|
|
72
71
|
});
|
package/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { default as useMountedState } from './hooks/useMountedState';
|
|
|
13
13
|
export { default as useMount } from './hooks/useMount';
|
|
14
14
|
export { default as useUnmount } from './hooks/useUnmount';
|
|
15
15
|
export { default as useAsync } from './hooks/useAsync';
|
|
16
|
-
export { default as useAsyncFn } from './hooks/useAsyncFn';
|
|
16
|
+
export { default as useAsyncFn, type AsyncState } from './hooks/useAsyncFn';
|
|
17
17
|
export { default as useDelayedValue } from './hooks/useDelayedValue';
|
|
18
18
|
export { default as useDelayedEffect } from './hooks/useDelayedEffect';
|
|
19
19
|
export { default as useAsyncFunction } from './hooks/useAsyncFunction';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushwoosh/kit-helpers",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.17.0",
|
|
4
4
|
"description": "React component for build Pushwoosh products",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"react-transition-group": "^4.4.5"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@pushwoosh/kit-constants": "^3.
|
|
17
|
+
"@pushwoosh/kit-constants": "^3.1.0",
|
|
18
18
|
"@types/react": "^19.3.0",
|
|
19
19
|
"@types/react-dom": "^19.3.0",
|
|
20
20
|
"@types/react-transition-group": "^4.4.12",
|