@passui/react 0.1.44 → 0.1.45
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/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import { CheckIcon } from "../../icons/icons"
|
|
|
5
5
|
import { cn } from "../../lib/class-names"
|
|
6
6
|
import { belongsToFloatingSurface, registerFloatingLayer } from "../../lib/floating-layers"
|
|
7
7
|
import { screenEdges } from "../../lib/screen-edges"
|
|
8
|
-
import { spring, fluidOvershoot } from "../../motion/transitions"
|
|
8
|
+
import { spring, fluidCollapse, fluidOvershoot } from "../../motion/transitions"
|
|
9
9
|
import { concealMenuSource } from "./conceal-menu-source"
|
|
10
10
|
import { findMenuTypeaheadIndex, isMenuNavigationKey, nextMenuIndex } from "./menu-navigation"
|
|
11
11
|
import { menuPosition } from "./menu-position"
|
|
@@ -321,7 +321,11 @@ function Menu({ menu }: { menu: OpenMenu }) {
|
|
|
321
321
|
}
|
|
322
322
|
: undefined
|
|
323
323
|
}
|
|
324
|
-
exit={
|
|
324
|
+
exit={
|
|
325
|
+
reducedMotion
|
|
326
|
+
? { opacity: 0 }
|
|
327
|
+
: { ...menuSurfaceExit(source), transition: fluidCollapse }
|
|
328
|
+
}
|
|
325
329
|
transition={
|
|
326
330
|
reducedMotion
|
|
327
331
|
? { duration: 0 }
|
|
@@ -13,6 +13,7 @@ import { screenEdges } from "../../lib/screen-edges"
|
|
|
13
13
|
import {
|
|
14
14
|
contentCrossfade,
|
|
15
15
|
floatingPanelMotion,
|
|
16
|
+
fluidCollapse,
|
|
16
17
|
fluidOvershoot,
|
|
17
18
|
spring,
|
|
18
19
|
} from "../../motion/transitions"
|
|
@@ -302,7 +303,11 @@ function OpenPopover({
|
|
|
302
303
|
}
|
|
303
304
|
: undefined
|
|
304
305
|
}
|
|
305
|
-
exit={
|
|
306
|
+
exit={
|
|
307
|
+
reducedMotion || !reveal
|
|
308
|
+
? { opacity: 0 }
|
|
309
|
+
: { ...menuSurfaceExit(reveal), transition: fluidCollapse }
|
|
310
|
+
}
|
|
306
311
|
transition={
|
|
307
312
|
reducedMotion
|
|
308
313
|
? { duration: 0 }
|
|
@@ -313,6 +318,13 @@ function OpenPopover({
|
|
|
313
318
|
<motion.div
|
|
314
319
|
initial={reducedMotion ? false : anchorRef ? { opacity: 0 } : undefined}
|
|
315
320
|
animate={reducedMotion ? undefined : anchorRef ? { opacity: 1 } : undefined}
|
|
321
|
+
exit={
|
|
322
|
+
reducedMotion
|
|
323
|
+
? undefined
|
|
324
|
+
: anchorRef
|
|
325
|
+
? { opacity: 0, transition: { duration: 0.12 } }
|
|
326
|
+
: undefined
|
|
327
|
+
}
|
|
316
328
|
transition={reducedMotion ? { duration: 0 } : { duration: 0.16, delay: 0.06 }}
|
|
317
329
|
>
|
|
318
330
|
{children}
|