Skip to content

Commit

Permalink
Merge pull request #4883 from GeekyAnts/release/3.4.0-rc.6
Browse files Browse the repository at this point in the history
Release/3.4.0 rc.6
  • Loading branch information
surajahmed authored Apr 6, 2022
2 parents 4df2567 + 1ea530b commit 929c979
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 60 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"prettier --write"
]
},
"version": "3.4.0-rc.5",
"version": "3.4.0-rc.6",
"license": "MIT",
"private": false,
"main": "lib/commonjs/index",
Expand Down
58 changes: 30 additions & 28 deletions src/components/composites/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,34 +79,36 @@ const Menu = (
return (
<>
{updatedTrigger()}
<Overlay
isOpen={isOpen}
onRequestClose={handleClose}
useRNModalOnAndroid
{..._overlay}
>
<PresenceTransition visible={isOpen} {..._presenceTransition}>
<Popper
triggerRef={triggerRef}
onClose={handleClose}
placement={placement}
{...resolvedProps}
>
<Backdrop onPress={handleClose} {..._backdrop} />
<Popper.Content isOpen={isOpen}>
<MenuContext.Provider
value={{ closeOnSelect, onClose: handleClose }}
>
<FocusScope contain restoreFocus autoFocus>
<MenuContent menuRef={ref} {...resolvedProps}>
{children}
</MenuContent>
</FocusScope>
</MenuContext.Provider>
</Popper.Content>
</Popper>
</PresenceTransition>
</Overlay>
{isOpen && (
<Overlay
isOpen={isOpen}
onRequestClose={handleClose}
useRNModalOnAndroid
{..._overlay}
>
<PresenceTransition visible={isOpen} {..._presenceTransition}>
<Popper
triggerRef={triggerRef}
onClose={handleClose}
placement={placement}
{...resolvedProps}
>
<Backdrop onPress={handleClose} {..._backdrop} />
<Popper.Content isOpen={isOpen}>
<MenuContext.Provider
value={{ closeOnSelect, onClose: handleClose }}
>
<FocusScope contain restoreFocus autoFocus>
<MenuContent menuRef={ref} {...resolvedProps}>
{children}
</MenuContent>
</FocusScope>
</MenuContext.Provider>
</Popper.Content>
</Popper>
</PresenceTransition>
</Overlay>
)}
</>
);
};
Expand Down
68 changes: 37 additions & 31 deletions src/components/composites/Popover/Popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,38 +73,44 @@ const Popover = (
return (
<Box ref={ref}>
{updatedTrigger()}
<Overlay isOpen={isOpen} onRequestClose={handleClose} useRNModalOnAndroid>
<PresenceTransition
initial={{ opacity: 0 }}
animate={{ opacity: 1, transition: { duration: 150 } }}
exit={{ opacity: 0, scale: 0.95, transition: { duration: 100 } }}
visible={isOpen}
style={StyleSheet.absoluteFill}
{isOpen && (
<Overlay
isOpen={isOpen}
onRequestClose={handleClose}
useRNModalOnAndroid
>
<Popper onClose={handleClose} triggerRef={triggerRef} {...props}>
<Backdrop onPress={handleClose} bg="transparent" />
<PopoverContext.Provider
value={{
onClose: handleClose,
initialFocusRef,
finalFocusRef,
popoverContentId,
bodyId,
headerId,
headerMounted,
bodyMounted,
setBodyMounted,
setHeaderMounted,
isOpen,
}}
>
<FocusScope contain={trapFocus} restoreFocus autoFocus>
{children}
</FocusScope>
</PopoverContext.Provider>
</Popper>
</PresenceTransition>
</Overlay>
<PresenceTransition
initial={{ opacity: 0 }}
animate={{ opacity: 1, transition: { duration: 150 } }}
exit={{ opacity: 0, scale: 0.95, transition: { duration: 100 } }}
visible={isOpen}
style={StyleSheet.absoluteFill}
>
<Popper onClose={handleClose} triggerRef={triggerRef} {...props}>
<Backdrop onPress={handleClose} bg="transparent" />
<PopoverContext.Provider
value={{
onClose: handleClose,
initialFocusRef,
finalFocusRef,
popoverContentId,
bodyId,
headerId,
headerMounted,
bodyMounted,
setBodyMounted,
setHeaderMounted,
isOpen,
}}
>
<FocusScope contain={trapFocus} restoreFocus autoFocus>
{children}
</FocusScope>
</PopoverContext.Provider>
</Popper>
</PresenceTransition>
</Overlay>
)}
</Box>
);
};
Expand Down

1 comment on commit 929c979

@vercel
Copy link

@vercel vercel bot commented on 929c979 Apr 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.