@bitrise/bitkit 13.161.0 → 13.162.0

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "13.161.0",
4
+ "version": "13.162.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -5,6 +5,7 @@ import {
5
5
  PopoverBodyProps as ChakraPopoverBodyProps,
6
6
  PopoverContent as ChakraPopoverContent,
7
7
  Portal,
8
+ usePrefersReducedMotion,
8
9
  } from '@chakra-ui/react';
9
10
  import { usePopoverContext } from './Popover.context';
10
11
 
@@ -17,9 +18,36 @@ const PopoverContent = ({ children, withoutPortal, ...rest }: PopoverContentProp
17
18
 
18
19
  const { withArrow } = usePopoverContext();
19
20
 
21
+ const prefersReducedMotion = usePrefersReducedMotion({ ssr: false });
22
+
20
23
  return (
21
24
  <Wrapper>
22
- <ChakraPopoverContent>
25
+ <ChakraPopoverContent
26
+ motionProps={
27
+ prefersReducedMotion
28
+ ? {
29
+ variants: {
30
+ enter: {
31
+ visibility: 'visible',
32
+ opacity: 1,
33
+ transition: {
34
+ duration: 0,
35
+ },
36
+ },
37
+ exit: {
38
+ transitionEnd: {
39
+ visibility: 'hidden',
40
+ },
41
+ opacity: 0,
42
+ transition: {
43
+ duration: 0,
44
+ },
45
+ },
46
+ },
47
+ }
48
+ : undefined
49
+ }
50
+ >
23
51
  {withArrow && <PopoverArrow />}
24
52
  <PopoverBody {...rest}>{children}</PopoverBody>
25
53
  </ChakraPopoverContent>