diff --git a/addons/info/src/__snapshots__/index.test.js.snap b/addons/info/src/__snapshots__/index.test.js.snap index 9aacd4003e6c..ea00c1e013da 100644 --- a/addons/info/src/__snapshots__/index.test.js.snap +++ b/addons/info/src/__snapshots__/index.test.js.snap @@ -1,6 +1,63 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`addon Info should render and external markdown 1`] = ` +.emotion-4 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + font-size: .88em; + font-family: Menlo,Monaco,"Courier New",monospace; + background-color: #fafafa; + padding: .5rem; + line-height: 1.5; + overflow-x: scroll; +} + +.emotion-2 { + overflow: hidden; + border: 1px solid #eee; + border-radius: 3px; + background-color: #FFFFFF; + cursor: pointer; + font-size: 13px; + padding: 3px 10px; + -webkit-align-self: flex-start; + -ms-flex-item-align: start; + align-self: flex-start; + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; +} + +.emotion-2:hover { + background-color: #f4f7fa; + border-color: #ddd; +} + +.emotion-2:active { + background-color: #e9ecef; + border-color: #ccc; +} + +.emotion-0 { + -webkit-transition: -webkit-transform .2s ease; + -webkit-transition: transform .2s ease; + transition: transform .2s ease; + height: 16px; + -webkit-transform: translateY(-100%) translateY(-6px); + -ms-transform: translateY(-100%) translateY(-6px); + transform: translateY(-100%) translateY(-6px); +} + and external markdown 1`] = ` `; exports[`addon Info should render and markdown 1`] = ` +.emotion-4 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + font-size: .88em; + font-family: Menlo,Monaco,"Courier New",monospace; + background-color: #fafafa; + padding: .5rem; + line-height: 1.5; + overflow-x: scroll; +} + +.emotion-2 { + overflow: hidden; + border: 1px solid #eee; + border-radius: 3px; + background-color: #FFFFFF; + cursor: pointer; + font-size: 13px; + padding: 3px 10px; + -webkit-align-self: flex-start; + -ms-flex-item-align: start; + align-self: flex-start; + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; +} + +.emotion-2:hover { + background-color: #f4f7fa; + border-color: #ddd; +} + +.emotion-2:active { + background-color: #e9ecef; + border-color: #ccc; +} + +.emotion-0 { + -webkit-transition: -webkit-transform .2s ease; + -webkit-transition: transform .2s ease; + transition: transform .2s ease; + height: 16px; + -webkit-transform: translateY(-100%) translateY(-6px); + -ms-transform: translateY(-100%) translateY(-6px); + transform: translateY(-100%) translateY(-6px); +} + @@ -23,6 +33,16 @@ exports[`Storyshots Another Button with some emoji 1`] = ` `; exports[`Storyshots Another Button with text 1`] = ` +.emotion-0 { + border: 1px solid #eee; + border-radius: 3px; + background-color: #FFFFFF; + cursor: pointer; + font-size: 15px; + padding: 3px 10px; + margin: 10px; +} + @@ -46,6 +66,16 @@ exports[`Storyshots Async with 5ms timeout simulating async operation 1`] = ` `; exports[`Storyshots Button with some emoji 1`] = ` +.emotion-0 { + border: 1px solid #eee; + border-radius: 3px; + background-color: #FFFFFF; + cursor: pointer; + font-size: 15px; + padding: 3px 10px; + margin: 10px; +} + @@ -68,6 +98,16 @@ exports[`Storyshots Button with some emoji 1`] = ` `; exports[`Storyshots Button with text 1`] = ` +.emotion-0 { + border: 1px solid #eee; + border-radius: 3px; + background-color: #FFFFFF; + cursor: pointer; + font-size: 15px; + padding: 3px 10px; + margin: 10px; +} + @@ -85,6 +125,50 @@ exports[`Storyshots Button with text 1`] = ` `; exports[`Storyshots Welcome to Storybook 1`] = ` +.emotion-18 { + margin: 15px; + max-width: 600px; + line-height: 1.4; + font-family: "Helvetica Neue",Helvetica,"Segoe UI",Arial,freesans,sans-serif; +} + +.emotion-2 { + font-size: 15px; + font-weight: 600; + padding: 2px 5px; + border: 1px solid #eae9e9; + border-radius: 4px; + background-color: #f3f2f2; + color: #3a3a3a; +} + +.emotion-4 { + color: #1474f3; + -webkit-text-decoration: none; + text-decoration: none; + border-bottom: 1px solid #1474f3; + padding-bottom: 2px; + border-top: none; + border-right: none; + border-left: none; + background-color: transparent; + padding: 0; + cursor: pointer; + font: inherit; +} + +.emotion-12 { + color: #1474f3; + -webkit-text-decoration: none; + text-decoration: none; + border-bottom: 1px solid #1474f3; + padding-bottom: 2px; +} + +.emotion-16 { + opacity: 0.5; +} + diff --git a/jest.config.js b/jest.config.js index ad8ec973ec5f..3f46feaa4d85 100644 --- a/jest.config.js +++ b/jest.config.js @@ -23,7 +23,7 @@ module.exports = { '/examples/official-storybook', '/examples/angular-cli', ], - snapshotSerializers: ['jest-emotion/serializer'], + snapshotSerializers: ['@emotion/snapshot-serializer'], transform: { '^.+\\.jsx?$': '/scripts/babel-jest.js', '^.+[/\\\\].storybook[/\\\\]config\\.ts$': '/scripts/jest-ts-babel.js', diff --git a/package.json b/package.json index 5206018a9b2d..7a4705b799ac 100644 --- a/package.json +++ b/package.json @@ -75,6 +75,7 @@ "@babel/runtime": "^7.0.0", "@emotion/core": "0.13.0", "@emotion/provider": "0.11.1", + "@emotion/snapshot-serializer": "0.8.1", "axe-core": "^3.1.1", "babel-core": "^7.0.0-bridge.0", "babel-eslint": "^9.0.0", @@ -91,7 +92,6 @@ "concurrently": "^4.0.1", "cross-env": "^5.2.0", "danger": "^3.8.4", - "emotion": "9.2.8", "enzyme": "^3.5.0", "enzyme-adapter-react-16": "^1.3.0", "eslint": "^5.4.0", @@ -112,7 +112,6 @@ "jest-cli": "^23.4.2", "jest-config": "^23.4.2", "jest-diff": "^23.2.0", - "jest-emotion": "^9.2.7", "jest-environment-jsdom": "^23.4.0", "jest-enzyme": "^6.0.2", "jest-glamor-react": "^4.3.1", diff --git a/yarn.lock b/yarn.lock index 1b7b3ddf7472..6d8664a87387 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1037,6 +1037,13 @@ version "0.8.0" resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-0.8.0.tgz#278e3e95e5006515958382369104ae0fabc65b52" +"@emotion/snapshot-serializer@0.8.1": + version "0.8.1" + resolved "https://registry.yarnpkg.com/@emotion/snapshot-serializer/-/snapshot-serializer-0.8.1.tgz#4e878f8139ca9172546461cf62f1d090e7136e00" + dependencies: + chalk "^2.4.1" + css "^2.2.1" + "@emotion/styled-base@^0.10.5": version "0.10.5" resolved "https://registry.yarnpkg.com/@emotion/styled-base/-/styled-base-0.10.5.tgz#7f8afca216b2440367c6747de0cb1459468624b1" @@ -1051,15 +1058,11 @@ dependencies: "@emotion/styled-base" "^0.10.5" -"@emotion/stylis@^0.6.10": - version "0.6.12" - resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.6.12.tgz#3fb58220e0fc9e380bcabbb3edde396ddc1dfe6e" - "@emotion/stylis@^0.7.0": version "0.7.0" resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.7.0.tgz#4c30e6fccc9555e42fa6fef98b3bd0788b954684" -"@emotion/unitless@^0.6.2", "@emotion/unitless@^0.6.6": +"@emotion/unitless@^0.6.6": version "0.6.6" resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.6.6.tgz#988957ecd0a9be00ee9de27172f8c56d41595a93" @@ -1754,7 +1757,7 @@ dependencies: "@types/jasmine" "*" -"@types/jest@^23.0.2", "@types/jest@^23.3.1": +"@types/jest@^23.3.1": version "23.3.1" resolved "https://registry.yarnpkg.com/@types/jest/-/jest-23.3.1.tgz#a4319aedb071d478e6f407d1c4578ec8156829cf" @@ -3106,7 +3109,7 @@ babel-plugin-dynamic-import-node@1.1.0: babel-template "^6.26.0" babel-types "^6.26.0" -babel-plugin-emotion@^9.2.4, babel-plugin-emotion@^9.2.8: +babel-plugin-emotion@^9.2.4: version "9.2.8" resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-9.2.8.tgz#4df55ef10625c391f25b031f7e3006abac359e09" dependencies: @@ -5808,18 +5811,6 @@ create-ecdh@^4.0.0: bn.js "^4.1.0" elliptic "^6.0.0" -create-emotion@^9.2.6: - version "9.2.6" - resolved "https://registry.yarnpkg.com/create-emotion/-/create-emotion-9.2.6.tgz#f64cf1c64cf82fe7d22725d1d77498ddd2d39edb" - dependencies: - "@emotion/hash" "^0.6.2" - "@emotion/memoize" "^0.6.1" - "@emotion/stylis" "^0.6.10" - "@emotion/unitless" "^0.6.2" - csstype "^2.5.2" - stylis "^3.5.0" - stylis-rule-sheet "^0.0.10" - create-error-class@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" @@ -6086,10 +6077,6 @@ cssstyle@^1.0.0: dependencies: cssom "0.3.x" -csstype@^2.5.2: - version "2.5.6" - resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.6.tgz#2ae1db2319642d8b80a668d2d025c6196071e788" - csurf@~1.8.3: version "1.8.3" resolved "https://registry.yarnpkg.com/csurf/-/csurf-1.8.3.tgz#23f2a13bf1d8fce1d0c996588394442cba86a56a" @@ -6741,13 +6728,6 @@ emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" -emotion@9.2.8: - version "9.2.8" - resolved "https://registry.yarnpkg.com/emotion/-/emotion-9.2.8.tgz#b89e754be1a109f4e47ff0031928f94e40d7984a" - dependencies: - babel-plugin-emotion "^9.2.8" - create-emotion "^9.2.6" - encodeurl@~1.0.1, encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -10252,14 +10232,6 @@ jest-each@^23.5.0: chalk "^2.0.1" pretty-format "^23.5.0" -jest-emotion@^9.2.7: - version "9.2.7" - resolved "https://registry.yarnpkg.com/jest-emotion/-/jest-emotion-9.2.7.tgz#7a854156d1d5ceb95d8f36095a3f81d04109f125" - dependencies: - "@types/jest" "^23.0.2" - chalk "^2.4.1" - css "^2.2.1" - jest-environment-enzyme@^6.0.4: version "6.0.4" resolved "https://registry.yarnpkg.com/jest-environment-enzyme/-/jest-environment-enzyme-6.0.4.tgz#1576bec170bb9025e82579bf63fadbf1aeabe944" @@ -17534,14 +17506,6 @@ style-loader@^0.23.0: loader-utils "^1.1.0" schema-utils "^0.4.5" -stylis-rule-sheet@^0.0.10: - version "0.0.10" - resolved "https://registry.yarnpkg.com/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430" - -stylis@^3.5.0: - version "3.5.3" - resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.3.tgz#99fdc46afba6af4deff570825994181a5e6ce546" - stylus-loader@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/stylus-loader/-/stylus-loader-3.0.2.tgz#27a706420b05a38e038e7cacb153578d450513c6"