@bitrise/bitkit 9.37.0-alpha-chakra.1 → 9.37.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": "9.37.0-alpha-chakra.1",
4
+ "version": "9.37.0",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -54,4 +54,5 @@ WithProps.args = {
54
54
  title: 'Title',
55
55
  lotsOfContent: false,
56
56
  dataTestid: 'test-modal',
57
+ trapFocus: false,
57
58
  };
@@ -17,8 +17,8 @@ const DialogTheme: ComponentStyleConfig = {
17
17
  borderRadius: '8',
18
18
  backgroundColor: 'neutral.100',
19
19
  boxShadow: 'large',
20
- marginY: '128',
21
- maxH: scrollBehavior === 'inside' ? 'calc(100% - 16rem)' : undefined,
20
+ marginY: '15vh',
21
+ maxH: scrollBehavior === 'inside' ? '70vh' : undefined,
22
22
  },
23
23
  header: {
24
24
  padding: '24',
@@ -44,6 +44,7 @@ const DialogTheme: ComponentStyleConfig = {
44
44
  gap: '16',
45
45
  padding: '32',
46
46
  paddingTop: '48',
47
+ flexWrap: 'wrap',
47
48
  },
48
49
  }),
49
50
  sizes: {
@@ -82,11 +83,12 @@ const DialogTheme: ComponentStyleConfig = {
82
83
  },
83
84
  mobile: {
84
85
  dialog: {
85
- maxW: '100vw',
86
- minH: '100vh',
86
+ w: '100vw',
87
+ maxH: '100vh',
87
88
  '@supports(min-height: -webkit-fill-available)': {
88
- minH: '-webkit-fill-available',
89
+ maxH: '-webkit-fill-available',
89
90
  },
91
+ marginY: '0',
90
92
  borderRadius: 0,
91
93
  },
92
94
  },
@@ -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;
package/src/index.ts CHANGED
@@ -112,9 +112,3 @@ export { default as PopoverContent } from './Components/Popover/PopoverContent';
112
112
 
113
113
  export type { AvatarProps } from './Components/Avatar/Avatar';
114
114
  export { default as Avatar } from './Components/Avatar/Avatar';
115
-
116
- export type { ListProps } from './Components/List/List';
117
- export { default as List } from './Components/List/List';
118
-
119
- export type { ListItemProps } from './Components/List/ListItem';
120
- export { default as ListItem } from './Components/List/ListItem';
package/src/old.ts CHANGED
@@ -100,6 +100,12 @@ export { default as InputInlineHelp } from './Old/Input/InputInlineHelp';
100
100
  export type { Props as InputLabelProps } from './Old/Input/InputLabel';
101
101
  export { default as InputLabel } from './Old/Input/InputLabel';
102
102
 
103
+ export type { Props as ListProps } from './Old/List/List';
104
+ export { default as List } from './Old/List/List';
105
+
106
+ export type { Props as ListItemProps } from './Old/List/ListItem';
107
+ export { default as ListItem } from './Old/List/ListItem';
108
+
103
109
  export type { Props as LogoProps } from './Old/Logo/Logo';
104
110
  export { default as Logo } from './Old/Logo/Logo';
105
111
 
package/src/theme.ts CHANGED
@@ -7,7 +7,6 @@ import Dialog from './Components/Dialog/Dialog.theme';
7
7
  import Divider from './Components/Divider/Divider.theme';
8
8
  import EmptyState from './Components/EmptyState/EmptyState.theme';
9
9
  import Link from './Components/Link/Link.theme';
10
- import List from './Components/List/List.theme';
11
10
  import Menu from './Components/Menu/Menu.theme';
12
11
  import Select from './Components/Select/Select.theme';
13
12
  import Tabs from './Components/Tabs/Tabs.theme';
@@ -69,7 +68,6 @@ const theme = {
69
68
  Divider,
70
69
  EmptyState,
71
70
  Link,
72
- List,
73
71
  Menu,
74
72
  Modal: Dialog,
75
73
  Select,