Skip to content

Commit

Permalink
chore: bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
jigsawye authored and chentsulin committed Feb 6, 2019
1 parent c12920b commit 0dbf225
Show file tree
Hide file tree
Showing 14 changed files with 658 additions and 755 deletions.
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
'<rootDir>/test/__mocks__/fileMock.js',
'\\.(css|less)$': '<rootDir>/__mocks__/styleMock.js',
},
setupTestFrameworkScriptFile: require.resolve('./test/jest.setup.ts'),
setupFilesAfterEnv: [require.resolve('./test/jest.setup.ts')],
resetModules: true,
resetMocks: true,
};
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,16 @@
"polished": "^2.3.3",
"prop-types": "^15.6.2",
"ramda": "^0.26.1",
"rc-calendar": "9.7.11",
"rc-calendar": "^9.10.8",
"rc-editor-mention": "1.1.7",
"rc-time-picker": "3.4.0",
"rc-time-picker": "^3.6.2",
"react-dropzone": "7.0.1",
"react-html-attributes": "^1.4.3",
"react-intl-tel-input": "^6.1.0",
"react-select": "^2.3.0",
"react-spring": "^7.2.10",
"react-textarea-autosize": "^7.1.0",
"styled-normalize": "^8.0.4",
"styled-normalize": "^8.0.6",
"styled-system": "^3.2.1"
},
"peerDependencies": {
Expand All @@ -81,45 +81,45 @@
"@babel/preset-env": "^7.3.1",
"@babel/preset-react": "^7.0.0",
"@babel/preset-typescript": "^7.1.0",
"@types/jest": "^23.3.13",
"@types/jest": "^24.0.0",
"@types/ramda": "^0.25.47",
"@types/react": "16.7.20",
"@types/react": "16.7.22",
"@types/react-dom": "^16.0.11",
"@types/react-select": "^2.0.11",
"@types/styled-components": "4.1.6",
"@types/styled-system": "^3.1.3",
"@types/styled-components": "4.1.8",
"@types/styled-system": "^3.2.0",
"babel-core": "^7.0.0-0",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"babel-jest": "^24.1.0",
"babel-plugin-module-resolver": "^3.1.3",
"babel-plugin-ramda": "^2.0.0",
"babel-plugin-styled-components": "^1.10.0",
"babel-plugin-typescript-to-proptypes": "^0.16.0",
"babel-plugin-typescript-to-proptypes": "^0.17.0",
"commitizen": "^3.0.5",
"conventional-changelog-cli": "^2.0.11",
"cross-env": "^5.2.0",
"cz-conventional-changelog": "^2.1.0",
"docz": "^0.13.7",
"docz-theme-default": "^0.13.7",
"eslint": "^5.12.1",
"eslint-config-yoctol": "^0.20.0",
"eslint-import-resolver-babel-module": "^5.0.0",
"eslint": "^5.13.0",
"eslint-config-yoctol": "^0.21.0",
"eslint-import-resolver-babel-module": "^5.0.1",
"eslint-import-resolver-jest": "^2.1.1",
"eslint-plugin-import": "^2.15.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.12.4",
"eslint-plugin-react-hooks": "^0.0.0",
"eslint-plugin-sort-imports-es6-autofix": "^0.3.0",
"eslint-plugin-typescript": "^0.14.0",
"husky": "^1.3.1",
"jest": "^23.6.0",
"jest-dom": "^3.0.0",
"jest": "^24.1.0",
"jest-dom": "^3.0.1",
"jest-styled-components": "^6.3.1",
"lint-staged": "^8.1.0",
"prettier": "^1.16.1",
"lint-staged": "^8.1.3",
"prettier": "^1.16.4",
"prettier-package-json": "^2.0.1",
"react": "^16.8.0-alpha.0",
"react": "16.8.0-alpha.0",
"react-dom": "16.8.0-alpha.0",
"react-icons": "^3.3.0",
"react-testing-library": "^5.4.4",
Expand All @@ -133,9 +133,9 @@
"stylelint-processor-styled-components": "^1.5.2",
"ts-jest": "^23.10.5",
"tslint": "^5.12.1",
"tslint-config-prettier": "^1.17.0",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.0.1",
"typescript": "3.2.4",
"typescript": "3.3.1",
"typescript-eslint-parser": "22.0.0"
},
"husky": {
Expand Down
1 change: 1 addition & 0 deletions src/Alert/ClosableAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@ const ClosableAlert: FunctionComponent<IAlertProps> = ({
</Spring>
);
};

export default ClosableAlert;
19 changes: 14 additions & 5 deletions src/Dropdown/Item.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import React, { MouseEvent, MouseEventHandler, forwardRef } from 'react';
import React, {
MouseEvent,
MouseEventHandler,
ReactNode,
forwardRef,
} from 'react';
import styled, { css } from 'styled-components';
import { SpaceProps, space } from 'styled-system';

Expand Down Expand Up @@ -50,10 +55,14 @@ export interface IItemProps {
* Keep the dropdown after click item
*/
keep?: boolean;
children?: ReactNode;
}

const Item = forwardRef<any, IItemProps>(
({ onClick, disabled, keep, ...props }, ref: any) => (
const Item = forwardRef<any, IItemProps>(function Item(
{ onClick, disabled, keep, ...props },
ref: any
) {
return (
<Consumer>
{({ handleClose }) => (
<StyledListItem
Expand All @@ -74,7 +83,7 @@ const Item = forwardRef<any, IItemProps>(
/>
)}
</Consumer>
)
);
);
});

export default Item;
2 changes: 1 addition & 1 deletion src/Dropdown/SubList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const SubListWrapper = styled(tag.div)`
}
`;

const StyledSubItem = styled(Item)`
const StyledSubItem = styled(Item)<any>`
position: relative;
flex-direction: row;
align-items: center;
Expand Down
4 changes: 2 additions & 2 deletions src/NewMenu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import MenuContext from './MenuContext';
import MenuDivider from './MenuDivider';
import MenuItem from './MenuItem';
import SubMenu from './SubMenu';
import { AnimatedSubMenuWrapper } from './styles';
import { SubMenuWrapper } from './styles';

const spring = { ...config.stiff, precision: 0.1 };

Expand Down Expand Up @@ -80,7 +80,7 @@ const Menu: FunctionComponent<IMenuProps> & {
position="relative"
>
{children}
<AnimatedSubMenuWrapper style={subMenuSpringProps} />
<SubMenuWrapper style={subMenuSpringProps} />
<Backdrop
visible={subMenuVisible}
style={{ backgroundColor: 'rgba(0, 0, 0, 0)' }}
Expand Down
6 changes: 3 additions & 3 deletions src/NewMenu/SubMenuContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import React, {

import Box from '../Grid/Box';

import { AnimatedSubMenuContentWrapper } from './styles';
import { SubMenuContentWrapper } from './styles';

interface ISubMenuContentProps {
active: boolean;
Expand Down Expand Up @@ -43,7 +43,7 @@ const SubMenuContent: FunctionComponent<ISubMenuContentProps> = ({
placement === 'bottom' ? { bottom: 0 } : { top: -headerTop };

return (
<AnimatedSubMenuContentWrapper
<SubMenuContentWrapper
style={{ ...subMenuContentSpringProps, ...placementStyle }}
>
<Box ref={headerRef} pb="1">
Expand All @@ -59,7 +59,7 @@ const SubMenuContent: FunctionComponent<ISubMenuContentProps> = ({
>
{children}
</Box>
</AnimatedSubMenuContentWrapper>
</SubMenuContentWrapper>
);
};

Expand Down
8 changes: 2 additions & 6 deletions src/NewMenu/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import tag from 'utils/CleanTag';

import Box from '../Grid/Box';

const SubMenuWrapper = styled(tag.div)`
export const SubMenuWrapper = styled(animated.div)`
position: absolute;
left: 48px;
flex-direction: column;
Expand All @@ -14,18 +14,14 @@ const SubMenuWrapper = styled(tag.div)`
box-shadow: 4px 0 6px 0 rgba(94, 94, 94, 0.5);
`;

export const AnimatedSubMenuWrapper = animated(SubMenuWrapper);

const SubMenuContentWrapper = styled(tag.div)`
export const SubMenuContentWrapper = styled(animated.div)`
position: absolute;
z-index: 1;
left: 45px;
flex-direction: column;
width: 180px;
`;

export const AnimatedSubMenuContentWrapper = animated(SubMenuContentWrapper);

interface IStyledSubMenuProps {
active?: boolean;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Steps/Steps.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, {
Children,
FunctionComponent,
ReactChild,
ReactElement,
ReactNode,
createContext,
isValidElement,
} from 'react';
Expand Down Expand Up @@ -188,7 +188,7 @@ const getTailColor = ({
}: {
count: number;
status: Status;
steps: ReactChild[];
steps: ReactNode[];
}) => {
const nextStep = steps[count + 1];
if (
Expand Down
11 changes: 6 additions & 5 deletions src/utils/Portal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PureComponent } from 'react';
import React, { PureComponent } from 'react';
import { createPortal } from 'react-dom';

const elements: {
Expand Down Expand Up @@ -54,10 +54,11 @@ class Portal extends PureComponent<{
};

render() {
return (
this.canUseDOM() &&
createPortal(this.props.children, this.getPortalElement())
);
if (!this.canUseDOM()) {
return <></>;
}

return createPortal(this.props.children, this.getPortalElement());
}
}

Expand Down
16 changes: 0 additions & 16 deletions src/utils/styled-components.ts

This file was deleted.

2 changes: 1 addition & 1 deletion test/test-utils.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import { ThemeProvider } from 'styled-components';
import { render } from 'react-testing-library';

import defaultTheme from '../src/theme';
import { ThemeProvider } from '../src/utils/styled-components';

const customRender = (node: any, ...options: any[]) =>
render(
Expand Down
1 change: 1 addition & 0 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"object-literal-sort-keys": false,
"member-access": false,
"variable-name": false,
"no-shadowed-variable": false,
"no-empty": false,
"no-console": false
}
Expand Down
Loading

0 comments on commit 0dbf225

Please sign in to comment.