@bitrise/bitkit 9.32.0 → 9.33.2

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": "9.32.0",
4
+ "version": "9.33.2",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -33,6 +33,7 @@ const DialogTheme: SystemStyleObject = {
33
33
  body: {
34
34
  flex: 1,
35
35
  paddingX: '32',
36
+ overflow: 'auto',
36
37
  },
37
38
  footer: {
38
39
  display: 'flex',
@@ -59,6 +60,20 @@ const DialogTheme: SystemStyleObject = {
59
60
  },
60
61
  },
61
62
  full: {
63
+ dialogContainer: {
64
+ zIndex: 1000,
65
+ },
66
+ dialog: {
67
+ position: 'absolute',
68
+ margin: '0',
69
+ width: 'auto',
70
+ left: '32',
71
+ right: '32',
72
+ top: '32',
73
+ bottom: '32',
74
+ },
75
+ },
76
+ mobile: {
62
77
  dialog: {
63
78
  maxW: '100vw',
64
79
  minH: '100vh',
@@ -1,4 +1,3 @@
1
- import { ReactNode } from 'react';
2
1
  import {
3
2
  Modal,
4
3
  ModalOverlay,
@@ -7,6 +6,7 @@ import {
7
6
  ModalHeader,
8
7
  useBreakpointValue,
9
8
  useDisclosure,
9
+ HTMLChakraProps,
10
10
  } from '@chakra-ui/react';
11
11
  import Icon from '../Icon/Icon';
12
12
  import Text from '../Text/Text';
@@ -25,20 +25,19 @@ export const useDialog = (): DialogState => {
25
25
  onOpen,
26
26
  };
27
27
  };
28
- export interface DialogProps {
29
- children: ReactNode;
28
+ export interface DialogProps extends HTMLChakraProps<'section'> {
30
29
  dataTestid?: string;
31
- size?: 'small' | 'medium' | 'large';
30
+ size?: 'small' | 'medium' | 'large' | 'full';
32
31
  state: DialogState;
33
32
  title: string;
34
33
  }
35
34
 
36
- const Dialog = ({ children, dataTestid, state, size, title }: DialogProps) => {
37
- const dialogSize = useBreakpointValue({ mobile: 'full', desktop: size });
35
+ const Dialog = ({ children, dataTestid, state, size, title, ...rest }: DialogProps) => {
36
+ const dialogSize = useBreakpointValue({ mobile: 'mobile', desktop: size });
38
37
  return (
39
38
  <Modal closeOnOverlayClick={false} isOpen={state.isOpen} onClose={state.onClose} size={dialogSize}>
40
39
  <ModalOverlay />
41
- <ModalContent data-testid={dataTestid}>
40
+ <ModalContent data-testid={dataTestid} {...rest}>
42
41
  <ModalHeader>
43
42
  <Text as="h1" size="5">
44
43
  {title}