Skip to content

Commit

Permalink
[core] Upgrade the dependencies (#9828)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jan 10, 2018
1 parent eca2ee6 commit c0afa64
Show file tree
Hide file tree
Showing 11 changed files with 353 additions and 351 deletions.
4 changes: 2 additions & 2 deletions .size-limit
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[
{
"path": "build/index.js",
"limit": "93.6 KB"
"limit": "95.6 KB"
},
{
"path": "test/size/overhead.js",
"limit": "24.4 KB"
"limit": "25.6 KB"
}
]
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"jss-global": "^3.0.0",
"jss-nested": "^6.0.1",
"jss-props-sort": "^6.0.0",
"jss-vendor-prefixer": "^7.0.0",
"jss-vendor-prefixer": "^8.0.0",
"keycode": "^2.1.9",
"lodash": "^4.2.0",
"normalize-scroll-left": "^0.1.2",
Expand All @@ -92,7 +92,7 @@
"devDependencies": {
"@rosskevin/react-docgen": "^3.0.0-beta9",
"@types/enzyme": "^3.1.4",
"@types/react": "16.0.31",
"@types/react": "16.0.34",
"@types/react-transition-group": "^2.0.6",
"app-module-path": "^2.2.0",
"argos-cli": "^0.0.9",
Expand Down Expand Up @@ -188,7 +188,7 @@
"webpack-bundle-analyzer": "^2.9.1"
},
"resolutions": {
"@types/react": "16.0.31"
"@types/react": "16.0.34"
},
"side-effects": false,
"nyc": {
Expand Down
7 changes: 2 additions & 5 deletions src/ButtonBase/TouchRipple.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@ import { TransitionGroup } from 'react-transition-group';
import { StandardProps } from '..';

export interface TouchRippleProps
extends StandardProps<
TransitionGroup.TransitionGroupProps,
TouchRippleClassKey
> {
extends StandardProps<TransitionGroup.TransitionGroupProps, TouchRippleClassKey> {
center?: boolean;
}

export type TouchRippleClassKey =
export type TouchRippleClassKey =
| 'root'
| 'wrapper'
| 'wrapperLeaving'
Expand Down
4 changes: 2 additions & 2 deletions src/Card/CardContent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { StandardProps } from '..';

export interface CardContentProps
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, CardContentClassKey> {
component?: React.ReactType<CardContentProps>;
}
component?: React.ReactType<CardContentProps>;
}

export type CardContentClassKey = 'root';

Expand Down
2 changes: 1 addition & 1 deletion src/Chip/Chip.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ describe('<Chip />', () => {
});

afterEach(() => {
onClickSpy.reset();
onClickSpy.resetHistory();
});

it('should call onClick when `space` is pressed ', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/Menu/Menu.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ describe('<Menu />', () => {
});

beforeEach(() => {
menuListFocusSpy.reset();
selectedItemFocusSpy.reset();
menuListFocusSpy.resetHistory();
selectedItemFocusSpy.resetHistory();
});

it('should call props.onEnter with element if exists', () => {
Expand Down
46 changes: 25 additions & 21 deletions src/Tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,30 +329,34 @@ class Tooltip extends React.Component {
this.popper = node;
}}
>
{({ popperProps, restProps }) => (
<div
{...popperProps}
{...restProps}
style={{
...popperProps.style,
left: popperProps.style.left || 0,
...restProps.style,
}}
>
{({ popperProps, restProps }) => {
const actualPlacement = popperProps['data-placement'] || placement;
return (
<div
id={id}
role="tooltip"
aria-hidden={!open}
className={classNames(
classes.tooltip,
{ [classes.tooltipOpen]: open },
classes[`tooltip${capitalizeFirstLetter(placement.split('-')[0])}`],
)}
{...popperProps}
{...restProps}
style={{
...popperProps.style,
top: popperProps.style.top || 0,
left: popperProps.style.left || 0,
...restProps.style,
}}
>
{title}
<div
id={id}
role="tooltip"
aria-hidden={!open}
className={classNames(
classes.tooltip,
{ [classes.tooltipOpen]: open },
classes[`tooltip${capitalizeFirstLetter(actualPlacement.split('-')[0])}`],
)}
>
{title}
</div>
</div>
</div>
)}
);
}}
</Popper>
</Manager>
</EventListener>
Expand Down
7 changes: 5 additions & 2 deletions src/Tooltip/Tooltip.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Tooltip from './Tooltip';

const TooltipNaked = unwrap(Tooltip);

// Remove the style from the DOM element.
// eslint-disable-next-line react/prop-types
const Hack = ({ style, innerRef, ...other }) => <div ref={innerRef} {...other} />;

Expand Down Expand Up @@ -310,9 +311,11 @@ describe('<Tooltip />', () => {
</TooltipNaked>,
);
const instance = wrapper.instance();
instance.popper._popper.scheduleUpdate = handleUpdate;
instance.handleResize();
clock.tick(166);
assert.strictEqual(handleUpdate.callCount, 0);
clock.tick(1);
instance.popper._popper.scheduleUpdate = handleUpdate;
clock.tick(165);
assert.strictEqual(handleUpdate.callCount, 1);
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/internal/SwitchBase.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ describe('<SwitchBase />', () => {
assert.strictEqual(onChangeSpy.callCount, 1);
assert.strictEqual(onChangeSpy.calledWith(event), true);

onChangeSpy.reset();
onChangeSpy.resetHistory();
});

describe('controlled', () => {
Expand Down
1 change: 1 addition & 0 deletions test/utils/createDOM.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ function createDOM() {
setEnd: () => {},
commonAncestorContainer: {
nodeName: 'BODY',
ownerDocument: document,
},
});

Expand Down

0 comments on commit c0afa64

Please sign in to comment.