@choice-ui/react 1.7.1 → 1.7.2
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.
|
@@ -14,13 +14,13 @@ const SWIPE_THRESHOLD = 56;
|
|
|
14
14
|
const ANIMATION_CONFIG = {
|
|
15
15
|
default: {
|
|
16
16
|
type: "spring",
|
|
17
|
-
stiffness:
|
|
18
|
-
damping:
|
|
17
|
+
stiffness: 120,
|
|
18
|
+
damping: 18,
|
|
19
19
|
mass: 1
|
|
20
20
|
},
|
|
21
21
|
opacity: {
|
|
22
22
|
type: "tween",
|
|
23
|
-
duration: 0.
|
|
23
|
+
duration: 0.4,
|
|
24
24
|
ease: "easeOut"
|
|
25
25
|
}
|
|
26
26
|
};
|
|
@@ -199,13 +199,13 @@ const ToasterItem = memo(
|
|
|
199
199
|
const enterExitY = isTop ? -100 : 100;
|
|
200
200
|
const exitAnimation = useMemo(() => {
|
|
201
201
|
const dir = swipeDirection || toast.swipeDirection;
|
|
202
|
-
const exitBase = { opacity: 0, zIndex: -1, filter: "blur(
|
|
202
|
+
const exitBase = { opacity: 0, zIndex: -1, filter: "blur(8px)" };
|
|
203
203
|
if (dir === "right") return { ...exitBase, x: "100%" };
|
|
204
204
|
if (dir === "left") return { ...exitBase, x: "-100%" };
|
|
205
205
|
if (dir === "up") return { ...exitBase, y: "-100%" };
|
|
206
206
|
if (dir === "down") return { ...exitBase, y: "100%" };
|
|
207
|
-
return exitBase;
|
|
208
|
-
}, [swipeDirection, toast.swipeDirection]);
|
|
207
|
+
return { ...exitBase, y: isTop ? "-100%" : "100%" };
|
|
208
|
+
}, [swipeDirection, toast.swipeDirection, isTop]);
|
|
209
209
|
const tv = useMemo(
|
|
210
210
|
() => toastRootTv({
|
|
211
211
|
layout,
|
|
@@ -296,7 +296,13 @@ const ToasterItem = memo(
|
|
|
296
296
|
...isHtmlString(toast.description) ? { dangerouslySetInnerHTML: { __html: toast.description } } : { children: toast.description }
|
|
297
297
|
}
|
|
298
298
|
);
|
|
299
|
-
}, [
|
|
299
|
+
}, [
|
|
300
|
+
toast.description,
|
|
301
|
+
descriptionId,
|
|
302
|
+
tv,
|
|
303
|
+
slotProps.descriptionClassName,
|
|
304
|
+
slotProps.descriptionStyle
|
|
305
|
+
]);
|
|
300
306
|
const actionsContent = useMemo(() => {
|
|
301
307
|
var _a;
|
|
302
308
|
if (!toast.action && !toast.cancel) return null;
|
package/package.json
CHANGED