From e7c3a049526a595f8d4557d43cf629132dfbf321 Mon Sep 17 00:00:00 2001 From: Sepehr Mohammadi Date: Thu, 20 May 2021 12:52:41 +0430 Subject: [PATCH 01/97] fix: border css control styles --- docs/examples/CustomControl.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/CustomControl.tsx b/docs/examples/CustomControl.tsx index 2a069e5cb8..5b58e58623 100644 --- a/docs/examples/CustomControl.tsx +++ b/docs/examples/CustomControl.tsx @@ -3,7 +3,7 @@ import React, { Component } from 'react'; import Select, { components, ControlProps } from 'react-select'; import { ColourOption, colourOptions } from '../data'; const controlStyles = { - borderRadius: '1px solid black', + border: '1px solid black', padding: '5px', background: colourOptions[2].color, color: 'white', From 70bb93ae2b51e0e94dfb50ac4fcafb905ae35eec Mon Sep 17 00:00:00 2001 From: Sepehr Mohammadi Date: Thu, 20 May 2021 13:08:43 +0430 Subject: [PATCH 02/97] remove: unnecessarily curly bracket --- docs/examples/CustomControl.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/CustomControl.tsx b/docs/examples/CustomControl.tsx index 5b58e58623..9a7844f24f 100644 --- a/docs/examples/CustomControl.tsx +++ b/docs/examples/CustomControl.tsx @@ -11,7 +11,7 @@ const controlStyles = { const ControlComponent = (props: ControlProps) => (
- {

Custom Control

} +

Custom Control

); From 285112f08fa8aeacbd0021a400a62263116aeb67 Mon Sep 17 00:00:00 2001 From: Nick Gault Date: Thu, 27 May 2021 17:29:27 -0700 Subject: [PATCH 03/97] Update README to clarify need for @types Confusion about Typescript arises because the HEAD of the current master branch, although still numbered v4.x for the npm-published module, still shoes the Typescript code to be releases as v5. Unfamiliar users might assume that, variously, v4.x is written in Typescript (in fact, it's in JavaScript) or that the typings in this code work for v4.x (they don't, as they're not compatible with the required `@types` version. These 2 statements should clear up confusion. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index dea04e7334..b4a2a7de32 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,10 @@ Check the docs for more information on: - [Allowing users to create new options](https://www.react-select.com/creatable) - [Advanced use-cases](https://www.react-select.com/advanced) +## Typescript + +The upcoming v5 release is being rewritten in Typescript. The types for current (v4.x), and past published releases are available at [@types](https://www.npmjs.com/package/@types/react-select). + # Thanks Thank you to everyone who has contributed to this project. It's been a wild ride. From 9c53ce103e32faebb3eea52cab68c1b91806985f Mon Sep 17 00:00:00 2001 From: Nick Gault Date: Thu, 27 May 2021 17:53:33 -0700 Subject: [PATCH 04/97] Update README.md with Typescript info For the uninitiated, some possible points of confusion about Typescript and React Select are solved with these 2 short sentences. There will be no need to edit them in the future... or, at least until there is no demand for v4. BACKGROUND: For the current HEAD of master, the version number in the `package.json` is v4.x and all code is written in Typescript, although Typescript code will not be published until v5. A reasonable inference, if not the only one possible, is that v4 ships with the `.d.ts` files that reflect this Typescript code, especially since the `package.json` for v4.2.3 indicates that they do. Additionally, absent clarification, a user might assume that the typings on the current master apply to v4. In fact, they are incompatible with the @types version. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b4a2a7de32..d49e586fab 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ Check the docs for more information on: ## Typescript -The upcoming v5 release is being rewritten in Typescript. The types for current (v4.x), and past published releases are available at [@types](https://www.npmjs.com/package/@types/react-select). +The v5 release represents a rewrite from JavaScript to Typescript. The types for v4 and earlier releases are available at [@types](https://www.npmjs.com/package/@types/react-select). # Thanks From 2ad9345458445517a8f8497193ede83c83c6dafd Mon Sep 17 00:00:00 2001 From: Eric Bonow Date: Fri, 4 Jun 2021 15:16:53 -0700 Subject: [PATCH 05/97] Remove autosizeinput --- .prettierignore | 1 + babel.config.js | 1 + package.json | 3 +- packages/react-select/package.json | 2 - .../react-select/src/components/Input.tsx | 64 +- yarn.lock | 3237 ++++++++--------- 6 files changed, 1655 insertions(+), 1653 deletions(-) diff --git a/.prettierignore b/.prettierignore index b7d748ace5..201bf7f3af 100644 --- a/.prettierignore +++ b/.prettierignore @@ -5,3 +5,4 @@ cypress/support/* lib/* node_modules/* **/node_modules/* +**/magical-types/* diff --git a/babel.config.js b/babel.config.js index 271ed97774..1a658f42d8 100644 --- a/babel.config.js +++ b/babel.config.js @@ -2,6 +2,7 @@ module.exports = { plugins: [ '@emotion/babel-plugin', ['@babel/plugin-proposal-class-properties', { loose: true }], + ['@babel/plugin-proposal-private-methods', { loose: true }], '@babel/plugin-transform-runtime', ], presets: [ diff --git a/package.json b/package.json index ca8ed03829..b422e236b9 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@atlaskit/tooltip": "^17.1.2", "@babel/core": "^7.12.0", "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/plugin-proposal-private-methods": "^7.13.0", "@babel/plugin-transform-runtime": "^7.12.0", "@babel/polyfill": "^7.12.1", "@babel/preset-env": "^7.12.0", @@ -46,7 +47,6 @@ "@types/react-codesandboxer": "^3.1.0", "@types/react-dom": "^16.9.10", "@types/react-helmet": "^5.0.16", - "@types/react-input-autosize": "^2.2.0", "@types/react-markings": "^1.3.0", "@types/react-node-resolver": "^2.0.0", "@types/react-router-dom": "^4.3.5", @@ -96,7 +96,6 @@ "react-codesandboxer": "^3.1.5", "react-dom": "^16.13.0", "react-helmet": "^5.2.0", - "react-input-autosize": "^3.0.0", "react-markings": "^1.3.0", "react-router-dom": "^4.2.2", "react-sortable-hoc": "^1.9.1", diff --git a/packages/react-select/package.json b/packages/react-select/package.json index 6c37045565..1d8af1dff3 100644 --- a/packages/react-select/package.json +++ b/packages/react-select/package.json @@ -13,11 +13,9 @@ "@babel/runtime": "^7.12.0", "@emotion/cache": "^11.4.0", "@emotion/react": "^11.1.1", - "@types/react-input-autosize": "^2.2.0", "@types/react-transition-group": "^4.4.0", "memoize-one": "^5.0.0", "prop-types": "^15.6.0", - "react-input-autosize": "^3.0.0", "react-transition-group": "^4.3.0" }, "devDependencies": { diff --git a/packages/react-select/src/components/Input.tsx b/packages/react-select/src/components/Input.tsx index 4b863d291c..963ae7e25c 100644 --- a/packages/react-select/src/components/Input.tsx +++ b/packages/react-select/src/components/Input.tsx @@ -1,6 +1,6 @@ /** @jsx jsx */ +import { InputHTMLAttributes } from 'react'; import { jsx } from '@emotion/react'; -import AutosizeInput, { AutosizeInputProps } from 'react-input-autosize'; import { CommonPropsAndClassName, @@ -14,7 +14,8 @@ export interface InputSpecificProps< Option extends OptionBase = OptionBase, IsMulti extends boolean = boolean, Group extends GroupBase