@bitrise/bitkit 13.166.0 → 13.167.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.166.0",
4
+ "version": "13.167.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -1,9 +1,44 @@
1
- import { forwardRef, MenuList as ChakraMenuList, MenuListProps as ChakraMenuListProps } from '@chakra-ui/react';
1
+ import {
2
+ forwardRef,
3
+ MenuList as ChakraMenuList,
4
+ MenuListProps as ChakraMenuListProps,
5
+ usePrefersReducedMotion,
6
+ } from '@chakra-ui/react';
2
7
 
3
8
  export type MenuListProps = ChakraMenuListProps;
4
9
 
5
10
  const MenuList = forwardRef<MenuListProps, 'div'>((props, ref) => {
6
- return <ChakraMenuList {...props} ref={ref} />;
11
+ const prefersReducedMotion = usePrefersReducedMotion({ ssr: false });
12
+ return (
13
+ <ChakraMenuList
14
+ motionProps={
15
+ prefersReducedMotion
16
+ ? {
17
+ variants: {
18
+ enter: {
19
+ visibility: 'visible',
20
+ opacity: 1,
21
+ transition: {
22
+ duration: 0,
23
+ },
24
+ },
25
+ exit: {
26
+ transitionEnd: {
27
+ visibility: 'hidden',
28
+ },
29
+ opacity: 0,
30
+ transition: {
31
+ duration: 0,
32
+ },
33
+ },
34
+ },
35
+ }
36
+ : undefined
37
+ }
38
+ {...props}
39
+ ref={ref}
40
+ />
41
+ );
7
42
  });
8
43
 
9
44
  export default MenuList;