{
if (endsOwnAnimation(event)) {
onMotionEnded();
}
}}
ref={box}
// Inline because the box is a runtime value that Panda cannot extract
// at build time.
style={
rect === undefined || frame === undefined
? undefined
: {
...placedAt(rect, depth),
...clippedAlong(sliding, rect),
...moved,
}
}
>
{/*
Its popups, placed, moved and eased as the box is, just over it. Not in
the box, which would clip a menu reaching past the window.
*/}
{rect !== undefined && popups.length > 0 && (