diff --git a/.depcheckrc.yml b/.depcheckrc.yml index 04887ebd118a..cb90e46df5a2 100644 --- a/.depcheckrc.yml +++ b/.depcheckrc.yml @@ -11,13 +11,10 @@ ignores: - 'react-compiler-runtime' - '@fortawesome/fontawesome-free' - 'punycode' - # peer deps of @mui/material v5, consumed internally by MUI (not imported directly) + # peer deps of @mui/material v5; no direct imports in app source (MUI resolves them) - '@emotion/react' - '@emotion/styled' - # v5 pre-installed ahead of migration from @material-ui/core (v4 path); - # imports switch to @mui/material in the migration branch - - '@mui/material' - # future use for Snaps date pickers; v7 supports React 17 + MUI v5 + # present for upcoming date-picker migration; not imported yet — depcheck would flag unused - '@mui/x-date-pickers' # @@ -116,8 +113,6 @@ ignores: - '@metamask/institutional-wallet-snap' - '@metamask/gator-permissions-snap' - '@metamask/permissions-kernel-snap' - # perps poc - - '@metamask/perps-controller' # files depcheck should not parse ignorePatterns: diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index dba6bcd9a3e3..f77b1388c4ef 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -15,6 +15,79 @@ "luxon": true } }, + "@emotion/react>@emotion/cache": { + "globals": { + "document": false + }, + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/cache>@emotion/sheet": true, + "@emotion/react>@emotion/weak-memoize": true, + "@emotion/react>@emotion/cache>stylis": true + } + }, + "@emotion/styled>@emotion/is-prop-valid": { + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true + } + }, + "@emotion/react": { + "globals": { + "HTMLElement": true, + "document": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "@emotion/react>@emotion/weak-memoize": true, + "react-redux>hoist-non-react-statics": true, + "react": true + } + }, + "@emotion/react>@emotion/serialize": { + "packages": { + "@emotion/react>@emotion/serialize>@emotion/hash": true, + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/serialize>@emotion/unitless": true + } + }, + "@emotion/react>@emotion/cache>@emotion/sheet": { + "globals": { + "document.createElement": true, + "document.createTextNode": true, + "document.styleSheets": true + } + }, + "@emotion/styled": { + "globals": { + "document": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/styled>@emotion/is-prop-valid": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "react": true + } + }, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": { + "globals": { + "document": true + }, + "packages": { + "react": true + } + }, + "@emotion/react>@emotion/utils": { + "globals": { + "document": true + } + }, "@ensdomains/content-hash": { "globals": { "console.warn": true @@ -711,7 +784,6 @@ "@material-ui/core>@material-ui/system": true, "@material-ui/core>@material-ui/utils": true, "@material-ui/core>clsx": true, - "@material-ui/core>popper.js": true, "prop-types": true, "react": true, "react-dom": true, @@ -2672,6 +2744,102 @@ "semver": true } }, + "@mui/material": { + "globals": { + "DocumentFragment": true, + "ResizeObserver": true, + "addEventListener": true, + "cancelAnimationFrame": true, + "clearInterval": true, + "console.error": true, + "console.warn": true, + "document.addEventListener": true, + "document.body": true, + "document.removeEventListener": true, + "getSelection": true, + "navigator": true, + "performance.now": true, + "removeEventListener": true, + "requestAnimationFrame": true, + "setInterval": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system": true, + "@mui/material>@mui/utils": true, + "@popperjs/core": true, + "clsx": true, + "prop-types": true, + "react": true, + "react-dom": true, + "@mui/material>react-is": true, + "react-transition-group": true + } + }, + "@mui/material>@mui/system>@mui/private-theming": { + "globals": { + "console.error": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/utils": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system>@mui/styled-engine": { + "globals": { + "console.error": true, + "document": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/styled": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system": { + "globals": { + "clearTimeout": true, + "console.error": true, + "console.warn": true, + "document": true, + "getComputedStyle": true, + "localStorage.getItem": true, + "localStorage.setItem": true, + "matchMedia": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system>@mui/private-theming": true, + "@mui/material>@mui/system>@mui/styled-engine": true, + "@mui/material>@mui/utils": true, + "clsx": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/utils": { + "globals": { + "clearTimeout": true, + "console.error": true, + "document": true, + "innerWidth": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "clsx": true, + "prop-types": true, + "react": true, + "@mui/material>@mui/utils>react-is": true + } + }, "@ngraveio/bc-ur": { "packages": { "@ngraveio/bc-ur>@keystonehq/alias-sampling": true, @@ -5446,23 +5614,6 @@ "@ngraveio/bc-ur>sha.js>to-buffer": true } }, - "@material-ui/core>popper.js": { - "globals": { - "MSInputMethodContext": true, - "Node.DOCUMENT_POSITION_FOLLOWING": true, - "cancelAnimationFrame": true, - "console.warn": true, - "define": true, - "devicePixelRatio": true, - "document": true, - "getComputedStyle": true, - "innerHeight": true, - "innerWidth": true, - "navigator": true, - "requestAnimationFrame": true, - "setTimeout": true - } - }, "react-tippy>popper.js": { "globals": { "MSInputMethodContext": true, @@ -6389,6 +6540,11 @@ "react-markdown>style-to-object>inline-style-parser": true } }, + "@emotion/react>@emotion/cache>stylis": { + "globals": { + "define": true + } + }, "@metamask/snaps-controllers>tar-stream": { "packages": { "@metamask/snaps-controllers>tar-stream>b4a": true, diff --git a/lavamoat/browserify/experimental/policy.json b/lavamoat/browserify/experimental/policy.json index dba6bcd9a3e3..f77b1388c4ef 100644 --- a/lavamoat/browserify/experimental/policy.json +++ b/lavamoat/browserify/experimental/policy.json @@ -15,6 +15,79 @@ "luxon": true } }, + "@emotion/react>@emotion/cache": { + "globals": { + "document": false + }, + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/cache>@emotion/sheet": true, + "@emotion/react>@emotion/weak-memoize": true, + "@emotion/react>@emotion/cache>stylis": true + } + }, + "@emotion/styled>@emotion/is-prop-valid": { + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true + } + }, + "@emotion/react": { + "globals": { + "HTMLElement": true, + "document": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "@emotion/react>@emotion/weak-memoize": true, + "react-redux>hoist-non-react-statics": true, + "react": true + } + }, + "@emotion/react>@emotion/serialize": { + "packages": { + "@emotion/react>@emotion/serialize>@emotion/hash": true, + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/serialize>@emotion/unitless": true + } + }, + "@emotion/react>@emotion/cache>@emotion/sheet": { + "globals": { + "document.createElement": true, + "document.createTextNode": true, + "document.styleSheets": true + } + }, + "@emotion/styled": { + "globals": { + "document": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/styled>@emotion/is-prop-valid": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "react": true + } + }, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": { + "globals": { + "document": true + }, + "packages": { + "react": true + } + }, + "@emotion/react>@emotion/utils": { + "globals": { + "document": true + } + }, "@ensdomains/content-hash": { "globals": { "console.warn": true @@ -711,7 +784,6 @@ "@material-ui/core>@material-ui/system": true, "@material-ui/core>@material-ui/utils": true, "@material-ui/core>clsx": true, - "@material-ui/core>popper.js": true, "prop-types": true, "react": true, "react-dom": true, @@ -2672,6 +2744,102 @@ "semver": true } }, + "@mui/material": { + "globals": { + "DocumentFragment": true, + "ResizeObserver": true, + "addEventListener": true, + "cancelAnimationFrame": true, + "clearInterval": true, + "console.error": true, + "console.warn": true, + "document.addEventListener": true, + "document.body": true, + "document.removeEventListener": true, + "getSelection": true, + "navigator": true, + "performance.now": true, + "removeEventListener": true, + "requestAnimationFrame": true, + "setInterval": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system": true, + "@mui/material>@mui/utils": true, + "@popperjs/core": true, + "clsx": true, + "prop-types": true, + "react": true, + "react-dom": true, + "@mui/material>react-is": true, + "react-transition-group": true + } + }, + "@mui/material>@mui/system>@mui/private-theming": { + "globals": { + "console.error": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/utils": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system>@mui/styled-engine": { + "globals": { + "console.error": true, + "document": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/styled": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system": { + "globals": { + "clearTimeout": true, + "console.error": true, + "console.warn": true, + "document": true, + "getComputedStyle": true, + "localStorage.getItem": true, + "localStorage.setItem": true, + "matchMedia": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system>@mui/private-theming": true, + "@mui/material>@mui/system>@mui/styled-engine": true, + "@mui/material>@mui/utils": true, + "clsx": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/utils": { + "globals": { + "clearTimeout": true, + "console.error": true, + "document": true, + "innerWidth": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "clsx": true, + "prop-types": true, + "react": true, + "@mui/material>@mui/utils>react-is": true + } + }, "@ngraveio/bc-ur": { "packages": { "@ngraveio/bc-ur>@keystonehq/alias-sampling": true, @@ -5446,23 +5614,6 @@ "@ngraveio/bc-ur>sha.js>to-buffer": true } }, - "@material-ui/core>popper.js": { - "globals": { - "MSInputMethodContext": true, - "Node.DOCUMENT_POSITION_FOLLOWING": true, - "cancelAnimationFrame": true, - "console.warn": true, - "define": true, - "devicePixelRatio": true, - "document": true, - "getComputedStyle": true, - "innerHeight": true, - "innerWidth": true, - "navigator": true, - "requestAnimationFrame": true, - "setTimeout": true - } - }, "react-tippy>popper.js": { "globals": { "MSInputMethodContext": true, @@ -6389,6 +6540,11 @@ "react-markdown>style-to-object>inline-style-parser": true } }, + "@emotion/react>@emotion/cache>stylis": { + "globals": { + "define": true + } + }, "@metamask/snaps-controllers>tar-stream": { "packages": { "@metamask/snaps-controllers>tar-stream>b4a": true, diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index dba6bcd9a3e3..f77b1388c4ef 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -15,6 +15,79 @@ "luxon": true } }, + "@emotion/react>@emotion/cache": { + "globals": { + "document": false + }, + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/cache>@emotion/sheet": true, + "@emotion/react>@emotion/weak-memoize": true, + "@emotion/react>@emotion/cache>stylis": true + } + }, + "@emotion/styled>@emotion/is-prop-valid": { + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true + } + }, + "@emotion/react": { + "globals": { + "HTMLElement": true, + "document": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "@emotion/react>@emotion/weak-memoize": true, + "react-redux>hoist-non-react-statics": true, + "react": true + } + }, + "@emotion/react>@emotion/serialize": { + "packages": { + "@emotion/react>@emotion/serialize>@emotion/hash": true, + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/serialize>@emotion/unitless": true + } + }, + "@emotion/react>@emotion/cache>@emotion/sheet": { + "globals": { + "document.createElement": true, + "document.createTextNode": true, + "document.styleSheets": true + } + }, + "@emotion/styled": { + "globals": { + "document": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/styled>@emotion/is-prop-valid": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "react": true + } + }, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": { + "globals": { + "document": true + }, + "packages": { + "react": true + } + }, + "@emotion/react>@emotion/utils": { + "globals": { + "document": true + } + }, "@ensdomains/content-hash": { "globals": { "console.warn": true @@ -711,7 +784,6 @@ "@material-ui/core>@material-ui/system": true, "@material-ui/core>@material-ui/utils": true, "@material-ui/core>clsx": true, - "@material-ui/core>popper.js": true, "prop-types": true, "react": true, "react-dom": true, @@ -2672,6 +2744,102 @@ "semver": true } }, + "@mui/material": { + "globals": { + "DocumentFragment": true, + "ResizeObserver": true, + "addEventListener": true, + "cancelAnimationFrame": true, + "clearInterval": true, + "console.error": true, + "console.warn": true, + "document.addEventListener": true, + "document.body": true, + "document.removeEventListener": true, + "getSelection": true, + "navigator": true, + "performance.now": true, + "removeEventListener": true, + "requestAnimationFrame": true, + "setInterval": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system": true, + "@mui/material>@mui/utils": true, + "@popperjs/core": true, + "clsx": true, + "prop-types": true, + "react": true, + "react-dom": true, + "@mui/material>react-is": true, + "react-transition-group": true + } + }, + "@mui/material>@mui/system>@mui/private-theming": { + "globals": { + "console.error": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/utils": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system>@mui/styled-engine": { + "globals": { + "console.error": true, + "document": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/styled": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system": { + "globals": { + "clearTimeout": true, + "console.error": true, + "console.warn": true, + "document": true, + "getComputedStyle": true, + "localStorage.getItem": true, + "localStorage.setItem": true, + "matchMedia": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system>@mui/private-theming": true, + "@mui/material>@mui/system>@mui/styled-engine": true, + "@mui/material>@mui/utils": true, + "clsx": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/utils": { + "globals": { + "clearTimeout": true, + "console.error": true, + "document": true, + "innerWidth": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "clsx": true, + "prop-types": true, + "react": true, + "@mui/material>@mui/utils>react-is": true + } + }, "@ngraveio/bc-ur": { "packages": { "@ngraveio/bc-ur>@keystonehq/alias-sampling": true, @@ -5446,23 +5614,6 @@ "@ngraveio/bc-ur>sha.js>to-buffer": true } }, - "@material-ui/core>popper.js": { - "globals": { - "MSInputMethodContext": true, - "Node.DOCUMENT_POSITION_FOLLOWING": true, - "cancelAnimationFrame": true, - "console.warn": true, - "define": true, - "devicePixelRatio": true, - "document": true, - "getComputedStyle": true, - "innerHeight": true, - "innerWidth": true, - "navigator": true, - "requestAnimationFrame": true, - "setTimeout": true - } - }, "react-tippy>popper.js": { "globals": { "MSInputMethodContext": true, @@ -6389,6 +6540,11 @@ "react-markdown>style-to-object>inline-style-parser": true } }, + "@emotion/react>@emotion/cache>stylis": { + "globals": { + "define": true + } + }, "@metamask/snaps-controllers>tar-stream": { "packages": { "@metamask/snaps-controllers>tar-stream>b4a": true, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index dba6bcd9a3e3..f77b1388c4ef 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -15,6 +15,79 @@ "luxon": true } }, + "@emotion/react>@emotion/cache": { + "globals": { + "document": false + }, + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/cache>@emotion/sheet": true, + "@emotion/react>@emotion/weak-memoize": true, + "@emotion/react>@emotion/cache>stylis": true + } + }, + "@emotion/styled>@emotion/is-prop-valid": { + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true + } + }, + "@emotion/react": { + "globals": { + "HTMLElement": true, + "document": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "@emotion/react>@emotion/weak-memoize": true, + "react-redux>hoist-non-react-statics": true, + "react": true + } + }, + "@emotion/react>@emotion/serialize": { + "packages": { + "@emotion/react>@emotion/serialize>@emotion/hash": true, + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/serialize>@emotion/unitless": true + } + }, + "@emotion/react>@emotion/cache>@emotion/sheet": { + "globals": { + "document.createElement": true, + "document.createTextNode": true, + "document.styleSheets": true + } + }, + "@emotion/styled": { + "globals": { + "document": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/styled>@emotion/is-prop-valid": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "react": true + } + }, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": { + "globals": { + "document": true + }, + "packages": { + "react": true + } + }, + "@emotion/react>@emotion/utils": { + "globals": { + "document": true + } + }, "@ensdomains/content-hash": { "globals": { "console.warn": true @@ -711,7 +784,6 @@ "@material-ui/core>@material-ui/system": true, "@material-ui/core>@material-ui/utils": true, "@material-ui/core>clsx": true, - "@material-ui/core>popper.js": true, "prop-types": true, "react": true, "react-dom": true, @@ -2672,6 +2744,102 @@ "semver": true } }, + "@mui/material": { + "globals": { + "DocumentFragment": true, + "ResizeObserver": true, + "addEventListener": true, + "cancelAnimationFrame": true, + "clearInterval": true, + "console.error": true, + "console.warn": true, + "document.addEventListener": true, + "document.body": true, + "document.removeEventListener": true, + "getSelection": true, + "navigator": true, + "performance.now": true, + "removeEventListener": true, + "requestAnimationFrame": true, + "setInterval": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system": true, + "@mui/material>@mui/utils": true, + "@popperjs/core": true, + "clsx": true, + "prop-types": true, + "react": true, + "react-dom": true, + "@mui/material>react-is": true, + "react-transition-group": true + } + }, + "@mui/material>@mui/system>@mui/private-theming": { + "globals": { + "console.error": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/utils": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system>@mui/styled-engine": { + "globals": { + "console.error": true, + "document": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/styled": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system": { + "globals": { + "clearTimeout": true, + "console.error": true, + "console.warn": true, + "document": true, + "getComputedStyle": true, + "localStorage.getItem": true, + "localStorage.setItem": true, + "matchMedia": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system>@mui/private-theming": true, + "@mui/material>@mui/system>@mui/styled-engine": true, + "@mui/material>@mui/utils": true, + "clsx": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/utils": { + "globals": { + "clearTimeout": true, + "console.error": true, + "document": true, + "innerWidth": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "clsx": true, + "prop-types": true, + "react": true, + "@mui/material>@mui/utils>react-is": true + } + }, "@ngraveio/bc-ur": { "packages": { "@ngraveio/bc-ur>@keystonehq/alias-sampling": true, @@ -5446,23 +5614,6 @@ "@ngraveio/bc-ur>sha.js>to-buffer": true } }, - "@material-ui/core>popper.js": { - "globals": { - "MSInputMethodContext": true, - "Node.DOCUMENT_POSITION_FOLLOWING": true, - "cancelAnimationFrame": true, - "console.warn": true, - "define": true, - "devicePixelRatio": true, - "document": true, - "getComputedStyle": true, - "innerHeight": true, - "innerWidth": true, - "navigator": true, - "requestAnimationFrame": true, - "setTimeout": true - } - }, "react-tippy>popper.js": { "globals": { "MSInputMethodContext": true, @@ -6389,6 +6540,11 @@ "react-markdown>style-to-object>inline-style-parser": true } }, + "@emotion/react>@emotion/cache>stylis": { + "globals": { + "define": true + } + }, "@metamask/snaps-controllers>tar-stream": { "packages": { "@metamask/snaps-controllers>tar-stream>b4a": true, diff --git a/lavamoat/browserify/policy-override.json b/lavamoat/browserify/policy-override.json index 56073cdfd74e..14593dd5b4fd 100644 --- a/lavamoat/browserify/policy-override.json +++ b/lavamoat/browserify/policy-override.json @@ -145,6 +145,13 @@ "WorkerGlobalScope": false, "importScripts": false } + }, + "@emotion/react>@emotion/cache": { + "globals": { + "document": false, + "document.head": true, + "document.querySelectorAll": true + } } } } diff --git a/lavamoat/webpack/mv2/beta/policy.json b/lavamoat/webpack/mv2/beta/policy.json index 49c5d7b67ce9..a2df7bde7fd4 100644 --- a/lavamoat/webpack/mv2/beta/policy.json +++ b/lavamoat/webpack/mv2/beta/policy.json @@ -15,6 +15,69 @@ "luxon": true } }, + "@emotion/react>@emotion/cache": { + "globals": { + "document.head": true, + "document.querySelectorAll": true + }, + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/cache>@emotion/sheet": true, + "@emotion/react>@emotion/weak-memoize": true, + "@emotion/react>@emotion/cache>stylis": true + } + }, + "@emotion/styled>@emotion/is-prop-valid": { + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true + } + }, + "@emotion/react": { + "globals": { + "HTMLElement": true, + "document.querySelector": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "@emotion/react>@emotion/weak-memoize": true, + "react-redux>hoist-non-react-statics": true, + "react": true + } + }, + "@emotion/react>@emotion/serialize": { + "packages": { + "@emotion/react>@emotion/serialize>@emotion/hash": true, + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/serialize>@emotion/unitless": true + } + }, + "@emotion/react>@emotion/cache>@emotion/sheet": { + "globals": { + "document.createElement": true, + "document.createTextNode": true, + "document.styleSheets": true + } + }, + "@emotion/styled": { + "packages": { + "@babel/runtime": true, + "@emotion/styled>@emotion/is-prop-valid": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "react": true + } + }, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": { + "packages": { + "react": true + } + }, "@ensdomains/content-hash": { "globals": { "Buffer.from": true, @@ -655,7 +718,6 @@ "@material-ui/core>@material-ui/system": true, "@material-ui/core>@material-ui/utils": true, "@material-ui/core>clsx": true, - "@material-ui/core>popper.js": true, "prop-types": true, "react": true, "react-dom": true, @@ -2414,6 +2476,86 @@ "semver": true } }, + "@mui/material": { + "globals": { + "DocumentFragment": true, + "ResizeObserver": true, + "addEventListener": true, + "cancelAnimationFrame": true, + "clearInterval": true, + "console.error": true, + "console.warn": true, + "document.addEventListener": true, + "document.body": true, + "document.removeEventListener": true, + "getSelection": true, + "navigator": true, + "performance.now": true, + "removeEventListener": true, + "requestAnimationFrame": true, + "setInterval": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system": true, + "@mui/material>@mui/utils": true, + "@popperjs/core": true, + "clsx": true, + "prop-types": true, + "react": true, + "react-dom": true, + "@mui/material>react-is": true, + "react-transition-group": true + } + }, + "@mui/material>@mui/system>@mui/styled-engine": { + "globals": { + "console.error": true, + "document": true + }, + "packages": { + "@emotion/react>@emotion/cache": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/styled": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system": { + "globals": { + "console.error": true, + "console.warn": true + }, + "meta": { + "webpack-optimization": [ + "Dependency '@mui/material>@mui/system>@mui/styled-engine' reexports from '@emotion/react' and webpack collapsed that to a direct import." + ] + }, + "packages": { + "@babel/runtime": true, + "@emotion/react": true, + "@mui/material>@mui/system>@mui/styled-engine": true, + "@mui/material>@mui/utils": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/utils": { + "globals": { + "clearTimeout": true, + "console.error": true, + "document": true, + "innerWidth": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "clsx": true, + "react": true, + "@mui/material>@mui/utils>react-is": true + } + }, "@ngraveio/bc-ur": { "globals": { "Buffer.alloc": true, @@ -5213,22 +5355,6 @@ "@ngraveio/bc-ur>sha.js>to-buffer": true } }, - "@material-ui/core>popper.js": { - "globals": { - "MSInputMethodContext": true, - "Node.DOCUMENT_POSITION_FOLLOWING": true, - "cancelAnimationFrame": true, - "console.warn": true, - "devicePixelRatio": true, - "document": true, - "getComputedStyle": true, - "innerHeight": true, - "innerWidth": true, - "navigator": true, - "requestAnimationFrame": true, - "setTimeout": true - } - }, "react-tippy>popper.js": { "globals": { "MSInputMethodContext": true, diff --git a/lavamoat/webpack/mv2/experimental/policy.json b/lavamoat/webpack/mv2/experimental/policy.json index 49c5d7b67ce9..a2df7bde7fd4 100644 --- a/lavamoat/webpack/mv2/experimental/policy.json +++ b/lavamoat/webpack/mv2/experimental/policy.json @@ -15,6 +15,69 @@ "luxon": true } }, + "@emotion/react>@emotion/cache": { + "globals": { + "document.head": true, + "document.querySelectorAll": true + }, + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/cache>@emotion/sheet": true, + "@emotion/react>@emotion/weak-memoize": true, + "@emotion/react>@emotion/cache>stylis": true + } + }, + "@emotion/styled>@emotion/is-prop-valid": { + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true + } + }, + "@emotion/react": { + "globals": { + "HTMLElement": true, + "document.querySelector": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "@emotion/react>@emotion/weak-memoize": true, + "react-redux>hoist-non-react-statics": true, + "react": true + } + }, + "@emotion/react>@emotion/serialize": { + "packages": { + "@emotion/react>@emotion/serialize>@emotion/hash": true, + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/serialize>@emotion/unitless": true + } + }, + "@emotion/react>@emotion/cache>@emotion/sheet": { + "globals": { + "document.createElement": true, + "document.createTextNode": true, + "document.styleSheets": true + } + }, + "@emotion/styled": { + "packages": { + "@babel/runtime": true, + "@emotion/styled>@emotion/is-prop-valid": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "react": true + } + }, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": { + "packages": { + "react": true + } + }, "@ensdomains/content-hash": { "globals": { "Buffer.from": true, @@ -655,7 +718,6 @@ "@material-ui/core>@material-ui/system": true, "@material-ui/core>@material-ui/utils": true, "@material-ui/core>clsx": true, - "@material-ui/core>popper.js": true, "prop-types": true, "react": true, "react-dom": true, @@ -2414,6 +2476,86 @@ "semver": true } }, + "@mui/material": { + "globals": { + "DocumentFragment": true, + "ResizeObserver": true, + "addEventListener": true, + "cancelAnimationFrame": true, + "clearInterval": true, + "console.error": true, + "console.warn": true, + "document.addEventListener": true, + "document.body": true, + "document.removeEventListener": true, + "getSelection": true, + "navigator": true, + "performance.now": true, + "removeEventListener": true, + "requestAnimationFrame": true, + "setInterval": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system": true, + "@mui/material>@mui/utils": true, + "@popperjs/core": true, + "clsx": true, + "prop-types": true, + "react": true, + "react-dom": true, + "@mui/material>react-is": true, + "react-transition-group": true + } + }, + "@mui/material>@mui/system>@mui/styled-engine": { + "globals": { + "console.error": true, + "document": true + }, + "packages": { + "@emotion/react>@emotion/cache": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/styled": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system": { + "globals": { + "console.error": true, + "console.warn": true + }, + "meta": { + "webpack-optimization": [ + "Dependency '@mui/material>@mui/system>@mui/styled-engine' reexports from '@emotion/react' and webpack collapsed that to a direct import." + ] + }, + "packages": { + "@babel/runtime": true, + "@emotion/react": true, + "@mui/material>@mui/system>@mui/styled-engine": true, + "@mui/material>@mui/utils": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/utils": { + "globals": { + "clearTimeout": true, + "console.error": true, + "document": true, + "innerWidth": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "clsx": true, + "react": true, + "@mui/material>@mui/utils>react-is": true + } + }, "@ngraveio/bc-ur": { "globals": { "Buffer.alloc": true, @@ -5213,22 +5355,6 @@ "@ngraveio/bc-ur>sha.js>to-buffer": true } }, - "@material-ui/core>popper.js": { - "globals": { - "MSInputMethodContext": true, - "Node.DOCUMENT_POSITION_FOLLOWING": true, - "cancelAnimationFrame": true, - "console.warn": true, - "devicePixelRatio": true, - "document": true, - "getComputedStyle": true, - "innerHeight": true, - "innerWidth": true, - "navigator": true, - "requestAnimationFrame": true, - "setTimeout": true - } - }, "react-tippy>popper.js": { "globals": { "MSInputMethodContext": true, diff --git a/lavamoat/webpack/mv2/flask/policy.json b/lavamoat/webpack/mv2/flask/policy.json index 49c5d7b67ce9..a2df7bde7fd4 100644 --- a/lavamoat/webpack/mv2/flask/policy.json +++ b/lavamoat/webpack/mv2/flask/policy.json @@ -15,6 +15,69 @@ "luxon": true } }, + "@emotion/react>@emotion/cache": { + "globals": { + "document.head": true, + "document.querySelectorAll": true + }, + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/cache>@emotion/sheet": true, + "@emotion/react>@emotion/weak-memoize": true, + "@emotion/react>@emotion/cache>stylis": true + } + }, + "@emotion/styled>@emotion/is-prop-valid": { + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true + } + }, + "@emotion/react": { + "globals": { + "HTMLElement": true, + "document.querySelector": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "@emotion/react>@emotion/weak-memoize": true, + "react-redux>hoist-non-react-statics": true, + "react": true + } + }, + "@emotion/react>@emotion/serialize": { + "packages": { + "@emotion/react>@emotion/serialize>@emotion/hash": true, + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/serialize>@emotion/unitless": true + } + }, + "@emotion/react>@emotion/cache>@emotion/sheet": { + "globals": { + "document.createElement": true, + "document.createTextNode": true, + "document.styleSheets": true + } + }, + "@emotion/styled": { + "packages": { + "@babel/runtime": true, + "@emotion/styled>@emotion/is-prop-valid": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "react": true + } + }, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": { + "packages": { + "react": true + } + }, "@ensdomains/content-hash": { "globals": { "Buffer.from": true, @@ -655,7 +718,6 @@ "@material-ui/core>@material-ui/system": true, "@material-ui/core>@material-ui/utils": true, "@material-ui/core>clsx": true, - "@material-ui/core>popper.js": true, "prop-types": true, "react": true, "react-dom": true, @@ -2414,6 +2476,86 @@ "semver": true } }, + "@mui/material": { + "globals": { + "DocumentFragment": true, + "ResizeObserver": true, + "addEventListener": true, + "cancelAnimationFrame": true, + "clearInterval": true, + "console.error": true, + "console.warn": true, + "document.addEventListener": true, + "document.body": true, + "document.removeEventListener": true, + "getSelection": true, + "navigator": true, + "performance.now": true, + "removeEventListener": true, + "requestAnimationFrame": true, + "setInterval": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system": true, + "@mui/material>@mui/utils": true, + "@popperjs/core": true, + "clsx": true, + "prop-types": true, + "react": true, + "react-dom": true, + "@mui/material>react-is": true, + "react-transition-group": true + } + }, + "@mui/material>@mui/system>@mui/styled-engine": { + "globals": { + "console.error": true, + "document": true + }, + "packages": { + "@emotion/react>@emotion/cache": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/styled": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system": { + "globals": { + "console.error": true, + "console.warn": true + }, + "meta": { + "webpack-optimization": [ + "Dependency '@mui/material>@mui/system>@mui/styled-engine' reexports from '@emotion/react' and webpack collapsed that to a direct import." + ] + }, + "packages": { + "@babel/runtime": true, + "@emotion/react": true, + "@mui/material>@mui/system>@mui/styled-engine": true, + "@mui/material>@mui/utils": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/utils": { + "globals": { + "clearTimeout": true, + "console.error": true, + "document": true, + "innerWidth": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "clsx": true, + "react": true, + "@mui/material>@mui/utils>react-is": true + } + }, "@ngraveio/bc-ur": { "globals": { "Buffer.alloc": true, @@ -5213,22 +5355,6 @@ "@ngraveio/bc-ur>sha.js>to-buffer": true } }, - "@material-ui/core>popper.js": { - "globals": { - "MSInputMethodContext": true, - "Node.DOCUMENT_POSITION_FOLLOWING": true, - "cancelAnimationFrame": true, - "console.warn": true, - "devicePixelRatio": true, - "document": true, - "getComputedStyle": true, - "innerHeight": true, - "innerWidth": true, - "navigator": true, - "requestAnimationFrame": true, - "setTimeout": true - } - }, "react-tippy>popper.js": { "globals": { "MSInputMethodContext": true, diff --git a/lavamoat/webpack/mv2/main/policy.json b/lavamoat/webpack/mv2/main/policy.json index 49c5d7b67ce9..a2df7bde7fd4 100644 --- a/lavamoat/webpack/mv2/main/policy.json +++ b/lavamoat/webpack/mv2/main/policy.json @@ -15,6 +15,69 @@ "luxon": true } }, + "@emotion/react>@emotion/cache": { + "globals": { + "document.head": true, + "document.querySelectorAll": true + }, + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/cache>@emotion/sheet": true, + "@emotion/react>@emotion/weak-memoize": true, + "@emotion/react>@emotion/cache>stylis": true + } + }, + "@emotion/styled>@emotion/is-prop-valid": { + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true + } + }, + "@emotion/react": { + "globals": { + "HTMLElement": true, + "document.querySelector": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "@emotion/react>@emotion/weak-memoize": true, + "react-redux>hoist-non-react-statics": true, + "react": true + } + }, + "@emotion/react>@emotion/serialize": { + "packages": { + "@emotion/react>@emotion/serialize>@emotion/hash": true, + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/serialize>@emotion/unitless": true + } + }, + "@emotion/react>@emotion/cache>@emotion/sheet": { + "globals": { + "document.createElement": true, + "document.createTextNode": true, + "document.styleSheets": true + } + }, + "@emotion/styled": { + "packages": { + "@babel/runtime": true, + "@emotion/styled>@emotion/is-prop-valid": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "react": true + } + }, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": { + "packages": { + "react": true + } + }, "@ensdomains/content-hash": { "globals": { "Buffer.from": true, @@ -655,7 +718,6 @@ "@material-ui/core>@material-ui/system": true, "@material-ui/core>@material-ui/utils": true, "@material-ui/core>clsx": true, - "@material-ui/core>popper.js": true, "prop-types": true, "react": true, "react-dom": true, @@ -2414,6 +2476,86 @@ "semver": true } }, + "@mui/material": { + "globals": { + "DocumentFragment": true, + "ResizeObserver": true, + "addEventListener": true, + "cancelAnimationFrame": true, + "clearInterval": true, + "console.error": true, + "console.warn": true, + "document.addEventListener": true, + "document.body": true, + "document.removeEventListener": true, + "getSelection": true, + "navigator": true, + "performance.now": true, + "removeEventListener": true, + "requestAnimationFrame": true, + "setInterval": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system": true, + "@mui/material>@mui/utils": true, + "@popperjs/core": true, + "clsx": true, + "prop-types": true, + "react": true, + "react-dom": true, + "@mui/material>react-is": true, + "react-transition-group": true + } + }, + "@mui/material>@mui/system>@mui/styled-engine": { + "globals": { + "console.error": true, + "document": true + }, + "packages": { + "@emotion/react>@emotion/cache": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/styled": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system": { + "globals": { + "console.error": true, + "console.warn": true + }, + "meta": { + "webpack-optimization": [ + "Dependency '@mui/material>@mui/system>@mui/styled-engine' reexports from '@emotion/react' and webpack collapsed that to a direct import." + ] + }, + "packages": { + "@babel/runtime": true, + "@emotion/react": true, + "@mui/material>@mui/system>@mui/styled-engine": true, + "@mui/material>@mui/utils": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/utils": { + "globals": { + "clearTimeout": true, + "console.error": true, + "document": true, + "innerWidth": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "clsx": true, + "react": true, + "@mui/material>@mui/utils>react-is": true + } + }, "@ngraveio/bc-ur": { "globals": { "Buffer.alloc": true, @@ -5213,22 +5355,6 @@ "@ngraveio/bc-ur>sha.js>to-buffer": true } }, - "@material-ui/core>popper.js": { - "globals": { - "MSInputMethodContext": true, - "Node.DOCUMENT_POSITION_FOLLOWING": true, - "cancelAnimationFrame": true, - "console.warn": true, - "devicePixelRatio": true, - "document": true, - "getComputedStyle": true, - "innerHeight": true, - "innerWidth": true, - "navigator": true, - "requestAnimationFrame": true, - "setTimeout": true - } - }, "react-tippy>popper.js": { "globals": { "MSInputMethodContext": true, diff --git a/lavamoat/webpack/mv3/beta/policy.json b/lavamoat/webpack/mv3/beta/policy.json index 805ec8f2f330..5ab89509e81a 100644 --- a/lavamoat/webpack/mv3/beta/policy.json +++ b/lavamoat/webpack/mv3/beta/policy.json @@ -15,6 +15,69 @@ "luxon": true } }, + "@emotion/react>@emotion/cache": { + "globals": { + "document.head": true, + "document.querySelectorAll": true + }, + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/cache>@emotion/sheet": true, + "@emotion/react>@emotion/weak-memoize": true, + "@emotion/react>@emotion/cache>stylis": true + } + }, + "@emotion/styled>@emotion/is-prop-valid": { + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true + } + }, + "@emotion/react": { + "globals": { + "HTMLElement": true, + "document.querySelector": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "@emotion/react>@emotion/weak-memoize": true, + "react-redux>hoist-non-react-statics": true, + "react": true + } + }, + "@emotion/react>@emotion/serialize": { + "packages": { + "@emotion/react>@emotion/serialize>@emotion/hash": true, + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/serialize>@emotion/unitless": true + } + }, + "@emotion/react>@emotion/cache>@emotion/sheet": { + "globals": { + "document.createElement": true, + "document.createTextNode": true, + "document.styleSheets": true + } + }, + "@emotion/styled": { + "packages": { + "@babel/runtime": true, + "@emotion/styled>@emotion/is-prop-valid": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "react": true + } + }, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": { + "packages": { + "react": true + } + }, "@ethereumjs/tx>@ethereumjs/common": { "packages": { "@ethereumjs/tx>@ethereumjs/util": true, @@ -572,7 +635,6 @@ "@material-ui/core>@material-ui/system": true, "@material-ui/core>@material-ui/utils": true, "@material-ui/core>clsx": true, - "@material-ui/core>popper.js": true, "prop-types": true, "react": true, "react-dom": true, @@ -1428,6 +1490,86 @@ "semver": true } }, + "@mui/material": { + "globals": { + "DocumentFragment": true, + "ResizeObserver": true, + "addEventListener": true, + "cancelAnimationFrame": true, + "clearInterval": true, + "console.error": true, + "console.warn": true, + "document.addEventListener": true, + "document.body": true, + "document.removeEventListener": true, + "getSelection": true, + "navigator": true, + "performance.now": true, + "removeEventListener": true, + "requestAnimationFrame": true, + "setInterval": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system": true, + "@mui/material>@mui/utils": true, + "@popperjs/core": true, + "clsx": true, + "prop-types": true, + "react": true, + "react-dom": true, + "@mui/material>react-is": true, + "react-transition-group": true + } + }, + "@mui/material>@mui/system>@mui/styled-engine": { + "globals": { + "console.error": true, + "document": true + }, + "packages": { + "@emotion/react>@emotion/cache": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/styled": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system": { + "globals": { + "console.error": true, + "console.warn": true + }, + "meta": { + "webpack-optimization": [ + "Dependency '@mui/material>@mui/system>@mui/styled-engine' reexports from '@emotion/react' and webpack collapsed that to a direct import." + ] + }, + "packages": { + "@babel/runtime": true, + "@emotion/react": true, + "@mui/material>@mui/system>@mui/styled-engine": true, + "@mui/material>@mui/utils": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/utils": { + "globals": { + "clearTimeout": true, + "console.error": true, + "document": true, + "innerWidth": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "clsx": true, + "react": true, + "@mui/material>@mui/utils>react-is": true + } + }, "@ngraveio/bc-ur": { "globals": { "Buffer.alloc": true, @@ -3689,22 +3831,6 @@ "@ngraveio/bc-ur>sha.js>to-buffer": true } }, - "@material-ui/core>popper.js": { - "globals": { - "MSInputMethodContext": true, - "Node.DOCUMENT_POSITION_FOLLOWING": true, - "cancelAnimationFrame": true, - "console.warn": true, - "devicePixelRatio": true, - "document": true, - "getComputedStyle": true, - "innerHeight": true, - "innerWidth": true, - "navigator": true, - "requestAnimationFrame": true, - "setTimeout": true - } - }, "react-tippy>popper.js": { "globals": { "MSInputMethodContext": true, diff --git a/lavamoat/webpack/mv3/experimental/policy.json b/lavamoat/webpack/mv3/experimental/policy.json index 805ec8f2f330..5ab89509e81a 100644 --- a/lavamoat/webpack/mv3/experimental/policy.json +++ b/lavamoat/webpack/mv3/experimental/policy.json @@ -15,6 +15,69 @@ "luxon": true } }, + "@emotion/react>@emotion/cache": { + "globals": { + "document.head": true, + "document.querySelectorAll": true + }, + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/cache>@emotion/sheet": true, + "@emotion/react>@emotion/weak-memoize": true, + "@emotion/react>@emotion/cache>stylis": true + } + }, + "@emotion/styled>@emotion/is-prop-valid": { + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true + } + }, + "@emotion/react": { + "globals": { + "HTMLElement": true, + "document.querySelector": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "@emotion/react>@emotion/weak-memoize": true, + "react-redux>hoist-non-react-statics": true, + "react": true + } + }, + "@emotion/react>@emotion/serialize": { + "packages": { + "@emotion/react>@emotion/serialize>@emotion/hash": true, + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/serialize>@emotion/unitless": true + } + }, + "@emotion/react>@emotion/cache>@emotion/sheet": { + "globals": { + "document.createElement": true, + "document.createTextNode": true, + "document.styleSheets": true + } + }, + "@emotion/styled": { + "packages": { + "@babel/runtime": true, + "@emotion/styled>@emotion/is-prop-valid": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "react": true + } + }, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": { + "packages": { + "react": true + } + }, "@ethereumjs/tx>@ethereumjs/common": { "packages": { "@ethereumjs/tx>@ethereumjs/util": true, @@ -572,7 +635,6 @@ "@material-ui/core>@material-ui/system": true, "@material-ui/core>@material-ui/utils": true, "@material-ui/core>clsx": true, - "@material-ui/core>popper.js": true, "prop-types": true, "react": true, "react-dom": true, @@ -1428,6 +1490,86 @@ "semver": true } }, + "@mui/material": { + "globals": { + "DocumentFragment": true, + "ResizeObserver": true, + "addEventListener": true, + "cancelAnimationFrame": true, + "clearInterval": true, + "console.error": true, + "console.warn": true, + "document.addEventListener": true, + "document.body": true, + "document.removeEventListener": true, + "getSelection": true, + "navigator": true, + "performance.now": true, + "removeEventListener": true, + "requestAnimationFrame": true, + "setInterval": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system": true, + "@mui/material>@mui/utils": true, + "@popperjs/core": true, + "clsx": true, + "prop-types": true, + "react": true, + "react-dom": true, + "@mui/material>react-is": true, + "react-transition-group": true + } + }, + "@mui/material>@mui/system>@mui/styled-engine": { + "globals": { + "console.error": true, + "document": true + }, + "packages": { + "@emotion/react>@emotion/cache": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/styled": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system": { + "globals": { + "console.error": true, + "console.warn": true + }, + "meta": { + "webpack-optimization": [ + "Dependency '@mui/material>@mui/system>@mui/styled-engine' reexports from '@emotion/react' and webpack collapsed that to a direct import." + ] + }, + "packages": { + "@babel/runtime": true, + "@emotion/react": true, + "@mui/material>@mui/system>@mui/styled-engine": true, + "@mui/material>@mui/utils": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/utils": { + "globals": { + "clearTimeout": true, + "console.error": true, + "document": true, + "innerWidth": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "clsx": true, + "react": true, + "@mui/material>@mui/utils>react-is": true + } + }, "@ngraveio/bc-ur": { "globals": { "Buffer.alloc": true, @@ -3689,22 +3831,6 @@ "@ngraveio/bc-ur>sha.js>to-buffer": true } }, - "@material-ui/core>popper.js": { - "globals": { - "MSInputMethodContext": true, - "Node.DOCUMENT_POSITION_FOLLOWING": true, - "cancelAnimationFrame": true, - "console.warn": true, - "devicePixelRatio": true, - "document": true, - "getComputedStyle": true, - "innerHeight": true, - "innerWidth": true, - "navigator": true, - "requestAnimationFrame": true, - "setTimeout": true - } - }, "react-tippy>popper.js": { "globals": { "MSInputMethodContext": true, diff --git a/lavamoat/webpack/mv3/flask/policy.json b/lavamoat/webpack/mv3/flask/policy.json index 805ec8f2f330..5ab89509e81a 100644 --- a/lavamoat/webpack/mv3/flask/policy.json +++ b/lavamoat/webpack/mv3/flask/policy.json @@ -15,6 +15,69 @@ "luxon": true } }, + "@emotion/react>@emotion/cache": { + "globals": { + "document.head": true, + "document.querySelectorAll": true + }, + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/cache>@emotion/sheet": true, + "@emotion/react>@emotion/weak-memoize": true, + "@emotion/react>@emotion/cache>stylis": true + } + }, + "@emotion/styled>@emotion/is-prop-valid": { + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true + } + }, + "@emotion/react": { + "globals": { + "HTMLElement": true, + "document.querySelector": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "@emotion/react>@emotion/weak-memoize": true, + "react-redux>hoist-non-react-statics": true, + "react": true + } + }, + "@emotion/react>@emotion/serialize": { + "packages": { + "@emotion/react>@emotion/serialize>@emotion/hash": true, + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/serialize>@emotion/unitless": true + } + }, + "@emotion/react>@emotion/cache>@emotion/sheet": { + "globals": { + "document.createElement": true, + "document.createTextNode": true, + "document.styleSheets": true + } + }, + "@emotion/styled": { + "packages": { + "@babel/runtime": true, + "@emotion/styled>@emotion/is-prop-valid": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "react": true + } + }, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": { + "packages": { + "react": true + } + }, "@ethereumjs/tx>@ethereumjs/common": { "packages": { "@ethereumjs/tx>@ethereumjs/util": true, @@ -572,7 +635,6 @@ "@material-ui/core>@material-ui/system": true, "@material-ui/core>@material-ui/utils": true, "@material-ui/core>clsx": true, - "@material-ui/core>popper.js": true, "prop-types": true, "react": true, "react-dom": true, @@ -1428,6 +1490,86 @@ "semver": true } }, + "@mui/material": { + "globals": { + "DocumentFragment": true, + "ResizeObserver": true, + "addEventListener": true, + "cancelAnimationFrame": true, + "clearInterval": true, + "console.error": true, + "console.warn": true, + "document.addEventListener": true, + "document.body": true, + "document.removeEventListener": true, + "getSelection": true, + "navigator": true, + "performance.now": true, + "removeEventListener": true, + "requestAnimationFrame": true, + "setInterval": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system": true, + "@mui/material>@mui/utils": true, + "@popperjs/core": true, + "clsx": true, + "prop-types": true, + "react": true, + "react-dom": true, + "@mui/material>react-is": true, + "react-transition-group": true + } + }, + "@mui/material>@mui/system>@mui/styled-engine": { + "globals": { + "console.error": true, + "document": true + }, + "packages": { + "@emotion/react>@emotion/cache": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/styled": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system": { + "globals": { + "console.error": true, + "console.warn": true + }, + "meta": { + "webpack-optimization": [ + "Dependency '@mui/material>@mui/system>@mui/styled-engine' reexports from '@emotion/react' and webpack collapsed that to a direct import." + ] + }, + "packages": { + "@babel/runtime": true, + "@emotion/react": true, + "@mui/material>@mui/system>@mui/styled-engine": true, + "@mui/material>@mui/utils": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/utils": { + "globals": { + "clearTimeout": true, + "console.error": true, + "document": true, + "innerWidth": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "clsx": true, + "react": true, + "@mui/material>@mui/utils>react-is": true + } + }, "@ngraveio/bc-ur": { "globals": { "Buffer.alloc": true, @@ -3689,22 +3831,6 @@ "@ngraveio/bc-ur>sha.js>to-buffer": true } }, - "@material-ui/core>popper.js": { - "globals": { - "MSInputMethodContext": true, - "Node.DOCUMENT_POSITION_FOLLOWING": true, - "cancelAnimationFrame": true, - "console.warn": true, - "devicePixelRatio": true, - "document": true, - "getComputedStyle": true, - "innerHeight": true, - "innerWidth": true, - "navigator": true, - "requestAnimationFrame": true, - "setTimeout": true - } - }, "react-tippy>popper.js": { "globals": { "MSInputMethodContext": true, diff --git a/lavamoat/webpack/mv3/main/policy.json b/lavamoat/webpack/mv3/main/policy.json index 805ec8f2f330..5ab89509e81a 100644 --- a/lavamoat/webpack/mv3/main/policy.json +++ b/lavamoat/webpack/mv3/main/policy.json @@ -15,6 +15,69 @@ "luxon": true } }, + "@emotion/react>@emotion/cache": { + "globals": { + "document.head": true, + "document.querySelectorAll": true + }, + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/cache>@emotion/sheet": true, + "@emotion/react>@emotion/weak-memoize": true, + "@emotion/react>@emotion/cache>stylis": true + } + }, + "@emotion/styled>@emotion/is-prop-valid": { + "packages": { + "@emotion/react>@emotion/cache>@emotion/memoize": true + } + }, + "@emotion/react": { + "globals": { + "HTMLElement": true, + "document.querySelector": true + }, + "packages": { + "@babel/runtime": true, + "@emotion/react>@emotion/cache": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "@emotion/react>@emotion/weak-memoize": true, + "react-redux>hoist-non-react-statics": true, + "react": true + } + }, + "@emotion/react>@emotion/serialize": { + "packages": { + "@emotion/react>@emotion/serialize>@emotion/hash": true, + "@emotion/react>@emotion/cache>@emotion/memoize": true, + "@emotion/react>@emotion/serialize>@emotion/unitless": true + } + }, + "@emotion/react>@emotion/cache>@emotion/sheet": { + "globals": { + "document.createElement": true, + "document.createTextNode": true, + "document.styleSheets": true + } + }, + "@emotion/styled": { + "packages": { + "@babel/runtime": true, + "@emotion/styled>@emotion/is-prop-valid": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": true, + "@emotion/react>@emotion/utils": true, + "react": true + } + }, + "@emotion/react>@emotion/use-insertion-effect-with-fallbacks": { + "packages": { + "react": true + } + }, "@ethereumjs/tx>@ethereumjs/common": { "packages": { "@ethereumjs/tx>@ethereumjs/util": true, @@ -572,7 +635,6 @@ "@material-ui/core>@material-ui/system": true, "@material-ui/core>@material-ui/utils": true, "@material-ui/core>clsx": true, - "@material-ui/core>popper.js": true, "prop-types": true, "react": true, "react-dom": true, @@ -1428,6 +1490,86 @@ "semver": true } }, + "@mui/material": { + "globals": { + "DocumentFragment": true, + "ResizeObserver": true, + "addEventListener": true, + "cancelAnimationFrame": true, + "clearInterval": true, + "console.error": true, + "console.warn": true, + "document.addEventListener": true, + "document.body": true, + "document.removeEventListener": true, + "getSelection": true, + "navigator": true, + "performance.now": true, + "removeEventListener": true, + "requestAnimationFrame": true, + "setInterval": true + }, + "packages": { + "@babel/runtime": true, + "@mui/material>@mui/system": true, + "@mui/material>@mui/utils": true, + "@popperjs/core": true, + "clsx": true, + "prop-types": true, + "react": true, + "react-dom": true, + "@mui/material>react-is": true, + "react-transition-group": true + } + }, + "@mui/material>@mui/system>@mui/styled-engine": { + "globals": { + "console.error": true, + "document": true + }, + "packages": { + "@emotion/react>@emotion/cache": true, + "@emotion/react": true, + "@emotion/react>@emotion/serialize": true, + "@emotion/styled": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/system": { + "globals": { + "console.error": true, + "console.warn": true + }, + "meta": { + "webpack-optimization": [ + "Dependency '@mui/material>@mui/system>@mui/styled-engine' reexports from '@emotion/react' and webpack collapsed that to a direct import." + ] + }, + "packages": { + "@babel/runtime": true, + "@emotion/react": true, + "@mui/material>@mui/system>@mui/styled-engine": true, + "@mui/material>@mui/utils": true, + "prop-types": true, + "react": true + } + }, + "@mui/material>@mui/utils": { + "globals": { + "clearTimeout": true, + "console.error": true, + "document": true, + "innerWidth": true, + "setTimeout": true + }, + "packages": { + "@babel/runtime": true, + "clsx": true, + "react": true, + "@mui/material>@mui/utils>react-is": true + } + }, "@ngraveio/bc-ur": { "globals": { "Buffer.alloc": true, @@ -3689,22 +3831,6 @@ "@ngraveio/bc-ur>sha.js>to-buffer": true } }, - "@material-ui/core>popper.js": { - "globals": { - "MSInputMethodContext": true, - "Node.DOCUMENT_POSITION_FOLLOWING": true, - "cancelAnimationFrame": true, - "console.warn": true, - "devicePixelRatio": true, - "document": true, - "getComputedStyle": true, - "innerHeight": true, - "innerWidth": true, - "navigator": true, - "requestAnimationFrame": true, - "setTimeout": true - } - }, "react-tippy>popper.js": { "globals": { "MSInputMethodContext": true, diff --git a/test/jest/console-baseline-unit.json b/test/jest/console-baseline-unit.json index 1bb2af5d4f4b..f79b52bec0eb 100644 --- a/test/jest/console-baseline-unit.json +++ b/test/jest/console-baseline-unit.json @@ -530,9 +530,6 @@ "ui/components/ui/qr-code-view/qr-code-view.test.tsx": { "React: DOM nesting violations": 1 }, - "ui/components/ui/slider/slider.component.test.js": { - "Material-UI: JSS warnings": 4 - }, "ui/components/ui/survey-toast/survey-toast.test.tsx": { "MetaMask: Background connection not initialized": 1 }, diff --git a/ui/components/app/cancel-button/cancel-button.js b/ui/components/app/cancel-button/cancel-button.js index 387c48bc679b..dc82c886a4d3 100644 --- a/ui/components/app/cancel-button/cancel-button.js +++ b/ui/components/app/cancel-button/cancel-button.js @@ -1,4 +1,4 @@ -import Tooltip from '@material-ui/core/Tooltip'; +import Tooltip from '@mui/material/Tooltip'; import React from 'react'; import PropTypes from 'prop-types'; import { useSelector } from 'react-redux'; @@ -47,7 +47,7 @@ export default function CancelButton({
{btn}
diff --git a/ui/components/app/modals/customize-nonce/__snapshots__/customize-nonce.test.js.snap b/ui/components/app/modals/customize-nonce/__snapshots__/customize-nonce.test.js.snap index 737617ddb2ed..67d10b489df9 100644 --- a/ui/components/app/modals/customize-nonce/__snapshots__/customize-nonce.test.js.snap +++ b/ui/components/app/modals/customize-nonce/__snapshots__/customize-nonce.test.js.snap @@ -72,14 +72,14 @@ exports[`Customize Nonce should match snapshot 1`] = ` class="customize-nonce-modal__input" >
, + event: Event, value: number | number[], + activeThumb: number, ) => void; /** Committed change handler - fires only when drag ends or a discrete click occurs */ onChangeCommitted?: ( - event: React.ChangeEvent, + event: React.SyntheticEvent | Event, value: number | number[], ) => void; /** Show edit text */ diff --git a/ui/components/ui/slider/slider.component.js b/ui/components/ui/slider/slider.component.js index 58166506235e..9e276a977790 100644 --- a/ui/components/ui/slider/slider.component.js +++ b/ui/components/ui/slider/slider.component.js @@ -1,7 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import MaterialSlider from '@material-ui/core/Slider'; -import { withStyles } from '@material-ui/core/styles'; +import { Slider as MaterialSlider } from '@mui/material'; import { TextColor, @@ -11,42 +10,35 @@ import { import InfoTooltip from '../info-tooltip/info-tooltip'; import { Text } from '../../component-library'; -const styles = { - root: { - height: 6, - padding: '6px 0', - }, - rail: { +const sliderSx = { + height: 6, + padding: '6px 0', + '& .MuiSlider-rail': { borderRadius: 50, background: 'var(--color-background-alternative)', height: 6, }, - track: { + '& .MuiSlider-track': { borderRadius: 50, background: 'var(--color-primary-default)', height: 6, + border: 'none', }, - thumb: { + '& .MuiSlider-thumb': { height: 20, width: 20, - marginTop: -7, - marginLeft: -7, backgroundColor: 'var(--color-primary-default)', border: '1px solid var(--color-border-muted)', boxSizing: 'border-box', boxShadow: 'var(--shadow-size-md) var(--color-shadow-default)', - '&:focus, &$active': { + '&:focus, &.Mui-active': { height: 20, width: 20, - marginTop: -7, - marginLeft: -7, boxShadow: 'var(--shadow-size-md) var(--color-shadow-default)', }, '&:hover': { height: 22, width: 22, - marginTop: -8, - marginLeft: -8, border: 'none', boxShadow: 'var(--shadow-size-md) var(--color-shadow-default)', }, @@ -88,7 +80,7 @@ const Slider = ({
)}
- +
{infoText && ( @@ -163,4 +155,4 @@ Slider.propTypes = { value: PropTypes.number, }; -export default withStyles(styles)(Slider); +export default Slider; diff --git a/ui/components/ui/text-field/text-field.component.js b/ui/components/ui/text-field/text-field.component.js index 33ff464a4eb6..506ac7abc4da 100644 --- a/ui/components/ui/text-field/text-field.component.js +++ b/ui/components/ui/text-field/text-field.component.js @@ -1,7 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { withStyles } from '@material-ui/core/styles'; -import MaterialTextField from '@material-ui/core/TextField'; +import MaterialTextField from '@mui/material/TextField'; /** * @deprecated The `` component has been deprecated in favor of the new `` component from the component-library. @@ -21,109 +20,37 @@ const inputLabelBase = { const fontFamily = ['"Geist"', 'Helvetica', 'Arial', 'sans-serif'].join(', '); -const styles = { - materialLabel: { - '&$materialFocused': { - color: 'var(--color-text-alternative)', - }, - '&$materialError': { - color: 'var(--color-text-alternative)', - }, - fontWeight: '400', - color: 'var(--color-text-alternative)', - }, - materialFocused: {}, - materialUnderline: { - '&:before': { - borderBottom: '1px solid var(--color-text-default) !important', // Visible bottom border - }, - '&:after': { - borderBottom: `2px solid var(--color-primary-default)`, // Animated bottom border - }, - }, - materialError: {}, - materialWhitePaddedRoot: { - color: 'var(--color-text-alternative)', - }, - materialWhitePaddedInput: { - padding: '8px', - - '&::placeholder': { - color: 'var(--color-text-alternative)', - }, - }, - materialWhitePaddedFocused: { - color: 'var(--color-background-default)', - }, - materialWhitePaddedUnderline: { - '&:after': { - borderBottom: '2px solid var(--color-background-default)', // @TODO: Replace with border-muted ? - }, - }, - // Non-material styles - formLabel: { - fontFamily, - '&$formLabelFocused': { - color: 'var(--color-text-alternative)', - }, - '&$materialError': { - color: 'var(--color-text-alternative)', - }, - }, - formLabelFocused: {}, - inputFocused: {}, - inputRoot: { - fontFamily, - 'label + &': { - marginTop: '9px', - }, - backgroundColor: 'var(--color-background-default)', - border: '1px solid var(--color-border-default)', - color: 'var(--color-text-default)', - height: '48px', - padding: '0 16px', - display: 'flex', - alignItems: 'center', - '&$inputFocused': { - border: '1px solid var(--color-primary-default)', - }, - borderRadius: '8px', - fontSize: '0.875rem', - }, - largeInputLabel: { - ...inputLabelBase, - fontSize: '1rem', - }, - inputLabel: { - ...inputLabelBase, - fontSize: '.75rem', - }, - inputMultiline: { - lineHeight: 'initial !important', - }, -}; - const getMaterialThemeInputProps = ({ dir, - classes: { materialLabel, materialFocused, materialError, materialUnderline }, startAdornment, endAdornment, min, max, autoComplete, }) => ({ + variant: 'standard', InputLabelProps: { - classes: { - root: materialLabel, - focused: materialFocused, - error: materialError, + sx: { + '&.Mui-focused': { + color: 'var(--color-text-alternative)', + }, + '&.Mui-error': { + color: 'var(--color-text-alternative)', + }, + fontWeight: '400', + color: 'var(--color-text-alternative)', }, }, InputProps: { startAdornment, endAdornment, - classes: { - underline: materialUnderline, + sx: { + '&:before': { + borderBottom: '1px solid var(--color-text-default) !important', // Visible bottom border + }, + '&:after': { + borderBottom: `2px solid var(--color-primary-default)`, // Animated bottom border + }, }, inputProps: { dir, @@ -136,26 +63,30 @@ const getMaterialThemeInputProps = ({ const getMaterialWhitePaddedThemeInputProps = ({ dir, - classes: { - materialWhitePaddedRoot, - materialWhitePaddedFocused, - materialWhitePaddedInput, - materialWhitePaddedUnderline, - }, startAdornment, endAdornment, min, max, autoComplete, }) => ({ + variant: 'standard', InputProps: { startAdornment, endAdornment, - classes: { - root: materialWhitePaddedRoot, - focused: materialWhitePaddedFocused, - input: materialWhitePaddedInput, - underline: materialWhitePaddedUnderline, + sx: { + color: 'var(--color-text-alternative)', + '&.Mui-focused': { + color: 'var(--color-background-default)', + }, + '& .MuiInputBase-input': { + padding: '8px', + '&::placeholder': { + color: 'var(--color-text-alternative)', + }, + }, + '&:after': { + borderBottom: '2px solid var(--color-background-default)', // @TODO: Replace with border-muted ? + }, }, inputProps: { dir, @@ -168,16 +99,6 @@ const getMaterialWhitePaddedThemeInputProps = ({ const getBorderedThemeInputProps = ({ dir, - classes: { - formLabel, - formLabelFocused, - materialError, - largeInputLabel, - inputLabel, - inputRoot, - input, - inputFocused, - }, largeLabel, startAdornment, endAdornment, @@ -187,20 +108,39 @@ const getBorderedThemeInputProps = ({ }) => ({ InputLabelProps: { shrink: true, - className: largeLabel ? largeInputLabel : inputLabel, - classes: { - root: formLabel, - focused: formLabelFocused, - error: materialError, - }, - }, + sx: { + ...(largeLabel ? { fontSize: '1rem' } : { fontSize: '.75rem' }), + ...inputLabelBase, + fontFamily, + '&.Mui-focused': { + color: 'var(--color-text-alternative)', + }, + '&.Mui-error': { + color: 'var(--color-text-alternative)', + }, + }, + }, + variant: 'standard', InputProps: { startAdornment, endAdornment, - classes: { - root: inputRoot, - input, - focused: inputFocused, + sx: { + fontFamily, + 'label + &': { + marginTop: '9px', + }, + backgroundColor: 'var(--color-background-default)', + border: '1px solid var(--color-border-default)', + color: 'var(--color-text-default)', + height: '48px', + padding: '0 16px', + display: 'flex', + alignItems: 'center', + '&.Mui-focused': { + border: '1px solid var(--color-primary-default)', + }, + borderRadius: '8px', + fontSize: '0.875rem', }, inputProps: { dir, @@ -221,7 +161,6 @@ const themeToInputProps = { const TextField = ({ 'data-testid': dataTestId, error, - classes, theme, startAdornment, endAdornment, @@ -234,7 +173,6 @@ const TextField = ({ ...textFieldProps }) => { const inputProps = themeToInputProps[theme]({ - classes, startAdornment, endAdornment, largeLabel, @@ -280,10 +218,6 @@ TextField.propTypes = { * Show error message */ error: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), - /** - * Add custom CSS class - */ - classes: PropTypes.object, dir: PropTypes.string, /** * Give theme to the text field @@ -310,4 +244,4 @@ TextField.propTypes = { onPaste: PropTypes.func, }; -export default withStyles(styles)(TextField); +export default TextField;