@bitrise/bitkit 9.35.0 → 9.35.2-alpha-react18.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.35.0",
4
+ "version": "9.35.2-alpha-react18.2",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -33,30 +33,28 @@
33
33
  "framer-motion": "./node_modules/framer-motion/dist/cjs"
34
34
  },
35
35
  "dependencies": {
36
- "@chakra-ui/react": "^1.8.8",
37
- "@emotion/react": "^11.9.0",
38
- "@emotion/styled": "^11.8.1",
36
+ "@chakra-ui/react": "^2.2.1",
37
+ "@emotion/react": "^11.9.3",
38
+ "@emotion/styled": "^11.9.3",
39
39
  "@juggle/resize-observer": "^3.3.1",
40
40
  "@popperjs/core": "^2.11.5",
41
- "@types/react-transition-group": "^4.4.4",
42
41
  "classnames": "^2.3.1",
43
42
  "clipboard": "^2.0.11",
44
- "framer-motion": "^6.3.4",
43
+ "framer-motion": "^6.3.15",
45
44
  "luxon": "^2.4.0",
46
- "react": "^17.0.2",
47
- "react-dom": "^17.0.2",
48
- "react-popper": "^2.3.0",
49
- "react-transition-group": "^4.4.2"
45
+ "react": "^18.2.0",
46
+ "react-dom": "^18.2.0",
47
+ "react-popper": "^2.3.0"
50
48
  },
51
49
  "peerDependencies": {
52
- "react": "^17.0.2",
53
- "react-dom": "^17.0.2"
50
+ "react": "^18.2.0",
51
+ "react-dom": "^18.2.0"
54
52
  },
55
53
  "devDependencies": {
56
- "@babel/core": "^7.18.2",
57
- "@babel/parser": "^7.18.2",
58
- "@bitrise/eslint-plugin": "2.2.0",
59
- "@chakra-ui/cli": "^1.9.0",
54
+ "@babel/core": "^7.18.5",
55
+ "@babel/parser": "^7.18.5",
56
+ "@bitrise/eslint-plugin": "^2.2.0",
57
+ "@chakra-ui/cli": "^2.1.0",
60
58
  "@chakra-ui/storybook-addon": "^1.0.3",
61
59
  "@commitlint/cli": "^16.3.0",
62
60
  "@commitlint/config-conventional": "^16.2.4",
@@ -85,31 +83,30 @@
85
83
  "@types/lodash.shuffle": "^4.2.7",
86
84
  "@types/luxon": "^2.3.2",
87
85
  "@types/prismjs": "^1.26.0",
88
- "@types/react": "17.0.44",
89
- "@types/react-dom": "^17.0.16",
86
+ "@types/react": "18.0.14",
87
+ "@types/react-dom": "^18.0.5",
90
88
  "@types/react-router": "^5.1.18",
91
89
  "@types/react-router-dom": "^5.3.3",
92
- "@types/react-transition-group": "^4.4.4",
93
90
  "@types/vfile-message": "^2.0.0",
94
- "@typescript-eslint/eslint-plugin": "^5.26.0",
95
- "@typescript-eslint/parser": "^5.26.0",
91
+ "@typescript-eslint/eslint-plugin": "^5.29.0",
92
+ "@typescript-eslint/parser": "^5.29.0",
96
93
  "@wojtekmaj/enzyme-adapter-react-17": "^0.6.7",
97
94
  "axios": "^0.27.2",
98
95
  "babel-eslint": "^10.0.1",
99
96
  "babel-loader": "^8.2.5",
100
97
  "babel-plugin-polyfill-corejs2": "^0.3.1",
101
- "concurrently": "^7.2.1",
98
+ "concurrently": "^7.2.2",
102
99
  "enzyme": "^3.11.0",
103
100
  "enzyme-to-json": "^3.6.2",
104
- "esbuild": "^0.14.43",
105
- "eslint": "^8.16.0",
101
+ "esbuild": "^0.14.47",
102
+ "eslint": "^8.18.0",
106
103
  "eslint-plugin-import": "^2.26.0",
107
- "eslint-plugin-jest": "^26.4.5",
108
- "eslint-plugin-jsx-a11y": "^6.5.1",
109
- "eslint-plugin-prettier": "^4.0.0",
110
- "eslint-plugin-react": "^7.30.0",
111
- "eslint-plugin-react-hooks": "^4.5.0",
112
- "eslint-plugin-storybook": "^0.5.12",
104
+ "eslint-plugin-jest": "^26.5.3",
105
+ "eslint-plugin-jsx-a11y": "^6.6.0",
106
+ "eslint-plugin-prettier": "^4.1.0",
107
+ "eslint-plugin-react": "^7.30.1",
108
+ "eslint-plugin-react-hooks": "^4.6.0",
109
+ "eslint-plugin-storybook": "^0.5.13",
113
110
  "eslint-plugin-testing-library": "^5.5.1",
114
111
  "fscreen": "^1.2.0",
115
112
  "glob": "^8.0.3",
@@ -120,21 +117,21 @@
120
117
  "lodash.sample": "^4.2.1",
121
118
  "lodash.shuffle": "^4.2.0",
122
119
  "node-watch": "^0.7.3",
123
- "prettier": "^2.6.2",
120
+ "prettier": "^2.7.1",
124
121
  "prismjs": "^1.28.0",
125
- "react": "^17.0.2",
126
- "react-docgen": "5.4.0",
127
- "react-dom": "^17.0.2",
122
+ "react": "^18.2.0",
123
+ "react-docgen": "5.4.2",
124
+ "react-dom": "^18.2.0",
128
125
  "react-router": "^5.3.1",
129
126
  "react-router-dom": "^5.3.1",
130
127
  "recast": "^0.21.1",
131
- "semantic-release": "^19.0.2",
128
+ "semantic-release": "^19.0.3",
132
129
  "superstatic": "^8.0.0",
133
130
  "ts-jest": "^27.1.5",
134
- "ts-node": "^10.8.0",
131
+ "ts-node": "^10.8.1",
135
132
  "tsconfig-paths-webpack-plugin": "^3.5.2",
136
- "typescript": "^4.6.4",
137
- "webpack": "^5.72.1"
133
+ "typescript": "^4.7.4",
134
+ "webpack": "^5.73.0"
138
135
  },
139
136
  "files": [
140
137
  "src",
@@ -157,7 +154,7 @@
157
154
  },
158
155
  "resolutions": {
159
156
  "**/ast-types": "npm:@gkz/ast-types",
160
- "ts-node": "^10.8.0",
157
+ "ts-node": "^10.8.1",
161
158
  "@types/react": "17.0.40"
162
159
  }
163
160
  }
@@ -7,7 +7,7 @@ export default {
7
7
  } as ComponentMeta<typeof ButtonGroup>;
8
8
 
9
9
  const Template: ComponentStory<typeof ButtonGroup> = (props) => (
10
- <ButtonGroup {...props} width="900px" flexDirection="column">
10
+ <ButtonGroup {...props} width="900px" flexDirection="row">
11
11
  <Button>Button 1</Button>
12
12
  <Button>Button 2</Button>
13
13
  <Button>Button 3</Button>
@@ -4,6 +4,7 @@ const DialogTheme: ComponentStyleConfig = {
4
4
  baseStyle: ({ scrollBehavior }) => ({
5
5
  overlay: {
6
6
  backgroundColor: 'rgba(0, 0, 0, .5)',
7
+ zIndex: 'dialogOverlay',
7
8
  },
8
9
  dialogContainer: {
9
10
  display: 'flex',
@@ -62,6 +63,9 @@ const DialogTheme: ComponentStyleConfig = {
62
63
  },
63
64
  },
64
65
  full: {
66
+ overlay: {
67
+ zIndex: 'fullDialogOverlay',
68
+ },
65
69
  dialogContainer: {
66
70
  zIndex: 'fullDialog',
67
71
  },
@@ -2,6 +2,6 @@ import { Menu as ChakraMenu, MenuProps as ChakraMenuProps } from '@chakra-ui/rea
2
2
 
3
3
  export type MenuProps = ChakraMenuProps;
4
4
 
5
- const Menu = (props: MenuProps) => <ChakraMenu matchWidth {...props} />;
5
+ const Menu = (props: MenuProps) => <ChakraMenu {...props} />;
6
6
 
7
7
  export default Menu;
@@ -1,6 +1,5 @@
1
- import { FC } from 'react';
2
1
  import { PopoverTrigger as ChakraPopoverTrigger } from '@chakra-ui/react';
3
2
 
4
- const PopoverTigger: FC = (props) => <ChakraPopoverTrigger {...props} />;
3
+ const PopoverTigger = (props: { children: React.ReactNode }) => <ChakraPopoverTrigger {...props} />;
5
4
 
6
5
  export default PopoverTigger;
@@ -1,7 +1,13 @@
1
+ export const BREAKPOINTS = {
2
+ MOBILE: 'base',
3
+ DESKTOP: 'desktop',
4
+ WIDE: 'wide',
5
+ };
6
+
1
7
  const breakpoints = {
2
- mobile: '0rem',
3
- desktop: '53rem', // 848px
4
- wide: '101rem', // 1616px
8
+ [BREAKPOINTS.MOBILE]: '0rem',
9
+ [BREAKPOINTS.DESKTOP]: '53rem', // 848px
10
+ [BREAKPOINTS.WIDE]: '101rem', // 1616px
5
11
  };
6
12
 
7
13
  export default breakpoints;
@@ -3,7 +3,9 @@ const zIndices = {
3
3
  auto: 'auto',
4
4
  base: 0,
5
5
  header: 1100,
6
+ fullDialogOverlay: 1199,
6
7
  fullDialog: 1200,
8
+ dialogOverlay: 1299,
7
9
  dialog: 1300,
8
10
  };
9
11
 
@@ -2,26 +2,12 @@
2
2
  .Placement {
3
3
  position: absolute;
4
4
  z-index: var(--z-index-Placement--below-modal);
5
- pointer-events: none;
6
- }
7
-
8
- .Placement--animate {
9
- transition-property: transform;
10
- transition-duration: var(--transition-duration--fast);
11
- transition-timing-function: var(--transition-timing-function);
12
5
  }
13
6
 
14
7
  .Placement--above-modal {
15
8
  z-index: var(--z-index-Placement--above-modal);
16
9
  }
17
10
 
18
- .Placement__content {
19
- opacity: 0;
20
- transition-property: transform, opacity;
21
- transition-duration: var(--transition-duration--fast);
22
- transition-timing-function: var(--transition-timing-function);
23
- }
24
-
25
11
  .Placement--top .Placement__content { transform: translateY(calc(var(--size--x4) * -1)); }
26
12
  .Placement--bottom .Placement__content { transform: translateY(var(--size--x4)); }
27
13
 
@@ -3,10 +3,8 @@ import * as React from 'react';
3
3
  import { createPortal } from 'react-dom';
4
4
  import { Placement as TypePlacement, VirtualElement } from '@popperjs/core';
5
5
  import { Popper, PopperProps } from 'react-popper';
6
- import { CSSTransition } from 'react-transition-group';
7
6
  import classnames from 'classnames';
8
7
  import { useEventListener } from '../hooks';
9
- import { transitionDurationFast } from '../variables';
10
8
  import Base, { Props as BaseProps } from '../Base/Base';
11
9
  import { PlacementArrowPropsContext } from './PlacementArrowPropsContext';
12
10
  import { PlacementManagerContext } from './PlacementManagerContext';
@@ -14,18 +12,6 @@ import './Placement.css';
14
12
 
15
13
  const { useEffect, useRef, useState } = React;
16
14
 
17
- const transitionClasses = {
18
- appear: 'Placement__content-appear',
19
- appearActive: 'Placement__content-appear-active',
20
- appearDone: 'Placement__content-appear-done',
21
- enter: 'Placement__content-enter',
22
- enterActive: 'Placement__content-enter-active',
23
- enterDone: 'Placement__content-enter-done',
24
- exit: 'Placement__content-exit',
25
- exitActive: 'Placement__content-exit-active',
26
- exitDone: 'Placement__content-exit-done',
27
- };
28
-
29
15
  export interface Props extends BaseProps {
30
16
  animatePosition?: boolean;
31
17
  children: (props: { update: () => void; width?: number }) => React.ReactNode;
@@ -54,7 +40,6 @@ const PlacementPopper: React.FunctionComponent<Props> = (props: Props) => {
54
40
  referenceElement,
55
41
  sameWidth,
56
42
  visible,
57
- timeout = transitionDurationFast,
58
43
  ...rest
59
44
  } = props;
60
45
 
@@ -157,7 +142,7 @@ const PlacementPopper: React.FunctionComponent<Props> = (props: Props) => {
157
142
  ref={ref}
158
143
  style={style}
159
144
  >
160
- <CSSTransition appear={visible} classNames={transitionClasses} in={visible} timeout={timeout}>
145
+ {visible && (
161
146
  <div className="Placement__content">
162
147
  <Base {...rest} backgroundColor={backgroundColor} className="Placement__shadow">
163
148
  <PlacementManagerContext.Consumer>
@@ -170,7 +155,7 @@ const PlacementPopper: React.FunctionComponent<Props> = (props: Props) => {
170
155
  </PlacementManagerContext.Consumer>
171
156
  </Base>
172
157
  </div>
173
- </CSSTransition>
158
+ )}
174
159
  </div>
175
160
  </PlacementArrowPropsContext.Provider>
176
161
  );
package/src/index.ts CHANGED
@@ -109,4 +109,3 @@ export { default as PopoverTrigger } from './Components/Popover/PopoverTrigger';
109
109
 
110
110
  export type { PopoverContentProps } from './Components/Popover/PopoverContent';
111
111
  export { default as PopoverContent } from './Components/Popover/PopoverContent';
112
-
package/src/old.ts CHANGED
@@ -15,10 +15,6 @@ export { default as AddonBeamLink } from './Old/AddonBeam/AddonBeamLink';
15
15
  export type { Props as AddonFooterProps } from './Old/AddonFooter/AddonFooter';
16
16
  export { default as AddonFooter } from './Old/AddonFooter/AddonFooter';
17
17
 
18
- export type { Props as AppearProps } from './Old/Appear/Appear';
19
- export type { TypeAppearAnimationName } from './Old/Appear/Appear';
20
- export { default as Appear } from './Old/Appear/Appear';
21
-
22
18
  export type { Props as AppLayoutProps } from './Old/AppLayout/AppLayout';
23
19
  export { default as AppLayout } from './Old/AppLayout/AppLayout';
24
20