@bitrise/bitkit 9.34.2 → 9.35.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.34.2",
4
+ "version": "9.35.0",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -10,6 +10,7 @@ const DialogTheme: ComponentStyleConfig = {
10
10
  justifyContent: 'center',
11
11
  alignItems: 'flex-start',
12
12
  overflow: scrollBehavior === 'inside' ? 'hidden' : 'auto',
13
+ zIndex: 'dialog',
13
14
  },
14
15
  dialog: {
15
16
  borderRadius: '8',
@@ -62,7 +63,7 @@ const DialogTheme: ComponentStyleConfig = {
62
63
  },
63
64
  full: {
64
65
  dialogContainer: {
65
- zIndex: 1000,
66
+ zIndex: 'fullDialog',
66
67
  },
67
68
  dialog: {
68
69
  position: 'absolute',
@@ -2,9 +2,6 @@ import type { SystemStyleObject } from '@chakra-ui/theme-tools';
2
2
 
3
3
  const PopoverTheme: SystemStyleObject = {
4
4
  baseStyle: {
5
- popper: {
6
- zIndex: 10,
7
- },
8
5
  content: {
9
6
  backgroundColor: 'neutral.100',
10
7
  borderRadius: 8,
@@ -1,13 +1,22 @@
1
- import { ReactNode } from 'react';
1
+ import { ReactNode, Fragment } from 'react';
2
2
  import {
3
3
  PopoverContentProps as ChakraPopoverContentProps,
4
4
  PopoverContent as ChakraPopoverContent,
5
+ Portal,
5
6
  } from '@chakra-ui/react';
6
7
 
7
8
  export interface PopoverContentProps extends ChakraPopoverContentProps {
8
9
  children: ReactNode;
10
+ withoutPortal?: boolean;
9
11
  }
10
12
 
11
- const PopoverContent = (props: PopoverContentProps) => <ChakraPopoverContent {...props} />;
13
+ const PopoverContent = ({ withoutPortal, ...rest }: PopoverContentProps) => {
14
+ const Wrapper = withoutPortal ? Fragment : Portal;
15
+ return (
16
+ <Wrapper>
17
+ <ChakraPopoverContent {...rest} />
18
+ </Wrapper>
19
+ );
20
+ };
12
21
 
13
22
  export default PopoverContent;
@@ -0,0 +1,10 @@
1
+ const zIndices = {
2
+ hide: -1,
3
+ auto: 'auto',
4
+ base: 0,
5
+ header: 1100,
6
+ fullDialog: 1200,
7
+ dialog: 1300,
8
+ };
9
+
10
+ export default zIndices;
package/src/theme.ts CHANGED
@@ -21,6 +21,7 @@ import radii from './Foundations/Radii/Radii';
21
21
  import shadows from './Foundations/Shadows/Shadows';
22
22
  import sizes from './Foundations/Sizes/Sizes';
23
23
  import typography from './Foundations/Typography/Typography';
24
+ import zIndices from './Foundations/Zindex/Zindex';
24
25
 
25
26
  const theme = {
26
27
  config: {
@@ -33,6 +34,7 @@ const theme = {
33
34
  shadows,
34
35
  sizes,
35
36
  space: sizes,
37
+ zIndices,
36
38
  styles: {
37
39
  global: {
38
40
  body: {