From e09bff21a82c6838e2ca9e8d16790dff56f97abe Mon Sep 17 00:00:00 2001 From: Joe Maffei Date: Sat, 21 Aug 2021 15:20:23 -0500 Subject: [PATCH] Add support for Material-UI v5 beta (#418) * upgrade to material-ui v5; modify code as recommended by the material-ui docs * upgrade to material-ui v5; modify code as recommended by the material-ui docs * add missing anchor classes to SnackbarItem; fix child class declarations * update dependencies; run build * package-lock update * Allow passing classes from props * Adapt new MUI breakpoints * Bind this * Mark emotion peerDeps as optional * 1.0.6-next.2 Co-authored-by: Hossein Dehnokhalaji --- .eslintrc.js | 2 + package-lock.json | 572 +++++++++-------- package.json | 18 +- src/SnackbarContainer.tsx | 39 +- src/SnackbarContent/SnackbarContent.tsx | 26 +- src/SnackbarItem/SnackbarItem.tsx | 94 +-- src/SnackbarProvider.tsx | 4 +- typedoc.json | 775 ++++++++++++------------ 8 files changed, 812 insertions(+), 718 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 8a0ffdde..a5f723cc 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,7 +16,9 @@ module.exports = { 'react/destructuring-assignment': 0, 'react/jsx-closing-bracket-location': 0, 'react/sort-comp': 0, + 'arrow-parens': 0, 'react/require-default-props': 0, + 'react/jsx-props-no-spreading': 0, 'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx', '.ts', '.tsx'] }], 'jsx-a11y/anchor-is-valid': ['error', { aspects: ['invalidHref', 'preferButton'] }], }, diff --git a/package-lock.json b/package-lock.json index 5542ad38..d5fbe410 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "notistack", - "version": "1.0.6-next.1", + "version": "1.0.6-next.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -3187,10 +3187,87 @@ } } }, + "@emotion/babel-plugin": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.3.0.tgz", + "integrity": "sha512-UZKwBV2rADuhRp+ZOGgNWg2eYgbzKzQXfQPtJbu/PLy8onurxlNCLvxMQEvlr1/GudguPI5IU9qIY1+2z1M5bA==", + "dev": true, + "requires": { + "@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", + "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.3" + }, + "dependencies": { + "@babel/helper-module-imports": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz", + "integrity": "sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==", + "dev": true, + "requires": { + "@babel/types": "^7.14.5" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", + "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "dev": true + }, + "@babel/helper-validator-identifier": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", + "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", + "dev": true + }, + "@babel/plugin-syntax-jsx": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.14.5.tgz", + "integrity": "sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/runtime": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", + "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/types": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz", + "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.14.9", + "to-fast-properties": "^2.0.0" + } + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + } + } + }, "@emotion/cache": { - "version": "11.1.3", - "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.1.3.tgz", - "integrity": "sha512-n4OWinUPJVaP6fXxWZD9OUeQ0lY7DvtmtSuqtRWT0Ofo/sBLCVSgb4/Oa0Q5eFxcwablRKjUXqXtNZVyEwCAuA==", + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.4.0.tgz", + "integrity": "sha512-Zx70bjE7LErRO9OaZrhf22Qye1y4F7iDl+ITjet0J+i+B88PrAOBkKvaAWhxsZf72tDLajwCgfCjJ2dvH77C3g==", "dev": true, "requires": { "@emotion/memoize": "^0.7.4", @@ -3206,16 +3283,111 @@ "integrity": "sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow==", "dev": true }, + "@emotion/is-prop-valid": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.1.0.tgz", + "integrity": "sha512-9RkilvXAufQHsSsjQ3PIzSns+pxuX4EW8EbGeSPjZMHuMx6z/MOzb9LpqNieQX4F3mre3NWS2+X3JNRHTQztUQ==", + "dev": true, + "requires": { + "@emotion/memoize": "^0.7.4" + } + }, "@emotion/memoize": { "version": "0.7.5", "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.5.tgz", "integrity": "sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ==", "dev": true }, + "@emotion/react": { + "version": "11.4.1", + "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.4.1.tgz", + "integrity": "sha512-pRegcsuGYj4FCdZN6j5vqCALkNytdrKw3TZMekTzNXixRg4wkLsU5QEaBG5LC6l01Vppxlp7FE3aTHpIG5phLg==", + "dev": true, + "requires": { + "@babel/runtime": "^7.13.10", + "@emotion/cache": "^11.4.0", + "@emotion/serialize": "^1.0.2", + "@emotion/sheet": "^1.0.2", + "@emotion/utils": "^1.0.0", + "@emotion/weak-memoize": "^0.2.5", + "hoist-non-react-statics": "^3.3.1" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", + "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dev": true, + "requires": { + "react-is": "^16.7.0" + } + } + } + }, + "@emotion/serialize": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.0.2.tgz", + "integrity": "sha512-95MgNJ9+/ajxU7QIAruiOAdYNjxZX7G2mhgrtDWswA21VviYIRP1R5QilZ/bDY42xiKsaktP4egJb3QdYQZi1A==", + "dev": true, + "requires": { + "@emotion/hash": "^0.8.0", + "@emotion/memoize": "^0.7.4", + "@emotion/unitless": "^0.7.5", + "@emotion/utils": "^1.0.0", + "csstype": "^3.0.2" + }, + "dependencies": { + "csstype": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.8.tgz", + "integrity": "sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw==", + "dev": true + } + } + }, "@emotion/sheet": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.0.1.tgz", - "integrity": "sha512-GbIvVMe4U+Zc+929N1V7nW6YYJtidj31lidSmdYcWozwoBIObXBnaJkKNDjZrLm9Nc0BR+ZyHNaRZxqNZbof5g==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.0.2.tgz", + "integrity": "sha512-QQPB1B70JEVUHuNtzjHftMGv6eC3Y9wqavyarj4x4lg47RACkeSfNo5pxIOKizwS9AEFLohsqoaxGQj4p0vSIw==", + "dev": true + }, + "@emotion/styled": { + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.3.0.tgz", + "integrity": "sha512-fUoLcN3BfMiLlRhJ8CuPUMEyKkLEoM+n+UyAbnqGEsCd5IzKQ7VQFLtzpJOaCD2/VR2+1hXQTnSZXVJeiTNltA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.13.10", + "@emotion/babel-plugin": "^11.3.0", + "@emotion/is-prop-valid": "^1.1.0", + "@emotion/serialize": "^1.0.2", + "@emotion/utils": "^1.0.0" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", + "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + } + } + }, + "@emotion/unitless": { + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.7.5.tgz", + "integrity": "sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg==", "dev": true }, "@emotion/utils": { @@ -3449,32 +3621,53 @@ } }, "@material-ui/core": { - "version": "5.0.0-alpha.26", - "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-5.0.0-alpha.26.tgz", - "integrity": "sha512-etGxHyZn8REebM8SCcRl0ZaJmm3G6+I7oZqvuZf3Gg+SB03To8SgOkc0BXqteNjt+Z4Etz+xv1iy4RU+rFzGFA==", - "dev": true, - "requires": { - "@babel/runtime": "^7.4.4", - "@material-ui/styled-engine": "5.0.0-alpha.25", - "@material-ui/styles": "5.0.0-alpha.26", - "@material-ui/system": "5.0.0-alpha.26", - "@material-ui/types": "5.1.7", - "@material-ui/unstyled": "5.0.0-alpha.26", - "@material-ui/utils": "5.0.0-alpha.26", + "version": "5.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-5.0.0-beta.4.tgz", + "integrity": "sha512-9xQUtQc+EaNx7MSCWAK7tN46EMFegCHdbuXdPXOFeOf0RpNvBG3sbMgs8vTwesPUA0PfFIk3Xobr2SBImoqeSA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.14.8", + "@material-ui/system": "5.0.0-beta.4", + "@material-ui/types": "6.0.2", + "@material-ui/unstyled": "5.0.0-alpha.43", + "@material-ui/utils": "5.0.0-beta.4", "@popperjs/core": "^2.4.4", "@types/react-transition-group": "^4.2.0", "clsx": "^1.0.4", "csstype": "^3.0.2", "hoist-non-react-statics": "^3.3.2", "prop-types": "^15.7.2", - "react-is": "^16.8.0 || ^17.0.0", + "react-is": "^17.0.0", "react-transition-group": "^4.4.0" }, "dependencies": { + "@babel/runtime": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", + "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@material-ui/unstyled": { + "version": "5.0.0-alpha.43", + "resolved": "https://registry.npmjs.org/@material-ui/unstyled/-/unstyled-5.0.0-alpha.43.tgz", + "integrity": "sha512-b4VHYF9RXclvBthwXJ31d2byrBS8mdwTE76FXkPvAkUFPgQiJ+BVM5siJcxFMoexVj1qL1XpMDGWx6kz1xLw6A==", + "dev": true, + "requires": { + "@babel/runtime": "^7.14.8", + "@emotion/is-prop-valid": "^1.1.0", + "@material-ui/utils": "5.0.0-beta.4", + "clsx": "^1.0.4", + "prop-types": "^15.7.2", + "react-is": "^17.0.0" + } + }, "csstype": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.7.tgz", - "integrity": "sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.8.tgz", + "integrity": "sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw==", "dev": true }, "hoist-non-react-statics": { @@ -3484,112 +3677,135 @@ "dev": true, "requires": { "react-is": "^16.7.0" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + } } + }, + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true } } }, - "@material-ui/styled-engine": { - "version": "5.0.0-alpha.25", - "resolved": "https://registry.npmjs.org/@material-ui/styled-engine/-/styled-engine-5.0.0-alpha.25.tgz", - "integrity": "sha512-z9piABOWycFx1yA9Th8MAs/03SfVOobh+4X1owZmOzXVSln3Xm0C3GjsFmfUpYMC8oC0vddFj00IcCCxm0OECg==", + "@material-ui/private-theming": { + "version": "5.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@material-ui/private-theming/-/private-theming-5.0.0-beta.4.tgz", + "integrity": "sha512-wXZOuRTigjNkhHkH3r6P+n7pL2REZrZVqgDLudFDoj+uMocdr3xlqVBB2EIlLrI0j1No4w6XrCIryFMcDO1KKg==", "dev": true, "requires": { - "@babel/runtime": "^7.4.4", - "@emotion/cache": "^11.0.0", + "@babel/runtime": "^7.14.8", + "@material-ui/utils": "5.0.0-beta.4", "prop-types": "^15.7.2" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", + "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + } } }, - "@material-ui/styles": { - "version": "5.0.0-alpha.26", - "resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-5.0.0-alpha.26.tgz", - "integrity": "sha512-HL1NdzIruDkRMoPhb6qRDGYO4Bn3xM/VwE3pfZPmKyjOz7tCvtqHR5uzdI34EcodgfM/Hm/HSDB69CBTpxBt4A==", + "@material-ui/styled-engine": { + "version": "5.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@material-ui/styled-engine/-/styled-engine-5.0.0-beta.4.tgz", + "integrity": "sha512-Cw+9aD9ZzskhOYo370kWy1JODq6BgCfw2hj/THWK0Tqo+lP2LrjeZvKzKt7AUbPQh/glAi+I/vVtlKnl+OMI1w==", "dev": true, "requires": { - "@babel/runtime": "^7.4.4", - "@emotion/hash": "^0.8.0", - "@material-ui/types": "5.1.7", - "@material-ui/utils": "5.0.0-alpha.26", - "clsx": "^1.0.4", - "csstype": "^3.0.2", - "hoist-non-react-statics": "^3.3.2", - "jss": "^10.0.3", - "jss-plugin-camel-case": "^10.0.3", - "jss-plugin-default-unit": "^10.0.3", - "jss-plugin-global": "^10.0.3", - "jss-plugin-nested": "^10.0.3", - "jss-plugin-props-sort": "^10.0.3", - "jss-plugin-rule-value-function": "^10.0.3", - "jss-plugin-vendor-prefixer": "^10.0.3", + "@babel/runtime": "^7.14.8", + "@emotion/cache": "^11.0.0", "prop-types": "^15.7.2" }, "dependencies": { - "csstype": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.7.tgz", - "integrity": "sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g==", - "dev": true - }, - "hoist-non-react-statics": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", - "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "@babel/runtime": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", + "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", "dev": true, "requires": { - "react-is": "^16.7.0" + "regenerator-runtime": "^0.13.4" } } } }, "@material-ui/system": { - "version": "5.0.0-alpha.26", - "resolved": "https://registry.npmjs.org/@material-ui/system/-/system-5.0.0-alpha.26.tgz", - "integrity": "sha512-IiuXiNe1f/CFE4ybNGPu15rB3u3CuT6FKzMnBIQA4mezDOyXw+6vHm7FiBb3uk2LQMvTCJo6zael/QpdHHdwOA==", + "version": "5.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@material-ui/system/-/system-5.0.0-beta.4.tgz", + "integrity": "sha512-jiUBCcRkDSmkhFEKWVEEvBXxjbFC/zYSRdFW78KcOV1JYbcQmlOx2YXtH9tVuVqqRKvgvSK0hVCqADAuFH5Bhg==", "dev": true, "requires": { - "@babel/runtime": "^7.4.4", - "@material-ui/utils": "5.0.0-alpha.26", + "@babel/runtime": "^7.14.8", + "@material-ui/private-theming": "5.0.0-beta.4", + "@material-ui/styled-engine": "5.0.0-beta.4", + "@material-ui/types": "6.0.2", + "@material-ui/utils": "5.0.0-beta.4", + "clsx": "^1.0.4", "csstype": "^3.0.2", "prop-types": "^15.7.2" }, "dependencies": { + "@babel/runtime": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", + "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, "csstype": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.7.tgz", - "integrity": "sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.8.tgz", + "integrity": "sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw==", "dev": true } } }, "@material-ui/types": { - "version": "5.1.7", - "resolved": "https://registry.npmjs.org/@material-ui/types/-/types-5.1.7.tgz", - "integrity": "sha512-OSpB0gEKZm5h4izTLyipb34PkfazpvusgQMDTmFkSuqcKoChTshfGejEYX6uaZ+4m5xlT5qzihE6eKA+JnjELg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@material-ui/types/-/types-6.0.2.tgz", + "integrity": "sha512-/XUca4wUb9pWimLLdM1PE8KS8rTbDEGohSGkGtk3WST7lm23m+8RYv9uOmrvOg/VSsl4bMiOv4t2/LCb+RLbTg==", "dev": true }, - "@material-ui/unstyled": { - "version": "5.0.0-alpha.26", - "resolved": "https://registry.npmjs.org/@material-ui/unstyled/-/unstyled-5.0.0-alpha.26.tgz", - "integrity": "sha512-6xoakfiqtT1/KOcN3QPc5Avf8llNn2eklpKiEY4Jut6wIw5DHlGYi4jlMe6e7SvxUXTVdz0S55zR3GCLlKfcPg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.4.4", - "@material-ui/utils": "5.0.0-alpha.26", - "clsx": "^1.0.4", - "prop-types": "^15.7.2", - "react-is": "^16.8.0 || ^17.0.0" - } - }, "@material-ui/utils": { - "version": "5.0.0-alpha.26", - "resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-5.0.0-alpha.26.tgz", - "integrity": "sha512-h2SAkucZU+SlC14b3Vo3YzTD9dJQKFPVET6RvRhK/9Ommf+V4dPc6otaTMu5ES696BDqRfY7G2aeaTtkrd2bdg==", + "version": "5.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@material-ui/utils/-/utils-5.0.0-beta.4.tgz", + "integrity": "sha512-j6JA5WhENvpOFITZREOQwSizRl9ujjs2sJ/Ewl3MHf/LXzO1xBnZW0JTWLgflOva63MWxPJjS5JNQrR5PoG3gA==", "dev": true, "requires": { - "@babel/runtime": "^7.4.4", + "@babel/runtime": "^7.14.8", "@types/prop-types": "^15.7.3", "@types/react-is": "^16.7.1 || ^17.0.0", "prop-types": "^15.7.2", - "react-is": "^16.8.0 || ^17.0.0" + "react-is": "^17.0.0" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", + "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + } } }, "@nodelib/fs.scandir": { @@ -3619,9 +3835,9 @@ } }, "@popperjs/core": { - "version": "2.8.6", - "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.8.6.tgz", - "integrity": "sha512-1oXH2bAFXz9SttE1v/0Jp+2ZVePsPEAPGIuPKrmljWZcS3FPBEn2Q4WcANozZC0YiCjTWOF55k0g6rbSZS39ew==", + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.3.tgz", + "integrity": "sha512-xDu17cEfh7Kid/d95kB6tZsLOmSWKCZKtprnhVepjsSaCij+lM3mItSJDuuHDMbCWTh8Ejmebwb+KONcCJ0eXQ==", "dev": true }, "@rollup/plugin-commonjs": { @@ -3970,9 +4186,9 @@ } }, "@types/react-transition-group": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.1.tgz", - "integrity": "sha512-vIo69qKKcYoJ8wKCJjwSgCTM+z3chw3g18dkrDfVX665tMH7tmbDxEAnPdey4gTlwZz5QuHGzd+hul0OVZDqqQ==", + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.2.tgz", + "integrity": "sha512-KibDWL6nshuOJ0fu8ll7QnV/LVTo3PzQ9aCPnRUYPfX7eZohHwLIdNHj7pftanREzHNP4/nJa8oeM73uSiavMQ==", "dev": true, "requires": { "@types/react": "*" @@ -5437,16 +5653,6 @@ "which": "^1.2.9" } }, - "css-vendor": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/css-vendor/-/css-vendor-2.0.8.tgz", - "integrity": "sha512-x9Aq0XTInxrkuFeHKbYC7zWY8ai7qJ04Kxd9MnvbC1uO5DagxoHQjm4JvG+vCdXOoFtCjbL2XSZfxmoYa9uQVQ==", - "dev": true, - "requires": { - "@babel/runtime": "^7.8.3", - "is-in-browser": "^1.0.2" - } - }, "cssom": { "version": "0.3.8", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", @@ -5644,9 +5850,9 @@ } }, "dom-helpers": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.0.tgz", - "integrity": "sha512-Ru5o9+V8CpunKnz5LGgWXkmrH/20cGKwcHwS4m73zIvs54CN9epEmT/HLqFJW3kXpakAFkEdzgy1hzlJe3E4OQ==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", "dev": true, "requires": { "@babel/runtime": "^7.8.7", @@ -5654,9 +5860,9 @@ }, "dependencies": { "csstype": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.7.tgz", - "integrity": "sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.8.tgz", + "integrity": "sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw==", "dev": true } } @@ -7207,6 +7413,12 @@ } } }, + "find-root": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", + "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", + "dev": true + }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", @@ -8179,12 +8391,6 @@ "integrity": "sha512-kq2Ncl1E8I7LJtjWhraQS8/LCsdt6fTQ+fwrGJ8dLSNFITW5YQpGWAgPgzjfIErAID7QHv0PA+HZBPfAf6f7IA==", "dev": true }, - "hyphenate-style-name": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/hyphenate-style-name/-/hyphenate-style-name-1.0.4.tgz", - "integrity": "sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==", - "dev": true - }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -8280,15 +8486,6 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, - "indefinite-observable": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/indefinite-observable/-/indefinite-observable-2.0.1.tgz", - "integrity": "sha512-G8vgmork+6H9S8lUAg1gtXEj2JxIQTo0g2PbFiYOdjkziSI0F7UYBiVwhZRuixhBCNGczAls34+5HJPyZysvxQ==", - "dev": true, - "requires": { - "symbol-observable": "1.2.0" - } - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -8610,12 +8807,6 @@ "is-extglob": "^2.1.1" } }, - "is-in-browser": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz", - "integrity": "sha1-Vv9NtoOgeMYILrldrX3GLh0E+DU=", - "dev": true - }, "is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -9804,101 +9995,6 @@ "verror": "1.10.0" } }, - "jss": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss/-/jss-10.5.1.tgz", - "integrity": "sha512-hbbO3+FOTqVdd7ZUoTiwpHzKXIo5vGpMNbuXH1a0wubRSWLWSBvwvaq4CiHH/U42CmjOnp6lVNNs/l+Z7ZdDmg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.3.1", - "csstype": "^3.0.2", - "indefinite-observable": "^2.0.1", - "is-in-browser": "^1.1.3", - "tiny-warning": "^1.0.2" - }, - "dependencies": { - "csstype": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.7.tgz", - "integrity": "sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g==", - "dev": true - } - } - }, - "jss-plugin-camel-case": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.5.1.tgz", - "integrity": "sha512-9+oymA7wPtswm+zxVti1qiowC5q7bRdCJNORtns2JUj/QHp2QPXYwSNRD8+D2Cy3/CEMtdJzlNnt5aXmpS6NAg==", - "dev": true, - "requires": { - "@babel/runtime": "^7.3.1", - "hyphenate-style-name": "^1.0.3", - "jss": "10.5.1" - } - }, - "jss-plugin-default-unit": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.5.1.tgz", - "integrity": "sha512-D48hJBc9Tj3PusvlillHW8Fz0y/QqA7MNmTYDQaSB/7mTrCZjt7AVRROExoOHEtd2qIYKOYJW3Jc2agnvsXRlQ==", - "dev": true, - "requires": { - "@babel/runtime": "^7.3.1", - "jss": "10.5.1" - } - }, - "jss-plugin-global": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.5.1.tgz", - "integrity": "sha512-jX4XpNgoaB8yPWw/gA1aPXJEoX0LNpvsROPvxlnYe+SE0JOhuvF7mA6dCkgpXBxfTWKJsno7cDSCgzHTocRjCQ==", - "dev": true, - "requires": { - "@babel/runtime": "^7.3.1", - "jss": "10.5.1" - } - }, - "jss-plugin-nested": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.5.1.tgz", - "integrity": "sha512-xXkWKOCljuwHNjSYcXrCxBnjd8eJp90KVFW1rlhvKKRXnEKVD6vdKXYezk2a89uKAHckSvBvBoDGsfZrldWqqQ==", - "dev": true, - "requires": { - "@babel/runtime": "^7.3.1", - "jss": "10.5.1", - "tiny-warning": "^1.0.2" - } - }, - "jss-plugin-props-sort": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.5.1.tgz", - "integrity": "sha512-t+2vcevNmMg4U/jAuxlfjKt46D/jHzCPEjsjLRj/J56CvP7Iy03scsUP58Iw8mVnaV36xAUZH2CmAmAdo8994g==", - "dev": true, - "requires": { - "@babel/runtime": "^7.3.1", - "jss": "10.5.1" - } - }, - "jss-plugin-rule-value-function": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.5.1.tgz", - "integrity": "sha512-3gjrSxsy4ka/lGQsTDY8oYYtkt2esBvQiceGBB4PykXxHoGRz14tbCK31Zc6DHEnIeqsjMUGbq+wEly5UViStQ==", - "dev": true, - "requires": { - "@babel/runtime": "^7.3.1", - "jss": "10.5.1", - "tiny-warning": "^1.0.2" - } - }, - "jss-plugin-vendor-prefixer": { - "version": "10.5.1", - "resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.5.1.tgz", - "integrity": "sha512-cLkH6RaPZWHa1TqSfd2vszNNgxT1W0omlSjAd6hCFHp3KIocSrW21gaHjlMU26JpTHwkc+tJTCQOmE/O1A4FKQ==", - "dev": true, - "requires": { - "@babel/runtime": "^7.3.1", - "css-vendor": "^2.0.8", - "jss": "10.5.1" - } - }, "jsx-ast-utils": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.4.1.tgz", @@ -11408,9 +11504,9 @@ "integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==" }, "react-transition-group": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.1.tgz", - "integrity": "sha512-Djqr7OQ2aPUiYurhPalTrVy9ddmFCCzwhqQmtN+J3+3DzLO209Fdr70QrN8Z3DsglWql6iY1lDWAfpFiBtuKGw==", + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.2.tgz", + "integrity": "sha512-/RNYfRAMlZwDSr6z4zNKV6xu53/e2BuaBbGhbyYIXTrmgu/bGHzmqOs7mJSJBHy9Ud+ApHx3QjrkKSp1pxvlFg==", "dev": true, "requires": { "@babel/runtime": "^7.5.5", @@ -12903,9 +12999,9 @@ "dev": true }, "stylis": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.7.tgz", - "integrity": "sha512-OFFeUXFgwnGOKvEXaSv0D0KQ5ADP0n6g3SVONx6I/85JzNZ3u50FRwB3lVIk1QO2HNdI75tbVzc4Z66Gdp9voA==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.10.tgz", + "integrity": "sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg==", "dev": true }, "supports-color": { @@ -12917,12 +13013,6 @@ "has-flag": "^3.0.0" } }, - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "dev": true - }, "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -13117,12 +13207,6 @@ "globrex": "^0.1.1" } }, - "tiny-warning": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz", - "integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==", - "dev": true - }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", diff --git a/package.json b/package.json index 27240ca2..c7744da9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "notistack", - "version": "1.0.6-next.1", + "version": "1.0.6-next.2", "description": "Highly customizable notification snackbars (toasts) that can be stacked on top of each other", "main": "dist/index.js", "module": "dist/notistack.esm.js", @@ -26,11 +26,23 @@ "peerDependencies": { "react": "^16.8.0 || ^17.0.0", "react-dom": "^16.8.0 || ^17.0.0", - "@material-ui/core": "^5.0.0-alpha.15" + "@emotion/react": "^11.4.1", + "@emotion/styled": "^11.3.0", + "@material-ui/core": "^5.0.0-beta.4" + }, + "peerDependenciesMeta": { + "@emotion/react": { + "optional": true + }, + "@emotion/styled": { + "optional": true + } }, "devDependencies": { "@babel/preset-react": "^7.8.3", - "@material-ui/core": "^5.0.0-alpha.15", + "@emotion/react": "^11.4.1", + "@emotion/styled": "^11.3.0", + "@material-ui/core": "^5.0.0-beta.4", "@types/node": "^13.9.0", "@types/react": "^16.9.23", "@types/react-dom": "^16.9.5", diff --git a/src/SnackbarContainer.tsx b/src/SnackbarContainer.tsx index abd787ed..1b7686ff 100644 --- a/src/SnackbarContainer.tsx +++ b/src/SnackbarContainer.tsx @@ -1,6 +1,6 @@ import React from 'react'; import clsx from 'clsx'; -import { makeStyles } from '@material-ui/core/styles'; +import { styled } from '@material-ui/core/styles'; import { SNACKBAR_INDENTS } from './utils/constants'; import { SnackbarProviderProps } from '.'; @@ -13,8 +13,20 @@ const collapse = { const xsWidthMargin = 16; -const useStyle = makeStyles((theme) => ({ - root: { +const componentName = 'SnackbarContainer'; + +const classes = { + root: `${componentName}-root`, + rootDense: `${componentName}-rootDense`, + top: `${componentName}-top`, + bottom: `${componentName}-bottom`, + left: `${componentName}-left`, + right: `${componentName}-right`, + center: `${componentName}-center`, +}; + +const Root = styled('div')(({ theme }) => ({ + [`&.${classes.root}`]: { boxSizing: 'border-box', display: 'flex', maxHeight: '100%', @@ -33,43 +45,43 @@ const useStyle = makeStyles((theme) => ({ transition: 'padding 300ms ease 0ms', }, maxWidth: `calc(100% - ${SNACKBAR_INDENTS.view.default * 2}px)`, - [theme.breakpoints.down('xs')]: { + [theme.breakpoints.down('sm')]: { width: '100%', maxWidth: `calc(100% - ${xsWidthMargin * 2}px)`, }, }, - rootDense: { + [`&.${classes.rootDense}`]: { [collapse.wrapper]: { padding: `${SNACKBAR_INDENTS.snackbar.dense}px 0px`, }, }, - top: { + [`&.${classes.top}`]: { top: SNACKBAR_INDENTS.view.default - SNACKBAR_INDENTS.snackbar.default, flexDirection: 'column', }, - bottom: { + [`&.${classes.bottom}`]: { bottom: SNACKBAR_INDENTS.view.default - SNACKBAR_INDENTS.snackbar.default, flexDirection: 'column-reverse', }, - left: { + [`&.${classes.left}`]: { left: SNACKBAR_INDENTS.view.default, [theme.breakpoints.up('sm')]: { alignItems: 'flex-start', }, - [theme.breakpoints.down('xs')]: { + [theme.breakpoints.down('sm')]: { left: `${xsWidthMargin}px`, }, }, - right: { + [`&.${classes.right}`]: { right: SNACKBAR_INDENTS.view.default, [theme.breakpoints.up('sm')]: { alignItems: 'flex-end', }, - [theme.breakpoints.down('xs')]: { + [theme.breakpoints.down('sm')]: { right: `${xsWidthMargin}px`, }, }, - center: { + [`&.${classes.center}`]: { left: '50%', transform: 'translateX(-50%)', [theme.breakpoints.up('sm')]: { @@ -86,7 +98,6 @@ interface SnackbarContainerProps { } const SnackbarContainer: React.FC = (props) => { - const classes = useStyle(); const { className, anchorOrigin, dense, ...other } = props; const combinedClassname = clsx( @@ -98,7 +109,7 @@ const SnackbarContainer: React.FC = (props) => { ); return ( -
+ ); }; diff --git a/src/SnackbarContent/SnackbarContent.tsx b/src/SnackbarContent/SnackbarContent.tsx index 8b7638a9..beebaffc 100644 --- a/src/SnackbarContent/SnackbarContent.tsx +++ b/src/SnackbarContent/SnackbarContent.tsx @@ -1,10 +1,16 @@ import React, { forwardRef } from 'react'; import clsx from 'clsx'; -import { createStyles, Theme, withStyles, WithStyles } from '@material-ui/core/styles'; +import { styled } from '@material-ui/core/styles'; import { SnackbarContentProps } from '../index'; -const styles = (theme: Theme) => createStyles({ - root: { +const componentName = 'SnackbarContent'; + +const classes = { + root: `${componentName}-root`, +}; + +const Root = styled('div')(({ theme }) => ({ + [`&.${classes.root}`]: { display: 'flex', flexWrap: 'wrap', flexGrow: 1, @@ -12,13 +18,11 @@ const styles = (theme: Theme) => createStyles({ flexGrow: 'initial', minWidth: 288, }, - } -}); - -interface Props extends WithStyles, SnackbarContentProps { } + }, +})); -const SnackbarContent = forwardRef(({ classes, className, ...props }, ref) => ( -
-)) +const SnackbarContent = forwardRef(({ className, ...props }, ref) => ( + +)); -export default withStyles(styles)(SnackbarContent); +export default SnackbarContent; diff --git a/src/SnackbarItem/SnackbarItem.tsx b/src/SnackbarItem/SnackbarItem.tsx index e7364a38..ad3841c7 100644 --- a/src/SnackbarItem/SnackbarItem.tsx +++ b/src/SnackbarItem/SnackbarItem.tsx @@ -1,23 +1,45 @@ import React, { useState, useEffect, useRef } from 'react'; import clsx from 'clsx'; -import { withStyles, WithStyles, createStyles, Theme, emphasize } from '@material-ui/core/styles'; +import { emphasize, styled } from '@material-ui/core/styles'; import Collapse from '@material-ui/core/Collapse'; +import type { SnackbarClassKey } from '@material-ui/core'; import SnackbarContent from '../SnackbarContent'; import { getTransitionDirection } from './SnackbarItem.util'; -import { allClasses, REASONS, objectMerge, DEFAULTS, transformer } from '../utils/constants'; -import { SharedProps, RequiredBy, TransitionHandlerProps, SnackbarProviderProps as ProviderProps } from '../index'; +import { REASONS, objectMerge, DEFAULTS, transformer } from '../utils/constants'; +import { SharedProps, RequiredBy, TransitionHandlerProps, SnackbarProviderProps as ProviderProps, ClassNameMap } from '../index'; import defaultIconVariants from '../utils/defaultIconVariants'; import createChainedFunction from '../utils/createChainedFunction'; import { Snack } from '../SnackbarProvider'; import Snackbar from './Snackbar'; -const styles = (theme: Theme) => { - // @ts-ignore +const componentName = 'SnackbarItem'; + +const classes = { + contentRoot: `${componentName}-contentRoot`, + lessPadding: `${componentName}-lessPadding`, + variantSuccess: `${componentName}-variantSuccess`, + variantError: `${componentName}-variantError`, + variantInfo: `${componentName}-variantInfo`, + variantWarning: `${componentName}-variantWarning`, + message: `${componentName}-message`, + action: `${componentName}-action`, + wrappedRoot: `${componentName}-wrappedRoot`, +}; + +const StyledSnackbar = styled(Snackbar)(({ theme }) => { const mode = theme.palette.mode || theme.palette.type; const backgroundColor = emphasize(theme.palette.background.default, mode === 'light' ? 0.8 : 0.98); - return createStyles({ - ...allClasses.mui, - contentRoot: { + + return { + [`&.${classes.wrappedRoot}`]: { + position: 'relative', + transform: 'translateX(0)', + top: 0, + right: 0, + bottom: 0, + left: 0, + }, + [`.${classes.contentRoot}`]: { ...theme.typography.body2, backgroundColor, color: theme.palette.getContrastText(backgroundColor), @@ -26,64 +48,55 @@ const styles = (theme: Theme) => { borderRadius: '4px', boxShadow: '0px 3px 5px -1px rgba(0,0,0,0.2),0px 6px 10px 0px rgba(0,0,0,0.14),0px 1px 18px 0px rgba(0,0,0,0.12)', }, - lessPadding: { + [`.${classes.lessPadding}`]: { paddingLeft: 8 * 2.5, }, - variantSuccess: { + [`.${classes.variantSuccess}`]: { backgroundColor: '#43a047', // green color: '#fff', }, - variantError: { + [`.${classes.variantError}`]: { backgroundColor: '#d32f2f', // dark red color: '#fff', }, - variantInfo: { + [`.${classes.variantInfo}`]: { backgroundColor: '#2196f3', // nice blue color: '#fff', }, - variantWarning: { + [`.${classes.variantWarning}`]: { backgroundColor: '#ff9800', // amber color: '#fff', }, - message: { + [`.${classes.message}`]: { display: 'flex', alignItems: 'center', padding: '8px 0', }, - action: { + [`.${classes.action}`]: { display: 'flex', alignItems: 'center', marginLeft: 'auto', paddingLeft: 16, marginRight: -8, }, - wrappedRoot: { - position: 'relative', - transform: 'translateX(0)', - top: 0, - right: 0, - bottom: 0, - left: 0, - }, - }); -} - + }; +}); type RemovedProps = - | 'variant' // the one received from Provider is processed and passed to snack prop + | 'variant' // the one received from Provider is processed and passed to snack prop | 'anchorOrigin' // same as above | 'autoHideDuration' // same as above | 'preventDuplicate' // the one recevied from enqueueSnackbar is processed in provider, therefore shouldn't be passed to SnackbarItem */ - -export interface SnackbarItemProps extends WithStyles, RequiredBy, 'onEntered' | 'onExited' | 'onClose'> { +export interface SnackbarItemProps extends RequiredBy, 'onEntered' | 'onExited' | 'onClose'> { snack: Snack; dense: ProviderProps['dense']; iconVariant: ProviderProps['iconVariant']; hideIconVariant: ProviderProps['hideIconVariant']; + classes: Partial>; } -const SnackbarItem: React.FC = ({ classes, ...props }) => { +const SnackbarItem: React.FC = ({ classes: propClasses, ...props }) => { const timeout = useRef>(); const [collapsed, setCollapsed] = useState(true); @@ -181,11 +194,14 @@ const SnackbarItem: React.FC = ({ classes, ...props }) => { content = content(key, snack.message); } + // eslint-disable-next-line operator-linebreak const callbacks: { [key in keyof TransitionHandlerProps]?: any } = ['onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited'].reduce((acc, cbName) => ({ ...acc, - // @ts-ignore - [cbName]: createChainedFunction([props.snack[cbName], props[cbName]], props.snack.key), + [cbName]: createChainedFunction([ + props.snack[cbName as keyof Snack], + props[cbName as keyof SnackbarItemProps], + ], props.snack.key), }), {}); return ( @@ -195,19 +211,17 @@ const SnackbarItem: React.FC = ({ classes, ...props }) => { in={collapsed} onExited={callbacks.onExited} > - {/* @ts-ignore */} - - {/* @ts-ignore */} = ({ classes, ...props }) => { { [classes.lessPadding]: !hideIconVariant && icon }, classes[transformer.toVariant(variant)], otherClassName, - singleClassName + singleClassName, )} >
@@ -246,9 +260,9 @@ const SnackbarItem: React.FC = ({ classes, ...props }) => { )} - + ); }; -export default withStyles(styles)(SnackbarItem); +export default SnackbarItem; diff --git a/src/SnackbarProvider.tsx b/src/SnackbarProvider.tsx index d9738d48..16daca09 100644 --- a/src/SnackbarProvider.tsx +++ b/src/SnackbarProvider.tsx @@ -32,8 +32,8 @@ class SnackbarProvider extends Component { snacks: [], queue: [], // eslint-disable-line react/no-unused-state contextValue: { - enqueueSnackbar: this.enqueueSnackbar, - closeSnackbar: this.closeSnackbar, + enqueueSnackbar: this.enqueueSnackbar.bind(this), + closeSnackbar: this.closeSnackbar.bind(this), }, }; } diff --git a/typedoc.json b/typedoc.json index 61b16eca..42a50dc4 100644 --- a/typedoc.json +++ b/typedoc.json @@ -6,7 +6,7 @@ "originalName": "", "children": [ { - "id": 73, + "id": 72, "name": "SnackbarProvider", "kind": 128, "kindString": "Class", @@ -15,7 +15,7 @@ }, "typeParameter": [ { - "id": 76, + "id": 75, "name": "S", "kind": 131072, "kindString": "Type parameter", @@ -24,7 +24,7 @@ } }, { - "id": 77, + "id": 76, "name": "SS", "kind": 131072, "kindString": "Type parameter", @@ -33,7 +33,7 @@ } }, { - "id": 122, + "id": 121, "name": "S", "kind": 131072, "kindString": "Type parameter", @@ -44,7 +44,7 @@ ], "children": [ { - "id": 125, + "id": 124, "name": "constructor", "kind": 512, "kindString": "Constructor", @@ -65,7 +65,7 @@ }, "signatures": [ { - "id": 126, + "id": 125, "name": "new SnackbarProvider", "kind": 16384, "kindString": "Constructor signature", @@ -86,7 +86,7 @@ }, "parameters": [ { - "id": 127, + "id": 126, "name": "props", "kind": 32768, "kindString": "Parameter", @@ -98,7 +98,7 @@ "typeArguments": [ { "type": "reference", - "id": 60, + "id": 59, "name": "SnackbarProviderProps" } ], @@ -108,17 +108,17 @@ ], "type": { "type": "reference", - "id": 73, + "id": 72, "name": "SnackbarProvider" }, "inheritedFrom": { "type": "reference", - "id": 125, + "id": 124, "name": "Component.__constructor" } }, { - "id": 128, + "id": 127, "name": "new SnackbarProvider", "kind": 16384, "kindString": "Constructor signature", @@ -139,7 +139,7 @@ }, "parameters": [ { - "id": 129, + "id": 128, "name": "props", "kind": 32768, "kindString": "Parameter", @@ -148,12 +148,12 @@ }, "type": { "type": "reference", - "id": 60, + "id": 59, "name": "SnackbarProviderProps" } }, { - "id": 130, + "id": 129, "name": "context", "kind": 32768, "kindString": "Parameter", @@ -169,12 +169,12 @@ ], "type": { "type": "reference", - "id": 73, + "id": 72, "name": "SnackbarProvider" }, "inheritedFrom": { "type": "reference", - "id": 125, + "id": 124, "name": "Component.__constructor" } } @@ -193,12 +193,12 @@ ], "inheritedFrom": { "type": "reference", - "id": 125, + "id": 124, "name": "Component.__constructor" } }, { - "id": 75, + "id": 74, "name": "closeSnackbar", "kind": 1024, "kindString": "Property", @@ -225,7 +225,7 @@ } }, { - "id": 124, + "id": 123, "name": "context", "kind": 1024, "kindString": "Property", @@ -255,12 +255,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 124, + "id": 123, "name": "Component.context" } }, { - "id": 74, + "id": 73, "name": "enqueueSnackbar", "kind": 1024, "kindString": "Property", @@ -287,7 +287,7 @@ } }, { - "id": 151, + "id": 150, "name": "props", "kind": 1024, "kindString": "Property", @@ -309,7 +309,7 @@ "typeArguments": [ { "type": "reference", - "id": 60, + "id": 59, "name": "SnackbarProviderProps" } ], @@ -321,7 +321,7 @@ { "type": "reflection", "declaration": { - "id": 152, + "id": 151, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -330,7 +330,7 @@ }, "children": [ { - "id": 153, + "id": 152, "name": "children", "kind": 32, "kindString": "Variable", @@ -356,7 +356,7 @@ "title": "Variables", "kind": 32, "children": [ - 153 + 152 ] } ], @@ -376,12 +376,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 151, + "id": 150, "name": "Component.props" } }, { - "id": 155, + "id": 154, "name": "refs", "kind": 1024, "kindString": "Property", @@ -406,7 +406,7 @@ "type": { "type": "reflection", "declaration": { - "id": 156, + "id": 155, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -415,7 +415,7 @@ }, "indexSignature": [ { - "id": 157, + "id": 156, "name": "__index", "kind": 8192, "kindString": "Index signature", @@ -424,7 +424,7 @@ }, "parameters": [ { - "id": 158, + "id": 157, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -454,12 +454,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 155, + "id": 154, "name": "Component.refs" } }, { - "id": 154, + "id": 153, "name": "state", "kind": 1024, "kindString": "Property", @@ -485,12 +485,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 154, + "id": 153, "name": "Component.state" } }, { - "id": 123, + "id": 122, "name": "contextType", "kind": 1024, "kindString": "Property", @@ -528,12 +528,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 123, + "id": 122, "name": "Component.contextType" } }, { - "id": 102, + "id": 101, "name": "UNSAFE_componentWillMount", "kind": 2048, "kindString": "Method", @@ -543,7 +543,7 @@ }, "signatures": [ { - "id": 103, + "id": 102, "name": "UNSAFE_componentWillMount", "kind": 4096, "kindString": "Call signature", @@ -574,7 +574,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 102, + "id": 101, "name": "DeprecatedLifecycle.UNSAFE_componentWillMount" } } @@ -588,12 +588,12 @@ ], "inheritedFrom": { "type": "reference", - "id": 102, + "id": 101, "name": "DeprecatedLifecycle.UNSAFE_componentWillMount" } }, { - "id": 108, + "id": 107, "name": "UNSAFE_componentWillReceiveProps", "kind": 2048, "kindString": "Method", @@ -603,7 +603,7 @@ }, "signatures": [ { - "id": 109, + "id": 108, "name": "UNSAFE_componentWillReceiveProps", "kind": 4096, "kindString": "Call signature", @@ -630,7 +630,7 @@ }, "parameters": [ { - "id": 110, + "id": 109, "name": "nextProps", "kind": 32768, "kindString": "Parameter", @@ -642,7 +642,7 @@ "typeArguments": [ { "type": "reference", - "id": 60, + "id": 59, "name": "SnackbarProviderProps" } ], @@ -650,7 +650,7 @@ } }, { - "id": 111, + "id": 110, "name": "nextContext", "kind": 32768, "kindString": "Parameter", @@ -669,7 +669,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 108, + "id": 107, "name": "DeprecatedLifecycle.UNSAFE_componentWillReceiveProps" } } @@ -683,12 +683,12 @@ ], "inheritedFrom": { "type": "reference", - "id": 108, + "id": 107, "name": "DeprecatedLifecycle.UNSAFE_componentWillReceiveProps" } }, { - "id": 117, + "id": 116, "name": "UNSAFE_componentWillUpdate", "kind": 2048, "kindString": "Method", @@ -698,7 +698,7 @@ }, "signatures": [ { - "id": 118, + "id": 117, "name": "UNSAFE_componentWillUpdate", "kind": 4096, "kindString": "Call signature", @@ -725,7 +725,7 @@ }, "parameters": [ { - "id": 119, + "id": 118, "name": "nextProps", "kind": 32768, "kindString": "Parameter", @@ -737,7 +737,7 @@ "typeArguments": [ { "type": "reference", - "id": 60, + "id": 59, "name": "SnackbarProviderProps" } ], @@ -745,7 +745,7 @@ } }, { - "id": 120, + "id": 119, "name": "nextState", "kind": 32768, "kindString": "Parameter", @@ -764,7 +764,7 @@ } }, { - "id": 121, + "id": 120, "name": "nextContext", "kind": 32768, "kindString": "Parameter", @@ -783,7 +783,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 117, + "id": 116, "name": "DeprecatedLifecycle.UNSAFE_componentWillUpdate" } } @@ -797,12 +797,12 @@ ], "inheritedFrom": { "type": "reference", - "id": 117, + "id": 116, "name": "DeprecatedLifecycle.UNSAFE_componentWillUpdate" } }, { - "id": 87, + "id": 86, "name": "componentDidCatch", "kind": 2048, "kindString": "Method", @@ -812,7 +812,7 @@ }, "signatures": [ { - "id": 88, + "id": 87, "name": "componentDidCatch", "kind": 4096, "kindString": "Call signature", @@ -824,7 +824,7 @@ }, "parameters": [ { - "id": 89, + "id": 88, "name": "error", "kind": 32768, "kindString": "Parameter", @@ -837,7 +837,7 @@ } }, { - "id": 90, + "id": 89, "name": "errorInfo", "kind": 32768, "kindString": "Parameter", @@ -856,7 +856,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 87, + "id": 86, "name": "ComponentLifecycle.componentDidCatch" } } @@ -870,12 +870,12 @@ ], "inheritedFrom": { "type": "reference", - "id": 87, + "id": 86, "name": "ComponentLifecycle.componentDidCatch" } }, { - "id": 78, + "id": 77, "name": "componentDidMount", "kind": 2048, "kindString": "Method", @@ -885,7 +885,7 @@ }, "signatures": [ { - "id": 79, + "id": 78, "name": "componentDidMount", "kind": 4096, "kindString": "Call signature", @@ -901,7 +901,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 78, + "id": 77, "name": "ComponentLifecycle.componentDidMount" } } @@ -915,12 +915,12 @@ ], "inheritedFrom": { "type": "reference", - "id": 78, + "id": 77, "name": "ComponentLifecycle.componentDidMount" } }, { - "id": 95, + "id": 94, "name": "componentDidUpdate", "kind": 2048, "kindString": "Method", @@ -930,7 +930,7 @@ }, "signatures": [ { - "id": 96, + "id": 95, "name": "componentDidUpdate", "kind": 4096, "kindString": "Call signature", @@ -943,7 +943,7 @@ }, "parameters": [ { - "id": 97, + "id": 96, "name": "prevProps", "kind": 32768, "kindString": "Parameter", @@ -955,7 +955,7 @@ "typeArguments": [ { "type": "reference", - "id": 60, + "id": 59, "name": "SnackbarProviderProps" } ], @@ -963,7 +963,7 @@ } }, { - "id": 98, + "id": 97, "name": "prevState", "kind": 32768, "kindString": "Parameter", @@ -982,7 +982,7 @@ } }, { - "id": 99, + "id": 98, "name": "snapshot", "kind": 32768, "kindString": "Parameter", @@ -992,7 +992,7 @@ }, "type": { "type": "reference", - "id": 77, + "id": 76, "name": "SS" } } @@ -1003,7 +1003,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 95, + "id": 94, "name": "NewLifecycle.componentDidUpdate" } } @@ -1017,12 +1017,12 @@ ], "inheritedFrom": { "type": "reference", - "id": 95, + "id": 94, "name": "NewLifecycle.componentDidUpdate" } }, { - "id": 100, + "id": 99, "name": "componentWillMount", "kind": 2048, "kindString": "Method", @@ -1032,7 +1032,7 @@ }, "signatures": [ { - "id": 101, + "id": 100, "name": "componentWillMount", "kind": 4096, "kindString": "Call signature", @@ -1063,7 +1063,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 100, + "id": 99, "name": "DeprecatedLifecycle.componentWillMount" } } @@ -1077,12 +1077,12 @@ ], "inheritedFrom": { "type": "reference", - "id": 100, + "id": 99, "name": "DeprecatedLifecycle.componentWillMount" } }, { - "id": 104, + "id": 103, "name": "componentWillReceiveProps", "kind": 2048, "kindString": "Method", @@ -1092,7 +1092,7 @@ }, "signatures": [ { - "id": 105, + "id": 104, "name": "componentWillReceiveProps", "kind": 4096, "kindString": "Call signature", @@ -1119,7 +1119,7 @@ }, "parameters": [ { - "id": 106, + "id": 105, "name": "nextProps", "kind": 32768, "kindString": "Parameter", @@ -1131,7 +1131,7 @@ "typeArguments": [ { "type": "reference", - "id": 60, + "id": 59, "name": "SnackbarProviderProps" } ], @@ -1139,7 +1139,7 @@ } }, { - "id": 107, + "id": 106, "name": "nextContext", "kind": 32768, "kindString": "Parameter", @@ -1158,7 +1158,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 104, + "id": 103, "name": "DeprecatedLifecycle.componentWillReceiveProps" } } @@ -1172,12 +1172,12 @@ ], "inheritedFrom": { "type": "reference", - "id": 104, + "id": 103, "name": "DeprecatedLifecycle.componentWillReceiveProps" } }, { - "id": 85, + "id": 84, "name": "componentWillUnmount", "kind": 2048, "kindString": "Method", @@ -1187,7 +1187,7 @@ }, "signatures": [ { - "id": 86, + "id": 85, "name": "componentWillUnmount", "kind": 4096, "kindString": "Call signature", @@ -1203,7 +1203,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 85, + "id": 84, "name": "ComponentLifecycle.componentWillUnmount" } } @@ -1217,12 +1217,12 @@ ], "inheritedFrom": { "type": "reference", - "id": 85, + "id": 84, "name": "ComponentLifecycle.componentWillUnmount" } }, { - "id": 112, + "id": 111, "name": "componentWillUpdate", "kind": 2048, "kindString": "Method", @@ -1232,7 +1232,7 @@ }, "signatures": [ { - "id": 113, + "id": 112, "name": "componentWillUpdate", "kind": 4096, "kindString": "Call signature", @@ -1259,7 +1259,7 @@ }, "parameters": [ { - "id": 114, + "id": 113, "name": "nextProps", "kind": 32768, "kindString": "Parameter", @@ -1271,7 +1271,7 @@ "typeArguments": [ { "type": "reference", - "id": 60, + "id": 59, "name": "SnackbarProviderProps" } ], @@ -1279,7 +1279,7 @@ } }, { - "id": 115, + "id": 114, "name": "nextState", "kind": 32768, "kindString": "Parameter", @@ -1298,7 +1298,7 @@ } }, { - "id": 116, + "id": 115, "name": "nextContext", "kind": 32768, "kindString": "Parameter", @@ -1317,7 +1317,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 112, + "id": 111, "name": "DeprecatedLifecycle.componentWillUpdate" } } @@ -1331,12 +1331,12 @@ ], "inheritedFrom": { "type": "reference", - "id": 112, + "id": 111, "name": "DeprecatedLifecycle.componentWillUpdate" } }, { - "id": 144, + "id": 143, "name": "forceUpdate", "kind": 2048, "kindString": "Method", @@ -1345,7 +1345,7 @@ }, "signatures": [ { - "id": 145, + "id": 144, "name": "forceUpdate", "kind": 4096, "kindString": "Call signature", @@ -1354,7 +1354,7 @@ }, "parameters": [ { - "id": 146, + "id": 145, "name": "callback", "kind": 32768, "kindString": "Parameter", @@ -1372,7 +1372,7 @@ { "type": "reflection", "declaration": { - "id": 147, + "id": 146, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -1381,7 +1381,7 @@ }, "signatures": [ { - "id": 148, + "id": 147, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -1406,7 +1406,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 144, + "id": 143, "name": "Component.forceUpdate" } } @@ -1420,12 +1420,12 @@ ], "inheritedFrom": { "type": "reference", - "id": 144, + "id": 143, "name": "Component.forceUpdate" } }, { - "id": 91, + "id": 90, "name": "getSnapshotBeforeUpdate", "kind": 2048, "kindString": "Method", @@ -1435,7 +1435,7 @@ }, "signatures": [ { - "id": 92, + "id": 91, "name": "getSnapshotBeforeUpdate", "kind": 4096, "kindString": "Call signature", @@ -1448,7 +1448,7 @@ }, "parameters": [ { - "id": 93, + "id": 92, "name": "prevProps", "kind": 32768, "kindString": "Parameter", @@ -1460,7 +1460,7 @@ "typeArguments": [ { "type": "reference", - "id": 60, + "id": 59, "name": "SnackbarProviderProps" } ], @@ -1468,7 +1468,7 @@ } }, { - "id": 94, + "id": 93, "name": "prevState", "kind": 32768, "kindString": "Parameter", @@ -1502,7 +1502,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 91, + "id": 90, "name": "NewLifecycle.getSnapshotBeforeUpdate" } } @@ -1516,12 +1516,12 @@ ], "inheritedFrom": { "type": "reference", - "id": 91, + "id": 90, "name": "NewLifecycle.getSnapshotBeforeUpdate" } }, { - "id": 149, + "id": 148, "name": "render", "kind": 2048, "kindString": "Method", @@ -1530,7 +1530,7 @@ }, "signatures": [ { - "id": 150, + "id": 149, "name": "render", "kind": 4096, "kindString": "Call signature", @@ -1543,7 +1543,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 149, + "id": 148, "name": "Component.render" } } @@ -1557,12 +1557,12 @@ ], "inheritedFrom": { "type": "reference", - "id": 149, + "id": 148, "name": "Component.render" } }, { - "id": 131, + "id": 130, "name": "setState", "kind": 2048, "kindString": "Method", @@ -1571,7 +1571,7 @@ }, "signatures": [ { - "id": 132, + "id": 131, "name": "setState", "kind": 4096, "kindString": "Call signature", @@ -1580,7 +1580,7 @@ }, "typeParameter": [ { - "id": 133, + "id": 132, "name": "K", "kind": 131072, "kindString": "Type parameter", @@ -1599,7 +1599,7 @@ ], "parameters": [ { - "id": 134, + "id": 133, "name": "state", "kind": 32768, "kindString": "Parameter", @@ -1612,7 +1612,7 @@ { "type": "reflection", "declaration": { - "id": 135, + "id": 134, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -1621,7 +1621,7 @@ }, "signatures": [ { - "id": 136, + "id": 135, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -1630,7 +1630,7 @@ }, "parameters": [ { - "id": 137, + "id": 136, "name": "prevState", "kind": 32768, "kindString": "Parameter", @@ -1649,7 +1649,7 @@ } }, { - "id": 138, + "id": 137, "name": "props", "kind": 32768, "kindString": "Parameter", @@ -1661,7 +1661,7 @@ "typeArguments": [ { "type": "reference", - "id": 60, + "id": 59, "name": "SnackbarProviderProps" } ], @@ -1683,7 +1683,7 @@ { "type": "reflection", "declaration": { - "id": 139, + "id": 138, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -1719,7 +1719,7 @@ { "type": "reflection", "declaration": { - "id": 140, + "id": 139, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -1734,7 +1734,7 @@ } }, { - "id": 141, + "id": 140, "name": "callback", "kind": 32768, "kindString": "Parameter", @@ -1752,7 +1752,7 @@ { "type": "reflection", "declaration": { - "id": 142, + "id": 141, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -1761,7 +1761,7 @@ }, "signatures": [ { - "id": 143, + "id": 142, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -1786,7 +1786,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 131, + "id": 130, "name": "Component.setState" } } @@ -1800,12 +1800,12 @@ ], "inheritedFrom": { "type": "reference", - "id": 131, + "id": 130, "name": "Component.setState" } }, { - "id": 80, + "id": 79, "name": "shouldComponentUpdate", "kind": 2048, "kindString": "Method", @@ -1815,7 +1815,7 @@ }, "signatures": [ { - "id": 81, + "id": 80, "name": "shouldComponentUpdate", "kind": 4096, "kindString": "Call signature", @@ -1828,7 +1828,7 @@ }, "parameters": [ { - "id": 82, + "id": 81, "name": "nextProps", "kind": 32768, "kindString": "Parameter", @@ -1840,7 +1840,7 @@ "typeArguments": [ { "type": "reference", - "id": 60, + "id": 59, "name": "SnackbarProviderProps" } ], @@ -1848,7 +1848,7 @@ } }, { - "id": 83, + "id": 82, "name": "nextState", "kind": 32768, "kindString": "Parameter", @@ -1867,7 +1867,7 @@ } }, { - "id": 84, + "id": 83, "name": "nextContext", "kind": 32768, "kindString": "Parameter", @@ -1886,7 +1886,7 @@ }, "inheritedFrom": { "type": "reference", - "id": 80, + "id": 79, "name": "ComponentLifecycle.shouldComponentUpdate" } } @@ -1900,7 +1900,7 @@ ], "inheritedFrom": { "type": "reference", - "id": 80, + "id": 79, "name": "ComponentLifecycle.shouldComponentUpdate" } } @@ -1910,41 +1910,41 @@ "title": "Constructors", "kind": 512, "children": [ - 125 + 124 ] }, { "title": "Properties", "kind": 1024, "children": [ - 75, - 124, 74, - 151, - 155, + 123, + 73, + 150, 154, - 123 + 153, + 122 ] }, { "title": "Methods", "kind": 2048, "children": [ - 102, - 108, - 117, - 87, - 78, - 95, - 100, - 104, - 85, - 112, - 144, - 91, - 149, - 131, - 80 + 101, + 107, + 116, + 86, + 77, + 94, + 99, + 103, + 84, + 111, + 143, + 90, + 148, + 130, + 79 ] } ], @@ -1961,7 +1961,7 @@ "typeArguments": [ { "type": "reference", - "id": 60, + "id": 59, "name": "SnackbarProviderProps" } ], @@ -2116,7 +2116,7 @@ ] }, { - "id": 53, + "id": 52, "name": "OptionsObject", "kind": 256, "kindString": "Interface", @@ -2126,7 +2126,7 @@ "comment": {}, "children": [ { - "id": 59, + "id": 58, "name": "action", "kind": 1024, "kindString": "Property", @@ -2153,17 +2153,17 @@ ], "type": { "type": "reference", - "id": 184, + "id": 183, "name": "SnackbarAction" }, "inheritedFrom": { "type": "reference", - "id": 50, + "id": 49, "name": "SharedProps.action" } }, { - "id": 58, + "id": 57, "name": "content", "kind": 1024, "kindString": "Property", @@ -2190,17 +2190,17 @@ ], "type": { "type": "reference", - "id": 188, + "id": 187, "name": "SnackbarContentCallback" }, "inheritedFrom": { "type": "reference", - "id": 49, + "id": 48, "name": "SharedProps.content" } }, { - "id": 54, + "id": 53, "name": "key", "kind": 1024, "kindString": "Property", @@ -2226,12 +2226,12 @@ ], "type": { "type": "reference", - "id": 180, + "id": 179, "name": "SnackbarKey" } }, { - "id": 55, + "id": 54, "name": "persist", "kind": 1024, "kindString": "Property", @@ -2274,7 +2274,7 @@ } }, { - "id": 57, + "id": 56, "name": "preventDuplicate", "kind": 1024, "kindString": "Property", @@ -2317,12 +2317,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 48, + "id": 47, "name": "SharedProps.preventDuplicate" } }, { - "id": 56, + "id": 55, "name": "variant", "kind": 1024, "kindString": "Property", @@ -2348,12 +2348,12 @@ ], "type": { "type": "reference", - "id": 181, + "id": 180, "name": "VariantType" }, "inheritedFrom": { "type": "reference", - "id": 47, + "id": 46, "name": "SharedProps.variant" } } @@ -2363,12 +2363,12 @@ "title": "Properties", "kind": 1024, "children": [ - 59, 58, - 54, - 55, 57, - 56 + 53, + 54, + 56, + 55 ] } ], @@ -2382,13 +2382,13 @@ "extendedTypes": [ { "type": "reference", - "id": 46, + "id": 45, "name": "SharedProps" } ] }, { - "id": 159, + "id": 158, "name": "ProviderContext", "kind": 256, "kindString": "Interface", @@ -2397,7 +2397,7 @@ }, "children": [ { - "id": 165, + "id": 164, "name": "closeSnackbar", "kind": 1024, "kindString": "Property", @@ -2414,7 +2414,7 @@ "type": { "type": "reflection", "declaration": { - "id": 166, + "id": 165, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -2423,7 +2423,7 @@ }, "signatures": [ { - "id": 167, + "id": 166, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -2432,7 +2432,7 @@ }, "parameters": [ { - "id": 168, + "id": 167, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -2442,7 +2442,7 @@ }, "type": { "type": "reference", - "id": 180, + "id": 179, "name": "SnackbarKey" } } @@ -2464,7 +2464,7 @@ } }, { - "id": 160, + "id": 159, "name": "enqueueSnackbar", "kind": 1024, "kindString": "Property", @@ -2481,7 +2481,7 @@ "type": { "type": "reflection", "declaration": { - "id": 161, + "id": 160, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -2490,7 +2490,7 @@ }, "signatures": [ { - "id": 162, + "id": 161, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -2499,7 +2499,7 @@ }, "parameters": [ { - "id": 163, + "id": 162, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -2508,12 +2508,12 @@ }, "type": { "type": "reference", - "id": 183, + "id": 182, "name": "SnackbarMessage" } }, { - "id": 164, + "id": 163, "name": "options", "kind": 32768, "kindString": "Parameter", @@ -2523,14 +2523,14 @@ }, "type": { "type": "reference", - "id": 53, + "id": 52, "name": "OptionsObject" } } ], "type": { "type": "reference", - "id": 180, + "id": 179, "name": "SnackbarKey" } } @@ -2551,8 +2551,8 @@ "title": "Properties", "kind": 1024, "children": [ - 165, - 160 + 164, + 159 ] } ], @@ -2565,7 +2565,7 @@ ] }, { - "id": 46, + "id": 45, "name": "SharedProps", "kind": 256, "kindString": "Interface", @@ -2575,7 +2575,7 @@ "comment": {}, "children": [ { - "id": 50, + "id": 49, "name": "action", "kind": 1024, "kindString": "Property", @@ -2602,12 +2602,12 @@ ], "type": { "type": "reference", - "id": 184, + "id": 183, "name": "SnackbarAction" } }, { - "id": 49, + "id": 48, "name": "content", "kind": 1024, "kindString": "Property", @@ -2634,12 +2634,12 @@ ], "type": { "type": "reference", - "id": 188, + "id": 187, "name": "SnackbarContentCallback" } }, { - "id": 48, + "id": 47, "name": "preventDuplicate", "kind": 1024, "kindString": "Property", @@ -2682,7 +2682,7 @@ } }, { - "id": 47, + "id": 46, "name": "variant", "kind": 1024, "kindString": "Property", @@ -2708,7 +2708,7 @@ ], "type": { "type": "reference", - "id": 181, + "id": 180, "name": "VariantType" } } @@ -2718,10 +2718,10 @@ "title": "Properties", "kind": 1024, "children": [ - 50, 49, 48, - 47 + 47, + 46 ] } ], @@ -2736,7 +2736,7 @@ { "type": "reflection", "declaration": { - "id": 51, + "id": 50, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -2755,7 +2755,7 @@ { "type": "reflection", "declaration": { - "id": 52, + "id": 51, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -2775,12 +2775,12 @@ "extendedBy": [ { "type": "reference", - "id": 53, + "id": 52, "name": "OptionsObject" }, { "type": "reference", - "id": 60, + "id": 59, "name": "SnackbarProviderProps" } ] @@ -3041,7 +3041,7 @@ } }, { - "id": 41, + "id": 40, "name": "className", "kind": 1024, "kindString": "Property", @@ -3052,7 +3052,7 @@ "sources": [ { "fileName": "node_modules/@material-ui/core/index.d.ts", - "line": 24, + "line": 19, "character": 13 } ], @@ -3089,8 +3089,8 @@ }, "sources": [ { - "fileName": "node_modules/@material-ui/styles/withStyles/withStyles.d.ts", - "line": 115, + "fileName": "node_modules/@material-ui/core/styles/index.d.ts", + "line": 76, "character": 9 } ], @@ -3099,7 +3099,7 @@ "typeArguments": [ { "type": "reference", - "id": 172, + "id": 171, "typeArguments": [ { "type": "reference", @@ -3167,39 +3167,7 @@ } }, { - "id": 40, - "name": "innerRef", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "node_modules/@material-ui/styles/withStyles/withStyles.d.ts", - "line": 116, - "character": 10 - } - ], - "type": { - "type": "reference", - "typeArguments": [ - { - "type": "intrinsic", - "name": "any" - } - ], - "name": "React.Ref" - }, - "inheritedFrom": { - "type": "reference", - "id": 40, - "name": "StyledComponentProps.innerRef" - } - }, - { - "id": 42, + "id": 41, "name": "ref", "kind": 1024, "kindString": "Property", @@ -3210,7 +3178,7 @@ "sources": [ { "fileName": "node_modules/@material-ui/core/index.d.ts", - "line": 25, + "line": 20, "character": 7 } ], @@ -3223,7 +3191,7 @@ "extendsType": { "type": "reflection", "declaration": { - "id": 43, + "id": 42, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -3232,7 +3200,7 @@ }, "children": [ { - "id": 44, + "id": 43, "name": "ref", "kind": 32, "kindString": "Variable", @@ -3243,7 +3211,7 @@ "sources": [ { "fileName": "node_modules/@material-ui/core/index.d.ts", - "line": 25, + "line": 20, "character": 25 } ], @@ -3258,14 +3226,14 @@ "title": "Variables", "kind": 32, "children": [ - 44 + 43 ] } ], "sources": [ { "fileName": "node_modules/@material-ui/core/index.d.ts", - "line": 25, + "line": 20, "character": 19 } ] @@ -3332,7 +3300,7 @@ } }, { - "id": 45, + "id": 44, "name": "style", "kind": 1024, "kindString": "Property", @@ -3343,7 +3311,7 @@ "sources": [ { "fileName": "node_modules/@material-ui/core/index.d.ts", - "line": 26, + "line": 21, "character": 9 } ], @@ -3518,13 +3486,12 @@ 19, 22, 20, - 41, + 40, 39, 23, - 40, - 42, + 41, 24, - 45, + 44, 26 ] } @@ -3614,7 +3581,7 @@ "sources": [ { "fileName": "node_modules/@material-ui/core/index.d.ts", - "line": 24, + "line": 19, "character": 13 } ], @@ -3644,7 +3611,7 @@ "sources": [ { "fileName": "node_modules/@material-ui/core/index.d.ts", - "line": 25, + "line": 20, "character": 7 } ], @@ -3677,7 +3644,7 @@ "sources": [ { "fileName": "node_modules/@material-ui/core/index.d.ts", - "line": 25, + "line": 20, "character": 25 } ], @@ -3699,7 +3666,7 @@ "sources": [ { "fileName": "node_modules/@material-ui/core/index.d.ts", - "line": 25, + "line": 20, "character": 19 } ] @@ -3733,7 +3700,7 @@ "sources": [ { "fileName": "node_modules/@material-ui/core/index.d.ts", - "line": 26, + "line": 21, "character": 9 } ], @@ -3761,7 +3728,7 @@ ] }, { - "id": 60, + "id": 59, "name": "SnackbarProviderProps", "kind": 256, "kindString": "Interface", @@ -3773,7 +3740,7 @@ }, "children": [ { - "id": 72, + "id": 71, "name": "action", "kind": 1024, "kindString": "Property", @@ -3800,17 +3767,17 @@ ], "type": { "type": "reference", - "id": 184, + "id": 183, "name": "SnackbarAction" }, "inheritedFrom": { "type": "reference", - "id": 50, + "id": 49, "name": "SharedProps.action" } }, { - "id": 61, + "id": 60, "name": "children", "kind": 1024, "kindString": "Property", @@ -3845,7 +3812,7 @@ } }, { - "id": 66, + "id": 65, "name": "classes", "kind": 1024, "kindString": "Property", @@ -3868,11 +3835,11 @@ "typeArguments": [ { "type": "reference", - "id": 172, + "id": 171, "typeArguments": [ { "type": "reference", - "id": 212, + "id": 211, "name": "CombinedClassKey" } ], @@ -3883,7 +3850,7 @@ } }, { - "id": 71, + "id": 70, "name": "content", "kind": 1024, "kindString": "Property", @@ -3910,17 +3877,17 @@ ], "type": { "type": "reference", - "id": 188, + "id": 187, "name": "SnackbarContentCallback" }, "inheritedFrom": { "type": "reference", - "id": 49, + "id": 48, "name": "SharedProps.content" } }, { - "id": 62, + "id": 61, "name": "dense", "kind": 1024, "kindString": "Property", @@ -3963,7 +3930,7 @@ } }, { - "id": 65, + "id": 64, "name": "domRoot", "kind": 1024, "kindString": "Property", @@ -3987,7 +3954,7 @@ } }, { - "id": 64, + "id": 63, "name": "hideIconVariant", "kind": 1024, "kindString": "Property", @@ -4030,7 +3997,7 @@ } }, { - "id": 67, + "id": 66, "name": "iconVariant", "kind": 1024, "kindString": "Property", @@ -4061,7 +4028,7 @@ } }, { - "id": 63, + "id": 62, "name": "maxSnack", "kind": 1024, "kindString": "Property", @@ -4100,7 +4067,7 @@ } }, { - "id": 70, + "id": 69, "name": "preventDuplicate", "kind": 1024, "kindString": "Property", @@ -4143,12 +4110,12 @@ }, "inheritedFrom": { "type": "reference", - "id": 48, + "id": 47, "name": "SharedProps.preventDuplicate" } }, { - "id": 69, + "id": 68, "name": "variant", "kind": 1024, "kindString": "Property", @@ -4174,12 +4141,12 @@ ], "type": { "type": "reference", - "id": 181, + "id": 180, "name": "VariantType" }, "inheritedFrom": { "type": "reference", - "id": 47, + "id": 46, "name": "SharedProps.variant" } } @@ -4189,17 +4156,17 @@ "title": "Properties", "kind": 1024, "children": [ - 72, - 61, - 66, 71, - 62, + 60, 65, + 70, + 61, 64, - 67, 63, - 70, - 69 + 66, + 62, + 69, + 68 ] } ], @@ -4213,7 +4180,7 @@ "extendedTypes": [ { "type": "reference", - "id": 46, + "id": 45, "name": "SharedProps" } ] @@ -4265,7 +4232,7 @@ ], "type": { "type": "reference", - "id": 193, + "id": 192, "name": "TransitionCloseHandler" } }, @@ -4289,7 +4256,7 @@ ], "type": { "type": "reference", - "id": 205, + "id": 204, "name": "TransitionHandler" } }, @@ -4313,7 +4280,7 @@ ], "type": { "type": "reference", - "id": 199, + "id": 198, "name": "TransitionEnterHandler" } }, @@ -4337,7 +4304,7 @@ ], "type": { "type": "reference", - "id": 205, + "id": 204, "name": "TransitionHandler" } }, @@ -4361,7 +4328,7 @@ ], "type": { "type": "reference", - "id": 205, + "id": 204, "name": "TransitionHandler" } }, @@ -4385,7 +4352,7 @@ ], "type": { "type": "reference", - "id": 205, + "id": 204, "name": "TransitionHandler" } }, @@ -4409,7 +4376,7 @@ ], "type": { "type": "reference", - "id": 205, + "id": 204, "name": "TransitionHandler" } } @@ -4438,7 +4405,7 @@ ] }, { - "id": 172, + "id": 171, "name": "ClassNameMap", "kind": 4194304, "kindString": "Type alias", @@ -4447,7 +4414,7 @@ }, "typeParameter": [ { - "id": 173, + "id": 172, "name": "ClassKey", "kind": 131072, "kindString": "Type parameter", @@ -4487,7 +4454,7 @@ } }, { - "id": 182, + "id": 181, "name": "CloseReason", "kind": 4194304, "kindString": "Type alias", @@ -4524,7 +4491,7 @@ } }, { - "id": 212, + "id": 211, "name": "CombinedClassKey", "kind": 4194304, "kindString": "Type alias", @@ -4543,12 +4510,12 @@ "types": [ { "type": "reference", - "id": 211, + "id": 210, "name": "VariantClassKey" }, { "type": "reference", - "id": 210, + "id": 209, "name": "ContainerClassKey" }, { @@ -4559,7 +4526,7 @@ } }, { - "id": 210, + "id": 209, "name": "ContainerClassKey", "kind": 4194304, "kindString": "Type alias", @@ -4608,7 +4575,7 @@ } }, { - "id": 177, + "id": 176, "name": "Modify", "kind": 4194304, "kindString": "Type alias", @@ -4617,7 +4584,7 @@ }, "typeParameter": [ { - "id": 178, + "id": 177, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -4626,7 +4593,7 @@ } }, { - "id": 179, + "id": 178, "name": "R", "kind": 131072, "kindString": "Type parameter", @@ -4685,7 +4652,7 @@ } }, { - "id": 174, + "id": 173, "name": "Omit", "kind": 4194304, "kindString": "Type alias", @@ -4694,7 +4661,7 @@ }, "typeParameter": [ { - "id": 175, + "id": 174, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -4703,7 +4670,7 @@ } }, { - "id": 176, + "id": 175, "name": "K", "kind": 131072, "kindString": "Type parameter", @@ -4765,7 +4732,7 @@ } }, { - "id": 169, + "id": 168, "name": "RequiredBy", "kind": 4194304, "kindString": "Type alias", @@ -4774,7 +4741,7 @@ }, "typeParameter": [ { - "id": 170, + "id": 169, "name": "T", "kind": 131072, "kindString": "Type parameter", @@ -4783,7 +4750,7 @@ } }, { - "id": 171, + "id": 170, "name": "K", "kind": 131072, "kindString": "Type parameter", @@ -4812,7 +4779,7 @@ "types": [ { "type": "reference", - "id": 174, + "id": 173, "typeArguments": [ { "type": "typeParameter", @@ -4865,7 +4832,7 @@ } }, { - "id": 184, + "id": 183, "name": "SnackbarAction", "kind": 4194304, "kindString": "Type alias", @@ -4889,7 +4856,7 @@ { "type": "reflection", "declaration": { - "id": 185, + "id": 184, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -4898,7 +4865,7 @@ }, "signatures": [ { - "id": 186, + "id": 185, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -4907,7 +4874,7 @@ }, "parameters": [ { - "id": 187, + "id": 186, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -4916,7 +4883,7 @@ }, "type": { "type": "reference", - "id": 180, + "id": 179, "name": "SnackbarKey" } } @@ -4940,7 +4907,7 @@ } }, { - "id": 188, + "id": 187, "name": "SnackbarContentCallback", "kind": 4194304, "kindString": "Type alias", @@ -4964,7 +4931,7 @@ { "type": "reflection", "declaration": { - "id": 189, + "id": 188, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -4973,7 +4940,7 @@ }, "signatures": [ { - "id": 190, + "id": 189, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -4982,7 +4949,7 @@ }, "parameters": [ { - "id": 191, + "id": 190, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -4991,12 +4958,12 @@ }, "type": { "type": "reference", - "id": 180, + "id": 179, "name": "SnackbarKey" } }, { - "id": 192, + "id": 191, "name": "message", "kind": 32768, "kindString": "Parameter", @@ -5005,7 +4972,7 @@ }, "type": { "type": "reference", - "id": 183, + "id": 182, "name": "SnackbarMessage" } } @@ -5029,7 +4996,7 @@ } }, { - "id": 213, + "id": 212, "name": "SnackbarContentProps", "kind": 4194304, "kindString": "Type alias", @@ -5055,7 +5022,7 @@ } }, { - "id": 180, + "id": 179, "name": "SnackbarKey", "kind": 4194304, "kindString": "Type alias", @@ -5084,7 +5051,7 @@ } }, { - "id": 183, + "id": 182, "name": "SnackbarMessage", "kind": 4194304, "kindString": "Type alias", @@ -5113,7 +5080,7 @@ } }, { - "id": 193, + "id": 192, "name": "TransitionCloseHandler", "kind": 4194304, "kindString": "Type alias", @@ -5130,7 +5097,7 @@ "type": { "type": "reflection", "declaration": { - "id": 194, + "id": 193, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -5139,7 +5106,7 @@ }, "signatures": [ { - "id": 195, + "id": 194, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -5148,7 +5115,7 @@ }, "parameters": [ { - "id": 196, + "id": 195, "name": "event", "kind": 32768, "kindString": "Parameter", @@ -5176,7 +5143,7 @@ } }, { - "id": 197, + "id": 196, "name": "reason", "kind": 32768, "kindString": "Parameter", @@ -5185,12 +5152,12 @@ }, "type": { "type": "reference", - "id": 182, + "id": 181, "name": "CloseReason" } }, { - "id": 198, + "id": 197, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -5200,7 +5167,7 @@ }, "type": { "type": "reference", - "id": 180, + "id": 179, "name": "SnackbarKey" } } @@ -5222,7 +5189,7 @@ } }, { - "id": 199, + "id": 198, "name": "TransitionEnterHandler", "kind": 4194304, "kindString": "Type alias", @@ -5239,7 +5206,7 @@ "type": { "type": "reflection", "declaration": { - "id": 200, + "id": 199, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -5248,7 +5215,7 @@ }, "signatures": [ { - "id": 201, + "id": 200, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -5257,7 +5224,7 @@ }, "parameters": [ { - "id": 202, + "id": 201, "name": "node", "kind": 32768, "kindString": "Parameter", @@ -5270,7 +5237,7 @@ } }, { - "id": 203, + "id": 202, "name": "isAppearing", "kind": 32768, "kindString": "Parameter", @@ -5283,7 +5250,7 @@ } }, { - "id": 204, + "id": 203, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -5292,7 +5259,7 @@ }, "type": { "type": "reference", - "id": 180, + "id": 179, "name": "SnackbarKey" } } @@ -5314,7 +5281,7 @@ } }, { - "id": 205, + "id": 204, "name": "TransitionHandler", "kind": 4194304, "kindString": "Type alias", @@ -5331,7 +5298,7 @@ "type": { "type": "reflection", "declaration": { - "id": 206, + "id": 205, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -5340,7 +5307,7 @@ }, "signatures": [ { - "id": 207, + "id": 206, "name": "__call", "kind": 4096, "kindString": "Call signature", @@ -5349,7 +5316,7 @@ }, "parameters": [ { - "id": 208, + "id": 207, "name": "node", "kind": 32768, "kindString": "Parameter", @@ -5362,7 +5329,7 @@ } }, { - "id": 209, + "id": 208, "name": "key", "kind": 32768, "kindString": "Parameter", @@ -5371,7 +5338,7 @@ }, "type": { "type": "reference", - "id": 180, + "id": 179, "name": "SnackbarKey" } } @@ -5393,7 +5360,7 @@ } }, { - "id": 211, + "id": 210, "name": "VariantClassKey", "kind": 4194304, "kindString": "Type alias", @@ -5430,7 +5397,7 @@ } }, { - "id": 181, + "id": 180, "name": "VariantType", "kind": 4194304, "kindString": "Type alias", @@ -5471,7 +5438,7 @@ } }, { - "id": 223, + "id": 222, "name": "WithSnackbarProps", "kind": 4194304, "kindString": "Type alias", @@ -5487,12 +5454,12 @@ ], "type": { "type": "reference", - "id": 159, + "id": 158, "name": "ProviderContext" } }, { - "id": 220, + "id": 219, "name": "SnackbarContent", "kind": 32, "kindString": "Variable", @@ -5515,7 +5482,7 @@ "types": [ { "type": "reference", - "id": 213, + "id": 212, "name": "SnackbarContentProps" }, { @@ -5535,7 +5502,7 @@ } }, { - "id": 221, + "id": 220, "name": "useSnackbar", "kind": 64, "kindString": "Function", @@ -5544,7 +5511,7 @@ }, "signatures": [ { - "id": 222, + "id": 221, "name": "useSnackbar", "kind": 4096, "kindString": "Call signature", @@ -5553,7 +5520,7 @@ }, "type": { "type": "reference", - "id": 159, + "id": 158, "name": "ProviderContext" } } @@ -5567,7 +5534,7 @@ ] }, { - "id": 214, + "id": 213, "name": "withSnackbar", "kind": 64, "kindString": "Function", @@ -5576,7 +5543,7 @@ }, "signatures": [ { - "id": 215, + "id": 214, "name": "withSnackbar", "kind": 4096, "kindString": "Call signature", @@ -5585,7 +5552,7 @@ }, "typeParameter": [ { - "id": 216, + "id": 215, "name": "P", "kind": 131072, "kindString": "Type parameter", @@ -5594,14 +5561,14 @@ }, "type": { "type": "reference", - "id": 159, + "id": 158, "name": "ProviderContext" } } ], "parameters": [ { - "id": 217, + "id": 216, "name": "component", "kind": 32768, "kindString": "Parameter", @@ -5616,7 +5583,7 @@ "name": "P", "constraint": { "type": "reference", - "id": 159, + "id": 158, "name": "ProviderContext" } } @@ -5633,14 +5600,14 @@ "typeArguments": [ { "type": "reference", - "id": 174, + "id": 173, "typeArguments": [ { "type": "typeParameter", "name": "P", "constraint": { "type": "reference", - "id": 159, + "id": 158, "name": "ProviderContext" } }, @@ -5649,7 +5616,7 @@ "operator": "keyof", "target": { "type": "reference", - "id": 159, + "id": 158, "name": "ProviderContext" } } @@ -5662,7 +5629,7 @@ { "type": "reflection", "declaration": { - "id": 218, + "id": 217, "name": "__type", "kind": 65536, "kindString": "Type literal", @@ -5671,7 +5638,7 @@ }, "children": [ { - "id": 219, + "id": 218, "name": "WrappedComponent", "kind": 32, "kindString": "Variable", @@ -5693,7 +5660,7 @@ "name": "P", "constraint": { "type": "reference", - "id": 159, + "id": 158, "name": "ProviderContext" } } @@ -5707,7 +5674,7 @@ "title": "Variables", "kind": 32, "children": [ - 219 + 218 ] } ], @@ -5738,7 +5705,7 @@ "title": "Classes", "kind": 128, "children": [ - 73 + 72 ] }, { @@ -5746,39 +5713,39 @@ "kind": 256, "children": [ 4, - 53, - 159, - 46, + 52, + 158, + 45, 1, 18, - 60, + 59, 10 ], "categories": [ { "title": "Enqueue", "children": [ - 53 + 52 ] }, { "title": "Other", "children": [ 4, - 159, + 158, 1 ] }, { "title": "Provider", "children": [ - 60 + 59 ] }, { "title": "Shared", "children": [ - 46, + 45, 18, 10 ] @@ -5789,39 +5756,39 @@ "title": "Type aliases", "kind": 4194304, "children": [ - 172, - 182, + 171, + 181, + 211, + 209, + 176, + 173, + 168, + 183, + 187, 212, + 179, + 182, + 192, + 198, + 204, 210, - 177, - 174, - 169, - 184, - 188, - 213, 180, - 183, - 193, - 199, - 205, - 211, - 181, - 223 + 222 ] }, { "title": "Variables", "kind": 32, "children": [ - 220 + 219 ] }, { "title": "Functions", "kind": 64, "children": [ - 221, - 214 + 220, + 213 ] } ]