From 1b853f01add265385697e020a0bf6e4759ff8bf6 Mon Sep 17 00:00:00 2001 From: Anze Demsar Date: Thu, 12 Oct 2023 10:41:19 +0200 Subject: [PATCH] chore: update emotion to v11 --- babel.config.js | 2 +- jest.config.js | 2 +- package.json | 6 +- packages/decap-cms-app/package.json | 4 +- packages/decap-cms-backend-azure/package.json | 4 +- .../decap-cms-backend-bitbucket/package.json | 4 +- .../package.json | 4 +- .../src/__tests__/AuthenticationPage.spec.js | 35 +- .../AuthenticationPage.spec.js.snap | 206 +- .../decap-cms-backend-github/package.json | 4 +- .../decap-cms-backend-gitlab/package.json | 4 +- packages/decap-cms-backend-proxy/package.json | 4 +- packages/decap-cms-backend-test/package.json | 4 +- packages/decap-cms-core/package.json | 4 +- .../src/components/App/Header.js | 2 +- .../components/Collection/ControlButton.js | 2 +- .../components/Collection/NestedCollection.js | 2 +- .../src/components/Collection/Sidebar.js | 2 +- .../__snapshots__/Collection.spec.js.snap | 32 +- .../NestedCollection.spec.js.snap | 286 +- .../__snapshots__/Sidebar.spec.js.snap | 72 +- .../Editor/EditorControlPane/EditorControl.js | 2 +- .../EditorControlPane/EditorControlPane.js | 2 +- .../src/components/Editor/EditorInterface.js | 2 +- .../src/components/Editor/EditorToolbar.js | 2 +- .../__snapshots__/EditorToolbar.spec.js.snap | 2102 +++++++-------- .../MediaLibrary/MediaLibraryButtons.js | 2 +- .../MediaLibraryCard.spec.js.snap | 140 +- .../decap-cms-core/src/components/UI/Modal.js | 2 +- .../src/components/UI/SettingsDropdown.js | 2 +- .../src/components/Workflow/WorkflowCard.js | 2 +- .../src/components/Workflow/WorkflowList.js | 2 +- .../decap-cms-default-exports/package.json | 4 +- .../decap-cms-default-exports/src/index.js | 4 +- packages/decap-cms-ui-default/package.json | 4 +- packages/decap-cms-ui-default/src/Dropdown.js | 2 +- packages/decap-cms-ui-default/src/Loader.js | 2 +- .../src/ObjectWidgetTopBar.js | 2 +- packages/decap-cms-ui-default/src/Toggle.js | 2 +- packages/decap-cms-ui-default/src/styles.js | 2 +- .../decap-cms-widget-boolean/package.json | 2 +- .../src/BooleanControl.js | 2 +- packages/decap-cms-widget-code/package.json | 2 +- .../decap-cms-widget-code/src/CodeControl.js | 2 +- .../decap-cms-widget-colorstring/package.json | 4 +- .../decap-cms-widget-datetime/package.json | 2 +- .../src/DateTimeControl.js | 2 +- packages/decap-cms-widget-file/package.json | 4 +- .../src/withFileControl.js | 2 +- packages/decap-cms-widget-image/package.json | 4 +- packages/decap-cms-widget-list/package.json | 4 +- .../decap-cms-widget-list/src/ListControl.js | 2 +- .../__snapshots__/ListControl.spec.js.snap | 845 +++--- packages/decap-cms-widget-map/package.json | 2 +- .../src/withMapControl.js | 2 +- .../decap-cms-widget-markdown/package.json | 4 +- .../src/MarkdownControl/RawEditor.js | 2 +- .../src/MarkdownControl/Toolbar.js | 2 +- .../src/MarkdownControl/VisualEditor.js | 2 +- .../MarkdownControl/components/Shortcode.js | 2 +- .../MarkdownControl/components/VoidBlock.js | 2 +- .../src/MarkdownControl/renderers.js | 2 +- packages/decap-cms-widget-object/package.json | 4 +- .../src/ObjectControl.js | 2 +- .../decap-cms-widget-relation/package.json | 4 +- scripts/externals.js | 10 +- yarn.lock | 2313 +++++++++-------- 67 files changed, 3131 insertions(+), 3066 deletions(-) diff --git a/babel.config.js b/babel.config.js index 22544c8297e9..9b7b21006133 100644 --- a/babel.config.js +++ b/babel.config.js @@ -46,7 +46,7 @@ function presets() { [ '@emotion/babel-preset-css-prop', { - autoLabel: true, + autoLabel: 'always', }, ], '@babel/typescript', diff --git a/jest.config.js b/jest.config.js index 51325685f9d2..b1bc986b7a5b 100644 --- a/jest.config.js +++ b/jest.config.js @@ -10,7 +10,7 @@ module.exports = { '\\.(css|less)$': '/__mocks__/styleMock.js', }, testURL: 'http://localhost:8080', - snapshotSerializers: ['jest-emotion'], + snapshotSerializers: ['@emotion/jest/serializer'], transformIgnorePatterns: [ 'node_modules/(?!copy-text-to-clipboard|clean-stack|escape-string-regexp)', ], diff --git a/package.json b/package.json index 50f1f9fcaf42..53df4698d489 100644 --- a/package.json +++ b/package.json @@ -88,6 +88,7 @@ "@commitlint/cli": "^16.0.0", "@commitlint/config-conventional": "^16.0.0", "@emotion/eslint-plugin": "^11.0.0", + "@emotion/jest": "^11.11.0", "@octokit/rest": "^16.28.7", "@soda/friendly-errors-webpack-plugin": "^1.8.1", "@storybook/addon-actions": "^5.3.6", @@ -141,7 +142,6 @@ "husky": "^7.0.0", "jest": "^27.0.0", "jest-cli": "^27.0.0", - "jest-emotion": "^10.0.32", "js-yaml": "^4.0.0", "mockserver-client": "^5.8.0", "mockserver-node": "^5.8.0", @@ -184,10 +184,10 @@ }, "private": true, "dependencies": { - "@emotion/babel-preset-css-prop": "^10.0.27", + "@emotion/babel-preset-css-prop": "^11.11.0", "browserify": "^17.0.0", "buffer": "^6.0.3", - "emotion": "^10.0.9", + "emotion": "^11.0.0", "eslint-config-prettier": "^8.0.0", "eslint-plugin-babel": "^5.3.0", "globby": "^12.0.0", diff --git a/packages/decap-cms-app/package.json b/packages/decap-cms-app/package.json index b87d78a3e3f8..96818363cad9 100644 --- a/packages/decap-cms-app/package.json +++ b/packages/decap-cms-app/package.json @@ -26,8 +26,8 @@ ], "license": "MIT", "dependencies": { - "@emotion/core": "^10.0.35", - "@emotion/styled": "^10.0.27", + "@emotion/react": "^11.11.1", + "@emotion/styled": "^11.11.0", "codemirror": "^5.46.0", "decap-cms-backend-azure": "^3.0.1", "decap-cms-backend-bitbucket": "^3.0.1", diff --git a/packages/decap-cms-backend-azure/package.json b/packages/decap-cms-backend-azure/package.json index 03f131b260f4..2fd57d9949f3 100644 --- a/packages/decap-cms-backend-azure/package.json +++ b/packages/decap-cms-backend-azure/package.json @@ -24,8 +24,8 @@ "semaphore": "^1.1.0" }, "peerDependencies": { - "@emotion/core": "^10.0.9", - "@emotion/styled": "^10.0.9", + "@emotion/react": "^11.11.1", + "@emotion/styled": "^11.11.0", "decap-cms-lib-auth": "^3.0.0", "decap-cms-lib-util": "^3.0.0", "decap-cms-ui-default": "^3.0.0", diff --git a/packages/decap-cms-backend-bitbucket/package.json b/packages/decap-cms-backend-bitbucket/package.json index c3f5db69d6ff..af6dde82bd8a 100644 --- a/packages/decap-cms-backend-bitbucket/package.json +++ b/packages/decap-cms-backend-bitbucket/package.json @@ -25,8 +25,8 @@ "what-the-diff": "^0.6.0" }, "peerDependencies": { - "@emotion/core": "^10.0.35", - "@emotion/styled": "^10.0.27", + "@emotion/react": "^11.11.1", + "@emotion/styled": "^11.11.0", "decap-cms-lib-auth": "^3.0.0", "decap-cms-lib-util": "^3.0.0", "decap-cms-ui-default": "^3.0.0", diff --git a/packages/decap-cms-backend-git-gateway/package.json b/packages/decap-cms-backend-git-gateway/package.json index e99c95d4d59e..06e7526ba5dc 100644 --- a/packages/decap-cms-backend-git-gateway/package.json +++ b/packages/decap-cms-backend-git-gateway/package.json @@ -26,8 +26,8 @@ "minimatch": "^3.0.4" }, "peerDependencies": { - "@emotion/core": "^10.0.35", - "@emotion/styled": "^10.0.27", + "@emotion/react": "^11.11.1", + "@emotion/styled": "^11.11.0", "decap-cms-backend-bitbucket": "^3.0.0", "decap-cms-backend-github": "^3.0.0", "decap-cms-backend-gitlab": "^3.0.0", diff --git a/packages/decap-cms-backend-git-gateway/src/__tests__/AuthenticationPage.spec.js b/packages/decap-cms-backend-git-gateway/src/__tests__/AuthenticationPage.spec.js index f392c816d02c..1a77164aa6d0 100644 --- a/packages/decap-cms-backend-git-gateway/src/__tests__/AuthenticationPage.spec.js +++ b/packages/decap-cms-backend-git-gateway/src/__tests__/AuthenticationPage.spec.js @@ -1,6 +1,8 @@ import React from 'react'; import { render } from '@testing-library/react'; +import GitGatewayAuthenticationPage from '../AuthenticationPage'; + window.netlifyIdentity = { currentUser: jest.fn(), on: jest.fn(), @@ -21,21 +23,32 @@ describe('GitGatewayAuthenticationPage', () => { }); it('should render with identity error', () => { - const { default: GitGatewayAuthenticationPage } = require('../AuthenticationPage'); - const { asFragment } = render(); + // obtain mock calls + require('../AuthenticationPage'); + + function TestComponent() { + const { asFragment } = render(); - const errorCallback = window.netlifyIdentity.on.mock.calls.find(call => call[0] === 'error')[1]; + const errorCallback = window.netlifyIdentity.on.mock.calls.find( + call => call[0] === 'error', + )[1]; - errorCallback( - new Error('Failed to load settings from https://site.netlify.com/.netlify/identity'), - ); + errorCallback( + new Error('Failed to load settings from https://site.netlify.com/.netlify/identity'), + ); - expect(asFragment()).toMatchSnapshot(); + expect(asFragment()).toMatchSnapshot(); + } + + TestComponent(); }); - it('should render with no identity error', () => { - const { default: GitGatewayAuthenticationPage } = require('../AuthenticationPage'); - const { asFragment } = render(); - expect(asFragment()).toMatchSnapshot(); + test('should render with no identity error', () => { + function TestComponent() { + const { asFragment } = render(); + expect(asFragment()).toMatchSnapshot(); + } + + TestComponent(); }); }); diff --git a/packages/decap-cms-backend-git-gateway/src/__tests__/__snapshots__/AuthenticationPage.spec.js.snap b/packages/decap-cms-backend-git-gateway/src/__tests__/__snapshots__/AuthenticationPage.spec.js.snap index 73c27397f940..d5b474d66b8c 100644 --- a/packages/decap-cms-backend-git-gateway/src/__tests__/__snapshots__/AuthenticationPage.spec.js.snap +++ b/packages/decap-cms-backend-git-gateway/src/__tests__/__snapshots__/AuthenticationPage.spec.js.snap @@ -2,11 +2,12 @@ exports[`GitGatewayAuthenticationPage should render with identity error 1`] = ` - .emotion-5 { + .emotion-0 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; + -webkit-box-flex-flow: column nowrap; -webkit-flex-flow: column nowrap; -ms-flex-flow: column nowrap; flex-flow: column nowrap; @@ -15,24 +16,63 @@ exports[`GitGatewayAuthenticationPage should render with identity error 1`] = ` -ms-flex-align: center; align-items: center; -webkit-box-pack: center; - -webkit-justify-content: center; -ms-flex-pack: center; + -webkit-justify-content: center; justify-content: center; gap: 50px; height: 100vh; } -.emotion-0 { +.emotion-2 { width: 300px; height: auto; } -.emotion-3 { +.emotion-4 { + border: 0; + border-radius: 5px; + cursor: pointer; + box-shadow: 0 4px 12px 0 rgba(68, 74, 87, 0.15),0 1px 3px 0 rgba(68, 74, 87, 0.25); + height: 36px; + line-height: 36px; + font-weight: 500; + padding: 0 15px; + background-color: #798291; + color: #fff; + background-color: #313d3e; + color: #fff; + padding: 0 12px; + margin-top: 0; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + position: relative; +} + +.emotion-4:focus, +.emotion-4:hover { + color: #fff; + background-color: #555a65; +} + +.emotion-4[disabled] { + background-color: #eff0f4; + color: #798291; + cursor: default; +} + +.emotion-7 { display: inline-block; line-height: 0; width: 100px; height: 100px; -webkit-transform: rotate(0deg); + -moz-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); color: #c4c6d2; @@ -40,42 +80,40 @@ exports[`GitGatewayAuthenticationPage should render with identity error 1`] = ` bottom: 10px; } -.emotion-3 path:not(.no-fill), -.emotion-3 circle:not(.no-fill), -.emotion-3 polygon:not(.no-fill), -.emotion-3 rect:not(.no-fill) { +.emotion-7 path:not(.no-fill), +.emotion-7 circle:not(.no-fill), +.emotion-7 polygon:not(.no-fill), +.emotion-7 rect:not(.no-fill) { fill: currentColor; } -.emotion-3 path.clipped { +.emotion-7 path.clipped { fill: transparent; } -.emotion-3 svg { +.emotion-7 svg { width: 100%; height: 100%; }
Logo - - auth.errors.identitySettings - + auth.loginWithNetlifyIdentity + - .emotion-7 { + .emotion-0 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; + -webkit-box-flex-flow: column nowrap; -webkit-flex-flow: column nowrap; -ms-flex-flow: column nowrap; flex-flow: column nowrap; @@ -115,115 +154,23 @@ exports[`GitGatewayAuthenticationPage should render with no identity error 1`] = -ms-flex-align: center; align-items: center; -webkit-box-pack: center; - -webkit-justify-content: center; -ms-flex-pack: center; - justify-content: center; - gap: 50px; - height: 100vh; -} - -.emotion-0 { - width: 300px; - height: auto; -} - -.emotion-2 { - border: 0; - border-radius: 5px; - cursor: pointer; - box-shadow: 0 4px 12px 0 rgba(68,74,87,0.15),0 1px 3px 0 rgba(68,74,87,0.25); - height: 36px; - line-height: 36px; - font-weight: 500; - padding: 0 15px; - background-color: #798291; - color: #fff; - background-color: #313d3e; - color: #fff; - padding: 0 12px; - margin-top: 0; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - position: relative; -} - -.emotion-2:focus, -.emotion-2:hover { - color: #fff; - background-color: #555a65; -} - -.emotion-2[disabled] { - background-color: #eff0f4; - color: #798291; - cursor: default; -} - -.emotion-5 { - display: inline-block; - line-height: 0; - width: 100px; - height: 100px; - -webkit-transform: rotate(0deg); - -ms-transform: rotate(0deg); - transform: rotate(0deg); - color: #c4c6d2; - position: absolute; - bottom: 10px; -} - -.emotion-5 path:not(.no-fill), -.emotion-5 circle:not(.no-fill), -.emotion-5 polygon:not(.no-fill), -.emotion-5 rect:not(.no-fill) { - fill: currentColor; -} - -.emotion-5 path.clipped { - fill: transparent; -} - -.emotion-5 svg { - width: 100%; - height: 100%; -} - -.emotion-7 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-flow: column nowrap; - -ms-flex-flow: column nowrap; - flex-flow: column nowrap; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-pack: center; -webkit-justify-content: center; - -ms-flex-pack: center; justify-content: center; gap: 50px; height: 100vh; } -.emotion-0 { +.emotion-2 { width: 300px; height: auto; } -.emotion-2 { +.emotion-4 { border: 0; border-radius: 5px; cursor: pointer; - box-shadow: 0 4px 12px 0 rgba(68,74,87,0.15),0 1px 3px 0 rgba(68,74,87,0.25); + box-shadow: 0 4px 12px 0 rgba(68, 74, 87, 0.15),0 1px 3px 0 rgba(68, 74, 87, 0.25); height: 36px; line-height: 36px; font-weight: 500; @@ -245,24 +192,25 @@ exports[`GitGatewayAuthenticationPage should render with no identity error 1`] = position: relative; } -.emotion-2:focus, -.emotion-2:hover { +.emotion-4:focus, +.emotion-4:hover { color: #fff; background-color: #555a65; } -.emotion-2[disabled] { +.emotion-4[disabled] { background-color: #eff0f4; color: #798291; cursor: default; } -.emotion-5 { +.emotion-7 { display: inline-block; line-height: 0; width: 100px; height: 100px; -webkit-transform: rotate(0deg); + -moz-transform: rotate(0deg); -ms-transform: rotate(0deg); transform: rotate(0deg); color: #c4c6d2; @@ -270,27 +218,27 @@ exports[`GitGatewayAuthenticationPage should render with no identity error 1`] = bottom: 10px; } -.emotion-5 path:not(.no-fill), -.emotion-5 circle:not(.no-fill), -.emotion-5 polygon:not(.no-fill), -.emotion-5 rect:not(.no-fill) { +.emotion-7 path:not(.no-fill), +.emotion-7 circle:not(.no-fill), +.emotion-7 polygon:not(.no-fill), +.emotion-7 rect:not(.no-fill) { fill: currentColor; } -.emotion-5 path.clipped { +.emotion-7 path.clipped { fill: transparent; } -.emotion-5 svg { +.emotion-7 svg { width: 100%; height: 100%; }
Logo - .emotion-2 { + .emotion-0 { margin: 28px 18px; } -.emotion-0 { +.emotion-2 { padding-left: 280px; }
- .emotion-2 { + .emotion-0 { margin: 28px 18px; } -.emotion-0 { +.emotion-2 { padding-left: 280px; }
- .emotion-2 { + .emotion-0 { margin: 28px 18px; } -.emotion-0 { +.emotion-2 { padding-left: 280px; }
- .emotion-2 { + .emotion-0 { margin: 28px 18px; } -.emotion-0 { +.emotion-2 { padding-left: 280px; }
- .emotion-6 { + .emotion-0 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -18,29 +18,29 @@ exports[`NestedCollection should render connected component 1`] = ` border-left: 2px solid #fff; } -.emotion-6 mocked-icon { +.emotion-0 mocked-icon { margin-right: 8px; -webkit-flex-shrink: 0; -ms-flex-negative: 0; flex-shrink: 0; } -.emotion-6:hover, -.emotion-6:active, -.emotion-6.sidebar-active { +.emotion-0:hover, +.emotion-0:active, +.emotion-0.sidebar-active { color: #3a69c7; background-color: #e8f5fe; border-left-color: #4863c6; } -.emotion-4 { +.emotion-2 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; - -webkit-justify-content: center; -ms-flex-pack: center; + -webkit-justify-content: center; justify-content: center; -webkit-align-items: center; -webkit-box-align: center; @@ -48,11 +48,11 @@ exports[`NestedCollection should render connected component 1`] = ` align-items: center; } -.emotion-0 { +.emotion-4 { margin-right: 4px; } -.emotion-2 { +.emotion-6 { position: relative; top: 2px; color: #fff; @@ -67,7 +67,7 @@ exports[`NestedCollection should render connected component 1`] = `
Pages
- .emotion-2 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.emotion-0 { - margin-right: 4px; -} - -.emotion-4 { + .emotion-0 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -123,23 +104,42 @@ exports[`NestedCollection should render connected component 1`] = ` border-left: 2px solid #fff; } -.emotion-4 mocked-icon { +.emotion-0 mocked-icon { margin-right: 8px; -webkit-flex-shrink: 0; -ms-flex-negative: 0; flex-shrink: 0; } -.emotion-4:hover, -.emotion-4:active, -.emotion-4.sidebar-active { +.emotion-0:hover, +.emotion-0:active, +.emotion-0.sidebar-active { color: #3a69c7; background-color: #e8f5fe; border-left-color: #4863c6; } +.emotion-2 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.emotion-4 { + margin-right: 4px; +} +
File 1
- .emotion-2 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.emotion-0 { - margin-right: 4px; -} - -.emotion-4 { + .emotion-0 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -192,23 +173,42 @@ exports[`NestedCollection should render connected component 1`] = ` border-left: 2px solid #fff; } -.emotion-4 mocked-icon { +.emotion-0 mocked-icon { margin-right: 8px; -webkit-flex-shrink: 0; -ms-flex-negative: 0; flex-shrink: 0; } -.emotion-4:hover, -.emotion-4:active, -.emotion-4.sidebar-active { +.emotion-0:hover, +.emotion-0:active, +.emotion-0.sidebar-active { color: #3a69c7; background-color: #e8f5fe; border-left-color: #4863c6; } +.emotion-2 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.emotion-4 { + margin-right: 4px; +} +
File 2
@@ -231,7 +231,7 @@ exports[`NestedCollection should render connected component 1`] = ` exports[`NestedCollection should render correctly with nested entries 1`] = ` - .emotion-6 { + .emotion-0 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -247,29 +247,29 @@ exports[`NestedCollection should render correctly with nested entries 1`] = ` border-left: 2px solid #fff; } -.emotion-6 mocked-icon { +.emotion-0 mocked-icon { margin-right: 8px; -webkit-flex-shrink: 0; -ms-flex-negative: 0; flex-shrink: 0; } -.emotion-6:hover, -.emotion-6:active, -.emotion-6.sidebar-active { +.emotion-0:hover, +.emotion-0:active, +.emotion-0.sidebar-active { color: #3a69c7; background-color: #e8f5fe; border-left-color: #4863c6; } -.emotion-4 { +.emotion-2 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; - -webkit-justify-content: center; -ms-flex-pack: center; + -webkit-justify-content: center; justify-content: center; -webkit-align-items: center; -webkit-box-align: center; @@ -277,11 +277,11 @@ exports[`NestedCollection should render correctly with nested entries 1`] = ` align-items: center; } -.emotion-0 { +.emotion-4 { margin-right: 4px; } -.emotion-2 { +.emotion-6 { position: relative; top: 2px; color: #fff; @@ -296,7 +296,7 @@ exports[`NestedCollection should render correctly with nested entries 1`] = `
Pages
- .emotion-2 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.emotion-0 { - margin-right: 4px; -} - -.emotion-4 { + .emotion-0 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -352,23 +333,42 @@ exports[`NestedCollection should render correctly with nested entries 1`] = ` border-left: 2px solid #fff; } -.emotion-4 mocked-icon { +.emotion-0 mocked-icon { margin-right: 8px; -webkit-flex-shrink: 0; -ms-flex-negative: 0; flex-shrink: 0; } -.emotion-4:hover, -.emotion-4:active, -.emotion-4.sidebar-active { +.emotion-0:hover, +.emotion-0:active, +.emotion-0.sidebar-active { color: #3a69c7; background-color: #e8f5fe; border-left-color: #4863c6; } +.emotion-2 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.emotion-4 { + margin-right: 4px; +} +
File 1
- .emotion-2 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-box-pack: center; - -webkit-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.emotion-0 { - margin-right: 4px; -} - -.emotion-4 { + .emotion-0 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -421,23 +402,42 @@ exports[`NestedCollection should render correctly with nested entries 1`] = ` border-left: 2px solid #fff; } -.emotion-4 mocked-icon { +.emotion-0 mocked-icon { margin-right: 8px; -webkit-flex-shrink: 0; -ms-flex-negative: 0; flex-shrink: 0; } -.emotion-4:hover, -.emotion-4:active, -.emotion-4.sidebar-active { +.emotion-0:hover, +.emotion-0:active, +.emotion-0.sidebar-active { color: #3a69c7; background-color: #e8f5fe; border-left-color: #4863c6; } +.emotion-2 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: center; + -ms-flex-pack: center; + -webkit-justify-content: center; + justify-content: center; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.emotion-4 { + margin-right: 4px; +} +
File 2
@@ -460,7 +460,7 @@ exports[`NestedCollection should render correctly with nested entries 1`] = ` exports[`NestedCollection should render correctly with no entries 1`] = ` - .emotion-6 { + .emotion-0 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -476,29 +476,29 @@ exports[`NestedCollection should render correctly with no entries 1`] = ` border-left: 2px solid #fff; } -.emotion-6 mocked-icon { +.emotion-0 mocked-icon { margin-right: 8px; -webkit-flex-shrink: 0; -ms-flex-negative: 0; flex-shrink: 0; } -.emotion-6:hover, -.emotion-6:active, -.emotion-6.sidebar-active { +.emotion-0:hover, +.emotion-0:active, +.emotion-0.sidebar-active { color: #3a69c7; background-color: #e8f5fe; border-left-color: #4863c6; } -.emotion-4 { +.emotion-2 { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; - -webkit-justify-content: center; -ms-flex-pack: center; + -webkit-justify-content: center; justify-content: center; -webkit-align-items: center; -webkit-box-align: center; @@ -506,11 +506,11 @@ exports[`NestedCollection should render correctly with no entries 1`] = ` align-items: center; } -.emotion-0 { +.emotion-4 { margin-right: 4px; } -.emotion-2 { +.emotion-6 { position: relative; top: 2px; color: #fff; @@ -525,7 +525,7 @@ exports[`NestedCollection should render correctly with no entries 1`] = ` }
Pages
diff --git a/packages/decap-cms-core/src/components/Collection/__tests__/__snapshots__/Sidebar.spec.js.snap b/packages/decap-cms-core/src/components/Collection/__tests__/__snapshots__/Sidebar.spec.js.snap index 6d5f297883b0..6e7ecd2607f1 100644 --- a/packages/decap-cms-core/src/components/Collection/__tests__/__snapshots__/Sidebar.spec.js.snap +++ b/packages/decap-cms-core/src/components/Collection/__tests__/__snapshots__/Sidebar.spec.js.snap @@ -2,8 +2,8 @@ exports[`Sidebar should render nested collection with filterTerm 1`] = ` - .emotion-4 { - box-shadow: 0 2px 6px 0 rgba(68,74,87,0.05),0 1px 3px 0 rgba(68,74,87,0.1); + .emotion-0 { + box-shadow: 0 2px 6px 0 rgba(68, 74, 87, 0.05),0 1px 3px 0 rgba(68, 74, 87, 0.1); border-radius: 5px; background-color: #fff; width: 250px; @@ -19,7 +19,7 @@ exports[`Sidebar should render nested collection with filterTerm 1`] = ` flex-direction: column; } -.emotion-0 { +.emotion-2 { font-size: 23px; font-weight: 600; padding: 0; @@ -27,17 +27,17 @@ exports[`Sidebar should render nested collection with filterTerm 1`] = ` color: #313d3e; } -.emotion-2 { +.emotion-4 { margin: 16px 0 0; list-style: none; overflow: auto; }