From 6c7e4da6868aeb6abd1bb3337d265f3e250710e3 Mon Sep 17 00:00:00 2001 From: Joanna Ong Date: Wed, 18 May 2022 22:41:51 -0400 Subject: [PATCH] make tooltip accessible --- package-lock.json | 162 +----------------- packages/website/components/tooltip.js | 24 --- .../zero/components/tooltip/tooltip.js | 2 +- packages/website/package.json | 1 - 4 files changed, 3 insertions(+), 186 deletions(-) delete mode 100644 packages/website/components/tooltip.js diff --git a/package-lock.json b/package-lock.json index a123be1220..de01def14e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21337,11 +21337,6 @@ "sha.js": "bin.js" } }, - "node_modules/shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" - }, "node_modules/shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -25659,7 +25654,7 @@ }, "packages/cron": { "name": "@web3-storage/cron", - "version": "0.0.0", + "version": "1.0.0", "license": "(Apache-2.0 OR MIT)", "dependencies": { "@nftstorage/ipfs-cluster": "^5.0.1", @@ -27556,7 +27551,7 @@ }, "packages/website": { "name": "@web3-storage/website", - "version": "2.3.0", + "version": "2.4.0", "dependencies": { "@docsearch/react": "^3.0.0", "@magic-ext/oauth": "^0.7.0", @@ -27574,7 +27569,6 @@ "p-map": "^5.1.0", "pretty-bytes": "^5.6.0", "raw-loader": "^4.0.2", - "rc-tooltip": "^5.1.1", "react": "^17.0.2", "react-dom": "^17.0.2", "react-dropzone": "^11.3.4", @@ -29643,12 +29637,6 @@ "node": ">=0.10.0" } }, - "packages/website/node_modules/dom-align": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.12.2.tgz", - "integrity": "sha512-pHuazgqrsTFrGU2WLDdXxCFabkdQDx72ddkraZNih1KsMcN5qsRSTR9O4VJRlwTPCPb5COYg3LOfiMHHcPInHg==", - "license": "MIT" - }, "packages/website/node_modules/domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", @@ -33679,82 +33667,6 @@ "once": "^1.3.1" } }, - "packages/website/node_modules/rc-align": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/rc-align/-/rc-align-4.0.11.tgz", - "integrity": "sha512-n9mQfIYQbbNTbefyQnRHZPWuTEwG1rY4a9yKlIWHSTbgwI+XUMGRYd0uJ5pE2UbrNX0WvnMBA1zJ3Lrecpra/A==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "dom-align": "^1.7.0", - "lodash": "^4.17.21", - "rc-util": "^5.3.0", - "resize-observer-polyfill": "^1.5.1" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "packages/website/node_modules/rc-motion": { - "version": "2.4.6", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.11.1", - "classnames": "^2.2.1", - "rc-util": "^5.19.2" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "packages/website/node_modules/rc-tooltip": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-5.1.1.tgz", - "integrity": "sha512-alt8eGMJulio6+4/uDm7nvV+rJq9bsfxFDCI0ljPdbuoygUscbsMYb6EQgwib/uqsXQUvzk+S7A59uYHmEgmDA==", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.11.2", - "rc-trigger": "^5.0.0" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "packages/website/node_modules/rc-trigger": { - "version": "5.2.11", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.11.2", - "classnames": "^2.2.6", - "rc-align": "^4.0.0", - "rc-motion": "^2.0.0", - "rc-util": "^5.19.2" - }, - "engines": { - "node": ">=8.x" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, - "packages/website/node_modules/rc-util": { - "version": "5.19.3", - "license": "MIT", - "dependencies": { - "@babel/runtime": "^7.12.5", - "react-is": "^16.12.0", - "shallowequal": "^1.1.0" - }, - "peerDependencies": { - "react": ">=16.9.0", - "react-dom": ">=16.9.0" - } - }, "packages/website/node_modules/react-dropzone": { "version": "11.7.1", "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-11.7.1.tgz", @@ -34015,12 +33927,6 @@ "node": ">= 0.10" } }, - "packages/website/node_modules/resize-observer-polyfill": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==", - "license": "MIT" - }, "packages/website/node_modules/resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", @@ -41617,7 +41523,6 @@ "prettier": "2.4.1", "pretty-bytes": "^5.6.0", "raw-loader": "^4.0.2", - "rc-tooltip": "^5.1.1", "react": "^17.0.2", "react-dom": "^17.0.2", "react-dropzone": "^11.3.4", @@ -42989,11 +42894,6 @@ "isobject": "^3.0.1" } }, - "dom-align": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/dom-align/-/dom-align-1.12.2.tgz", - "integrity": "sha512-pHuazgqrsTFrGU2WLDdXxCFabkdQDx72ddkraZNih1KsMcN5qsRSTR9O4VJRlwTPCPb5COYg3LOfiMHHcPInHg==" - }, "domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", @@ -45878,54 +45778,6 @@ } } }, - "rc-align": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/rc-align/-/rc-align-4.0.11.tgz", - "integrity": "sha512-n9mQfIYQbbNTbefyQnRHZPWuTEwG1rY4a9yKlIWHSTbgwI+XUMGRYd0uJ5pE2UbrNX0WvnMBA1zJ3Lrecpra/A==", - "requires": { - "@babel/runtime": "^7.10.1", - "classnames": "2.x", - "dom-align": "^1.7.0", - "lodash": "^4.17.21", - "rc-util": "^5.3.0", - "resize-observer-polyfill": "^1.5.1" - } - }, - "rc-motion": { - "version": "2.4.6", - "requires": { - "@babel/runtime": "^7.11.1", - "classnames": "^2.2.1", - "rc-util": "^5.19.2" - } - }, - "rc-tooltip": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/rc-tooltip/-/rc-tooltip-5.1.1.tgz", - "integrity": "sha512-alt8eGMJulio6+4/uDm7nvV+rJq9bsfxFDCI0ljPdbuoygUscbsMYb6EQgwib/uqsXQUvzk+S7A59uYHmEgmDA==", - "requires": { - "@babel/runtime": "^7.11.2", - "rc-trigger": "^5.0.0" - } - }, - "rc-trigger": { - "version": "5.2.11", - "requires": { - "@babel/runtime": "^7.11.2", - "classnames": "^2.2.6", - "rc-align": "^4.0.0", - "rc-motion": "^2.0.0", - "rc-util": "^5.19.2" - } - }, - "rc-util": { - "version": "5.19.3", - "requires": { - "@babel/runtime": "^7.12.5", - "react-is": "^16.12.0", - "shallowequal": "^1.1.0" - } - }, "react-dropzone": { "version": "11.7.1", "resolved": "https://registry.npmjs.org/react-dropzone/-/react-dropzone-11.7.1.tgz", @@ -46099,11 +45951,6 @@ "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==" }, - "resize-observer-polyfill": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" - }, "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", @@ -59535,11 +59382,6 @@ "safe-buffer": "^5.0.1" } }, - "shallowequal": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz", - "integrity": "sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==" - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", diff --git a/packages/website/components/tooltip.js b/packages/website/components/tooltip.js deleted file mode 100644 index 8af601f351..0000000000 --- a/packages/website/components/tooltip.js +++ /dev/null @@ -1,24 +0,0 @@ -import RCTooltip from 'rc-tooltip'; -import 'rc-tooltip/assets/bootstrap_white.css'; - -/** - * @param {Object} props - * @param {JSX.Element} props.children - * @param {JSX.Element} props.overlay - * @param {string} [props.placement] - * @param {boolean} [props.destroyTooltipOnHide] - * @param {string} [props.overlayClassName] - */ -const Tooltip = ({ children, placement = 'top', overlay, destroyTooltipOnHide, overlayClassName = '' }) => ( - {overlay}} - overlayInnerStyle={{ borderColor: '#fc6553' }} - destroyTooltipOnHide={destroyTooltipOnHide} - overlayClassName={overlayClassName} - > - {children} - -); - -export default Tooltip; diff --git a/packages/website/modules/zero/components/tooltip/tooltip.js b/packages/website/modules/zero/components/tooltip/tooltip.js index c785fe8e1d..53971f5a64 100644 --- a/packages/website/modules/zero/components/tooltip/tooltip.js +++ b/packages/website/modules/zero/components/tooltip/tooltip.js @@ -16,7 +16,7 @@ import InfoAIcon from 'assets/icons/infoA'; */ const Tooltip = ({ content, icon = null, className, position }) => { return ( -
+
{icon || }
diff --git a/packages/website/package.json b/packages/website/package.json index be2e877587..d9f5bf4ab2 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -36,7 +36,6 @@ "p-map": "^5.1.0", "pretty-bytes": "^5.6.0", "raw-loader": "^4.0.2", - "rc-tooltip": "^5.1.1", "react": "^17.0.2", "react-dom": "^17.0.2", "react-dropzone": "^11.3.4",