From afc6478815961ceea99d472e48ee157ded4fd3a2 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Sun, 9 Aug 2020 00:15:49 -0400 Subject: [PATCH] chore(*): upgrade styled-components (#575) * styled-components * Update snapshots --- packages/devui/package.json | 3 +- packages/devui/src/Button/styles/common.js | 8 +- packages/devui/src/ContextMenu/ContextMenu.js | 2 +- packages/devui/src/Editor/Editor.js | 2 +- packages/devui/src/Tabs/TabsHeader.js | 2 +- packages/devui/src/utils/animations.js | 4 +- .../tests/__snapshots__/Button.test.js.snap | 4 +- .../__snapshots__/Container.test.js.snap | 2 +- .../__snapshots__/ContextMenu.test.js.snap | 2 +- .../tests/__snapshots__/Dialog.test.js.snap | 30 +++---- .../tests/__snapshots__/Editor.test.js.snap | 6 +- .../__snapshots__/Notification.test.js.snap | 4 +- .../SegmentedControl.test.js.snap | 2 +- .../tests/__snapshots__/Select.test.js.snap | 12 +-- .../tests/__snapshots__/Slider.test.js.snap | 4 +- .../tests/__snapshots__/Tabs.test.js.snap | 12 +-- .../tests/__snapshots__/Toolbar.test.js.snap | 16 ++-- packages/redux-devtools-core/package.json | 3 +- yarn.lock | 88 +++++++++++++------ 19 files changed, 123 insertions(+), 83 deletions(-) diff --git a/packages/devui/package.json b/packages/devui/package.json index 5154a1c6..cd038146 100755 --- a/packages/devui/package.json +++ b/packages/devui/package.json @@ -65,11 +65,12 @@ "color": "^3.1.2", "prop-types": "^15.7.2", "react-icons": "^3.10.0", + "react-is": "^16.13.1", "react-jsonschema-form": "^1.8.1", "react-select": "^1.3.0", "redux-devtools-themes": "^1.0.0", "simple-element-resize-detector": "^1.3.0", - "styled-components": "^2.4.1" + "styled-components": "^5.1.1" }, "jest": { "setupFilesAfterEnv": [ diff --git a/packages/devui/src/Button/styles/common.js b/packages/devui/src/Button/styles/common.js index 31004788..15944983 100644 --- a/packages/devui/src/Button/styles/common.js +++ b/packages/devui/src/Button/styles/common.js @@ -205,7 +205,13 @@ export const tooltipStyle = ({ &:before { ${before(tooltipPosition)} ${getDirection(tooltipPosition)}: 3px; - ${theme.type === 'material' ? `animation: ${fadeIn} 500ms;` : ''} + ${ + theme.type === 'material' + ? css` + animation: ${fadeIn} 500ms; + ` + : '' + } } ${ diff --git a/packages/devui/src/ContextMenu/ContextMenu.js b/packages/devui/src/ContextMenu/ContextMenu.js index ca5a89e2..d21eec38 100644 --- a/packages/devui/src/ContextMenu/ContextMenu.js +++ b/packages/devui/src/ContextMenu/ContextMenu.js @@ -87,7 +87,7 @@ export default class ContextMenu extends Component { render() { return ( ; + return ; } } diff --git a/packages/devui/src/Tabs/TabsHeader.js b/packages/devui/src/Tabs/TabsHeader.js index 40024b81..a3255716 100644 --- a/packages/devui/src/Tabs/TabsHeader.js +++ b/packages/devui/src/Tabs/TabsHeader.js @@ -177,7 +177,7 @@ export default class TabsHeader extends Component { const { visibleTabs, hiddenTabs, contextMenu } = this.state; return ( diff --git a/packages/devui/src/utils/animations.js b/packages/devui/src/utils/animations.js index 88390f8a..c9cba056 100644 --- a/packages/devui/src/utils/animations.js +++ b/packages/devui/src/utils/animations.js @@ -1,9 +1,9 @@ -import { keyframes } from 'styled-components'; +import { css, keyframes } from 'styled-components'; export const spin = keyframes` to { transform: rotate(1turn); } `; -export const spinner = (theme) => ` +export const spinner = (theme) => css` animation: ${spin} 400ms infinite linear; width: ${theme.spinnerSize}px; height: ${theme.spinnerSize}px; diff --git a/packages/devui/tests/__snapshots__/Button.test.js.snap b/packages/devui/tests/__snapshots__/Button.test.js.snap index 785d8eab..fee5f61f 100644 --- a/packages/devui/tests/__snapshots__/Button.test.js.snap +++ b/packages/devui/tests/__snapshots__/Button.test.js.snap @@ -2,10 +2,10 @@ exports[`Button renders correctly 1`] = `
diff --git a/packages/devui/tests/__snapshots__/Container.test.js.snap b/packages/devui/tests/__snapshots__/Container.test.js.snap index 978bb658..cb057d78 100644 --- a/packages/devui/tests/__snapshots__/Container.test.js.snap +++ b/packages/devui/tests/__snapshots__/Container.test.js.snap @@ -2,7 +2,7 @@ exports[`Container renders correctly 1`] = `
Text
diff --git a/packages/devui/tests/__snapshots__/ContextMenu.test.js.snap b/packages/devui/tests/__snapshots__/ContextMenu.test.js.snap index f691b38e..17feacff 100644 --- a/packages/devui/tests/__snapshots__/ContextMenu.test.js.snap +++ b/packages/devui/tests/__snapshots__/ContextMenu.test.js.snap @@ -2,7 +2,7 @@ exports[`ContextMenu renders correctly 1`] = `
@@ -45,7 +45,7 @@ exports[`Dialog renders correctly 1`] = ` exports[`Dialog renders modal 1`] = `
@@ -61,19 +61,19 @@ exports[`Dialog renders modal 1`] = ` class="mc-dialog--footer" >
@@ -85,7 +85,7 @@ exports[`Dialog renders modal 1`] = ` exports[`Dialog renders with props 1`] = `
@@ -109,19 +109,19 @@ exports[`Dialog renders with props 1`] = ` class="mc-dialog--footer" >
diff --git a/packages/devui/tests/__snapshots__/Editor.test.js.snap b/packages/devui/tests/__snapshots__/Editor.test.js.snap index ad21f315..8f345360 100644 --- a/packages/devui/tests/__snapshots__/Editor.test.js.snap +++ b/packages/devui/tests/__snapshots__/Editor.test.js.snap @@ -10,11 +10,9 @@ exports[`Editor renders correctly 1`] = ` readOnly={false} value="var a = 1;" > - +
diff --git a/packages/devui/tests/__snapshots__/Notification.test.js.snap b/packages/devui/tests/__snapshots__/Notification.test.js.snap index 740ad748..1d1a5148 100644 --- a/packages/devui/tests/__snapshots__/Notification.test.js.snap +++ b/packages/devui/tests/__snapshots__/Notification.test.js.snap @@ -2,7 +2,7 @@ exports[`Notification renders correctly 1`] = `
@@ -13,7 +13,7 @@ exports[`Notification renders correctly 1`] = ` exports[`Notification renders with props 1`] = `