diff --git a/docs/components/DropdownButtonView.jsx b/docs/components/DropdownButtonView.jsx index aa6d1421d..d0619fb7b 100644 --- a/docs/components/DropdownButtonView.jsx +++ b/docs/components/DropdownButtonView.jsx @@ -29,7 +29,7 @@ export default class DropdownButtonView extends Component { this.byeTimerID = null; } - componentWillMount() { + UNSAFE_componentWillMount() { this.moreSamples(); } diff --git a/docs/components/Table2BetaView.jsx b/docs/components/Table2BetaView.jsx index 60e3ef076..820e329a9 100644 --- a/docs/components/Table2BetaView.jsx +++ b/docs/components/Table2BetaView.jsx @@ -75,7 +75,7 @@ export default class Table2BetaView extends React.PureComponent { }; } - componentWillMount() { + UNSAFE_componentWillMount() { this._reload(5000); } diff --git a/docs/components/TableView.jsx b/docs/components/TableView.jsx index 334647326..b96299295 100644 --- a/docs/components/TableView.jsx +++ b/docs/components/TableView.jsx @@ -23,7 +23,7 @@ export default class TableView extends PureComponent { }; } - componentWillMount() { + UNSAFE_componentWillMount() { this._reload(5000); } diff --git a/docs/components/View.jsx b/docs/components/View.jsx index 1188f3dd3..a18c4db80 100644 --- a/docs/components/View.jsx +++ b/docs/components/View.jsx @@ -7,7 +7,7 @@ import { Button, polyfillMediaQueries } from "src"; import "./View.less"; export default class View extends Component { - componentWillMount() { + UNSAFE_componentWillMount() { document.title = `${View.WINDOW_TITLE_PREFIX}${this.props.title}`; polyfillMediaQueries(); diff --git a/package.json b/package.json index 76dce688b..ce5da9af0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "clever-components", - "version": "2.69.4", + "version": "2.69.5", "description": "A library of helpful React components and less styles", "repository": { "type": "git", @@ -37,7 +37,7 @@ "prop-types": "^15.5.10", "react-accessible-accordion": "^1.0.2", "react-autosize-textarea": "^7.0.0", - "react-bootstrap": "0.32.1", + "react-bootstrap": "^0.33.1", "react-copy-to-clipboard": "^4.3.1", "react-datepicker": "~1.6.0", "react-datetime": "^2.14.0", @@ -48,7 +48,7 @@ "react-responsive": "^8.0.3", "react-select": "~1.2.1", "react-sticky": "^6.0.1", - "react-transition-group": "~1.2.0", + "react-transition-group": "^2.9.0", "short-number": "^1.0.6", "tether": "^1.4.0" }, @@ -59,6 +59,7 @@ "@types/react": "^16.9.49", "@types/react-datepicker": "^1.8.0", "@types/react-linkify": "^1.0.0", + "@types/react-transition-group": "^2.9.2", "@typescript-eslint/eslint-plugin": "^1.9.0", "@typescript-eslint/parser": "^1.9.0", "autoprefixer": "^6.5.3", diff --git a/src/LeftNav/LeftNav.less b/src/LeftNav/LeftNav.less index 9d3ebd769..c388a19be 100644 --- a/src/LeftNav/LeftNav.less +++ b/src/LeftNav/LeftNav.less @@ -89,11 +89,11 @@ } } -.LeftNav--subnav--content--anim-leave { +.LeftNav--subnav--content--anim-exit { .animateOpacity; opacity: 1; - &.LeftNav--subnav--content--anim-leave-active { + &.LeftNav--subnav--content--anim-exit-active { opacity: 0; } } diff --git a/src/LeftNav/LeftNav.tsx b/src/LeftNav/LeftNav.tsx index be9bda8ae..824fccf83 100644 --- a/src/LeftNav/LeftNav.tsx +++ b/src/LeftNav/LeftNav.tsx @@ -2,7 +2,7 @@ import * as PropTypes from "prop-types"; import * as React from "react"; import * as _ from "lodash"; import * as classnames from "classnames"; -import { CSSTransitionGroup } from "react-transition-group"; +import { TransitionGroup, CSSTransition } from "react-transition-group"; import * as RootCloseWrapper from "react-overlays/lib/RootCloseWrapper"; import MorePropTypes from "../utils/MorePropTypes"; @@ -146,15 +146,18 @@ export class LeftNav extends React.PureComponent {
{navItems}
- - {openChild &&
{openChild.props.children}
} -
+ {openChild && ( + +
{openChild.props.children}
+
+ )} + ); diff --git a/src/Menu/MenuItem.tsx b/src/Menu/MenuItem.tsx index edabf8745..ed6611ac0 100644 --- a/src/Menu/MenuItem.tsx +++ b/src/Menu/MenuItem.tsx @@ -60,8 +60,10 @@ export default class MenuItem extends React.PureComponent { this._updateFocus(this.props); } - componentWillReceiveProps(nextProps) { - this._updateFocus(nextProps); + componentDidUpdate(prevProps: Props) { + if (this.props.focused !== prevProps.focused) { + this._updateFocus(this.props); + } } render() { @@ -120,7 +122,7 @@ export default class MenuItem extends React.PureComponent { ); } - _updateFocus(props) { + _updateFocus(props: Props) { if (props.focused) { if (this._containerEl && this._containerEl.focus) { setTimeout(() => this._containerEl.focus()); diff --git a/src/ToastStack/ToastStack.less b/src/ToastStack/ToastStack.less index d9eafabd5..f840f6202 100644 --- a/src/ToastStack/ToastStack.less +++ b/src/ToastStack/ToastStack.less @@ -10,7 +10,7 @@ .ToastStack--notificationWrapper { .margin--bottom--xs; .margin--x--xs; - // We need to set an explicit initial value for the leave animation to work properly. No + // We need to set an explicit initial value for the exit animation to work properly. No // notifications should actually hit this limit. max-height: 10rem; } @@ -28,7 +28,7 @@ transition: all @timingPromptly ease-out; } -.ToastStack--animation-leave.ToastStack--animation-leave-active { +.ToastStack--animation-exit.ToastStack--animation-exit-active { opacity: 0; transform: translateY(-100%); margin-bottom: 0; diff --git a/src/ToastStack/ToastStack.tsx b/src/ToastStack/ToastStack.tsx index 860b8544d..7e111685f 100644 --- a/src/ToastStack/ToastStack.tsx +++ b/src/ToastStack/ToastStack.tsx @@ -1,7 +1,7 @@ import * as classnames from "classnames"; import * as React from "react"; import * as _ from "lodash"; -import { CSSTransitionGroup } from "react-transition-group"; +import { TransitionGroup, CSSTransition } from "react-transition-group"; import { ToastNotification } from "./ToastNotification"; import { ActionProps } from "./ToastNotification"; @@ -79,29 +79,26 @@ export class ToastStack extends React.PureComponent { const { className, clearNotification, notificationClassName, notifications } = this.props; const toasts = notifications.map((n) => ( -
- clearNotification(n.id)} - showCloseButton={n.showCloseButton} - type={n.type} - closeButtonAriaLabel={n.closeButtonAriaLabel} - > - {n.content} - -
+ +
+ clearNotification(n.id)} + showCloseButton={n.showCloseButton} + type={n.type} + closeButtonAriaLabel={n.closeButtonAriaLabel} + > + {n.content} + +
+
)); return ( - + {toasts} - + ); } } diff --git a/webpack.config.js b/webpack.config.js index 723b6448f..4efb80b73 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -57,4 +57,5 @@ module.exports = { // to : from the device. // disableHostCheck: true }, + devtool: "eval-cheap-source-map", };