@bitrise/bitkit 9.35.1 → 9.35.2-alpha-react18.3

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @bitrise/bitkit
2
2
 
3
- Library for React UI components and design patterns.
3
+ Library for React UI components and design patterns.
4
4
  ___
5
5
 
6
6
 
@@ -17,7 +17,6 @@ yarn install
17
17
  - [Typescript](https://www.typescriptlang.org/)
18
18
  - [Parcel](https://parceljs.org/) (bundler and dev servers)
19
19
  - [React](https://reactjs.org/) (with [React Router](https://reacttraining.com/react-router/) for routing links)
20
- - [PostCSS](https://postcss.org/) (with [postcss-preset-env](https://preset-env.cssdb.org/) for a little power)
21
20
  - [Jest](https://jestjs.io/) (for unit testing)
22
21
 
23
22
  ### Managing icons
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.1",
4
+ "version": "9.35.2-alpha-react18.3",
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>
@@ -8,6 +8,7 @@ import {
8
8
  useDisclosure,
9
9
  HTMLChakraProps,
10
10
  } from '@chakra-ui/react';
11
+ import { BREAKPOINTS } from '../../Foundations/Breakpoints/Breakpoints';
11
12
  import Icon from '../Icon/Icon';
12
13
  import Text from '../Text/Text';
13
14
 
@@ -34,7 +35,7 @@ export interface DialogProps extends Omit<HTMLChakraProps<'section'>, 'scrollBeh
34
35
  }
35
36
 
36
37
  const Dialog = ({ children, dataTestid, scrollBehavior, state, size, title, ...rest }: DialogProps) => {
37
- const dialogSize = useBreakpointValue({ mobile: 'mobile', desktop: size });
38
+ const dialogSize = useBreakpointValue({ [BREAKPOINTS.MOBILE]: 'full', [BREAKPOINTS.DESKTOP]: size });
38
39
  return (
39
40
  <Modal
40
41
  closeOnOverlayClick={false}
@@ -10,7 +10,7 @@ const EmptyStateTheme: ComponentStyleConfig = {
10
10
  justifyContent: 'center',
11
11
  paddingX: '16',
12
12
  paddingY: {
13
- mobile: '32',
13
+ base: '32',
14
14
  desktop: '48',
15
15
  },
16
16
  backgroundColor: 'neutral.95',
@@ -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;
@@ -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
@@ -99,6 +99,8 @@ export { default as DialogBody } from './Components/Dialog/DialogBody';
99
99
  export type { DialogFooterProps } from './Components/Dialog/DialogFooter';
100
100
  export { default as DialogFooter } from './Components/Dialog/DialogFooter';
101
101
 
102
+ export { BREAKPOINTS } from './Foundations/Breakpoints/Breakpoints';
103
+
102
104
  export type { FadeProps } from './Components/Transitions/Fade';
103
105
  export { default as Fade } from './Components/Transitions/Fade';
104
106
 
@@ -109,4 +111,3 @@ export { default as PopoverTrigger } from './Components/Popover/PopoverTrigger';
109
111
 
110
112
  export type { PopoverContentProps } from './Components/Popover/PopoverContent';
111
113
  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