diff --git a/CREDITS.md b/CREDITS.md index 4547e6dc1b4be2..7973a10a5a02d9 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -1133,32 +1133,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ``` -## - -``` -The MIT License (MIT) - -Copyright (c) 2015 Kenneth Chung - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -``` - ## ```text diff --git a/client/components/text-control/index.js b/client/components/text-control/index.js index eff5cf0b801189..e9d72c6465573d 100644 --- a/client/components/text-control/index.js +++ b/client/components/text-control/index.js @@ -1,7 +1,7 @@ import { FormLabel } from '@automattic/components'; +import { withFocusOutside } from '@wordpress/components'; import clsx from 'clsx'; import { Component } from 'react'; -import wrapWithClickOutside from 'react-click-outside'; /* * This component is temporary until we can pull in `@wordpress/components` and merge https://github.com/Automattic/wp-calypso/pull/34277. @@ -13,7 +13,7 @@ class MurielTextControl extends Component { isFocused: false, }; - handleClickOutside() { + handleFocusOutside() { this.setState( { isFocused: false } ); } @@ -87,4 +87,4 @@ class MurielTextControl extends Component { } } -export default wrapWithClickOutside( MurielTextControl ); +export default withFocusOutside( MurielTextControl ); diff --git a/client/my-sites/picker/index.jsx b/client/my-sites/picker/index.jsx index 083dc4b8af646e..a9af92a90bbb08 100644 --- a/client/my-sites/picker/index.jsx +++ b/client/my-sites/picker/index.jsx @@ -1,6 +1,6 @@ +import { withFocusOutside } from '@wordpress/components'; import PropTypes from 'prop-types'; import { Component } from 'react'; -import wrapWithClickOutside from 'react-click-outside'; import { connect } from 'react-redux'; import CloseOnEscape from 'calypso/components/close-on-escape'; import SiteSelector from 'calypso/components/site-selector'; @@ -85,7 +85,7 @@ class SitePicker extends Component { } }; - handleClickOutside = () => { + handleFocusOutside = () => { this.closePicker( null ); }; @@ -127,5 +127,5 @@ function mapStateToProps( state ) { } export default connect( mapStateToProps, { setNextLayoutFocus, setLayoutFocus } )( - wrapWithClickOutside( SitePicker ) + withFocusOutside( SitePicker ) ); diff --git a/client/package.json b/client/package.json index 3feb651730c1d9..5acddbda8e6ffb 100644 --- a/client/package.json +++ b/client/package.json @@ -183,7 +183,6 @@ "qrcode.react": "^3.1.0", "qs": "^6.9.1", "react": "^18.3.1", - "react-click-outside": "^3.0.1", "react-day-picker": "^7.4.10", "react-dom": "^18.3.1", "react-element-to-jsx-string": "^15.0.0", diff --git a/yarn.lock b/yarn.lock index 1745779be16e08..737ec4df067a1f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13245,7 +13245,6 @@ __metadata: qrcode.react: "npm:^3.1.0" qs: "npm:^6.9.1" react: "npm:^18.3.1" - react-click-outside: "npm:^3.0.1" react-day-picker: "npm:^7.4.10" react-dom: "npm:^18.3.1" react-element-to-jsx-string: "npm:^15.0.0" @@ -20024,13 +20023,6 @@ __metadata: languageName: node linkType: hard -"hoist-non-react-statics@npm:^2.1.1": - version: 2.5.5 - resolution: "hoist-non-react-statics@npm:2.5.5" - checksum: 79c204446a61ad490cc9342b2deeedea5a17f03a5fc091f367b6c08f29387c8d5578634ebfb8733043422a5e1182b372893d63f8737ac4b75da3a2ec4a316162 - languageName: node - linkType: hard - "hoist-non-react-statics@npm:^3.3.1, hoist-non-react-statics@npm:^3.3.2": version: 3.3.2 resolution: "hoist-non-react-statics@npm:3.3.2" @@ -28209,15 +28201,6 @@ __metadata: languageName: node linkType: hard -"react-click-outside@npm:^3.0.1": - version: 3.0.1 - resolution: "react-click-outside@npm:3.0.1" - dependencies: - hoist-non-react-statics: "npm:^2.1.1" - checksum: fd7c5c9984bcd1eb6214b5e180aa38dda1dce2cb5286a8ee57b84be2e4821a51eb791c275ebef345c23a010d3f026617c345fbb520bfb3babbc55fdbd08f244d - languageName: node - linkType: hard - "react-codemod@npm:^5.0.5": version: 5.1.1 resolution: "react-codemod@npm:5.1.1"