@bitrise/bitkit 10.0.0 → 10.0.3
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 +1 -1
- package/src/Components/ButtonGroup/ButtonGroup.stories.tsx +1 -1
- package/src/Components/Dialog/Dialog.tsx +6 -1
- package/src/Components/EmptyState/EmptyState.theme.ts +1 -1
- package/src/Components/Menu/Menu.tsx +1 -1
- package/src/Foundations/Breakpoints/Breakpoints.ts +9 -3
- package/src/index.ts +2 -0
- package/src/tsconfig.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
} as ComponentMeta<typeof ButtonGroup>;
|
|
8
8
|
|
|
9
9
|
const Template: ComponentStory<typeof ButtonGroup> = (props) => (
|
|
10
|
-
<ButtonGroup {...props} width="900px" flexDirection="
|
|
10
|
+
<ButtonGroup {...props} width="900px" flexDirection="row">
|
|
11
11
|
<Button>Button 1</Button>
|
|
12
12
|
<Button>Button 2</Button>
|
|
13
13
|
<Button>Button 3</Button>
|
|
@@ -5,8 +5,10 @@ import {
|
|
|
5
5
|
ModalCloseButton,
|
|
6
6
|
ModalHeader,
|
|
7
7
|
useBreakpointValue,
|
|
8
|
+
usePrefersReducedMotion,
|
|
8
9
|
HTMLChakraProps,
|
|
9
10
|
} from '@chakra-ui/react';
|
|
11
|
+
import { BREAKPOINTS } from '../../Foundations/Breakpoints/Breakpoints';
|
|
10
12
|
import Icon from '../Icon/Icon';
|
|
11
13
|
import Text from '../Text/Text';
|
|
12
14
|
|
|
@@ -33,12 +35,15 @@ const Dialog = ({
|
|
|
33
35
|
trapFocus,
|
|
34
36
|
...rest
|
|
35
37
|
}: DialogProps) => {
|
|
36
|
-
const dialogSize = useBreakpointValue({
|
|
38
|
+
const dialogSize = useBreakpointValue({ [BREAKPOINTS.MOBILE]: 'mobile', [BREAKPOINTS.DESKTOP]: size });
|
|
39
|
+
const prefersReducedMotion = usePrefersReducedMotion();
|
|
40
|
+
|
|
37
41
|
return (
|
|
38
42
|
<Modal
|
|
39
43
|
closeOnEsc={isClosable}
|
|
40
44
|
closeOnOverlayClick={false}
|
|
41
45
|
isOpen={isOpen}
|
|
46
|
+
motionPreset={prefersReducedMotion ? 'none' : 'scale'}
|
|
42
47
|
onClose={isClosable ? onClose : () => {}}
|
|
43
48
|
scrollBehavior={scrollBehavior}
|
|
44
49
|
size={dialogSize}
|
|
@@ -2,6 +2,6 @@ import { Menu as ChakraMenu, MenuProps as ChakraMenuProps } from '@chakra-ui/rea
|
|
|
2
2
|
|
|
3
3
|
export type MenuProps = ChakraMenuProps;
|
|
4
4
|
|
|
5
|
-
const Menu = (props: MenuProps) => <ChakraMenu
|
|
5
|
+
const Menu = (props: MenuProps) => <ChakraMenu {...props} />;
|
|
6
6
|
|
|
7
7
|
export default Menu;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
export const BREAKPOINTS = {
|
|
2
|
+
MOBILE: 'base',
|
|
3
|
+
DESKTOP: 'desktop',
|
|
4
|
+
WIDE: 'wide',
|
|
5
|
+
};
|
|
6
|
+
|
|
1
7
|
const breakpoints = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
8
|
+
[BREAKPOINTS.MOBILE]: '0rem',
|
|
9
|
+
[BREAKPOINTS.DESKTOP]: '53rem', // 848px
|
|
10
|
+
[BREAKPOINTS.WIDE]: '101rem', // 1616px
|
|
5
11
|
};
|
|
6
12
|
|
|
7
13
|
export default breakpoints;
|
package/src/index.ts
CHANGED
|
@@ -132,3 +132,5 @@ export { default as RadioGroup } from './Components/Form/Radio/RadioGroup';
|
|
|
132
132
|
|
|
133
133
|
export type { ImageProps } from './Components/Image/Image';
|
|
134
134
|
export { default as Image } from './Components/Image/Image';
|
|
135
|
+
|
|
136
|
+
export { BREAKPOINTS } from './Foundations/Breakpoints/Breakpoints';
|