@bitrise/bitkit 9.36.2 → 9.36.5

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.36.2",
4
+ "version": "9.36.5",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -57,7 +57,6 @@
57
57
  "@babel/parser": "^7.18.2",
58
58
  "@bitrise/eslint-plugin": "2.2.0",
59
59
  "@chakra-ui/cli": "^1.9.0",
60
- "@chakra-ui/storybook-addon": "^1.0.3",
61
60
  "@commitlint/cli": "^16.3.0",
62
61
  "@commitlint/config-conventional": "^16.2.4",
63
62
  "@google-cloud/storage": "^5.19.4",
@@ -54,4 +54,5 @@ WithProps.args = {
54
54
  title: 'Title',
55
55
  lotsOfContent: false,
56
56
  dataTestid: 'test-modal',
57
+ trapFocus: false,
57
58
  };
@@ -31,9 +31,10 @@ export interface DialogProps extends Omit<HTMLChakraProps<'section'>, 'scrollBeh
31
31
  scrollBehavior?: 'inside' | 'outside';
32
32
  state: DialogState;
33
33
  title: string;
34
+ trapFocus?: boolean;
34
35
  }
35
36
 
36
- const Dialog = ({ children, dataTestid, scrollBehavior, state, size, title, ...rest }: DialogProps) => {
37
+ const Dialog = ({ children, dataTestid, scrollBehavior, state, size, title, trapFocus, ...rest }: DialogProps) => {
37
38
  const dialogSize = useBreakpointValue({ mobile: 'mobile', desktop: size });
38
39
  return (
39
40
  <Modal
@@ -42,7 +43,7 @@ const Dialog = ({ children, dataTestid, scrollBehavior, state, size, title, ...r
42
43
  onClose={state.onClose}
43
44
  scrollBehavior={scrollBehavior}
44
45
  size={dialogSize}
45
- trapFocus={!process.env.IS_STORYBOOK}
46
+ trapFocus={trapFocus}
46
47
  >
47
48
  <ModalOverlay />
48
49
  <ModalContent data-testid={dataTestid} {...rest}>
@@ -63,6 +64,7 @@ const Dialog = ({ children, dataTestid, scrollBehavior, state, size, title, ...r
63
64
  Dialog.defaultProps = {
64
65
  scrollBehavior: 'outside',
65
66
  size: 'medium',
67
+ trapFocus: true,
66
68
  } as DialogProps;
67
69
 
68
70
  export default Dialog;