From bc1be722b60426e6e413ae9e91a32c23a0fd5fce Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Tue, 4 Oct 2022 10:41:05 -0700 Subject: [PATCH 1/9] Install `@emotion/css` and upgrade all Emotion dependencies to latest and --- package.json | 11 ++- yarn.lock | 274 ++++++++++++++++++++++++++++++--------------------- 2 files changed, 170 insertions(+), 115 deletions(-) diff --git a/package.json b/package.json index 9c7d1b508d2..62092e407ba 100644 --- a/package.json +++ b/package.json @@ -118,11 +118,12 @@ "@elastic/charts": "^50.0.1", "@elastic/datemath": "^5.0.3", "@elastic/eslint-config-kibana": "^0.15.0", - "@emotion/babel-preset-css-prop": "^11.2.0", - "@emotion/cache": "^11.7.1", - "@emotion/eslint-plugin": "^11.7.0", - "@emotion/jest": "^11.9.0", - "@emotion/react": "^11.9.0", + "@emotion/babel-preset-css-prop": "^11.10.0", + "@emotion/cache": "^11.10.3", + "@emotion/css": "^11.10.0", + "@emotion/eslint-plugin": "^11.10.0", + "@emotion/jest": "^11.10.0", + "@emotion/react": "^11.10.4", "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3", "@svgr/core": "5.5.0", "@svgr/plugin-svgo": "^4.0.3", diff --git a/yarn.lock b/yarn.lock index bbe60446c5e..dd6a59e98d6 100755 --- a/yarn.lock +++ b/yarn.lock @@ -265,7 +265,7 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-module-imports@^7.18.6": +"@babel/helper-module-imports@^7.16.7", "@babel/helper-module-imports@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== @@ -317,6 +317,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz#4b8aea3b069d8cb8a72cdfe28ddf5ceca695ef2f" integrity sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w== +"@babel/helper-plugin-utils@^7.19.0": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz#4796bb14961521f0f8715990bee2fb6e51ce21bf" + integrity sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw== + "@babel/helper-remap-async-to-generator@^7.16.0", "@babel/helper-remap-async-to-generator@^7.16.4": version "7.16.4" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.4.tgz#5d7902f61349ff6b963e07f06a389ce139fbfe6e" @@ -382,6 +387,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== +"@babel/helper-validator-identifier@^7.19.1": + version "7.19.1" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" + integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== + "@babel/helper-validator-option@^7.14.5", "@babel/helper-validator-option@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23" @@ -625,14 +635,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.12.13", "@babel/plugin-syntax-jsx@^7.16.0", "@babel/plugin-syntax-jsx@^7.2.0": +"@babel/plugin-syntax-jsx@^7.16.0": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz#50b6571d13f764266a113d77c82b4a6508bbe665" integrity sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q== dependencies: "@babel/helper-plugin-utils" "^7.16.7" -"@babel/plugin-syntax-jsx@^7.18.6": +"@babel/plugin-syntax-jsx@^7.17.12", "@babel/plugin-syntax-jsx@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== @@ -913,7 +923,7 @@ dependencies: "@babel/plugin-transform-react-jsx" "^7.18.6" -"@babel/plugin-transform-react-jsx@^7.12.1", "@babel/plugin-transform-react-jsx@^7.16.0": +"@babel/plugin-transform-react-jsx@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.0.tgz#55b797d4960c3de04e07ad1c0476e2bc6a4889f1" integrity sha512-rqDgIbukZ44pqq7NIRPGPGNklshPkvlmvqjdx3OZcGPk4zGIenYkxDTvl3LsSL8gqcc3ZzGmXPE6hR/u/voNOw== @@ -924,6 +934,17 @@ "@babel/plugin-syntax-jsx" "^7.16.0" "@babel/types" "^7.16.0" +"@babel/plugin-transform-react-jsx@^7.17.12": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.19.0.tgz#b3cbb7c3a00b92ec8ae1027910e331ba5c500eb9" + integrity sha512-UVEvX3tXie3Szm3emi1+G63jyw1w5IcMY0FSKM+CRnKRI5Mr1YbCNgsSTwoTwKphQEG9P+QqmuRFneJPZuHNhg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.18.6" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-plugin-utils" "^7.19.0" + "@babel/plugin-syntax-jsx" "^7.18.6" + "@babel/types" "^7.19.0" + "@babel/plugin-transform-react-jsx@^7.18.6": version "7.18.10" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.18.10.tgz#ea47b2c4197102c196cbd10db9b3bb20daa820f1" @@ -1177,13 +1198,20 @@ core-js-pure "^3.0.0" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a" integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw== dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.18.3": + version "7.19.0" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.0.tgz#22b11c037b094d27a8a2504ea4dcff00f50e2259" + integrity sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.12.13", "@babel/template@^7.18.10", "@babel/template@^7.18.6": version "7.18.10" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71" @@ -1251,6 +1279,15 @@ "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" +"@babel/types@^7.19.0": + version "7.19.3" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.3.tgz#fc420e6bbe54880bce6779ffaf315f5e43ec9624" + integrity sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw== + dependencies: + "@babel/helper-string-parser" "^7.18.10" + "@babel/helper-validator-identifier" "^7.19.1" + to-fast-properties "^2.0.0" + "@base2/pretty-print-object@1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@base2/pretty-print-object/-/pretty-print-object-1.0.1.tgz#371ba8be66d556812dc7fb169ebc3c08378f69d4" @@ -1387,129 +1424,146 @@ resolved "https://registry.yarnpkg.com/@elastic/eslint-config-kibana/-/eslint-config-kibana-0.15.0.tgz#a552793497cdfc1829c2f9b7cd7018eb008f1606" integrity sha1-pVJ5NJfN/Bgpwvm3zXAY6wCPFgY= -"@emotion/babel-plugin-jsx-pragmatic@^0.1.5": - version "0.1.5" - resolved "https://registry.yarnpkg.com/@emotion/babel-plugin-jsx-pragmatic/-/babel-plugin-jsx-pragmatic-0.1.5.tgz#27debfe9c27c4d83574d509787ae553bf8a34d7e" - integrity sha512-y+3AJ0SItMDaAgGPVkQBC/S/BaqaPACkQ6MyCI2CUlrjTxKttTVfD3TMtcs7vLEcLxqzZ1xiG0vzwCXjhopawQ== - dependencies: - "@babel/plugin-syntax-jsx" "^7.2.0" - -"@emotion/babel-plugin@^11.2.0", "@emotion/babel-plugin@^11.7.1": - version "11.7.2" - resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.7.2.tgz#fec75f38a6ab5b304b0601c74e2a5e77c95e5fa0" - integrity sha512-6mGSCWi9UzXut/ZAN6lGFu33wGR3SJisNl3c0tvlmb8XChH1b2SUvxvnOh7hvLpqyRdHHU9AiazV3Cwbk5SXKQ== - dependencies: - "@babel/helper-module-imports" "^7.12.13" - "@babel/plugin-syntax-jsx" "^7.12.13" - "@babel/runtime" "^7.13.10" - "@emotion/hash" "^0.8.0" - "@emotion/memoize" "^0.7.5" - "@emotion/serialize" "^1.0.2" - babel-plugin-macros "^2.6.1" +"@emotion/babel-plugin-jsx-pragmatic@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@emotion/babel-plugin-jsx-pragmatic/-/babel-plugin-jsx-pragmatic-0.2.0.tgz#6fdd78600417973fa2610704693158181d8505b7" + integrity sha512-VPfKAtb/bVyu5y+HzCPj9bb2nHnj9yX5mMAU7N0pIDcrFZo8aqDyHXLYF8BD7tY4pNL09N87dygVLKIkQvshJw== + dependencies: + "@babel/plugin-syntax-jsx" "^7.17.12" + +"@emotion/babel-plugin@^11.10.0": + version "11.10.2" + resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.10.2.tgz#879db80ba622b3f6076917a1e6f648b1c7d008c7" + integrity sha512-xNQ57njWTFVfPAc3cjfuaPdsgLp5QOSuRsj9MA6ndEhH/AzuZM86qIQzt6rq+aGBwj3n5/TkLmU5lhAfdRmogA== + dependencies: + "@babel/helper-module-imports" "^7.16.7" + "@babel/plugin-syntax-jsx" "^7.17.12" + "@babel/runtime" "^7.18.3" + "@emotion/hash" "^0.9.0" + "@emotion/memoize" "^0.8.0" + "@emotion/serialize" "^1.1.0" + babel-plugin-macros "^3.1.0" convert-source-map "^1.5.0" escape-string-regexp "^4.0.0" find-root "^1.1.0" source-map "^0.5.7" stylis "4.0.13" -"@emotion/babel-preset-css-prop@^11.2.0": - version "11.2.0" - resolved "https://registry.yarnpkg.com/@emotion/babel-preset-css-prop/-/babel-preset-css-prop-11.2.0.tgz#c7e945f56b2610b438f0dc8ae5253fc55488de0e" - integrity sha512-9XLQm2eLPYTho+Cx1LQTDA1rATjoAaB4O+ds55XDvoAa+Z16Hhg8y5Vihj3C8E6+ilDM8SV5A9Z6z+yj0YIRBg== - dependencies: - "@babel/plugin-transform-react-jsx" "^7.12.1" - "@babel/runtime" "^7.7.2" - "@emotion/babel-plugin" "^11.2.0" - "@emotion/babel-plugin-jsx-pragmatic" "^0.1.5" - -"@emotion/cache@^11.7.1": - version "11.7.1" - resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.7.1.tgz#08d080e396a42e0037848214e8aa7bf879065539" - integrity sha512-r65Zy4Iljb8oyjtLeCuBH8Qjiy107dOYC6SJq7g7GV5UCQWMObY4SJDPGFjiiVpPrOJ2hmJOoBiYTC7hwx9E2A== - dependencies: - "@emotion/memoize" "^0.7.4" - "@emotion/sheet" "^1.1.0" - "@emotion/utils" "^1.0.0" - "@emotion/weak-memoize" "^0.2.5" +"@emotion/babel-preset-css-prop@^11.10.0": + version "11.10.0" + resolved "https://registry.yarnpkg.com/@emotion/babel-preset-css-prop/-/babel-preset-css-prop-11.10.0.tgz#23922787561d8376782b0e9006323512fe797275" + integrity sha512-oN2lCP0NJTEt80IIeFM1RbmapeEVNYzKXYk2pYirAuom9WvV9Oz/aJQN5Hn3RyBMPaY+Of1OZYpTVMle2jUm4g== + dependencies: + "@babel/plugin-transform-react-jsx" "^7.17.12" + "@babel/runtime" "^7.18.3" + "@emotion/babel-plugin" "^11.10.0" + "@emotion/babel-plugin-jsx-pragmatic" "^0.2.0" + +"@emotion/cache@^11.10.0", "@emotion/cache@^11.10.3": + version "11.10.3" + resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.10.3.tgz#c4f67904fad10c945fea5165c3a5a0583c164b87" + integrity sha512-Psmp/7ovAa8appWh3g51goxu/z3iVms7JXOreq136D8Bbn6dYraPnmL6mdM8GThEx9vwSn92Fz+mGSjBzN8UPQ== + dependencies: + "@emotion/memoize" "^0.8.0" + "@emotion/sheet" "^1.2.0" + "@emotion/utils" "^1.2.0" + "@emotion/weak-memoize" "^0.3.0" stylis "4.0.13" -"@emotion/css-prettifier@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@emotion/css-prettifier/-/css-prettifier-1.0.1.tgz#a3ce1667398e83701f52ec43938208faeef2e0a5" - integrity sha512-cA9Dtol47mtvWKasPC+8tkh2DS0wBkX0MMHKieXGSkGyx079V7yFY85KC0pPalcIy+vi0LbMR9DNyiJBqYgJ1Q== +"@emotion/css-prettifier@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@emotion/css-prettifier/-/css-prettifier-1.1.0.tgz#1b5ac1588af9525e583f56fa898abb7edb3c7d9e" + integrity sha512-ALZCKBcpC9FeA0D6HLc4Et3bwY06fOG63CqLtWwk4W/u7+bWjorRxS9yikcJ2aTmlKur/ST9eWm5ohzBmWlTOQ== dependencies: - "@emotion/memoize" "^0.7.4" + "@emotion/memoize" "^0.8.0" stylis "4.0.13" -"@emotion/eslint-plugin@^11.7.0": - version "11.7.0" - resolved "https://registry.yarnpkg.com/@emotion/eslint-plugin/-/eslint-plugin-11.7.0.tgz#253c8ace26f3921695a7aa85ecbf6fac75e74b33" - integrity sha512-k6H0OxBgkPDVG5M16AWnu3z15OmmKNvGmJiYTcamoOIDhiGE5+no+BiVAiHPOwJf/NOsDei2S9i015cMwlO5sA== +"@emotion/css@^11.10.0": + version "11.10.0" + resolved "https://registry.yarnpkg.com/@emotion/css/-/css-11.10.0.tgz#270b4fdf2419e59cb07081d0e9f7940d88b8b443" + integrity sha512-dH9f+kSCucc8ilMg0MUA1AemabcyzYpe5EKX24F528PJjD7HyIY/VBNJHxfUdc8l400h2ncAjR6yEDu+DBj2cg== + dependencies: + "@emotion/babel-plugin" "^11.10.0" + "@emotion/cache" "^11.10.0" + "@emotion/serialize" "^1.1.0" + "@emotion/sheet" "^1.2.0" + "@emotion/utils" "^1.2.0" -"@emotion/hash@^0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" - integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== +"@emotion/eslint-plugin@^11.10.0": + version "11.10.0" + resolved "https://registry.yarnpkg.com/@emotion/eslint-plugin/-/eslint-plugin-11.10.0.tgz#e0d8544c8a568bb2dac605b87346baaa3b846e80" + integrity sha512-nWpuoQQrzI9aM9fgn+Pbb0pOau4BhheXyVqHcOYKFq46uSuSR2ivZaDwwCJKI6ScA8Pm7OcoOpwdRH2iisf9cg== + +"@emotion/hash@^0.9.0": + version "0.9.0" + resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.9.0.tgz#c5153d50401ee3c027a57a177bc269b16d889cb7" + integrity sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ== -"@emotion/jest@^11.9.0": - version "11.9.0" - resolved "https://registry.yarnpkg.com/@emotion/jest/-/jest-11.9.0.tgz#3ab2494d1b4ac63f4b61a2bb14db36d96f7ecd58" - integrity sha512-DgmKVpciuv2tyZiRKe7uU3Rs0djpJExTRmcjxjSPAI6zuxmpbWZMDcjazdNnAD3e8HPWG2KZy3svumFw6N283g== +"@emotion/jest@^11.10.0": + version "11.10.0" + resolved "https://registry.yarnpkg.com/@emotion/jest/-/jest-11.10.0.tgz#a39c16d0a5794254e0e4c5caf3f11278a64ae4a4" + integrity sha512-jeevEzauWrjDPWt9BGITjKzgLd31Q6kZ35gmH77f+LSaU/Ie1bFfxroum0nQNPEHS+kUxh6unv9DQIw+DEr5Ug== dependencies: - "@babel/runtime" "^7.13.10" - "@emotion/css-prettifier" "^1.0.1" + "@babel/runtime" "^7.18.3" + "@emotion/css-prettifier" "^1.1.0" chalk "^4.1.0" specificity "^0.4.1" stylis "4.0.13" -"@emotion/memoize@^0.7.4", "@emotion/memoize@^0.7.5": - version "0.7.5" - resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.5.tgz#2c40f81449a4e554e9fc6396910ed4843ec2be50" - integrity sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ== - -"@emotion/react@^11.9.0": - version "11.9.0" - resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.9.0.tgz#b6d42b1db3bd7511e7a7c4151dc8bc82e14593b8" - integrity sha512-lBVSF5d0ceKtfKCDQJveNAtkC7ayxpVlgOohLgXqRwqWr9bOf4TZAFFyIcNngnV6xK6X4x2ZeXq7vliHkoVkxQ== - dependencies: - "@babel/runtime" "^7.13.10" - "@emotion/babel-plugin" "^11.7.1" - "@emotion/cache" "^11.7.1" - "@emotion/serialize" "^1.0.3" - "@emotion/utils" "^1.1.0" - "@emotion/weak-memoize" "^0.2.5" +"@emotion/memoize@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.0.tgz#f580f9beb67176fa57aae70b08ed510e1b18980f" + integrity sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA== + +"@emotion/react@^11.10.4": + version "11.10.4" + resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.10.4.tgz#9dc6bccbda5d70ff68fdb204746c0e8b13a79199" + integrity sha512-j0AkMpr6BL8gldJZ6XQsQ8DnS9TxEQu1R+OGmDZiWjBAJtCcbt0tS3I/YffoqHXxH6MjgI7KdMbYKw3MEiU9eA== + dependencies: + "@babel/runtime" "^7.18.3" + "@emotion/babel-plugin" "^11.10.0" + "@emotion/cache" "^11.10.0" + "@emotion/serialize" "^1.1.0" + "@emotion/use-insertion-effect-with-fallbacks" "^1.0.0" + "@emotion/utils" "^1.2.0" + "@emotion/weak-memoize" "^0.3.0" hoist-non-react-statics "^3.3.1" -"@emotion/serialize@^1.0.2", "@emotion/serialize@^1.0.3": - version "1.0.3" - resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.0.3.tgz#99e2060c26c6292469fb30db41f4690e1c8fea63" - integrity sha512-2mSSvgLfyV3q+iVh3YWgNlUc2a9ZlDU7DjuP5MjK3AXRR0dYigCrP99aeFtaB2L/hjfEZdSThn5dsZ0ufqbvsA== +"@emotion/serialize@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.1.0.tgz#b1f97b1011b09346a40e9796c37a3397b4ea8ea8" + integrity sha512-F1ZZZW51T/fx+wKbVlwsfchr5q97iW8brAnXmsskz4d0hVB4O3M/SiA3SaeH06x02lSNzkkQv+n3AX3kCXKSFA== dependencies: - "@emotion/hash" "^0.8.0" - "@emotion/memoize" "^0.7.4" - "@emotion/unitless" "^0.7.5" - "@emotion/utils" "^1.0.0" + "@emotion/hash" "^0.9.0" + "@emotion/memoize" "^0.8.0" + "@emotion/unitless" "^0.8.0" + "@emotion/utils" "^1.2.0" csstype "^3.0.2" -"@emotion/sheet@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.1.0.tgz#56d99c41f0a1cda2726a05aa6a20afd4c63e58d2" - integrity sha512-u0AX4aSo25sMAygCuQTzS+HsImZFuS8llY8O7b9MDRzbJM0kVJlAz6KNDqcG7pOuQZJmj/8X/rAW+66kMnMW+g== +"@emotion/sheet@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.2.0.tgz#771b1987855839e214fc1741bde43089397f7be5" + integrity sha512-OiTkRgpxescko+M51tZsMq7Puu/KP55wMT8BgpcXVG2hqXc0Vo0mfymJ/Uj24Hp0i083ji/o0aLddh08UEjq8w== -"@emotion/unitless@^0.7.5": - version "0.7.5" - resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" - integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== +"@emotion/unitless@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.8.0.tgz#a4a36e9cbdc6903737cd20d38033241e1b8833db" + integrity sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw== -"@emotion/utils@^1.0.0", "@emotion/utils@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.1.0.tgz#86b0b297f3f1a0f2bdb08eeac9a2f49afd40d0cf" - integrity sha512-iRLa/Y4Rs5H/f2nimczYmS5kFJEbpiVvgN3XVfZ022IYhuNA1IRSHEizcof88LtCTXtl9S2Cxt32KgaXEu72JQ== +"@emotion/use-insertion-effect-with-fallbacks@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.0.tgz#ffadaec35dbb7885bd54de3fa267ab2f860294df" + integrity sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A== -"@emotion/weak-memoize@^0.2.5": - version "0.2.5" - resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" - integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== +"@emotion/utils@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.2.0.tgz#9716eaccbc6b5ded2ea5a90d65562609aab0f561" + integrity sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw== + +"@emotion/weak-memoize@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz#ea89004119dc42db2e1dba0f97d553f7372f6fcb" + integrity sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg== "@eslint/eslintrc@^0.1.3": version "0.1.3" @@ -3746,14 +3800,14 @@ babel-plugin-jest-hoist@^24.9.0: dependencies: "@types/babel__traverse" "^7.0.6" -babel-plugin-macros@^2.6.1: - version "2.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" - integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== +babel-plugin-macros@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz#9ef6dc74deb934b4db344dc973ee851d148c50c1" + integrity sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg== dependencies: - "@babel/runtime" "^7.7.2" - cosmiconfig "^6.0.0" - resolve "^1.12.0" + "@babel/runtime" "^7.12.5" + cosmiconfig "^7.0.0" + resolve "^1.19.0" babel-plugin-pegjs-inline-precompile@^0.1.1: version "0.1.1" @@ -15375,7 +15429,7 @@ resolve@1.5.0: dependencies: path-parse "^1.0.5" -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.9.0: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.19.0, resolve@^1.9.0: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== From 3399bdff9a17535875988331251df9669bcd831c Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Tue, 4 Oct 2022 10:46:07 -0700 Subject: [PATCH 2/9] Convert docs anchor links to `@emotion/css` - instead of using `ClassNames` render prop --- .../services/routing/heading_anchor_links.tsx | 64 +++++++++---------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/src-docs/src/services/routing/heading_anchor_links.tsx b/src-docs/src/services/routing/heading_anchor_links.tsx index 15a82794a1a..fe3d3c32704 100644 --- a/src-docs/src/services/routing/heading_anchor_links.tsx +++ b/src-docs/src/services/routing/heading_anchor_links.tsx @@ -1,7 +1,7 @@ import React, { useEffect, useState, useMemo } from 'react'; import { createPortal } from 'react-dom'; import { useLocation } from 'react-router-dom'; -import { ClassNames } from '@emotion/react'; +import { css } from '@emotion/css'; import { EuiButtonIcon, useEuiTheme, logicalCSS } from '../../../../src'; @@ -33,43 +33,39 @@ export const useHeadingAnchorLinks = () => { // to quickly get/copy the heading anchor link const anchorLinks = useMemo( () => ( - - {({ css }) => ( - <> - {headingNodes.map((heading) => { - const headingCss = css` - &:hover [data-anchor-link] { - opacity: 1; - } - `; - const linkCss = css` - opacity: 0; - ${logicalCSS('margin-left', euiTheme.size.s)} + <> + {headingNodes.map((heading) => { + const headingCss = css` + &:hover [data-anchor-link] { + opacity: 1; + } + `; + const linkCss = css` + opacity: 0; + ${logicalCSS('margin-left', euiTheme.size.s)} - &:hover, + &:hover, &:focus { - opacity: 1; - } - `; + opacity: 1; + } + `; - heading.classList.add(headingCss); + heading.classList.add(headingCss); - return createPortal( - , - heading - ); - })} - - )} - + return createPortal( + , + heading + ); + })} + ), [headingNodes] // eslint-disable-line react-hooks/exhaustive-deps ); From 41e4ac5a2e10038e5bbb69fe35ed6253b30d98f1 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Tue, 4 Oct 2022 10:53:28 -0700 Subject: [PATCH 3/9] Add `@emotion/css` as a peerDependency - since we're about to start using it in src components --- package.json | 1 + src-docs/src/components/codesandbox/link.js | 1 + .../src/views/guidelines/getting_started/getting_started.js | 2 +- upcoming_changelogs/6288.md | 3 +++ wiki/consuming.md | 2 +- 5 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 upcoming_changelogs/6288.md diff --git a/package.json b/package.json index 62092e407ba..6d92d57bcf9 100644 --- a/package.json +++ b/package.json @@ -256,6 +256,7 @@ "@elastic/datemath": "^5.0.2", "@emotion/cache": "11.x", "@emotion/react": "11.x", + "@emotion/css": "11.x", "@types/react": "^16.9 || ^17.0", "@types/react-dom": "^16.9 || ^17.0", "moment": "^2.13.0", diff --git a/src-docs/src/components/codesandbox/link.js b/src-docs/src/components/codesandbox/link.js index d2557fa6e64..be95e888299 100644 --- a/src-docs/src/components/codesandbox/link.js +++ b/src-docs/src/components/codesandbox/link.js @@ -138,6 +138,7 @@ ${demoContent} '@elastic/datemath', '@emotion/cache', '@emotion/react', + '@emotion/css', 'moment', 'react', 'react-dom', diff --git a/src-docs/src/views/guidelines/getting_started/getting_started.js b/src-docs/src/views/guidelines/getting_started/getting_started.js index d3517944097..66bb34d5a61 100644 --- a/src-docs/src/views/guidelines/getting_started/getting_started.js +++ b/src-docs/src/views/guidelines/getting_started/getting_started.js @@ -43,7 +43,7 @@ export const GettingStarted = { { - 'yarn add @elastic/eui @elastic/datemath @emotion/react @emotion/cache moment prop-types' + 'yarn add @elastic/eui @elastic/datemath @emotion/react @emotion/cache @emotion/css moment prop-types' } diff --git a/upcoming_changelogs/6288.md b/upcoming_changelogs/6288.md new file mode 100644 index 00000000000..dfd4a51e36b --- /dev/null +++ b/upcoming_changelogs/6288.md @@ -0,0 +1,3 @@ +**Breaking changes** + +- `@emotion/css` is now a required peer dependency, alongside `@emotion/react` diff --git a/wiki/consuming.md b/wiki/consuming.md index 106787ccaaa..a0794578386 100644 --- a/wiki/consuming.md +++ b/wiki/consuming.md @@ -11,7 +11,7 @@ yarn add @elastic/eui Note that EUI has [several `peerDependencies` requirements](package.json) that will also need to be installed if starting with a blank project. ```bash -yarn add @elastic/eui @elastic/datemath @emotion/react @emotion/cache moment prop-types +yarn add @elastic/eui @elastic/datemath @emotion/react @emotion/cache @emotion/css moment prop-types ``` ## Requirements and dependencies From 88ac73a8412c264be48e4e80326f7a17d1dfdb39 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Tue, 4 Oct 2022 10:55:13 -0700 Subject: [PATCH 4/9] Remove `@emotion/cache` usage from EuiProvider in favor of the default cache Emotion provides - which will automatically set compat = true --- .../provider/__snapshots__/provider.test.tsx.snap | 7 +++++++ src/components/provider/provider.tsx | 5 +---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/provider/__snapshots__/provider.test.tsx.snap b/src/components/provider/__snapshots__/provider.test.tsx.snap index b9a925d2c51..d83523850cd 100644 --- a/src/components/provider/__snapshots__/provider.test.tsx.snap +++ b/src/components/provider/__snapshots__/provider.test.tsx.snap @@ -20,6 +20,7 @@ exports[`EuiProvider applying modifications propagates \`modify\` 1`] = ` "key": "css", "nonce": undefined, "prepend": undefined, + "speedy": [Function], "tags": Array [], }, } @@ -379,6 +380,7 @@ exports[`EuiProvider changing color modes propagates \`colorMode\` 1`] = ` "key": "css", "nonce": undefined, "prepend": undefined, + "speedy": [Function], "tags": Array [], }, } @@ -727,6 +729,7 @@ exports[`EuiProvider is rendered 1`] = ` "key": "css", "nonce": undefined, "prepend": undefined, + "speedy": [Function], "tags": Array [], }, } @@ -1814,6 +1817,7 @@ exports[`EuiProvider providing an @emotion cache config applies the cache to glo "key": "css", "nonce": undefined, "prepend": undefined, + "speedy": [Function], "tags": Array [], }, } @@ -2184,6 +2188,7 @@ exports[`EuiProvider providing an @emotion cache config applies the cache to uti "key": "css", "nonce": undefined, "prepend": undefined, + "speedy": [Function], "tags": Array [], }, } @@ -2554,6 +2559,7 @@ exports[`EuiProvider providing an @emotion cache config provides a default cache "key": "css", "nonce": undefined, "prepend": undefined, + "speedy": [Function], "tags": Array [], }, } @@ -2901,6 +2907,7 @@ exports[`EuiProvider using \`null\` theme option does not add global styles 1`] "key": "css", "nonce": undefined, "prepend": undefined, + "speedy": [Function], "tags": Array [], }, } diff --git a/src/components/provider/provider.tsx b/src/components/provider/provider.tsx index 7fcebc9a280..84c2e662489 100644 --- a/src/components/provider/provider.tsx +++ b/src/components/provider/provider.tsx @@ -7,7 +7,7 @@ */ import React, { PropsWithChildren } from 'react'; -import createCache from '@emotion/cache'; +import { cache as fallbackCache } from '@emotion/css'; import { EmotionCache } from '@emotion/react'; import { @@ -28,9 +28,6 @@ const isEmotionCacheObject = ( obj: EmotionCache | Object ): obj is EmotionCache => obj.hasOwnProperty('key'); -const fallbackCache = createCache({ key: 'css' }); -fallbackCache.compat = true; - export interface EuiProviderProps extends Omit, 'children' | 'theme'>, EuiGlobalStylesProps { From d08a00b3e71741325eb212c3d8ee194d91bbbf6d Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Tue, 4 Oct 2022 10:57:48 -0700 Subject: [PATCH 5/9] [OPTIONAL] unrequire `@emotion/cache` as a peerDependency now that EuiProvider no longer needs it --- package.json | 1 - .../src/views/guidelines/getting_started/getting_started.js | 2 +- upcoming_changelogs/6288.md | 1 + wiki/consuming.md | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 6d92d57bcf9..ded6d329a92 100644 --- a/package.json +++ b/package.json @@ -254,7 +254,6 @@ }, "peerDependencies": { "@elastic/datemath": "^5.0.2", - "@emotion/cache": "11.x", "@emotion/react": "11.x", "@emotion/css": "11.x", "@types/react": "^16.9 || ^17.0", diff --git a/src-docs/src/views/guidelines/getting_started/getting_started.js b/src-docs/src/views/guidelines/getting_started/getting_started.js index 66bb34d5a61..1fe80c73a07 100644 --- a/src-docs/src/views/guidelines/getting_started/getting_started.js +++ b/src-docs/src/views/guidelines/getting_started/getting_started.js @@ -43,7 +43,7 @@ export const GettingStarted = { { - 'yarn add @elastic/eui @elastic/datemath @emotion/react @emotion/cache @emotion/css moment prop-types' + 'yarn add @elastic/eui @elastic/datemath @emotion/react @emotion/css moment prop-types' } diff --git a/upcoming_changelogs/6288.md b/upcoming_changelogs/6288.md index dfd4a51e36b..018e0a9b0ea 100644 --- a/upcoming_changelogs/6288.md +++ b/upcoming_changelogs/6288.md @@ -1,3 +1,4 @@ **Breaking changes** - `@emotion/css` is now a required peer dependency, alongside `@emotion/react` +- `@emotion/cache` is no longer required peer dependency, although your project must still use it if setting custom cache/injection locations diff --git a/wiki/consuming.md b/wiki/consuming.md index a0794578386..ce1d9525bca 100644 --- a/wiki/consuming.md +++ b/wiki/consuming.md @@ -11,7 +11,7 @@ yarn add @elastic/eui Note that EUI has [several `peerDependencies` requirements](package.json) that will also need to be installed if starting with a blank project. ```bash -yarn add @elastic/eui @elastic/datemath @emotion/react @emotion/cache @emotion/css moment prop-types +yarn add @elastic/eui @elastic/datemath @emotion/react @emotion/css moment prop-types ``` ## Requirements and dependencies From 04a81c6e47355e1b4a30f47c71dfa1d9f24a4330 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Tue, 4 Oct 2022 14:09:19 -0700 Subject: [PATCH 6/9] Convert EuiOverlayMask to `@emotion/css` - body overflow CSS still needs to be `@emotion/react`, and should be moved into a different file --- .../overlay_mask/overlay_mask.styles.ts | 44 +++++++------------ src/components/overlay_mask/overlay_mask.tsx | 17 +++---- .../overlay_mask/overlay_mask_body.styles.ts | 15 +++++++ 3 files changed, 38 insertions(+), 38 deletions(-) create mode 100644 src/components/overlay_mask/overlay_mask_body.styles.ts diff --git a/src/components/overlay_mask/overlay_mask.styles.ts b/src/components/overlay_mask/overlay_mask.styles.ts index 2590a4ac22a..469703508f9 100644 --- a/src/components/overlay_mask/overlay_mask.styles.ts +++ b/src/components/overlay_mask/overlay_mask.styles.ts @@ -6,42 +6,30 @@ * Side Public License, v 1. */ -import { css } from '@emotion/react'; +import { css } from '@emotion/css'; import { logicalCSS, euiAnimFadeIn } from '../../global_styling'; import { transparentize, UseEuiTheme } from '../../services'; export const euiOverlayMaskStyles = ({ euiTheme }: UseEuiTheme) => ({ euiOverlayMask: css` - .euiOverlayMask { - position: fixed; - ${logicalCSS('top', 0)} - ${logicalCSS('left', 0)} - ${logicalCSS('right', 0)} - ${logicalCSS('bottom', 0)} - display: flex; - align-items: center; - justify-content: center; - ${logicalCSS('padding-bottom', '10vh')}; - animation: ${euiAnimFadeIn} ${euiTheme.animation.fast} ease-in; - background: ${transparentize(euiTheme.colors.ink, 0.5)}; - } + position: fixed; + ${logicalCSS('top', 0)} + ${logicalCSS('left', 0)} + ${logicalCSS('right', 0)} + ${logicalCSS('bottom', 0)} + display: flex; + align-items: center; + justify-content: center; + ${logicalCSS('padding-bottom', '10vh')}; + animation: ${euiAnimFadeIn} ${euiTheme.animation.fast} ease-in; + background: ${transparentize(euiTheme.colors.ink, 0.5)}; `, aboveHeader: css` - .euiOverlayMask { - z-index: ${euiTheme.levels.mask}; - } + z-index: ${euiTheme.levels.mask}; `, belowHeader: css` - .euiOverlayMask { - z-index: ${euiTheme.levels.maskBelowHeader}; - // TODO: use size variable when EuiHeader is converted - ${logicalCSS('top', `${euiTheme.base * 3}px`)}; - } + z-index: ${euiTheme.levels.maskBelowHeader}; + // TODO: use size variable when EuiHeader is converted + ${logicalCSS('top', `${euiTheme.base * 3}px`)}; `, }); - -export const euiOverlayMaskBodyStyles = css` - body { - overflow: hidden; - } -`; diff --git a/src/components/overlay_mask/overlay_mask.tsx b/src/components/overlay_mask/overlay_mask.tsx index 2f6fe007ca7..cc2076d2934 100644 --- a/src/components/overlay_mask/overlay_mask.tsx +++ b/src/components/overlay_mask/overlay_mask.tsx @@ -20,15 +20,13 @@ import React, { useEffect, useState, } from 'react'; -import classNames from 'classnames'; +import { cx } from '@emotion/css'; import { Global } from '@emotion/react'; import { CommonProps, keysOf } from '../common'; import { useCombinedRefs, useEuiTheme } from '../../services'; import { EuiPortal } from '../portal'; -import { - euiOverlayMaskStyles, - euiOverlayMaskBodyStyles, -} from './overlay_mask.styles'; +import { euiOverlayMaskStyles } from './overlay_mask.styles'; +import { euiOverlayMaskBodyStyles } from './overlay_mask_body.styles'; export interface EuiOverlayMaskInterface { /** @@ -69,10 +67,10 @@ export const EuiOverlayMask: FunctionComponent = ({ ]); const euiTheme = useEuiTheme(); const styles = euiOverlayMaskStyles(euiTheme); - const cssStyles = [ + const cssStyles = cx([ styles.euiOverlayMask, styles[`${headerZindexLocation}Header`], - ]; + ]); useEffect(() => { if (!overlayMaskNode) return; @@ -90,13 +88,12 @@ export const EuiOverlayMask: FunctionComponent = ({ useEffect(() => { if (!overlayMaskNode) return; - overlayMaskNode.className = classNames('euiOverlayMask', className); - }, [overlayMaskNode, className]); + overlayMaskNode.className = cx('euiOverlayMask', cssStyles, className); + }, [overlayMaskNode, cssStyles, className]); return ( - {children} ); diff --git a/src/components/overlay_mask/overlay_mask_body.styles.ts b/src/components/overlay_mask/overlay_mask_body.styles.ts new file mode 100644 index 00000000000..4771ef6fb38 --- /dev/null +++ b/src/components/overlay_mask/overlay_mask_body.styles.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { css } from '@emotion/react'; + +export const euiOverlayMaskBodyStyles = css` + body { + overflow: hidden; + } +`; From ff5aaedbf6e98d9005b9fc866353441175b3b955 Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Tue, 4 Oct 2022 14:11:11 -0700 Subject: [PATCH 7/9] Remove incredibly annoying mounted snapshots --- .../__snapshots__/code_block.test.tsx.snap | 615 ++---------------- src/components/code/code_block.test.tsx | 8 +- 2 files changed, 45 insertions(+), 578 deletions(-) diff --git a/src/components/code/__snapshots__/code_block.test.tsx.snap b/src/components/code/__snapshots__/code_block.test.tsx.snap index 06a072e9d0f..0213356e3bd 100644 --- a/src/components/code/__snapshots__/code_block.test.tsx.snap +++ b/src/components/code/__snapshots__/code_block.test.tsx.snap @@ -42,40 +42,35 @@ exports[`EuiCodeBlock dynamic content updates DOM when input changes 2`] = ` exports[`EuiCodeBlock fullscreen displays content in fullscreen mode 1`] = `
     
       
         
           const
         
          value 
         
           =
         
          
         
           "hello"
         
@@ -83,234 +78,20 @@ exports[`EuiCodeBlock fullscreen displays content in fullscreen mode 1`] = `
     
   
- - - - - - +
`; @@ -556,349 +337,31 @@ exports[`EuiCodeBlock props fontSize s is rendered 1`] = ` `; exports[`EuiCodeBlock props isCopyable is rendered 1`] = ` - -
-
-      
-        
-          var some = 'code';
+        var some = 'code';
 
-        
-        
-          console.log(some);
-        
-      
-    
-
- + -
- - - - - - - - - - - , - "ctr": 5, - "insertionPoint": undefined, - "isSpeedy": false, - "key": "css", - "nonce": undefined, - "prepend": undefined, - "tags": Array [ - , - , - , - , - , - ], - }, - } - } - isStringTag={true} - serialized={ - Object { - "map": undefined, - "name": "jcaat8-euiToolTipAnchor-inlineBlock", - "next": undefined, - "styles": "*[disabled]{pointer-events:none;};label:euiToolTipAnchor;;;display:inline-block;label:inlineBlock;;;", - "toString": [Function], - } - } - /> - - - - - - - - - - -
-
-
-
-
+ console.log(some); + + + + `; exports[`EuiCodeBlock props language is rendered 1`] = ` diff --git a/src/components/code/code_block.test.tsx b/src/components/code/code_block.test.tsx index cba5695f420..5bb19463abd 100644 --- a/src/components/code/code_block.test.tsx +++ b/src/components/code/code_block.test.tsx @@ -39,7 +39,9 @@ describe('EuiCodeBlock', () => { describe('isCopyable', () => { it('is rendered', () => { - const component = mount({code}); + const component = render( + {code} + ); expect(component).toMatchSnapshot(); }); @@ -161,7 +163,9 @@ describe('EuiCodeBlock', () => { component.find('button[aria-label="Expand"]').simulate('click'); component.update(); - expect(component.find('.euiCodeBlock-isFullScreen')).toMatchSnapshot(); + expect( + component.find('.euiCodeBlock-isFullScreen').render() + ).toMatchSnapshot(); }); it('closes fullscreen mode when the escape key is pressed', () => { From 14fdc1990bbfffb41bf5c3f5c9125ba95492a8bb Mon Sep 17 00:00:00 2001 From: Chandler Prall Date: Wed, 5 Oct 2022 09:15:17 -0600 Subject: [PATCH 8/9] consolidated some yarn.lock entries --- yarn.lock | 79 +++++-------------------------------------------------- 1 file changed, 6 insertions(+), 73 deletions(-) diff --git a/yarn.lock b/yarn.lock index dd6a59e98d6..a77a176ff7c 100755 --- a/yarn.lock +++ b/yarn.lock @@ -307,17 +307,7 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz#aa3a8ab4c3cceff8e65eb9e73d87dc4ff320b2f5" - integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== - -"@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz#4b8aea3b069d8cb8a72cdfe28ddf5ceca695ef2f" - integrity sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w== - -"@babel/helper-plugin-utils@^7.19.0": +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.19.0" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz#4796bb14961521f0f8715990bee2fb6e51ce21bf" integrity sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw== @@ -382,12 +372,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== -"@babel/helper-validator-identifier@^7.15.7", "@babel/helper-validator-identifier@^7.16.7", "@babel/helper-validator-identifier@^7.18.6": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" - integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== - -"@babel/helper-validator-identifier@^7.19.1": +"@babel/helper-validator-identifier@^7.15.7", "@babel/helper-validator-identifier@^7.16.7", "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": version "7.19.1" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2" integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== @@ -635,13 +620,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-jsx@^7.16.0": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz#50b6571d13f764266a113d77c82b4a6508bbe665" - integrity sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.16.7" - "@babel/plugin-syntax-jsx@^7.17.12", "@babel/plugin-syntax-jsx@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz#a8feef63b010150abd97f1649ec296e849943ca0" @@ -909,32 +887,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-transform-react-jsx-development@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.0.tgz#1cb52874678d23ab11d0d16488d54730807303ef" - integrity sha512-qq65iSqBRq0Hr3wq57YG2AmW0H6wgTnIzpffTphrUWUgLCOK+zf1f7G0vuOiXrp7dU1qq+fQBoqZ3wCDAkhFzw== - dependencies: - "@babel/plugin-transform-react-jsx" "^7.16.0" - -"@babel/plugin-transform-react-jsx-development@^7.18.6": +"@babel/plugin-transform-react-jsx-development@^7.16.0", "@babel/plugin-transform-react-jsx-development@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz#dbe5c972811e49c7405b630e4d0d2e1380c0ddc5" integrity sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA== dependencies: "@babel/plugin-transform-react-jsx" "^7.18.6" -"@babel/plugin-transform-react-jsx@^7.16.0": - version "7.16.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.16.0.tgz#55b797d4960c3de04e07ad1c0476e2bc6a4889f1" - integrity sha512-rqDgIbukZ44pqq7NIRPGPGNklshPkvlmvqjdx3OZcGPk4zGIenYkxDTvl3LsSL8gqcc3ZzGmXPE6hR/u/voNOw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.16.0" - "@babel/helper-module-imports" "^7.16.0" - "@babel/helper-plugin-utils" "^7.14.5" - "@babel/plugin-syntax-jsx" "^7.16.0" - "@babel/types" "^7.16.0" - -"@babel/plugin-transform-react-jsx@^7.17.12": +"@babel/plugin-transform-react-jsx@^7.16.0", "@babel/plugin-transform-react-jsx@^7.17.12", "@babel/plugin-transform-react-jsx@^7.18.6": version "7.19.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.19.0.tgz#b3cbb7c3a00b92ec8ae1027910e331ba5c500eb9" integrity sha512-UVEvX3tXie3Szm3emi1+G63jyw1w5IcMY0FSKM+CRnKRI5Mr1YbCNgsSTwoTwKphQEG9P+QqmuRFneJPZuHNhg== @@ -945,17 +905,6 @@ "@babel/plugin-syntax-jsx" "^7.18.6" "@babel/types" "^7.19.0" -"@babel/plugin-transform-react-jsx@^7.18.6": - version "7.18.10" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.18.10.tgz#ea47b2c4197102c196cbd10db9b3bb20daa820f1" - integrity sha512-gCy7Iikrpu3IZjYZolFE4M1Sm+nrh1/6za2Ewj77Z+XirT4TsbJcvOFOyF+fRPwU6AKKK136CZxx6L8AbSFG6A== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/plugin-syntax-jsx" "^7.18.6" - "@babel/types" "^7.18.10" - "@babel/plugin-transform-react-pure-annotations@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.0.tgz#23db6ddf558d8abde41b8ad9d59f48ad5532ccab" @@ -1198,14 +1147,7 @@ core-js-pure "^3.0.0" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": - version "7.18.9" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a" - integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw== - dependencies: - regenerator-runtime "^0.13.4" - -"@babel/runtime@^7.18.3": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.16.3", "@babel/runtime@^7.18.3", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": version "7.19.0" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.0.tgz#22b11c037b094d27a8a2504ea4dcff00f50e2259" integrity sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA== @@ -1270,16 +1212,7 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" -"@babel/types@^7.13.0", "@babel/types@^7.18.10", "@babel/types@^7.18.13", "@babel/types@^7.18.6", "@babel/types@^7.18.9": - version "7.18.13" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.13.tgz#30aeb9e514f4100f7c1cb6e5ba472b30e48f519a" - integrity sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ== - dependencies: - "@babel/helper-string-parser" "^7.18.10" - "@babel/helper-validator-identifier" "^7.18.6" - to-fast-properties "^2.0.0" - -"@babel/types@^7.19.0": +"@babel/types@^7.13.0", "@babel/types@^7.18.10", "@babel/types@^7.18.13", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0": version "7.19.3" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.3.tgz#fc420e6bbe54880bce6779ffaf315f5e43ec9624" integrity sha512-hGCaQzIY22DJlDh9CH7NOxgKkFjBk0Cw9xDO1Xmh2151ti7wiGfQ3LauXzL4HP1fmFlTX6XjpRETTpUcv7wQLw== From 516fe7b73a562516e5f4ac6817387b510224198c Mon Sep 17 00:00:00 2001 From: Constance Chen Date: Wed, 5 Oct 2022 11:01:03 -0700 Subject: [PATCH 9/9] "Fix" type reference to use `@emotion/css` instead of `@emotion/cache` --- src/components/provider/cache/cache_provider.tsx | 2 +- src/components/provider/provider.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/provider/cache/cache_provider.tsx b/src/components/provider/cache/cache_provider.tsx index 7c0bd618ce8..fd13f847a11 100644 --- a/src/components/provider/cache/cache_provider.tsx +++ b/src/components/provider/cache/cache_provider.tsx @@ -7,7 +7,7 @@ */ import React, { PropsWithChildren } from 'react'; -import { EmotionCache } from '@emotion/cache'; +import { EmotionCache } from '@emotion/css'; import { CacheProvider } from '@emotion/react'; export interface EuiCacheProviderProps { diff --git a/src/components/provider/provider.tsx b/src/components/provider/provider.tsx index 84c2e662489..50b4c29f17b 100644 --- a/src/components/provider/provider.tsx +++ b/src/components/provider/provider.tsx @@ -7,8 +7,7 @@ */ import React, { PropsWithChildren } from 'react'; -import { cache as fallbackCache } from '@emotion/css'; -import { EmotionCache } from '@emotion/react'; +import { cache as fallbackCache, EmotionCache } from '@emotion/css'; import { EuiGlobalStyles,