@bitrise/bitkit 13.2.0 → 13.3.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
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
ModalContent,
|
|
8
8
|
ModalHeader,
|
|
9
9
|
ModalOverlay,
|
|
10
|
+
ModalProps,
|
|
10
11
|
useBreakpointValue,
|
|
11
12
|
usePrefersReducedMotion,
|
|
12
13
|
} from '@chakra-ui/react';
|
|
@@ -15,7 +16,9 @@ import Icon from '../Icon/Icon';
|
|
|
15
16
|
import Text from '../Text/Text';
|
|
16
17
|
import Tooltip from '../Tooltip/Tooltip';
|
|
17
18
|
|
|
18
|
-
export interface DialogProps
|
|
19
|
+
export interface DialogProps
|
|
20
|
+
extends Omit<HTMLChakraProps<'section'>, 'scrollBehavior'>,
|
|
21
|
+
Pick<ModalProps, 'returnFocusOnClose'> {
|
|
19
22
|
isClosable?: boolean;
|
|
20
23
|
isOpen: boolean;
|
|
21
24
|
onClose(): void;
|
|
@@ -35,6 +38,7 @@ const Dialog: ComponentWithAs<'section', DialogProps> = ({
|
|
|
35
38
|
isOpen,
|
|
36
39
|
onClose,
|
|
37
40
|
onCloseComplete,
|
|
41
|
+
returnFocusOnClose = true,
|
|
38
42
|
scrollBehavior,
|
|
39
43
|
size,
|
|
40
44
|
title,
|
|
@@ -60,6 +64,7 @@ const Dialog: ComponentWithAs<'section', DialogProps> = ({
|
|
|
60
64
|
motionPreset={prefersReducedMotion ? 'none' : 'scale'}
|
|
61
65
|
onClose={isClosable ? onClose : () => {}}
|
|
62
66
|
onCloseComplete={onCloseComplete}
|
|
67
|
+
returnFocusOnClose={returnFocusOnClose}
|
|
63
68
|
scrollBehavior={scrollBehavior}
|
|
64
69
|
size={dialogSize}
|
|
65
70
|
trapFocus={trapFocus}
|