@eqtylab/equality 3.2.5 → 3.2.6
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/dist/index.cjs
CHANGED
|
@@ -2432,6 +2432,7 @@ var MotionCollapsibleContent = ({
|
|
|
2432
2432
|
className
|
|
2433
2433
|
}) => {
|
|
2434
2434
|
const [contentHeight, setContentHeight] = React15.useState(0);
|
|
2435
|
+
const [isSettled, setIsSettled] = React15.useState(false);
|
|
2435
2436
|
const contentRef = React15.useRef(null);
|
|
2436
2437
|
React15.useEffect(() => {
|
|
2437
2438
|
if (contentRef.current) {
|
|
@@ -2452,7 +2453,13 @@ var MotionCollapsibleContent = ({
|
|
|
2452
2453
|
animate: { height: contentHeight, opacity: 1 },
|
|
2453
2454
|
exit: { height: 0, opacity: 0 },
|
|
2454
2455
|
transition: { duration: 0.3, ease: "easeInOut" },
|
|
2455
|
-
|
|
2456
|
+
onAnimationStart: () => setIsSettled(false),
|
|
2457
|
+
onAnimationComplete: () => setIsSettled(isOpen),
|
|
2458
|
+
className: cn(
|
|
2459
|
+
styles28__default.default["motion-collapsible"],
|
|
2460
|
+
isSettled && styles28__default.default["motion-collapsible--settled"],
|
|
2461
|
+
className
|
|
2462
|
+
),
|
|
2456
2463
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: contentRef, children })
|
|
2457
2464
|
},
|
|
2458
2465
|
"motion-content"
|