Skip to content

Commit

Permalink
Merge pull request #1 from JedWatson/master
Browse files Browse the repository at this point in the history
Merging in React-Select v5.1
  • Loading branch information
ebonow committed Oct 13, 2021
2 parents a92c09a + 480ea85 commit caeef29
Show file tree
Hide file tree
Showing 94 changed files with 4,296 additions and 3,340 deletions.
5 changes: 5 additions & 0 deletions .changeset/nasty-eagles-suffer.md
@@ -0,0 +1,5 @@
---
'react-select': patch
---

Remove src directory from published package
5 changes: 5 additions & 0 deletions .changeset/small-bobcats-push.md
@@ -0,0 +1,5 @@
---
'react-select': patch
---

Add missing index to MultiValue props type
36 changes: 0 additions & 36 deletions .github/ISSUE_TEMPLATE.md

This file was deleted.

27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,27 @@
---
name: Bug report
about: File a bug report
title: '<title>'
labels: [issue/bug-unconfirmed]
assignees: ''
---

**Thanks for using react-select!**

If you are going to ask a question or want to propose a change or a new feature, then please don't file an issue for this.
Questions and feature requests have their own place in our discussions section.

## Are you reporting a bug or runtime error?

Please include a test case that demonstrates the issue you're reporting!

This is very helpful to maintainers in order to help us see the issue you're seeing.

Please note we are currently only directing our efforts towards the current major (v5) version and beyond.

We understand this might be inconvenient but it is in the best interest of supporting the broader community and to sustain the `react-select` project going forward.

To report bugs against react-select v5 please fork the following code-sandbox:
https://codesandbox.io/s/react-select-v5-sandbox-y5jtm

You may also find the [online Babel tool](https://babeljs.io/repl/) quite helpful if you wish to use ES6/ES7 syntax not yet supported by the browser you are using.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Feature request
url: https://github.com/JedWatson/react-select/discussions/categories/ideas
about: Got an idea for a feature or want to propose a change? Then this is the place for you.
- name: Question on usage
url: https://github.com/JedWatson/react-select/discussions/categories/q-a
about: If you have a question regarding the usage of the library.
- name: StackOverflow
url: https://stackoverflow.com/questions/tagged/react-select
about: Alternatively you can visit StackOverflow with the `[react-select]` tag
1 change: 1 addition & 0 deletions .prettierignore
Expand Up @@ -5,3 +5,4 @@ cypress/support/*
lib/*
node_modules/*
**/node_modules/*
**/magical-types/*
6 changes: 6 additions & 0 deletions .prettierrc.js
@@ -1,4 +1,10 @@
module.exports = {
singleQuote: true,
trailingComma: 'es5',
overrides: [
{
files: '.changeset/pre.json',
options: { parser: 'json-stringify' },
},
],
};
9 changes: 7 additions & 2 deletions README.md
Expand Up @@ -23,8 +23,8 @@ Features include:

## Using an older version?

- [v2 to v3 upgrade guide](https://github.com/JedWatson/react-select/issues/3585)
- [v1 to v2 upgrade guide](https://react-select.com/upgrade-guide)
- [v3, v4, and v5 upgrade guide](https://react-select.com/upgrade)
- [v2 upgrade guide](https://react-select.com/upgrade-to-v2)
- React Select v1 documentation and examples are available at [v1.react-select.com](https://v1.react-select.com)

# Installation and usage
Expand Down Expand Up @@ -149,6 +149,11 @@ Check the docs for more information on:
- [Creating an async select](https://www.react-select.com/async)
- [Allowing users to create new options](https://www.react-select.com/creatable)
- [Advanced use-cases](https://www.react-select.com/advanced)
- [TypeScript guide](https://www.react-select.com/typescript)

## Typescript

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). See the [TypeScript guide](https://www.react-select.com/typescript) for how to use the types starting with v5.

# Thanks

Expand Down
1 change: 1 addition & 0 deletions babel.config.js
Expand Up @@ -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: [
Expand Down
7 changes: 6 additions & 1 deletion docs/App/Header.tsx
Expand Up @@ -19,6 +19,11 @@ interface Change {
}

const changes = [
{
value: '/typescript',
icon: '🛠️',
label: 'Written in TypeScript',
},
{
value: '/props',
icon: '❤️',
Expand All @@ -40,7 +45,7 @@ const changes = [
label: 'Lots of advanced functionality',
},
{
value: '/upgrade-guide',
value: '/upgrade',
icon: '🗺',
label: 'Check out the Upgrade Guide',
},
Expand Down
3 changes: 2 additions & 1 deletion docs/App/index.tsx
Expand Up @@ -26,7 +26,8 @@ const sections = [
{ label: 'Async', path: '/async' },
{ label: 'Creatable', path: '/creatable' },
{ label: 'Advanced', path: '/advanced' },
{ label: 'Upgrading', path: '/upgrade-guide' },
{ label: 'TypeScript', path: '/typescript' },
{ label: 'Upgrading', path: '/upgrade' },
];

export default class App extends Component {
Expand Down
8 changes: 6 additions & 2 deletions docs/App/routes.ts
Expand Up @@ -6,7 +6,9 @@ import Components from '../pages/components';
import Async from '../pages/async';
import Creatable from '../pages/creatable';
import Advanced from '../pages/advanced';
import UpgradeGuide from '../pages/upgradeGuide';
import TypeScript from '../pages/typescript';
import Upgrade from '../pages/upgrade';
import UpgradeToV2 from '../pages/upgrade-to-v2';

const routes: { readonly [key: string]: ComponentType } = {
'/home': Home,
Expand All @@ -16,7 +18,9 @@ const routes: { readonly [key: string]: ComponentType } = {
'/async': Async,
'/creatable': Creatable,
'/advanced': Advanced,
'/upgrade-guide': UpgradeGuide,
'/typescript': TypeScript,
'/upgrade': Upgrade,
'/upgrade-to-v2': UpgradeToV2,
};

export default routes;
40 changes: 40 additions & 0 deletions docs/CHANGELOG.md
@@ -1,5 +1,45 @@
# @react-select/docs

## 3.1.1

### Patch Changes

- [638f5455](https://github.com/JedWatson/react-select/commit/638f545517d320fe70ca954511a71e96956abae3) [#4702](https://github.com/JedWatson/react-select/pull/4702) Thanks [@Methuselah96](https://github.com/Methuselah96)! - The Option generic is no longer required to extend the OptionBase type

- Updated dependencies [10225290]:
- Updated dependencies [53f1972b]:
- Updated dependencies [b41f4ceb]:
- Updated dependencies [4b028829]:
- Updated dependencies [7fcec537]:
- Updated dependencies [ca2c0e5b]:
- Updated dependencies [9e82aadc]:
- Updated dependencies [638f5455]:
- Updated dependencies [23cea0b5]:
- Updated dependencies [ef87c3ac]:
- react-select@undefined

## 3.1.1-beta.1

### Patch Changes

- [638f5455](https://github.com/JedWatson/react-select/commit/638f545517d320fe70ca954511a71e96956abae3) [#4702](https://github.com/JedWatson/react-select/pull/4702) Thanks [@Methuselah96](https://github.com/Methuselah96)! - The Option generic is no longer required to extend the OptionBase type

- Updated dependencies [10225290]:
- Updated dependencies [53f1972b]:
- Updated dependencies [b41f4ceb]:
- Updated dependencies [7fcec537]:
- Updated dependencies [9e82aadc]:
- Updated dependencies [638f5455]:
- react-select@undefined

## 3.1.1-beta.0

### Patch Changes

- Updated dependencies [4b028829]:
- Updated dependencies [ef87c3ac]:
- react-select@undefined

## 3.1.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions docs/PropTypes/Select.ts
@@ -1,10 +1,10 @@
import { Component } from 'react';

import { Props, defaultProps } from 'react-select/src/Select';
import { GroupBase, OptionBase } from 'react-select';
import { GroupBase } from 'react-select';

export default class Select extends Component<
Props<OptionBase, boolean, GroupBase<OptionBase>>
Props<unknown, boolean, GroupBase<unknown>>
> {
defaultProps = defaultProps;
}
4 changes: 2 additions & 2 deletions docs/PropTypes/components/ClearIndicator.ts
@@ -1,8 +1,8 @@
import { Component } from 'react';
import { GroupBase, ClearIndicatorProps, OptionBase } from 'react-select';
import { GroupBase, ClearIndicatorProps } from 'react-select';

export default class ClearIndicator<
Option extends OptionBase,
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>
> extends Component<ClearIndicatorProps<Option, IsMulti, Group>> {}
4 changes: 2 additions & 2 deletions docs/PropTypes/components/Control.ts
@@ -1,8 +1,8 @@
import { Component } from 'react';
import { ControlProps, GroupBase, OptionBase } from 'react-select';
import { ControlProps, GroupBase } from 'react-select';

export default class Control<
Option extends OptionBase,
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>
> extends Component<ControlProps<Option, IsMulti, Group>> {}
4 changes: 2 additions & 2 deletions docs/PropTypes/components/DropdownIndicator.ts
@@ -1,8 +1,8 @@
import { Component } from 'react';
import { GroupBase, DropdownIndicatorProps, OptionBase } from 'react-select';
import { GroupBase, DropdownIndicatorProps } from 'react-select';

export default class DropdownIndicator<
Option extends OptionBase,
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>
> extends Component<DropdownIndicatorProps<Option, IsMulti, Group>> {}
4 changes: 2 additions & 2 deletions docs/PropTypes/components/Group.ts
@@ -1,8 +1,8 @@
import { Component } from 'react';
import { GroupBase, GroupProps, OptionBase } from 'react-select';
import { GroupBase, GroupProps } from 'react-select';

export default class Group<
Option extends OptionBase,
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>
> extends Component<GroupProps<Option, IsMulti, Group>> {}
4 changes: 2 additions & 2 deletions docs/PropTypes/components/IndicatorsContainer.ts
@@ -1,8 +1,8 @@
import { Component } from 'react';
import { GroupBase, IndicatorsContainerProps, OptionBase } from 'react-select';
import { GroupBase, IndicatorsContainerProps } from 'react-select';

export default class IndicatorsContainer<
Option extends OptionBase,
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>
> extends Component<IndicatorsContainerProps<Option, IsMulti, Group>> {}
4 changes: 2 additions & 2 deletions docs/PropTypes/components/IndicatorsSeparator.ts
@@ -1,8 +1,8 @@
import { Component } from 'react';
import { DropdownIndicatorProps, GroupBase, OptionBase } from 'react-select';
import { DropdownIndicatorProps, GroupBase } from 'react-select';

export default class DropdownIndicator<
Option extends OptionBase,
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>
> extends Component<DropdownIndicatorProps<Option, IsMulti, Group>> {}
4 changes: 2 additions & 2 deletions docs/PropTypes/components/Input.ts
@@ -1,8 +1,8 @@
import { Component } from 'react';
import { GroupBase, InputProps, OptionBase } from 'react-select';
import { GroupBase, InputProps } from 'react-select';

export default class Input<
Option extends OptionBase,
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>
> extends Component<InputProps<Option, IsMulti, Group>> {}
4 changes: 2 additions & 2 deletions docs/PropTypes/components/LoadingIndicator.ts
@@ -1,8 +1,8 @@
import { Component } from 'react';
import { GroupBase, LoadingIndicatorProps, OptionBase } from 'react-select';
import { GroupBase, LoadingIndicatorProps } from 'react-select';

export default class LoadingIndicator<
Option extends OptionBase,
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>
> extends Component<LoadingIndicatorProps<Option, IsMulti, Group>> {}
4 changes: 2 additions & 2 deletions docs/PropTypes/components/LoadingMessage.ts
@@ -1,8 +1,8 @@
import { Component } from 'react';
import { GroupBase, NoticeProps, OptionBase } from 'react-select';
import { GroupBase, NoticeProps } from 'react-select';

export default class LoadingMessage<
Option extends OptionBase,
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>
> extends Component<NoticeProps<Option, IsMulti, Group>> {}
4 changes: 2 additions & 2 deletions docs/PropTypes/components/Menu.ts
@@ -1,8 +1,8 @@
import { Component } from 'react';
import { GroupBase, MenuProps, OptionBase } from 'react-select';
import { GroupBase, MenuProps } from 'react-select';

export default class Menu<
Option extends OptionBase,
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>
> extends Component<MenuProps<Option, IsMulti, Group>> {}
4 changes: 2 additions & 2 deletions docs/PropTypes/components/MenuList.ts
@@ -1,8 +1,8 @@
import { Component } from 'react';
import { GroupBase, MenuListProps, OptionBase } from 'react-select';
import { GroupBase, MenuListProps } from 'react-select';

export default class MenuList<
Option extends OptionBase,
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>
> extends Component<MenuListProps<Option, IsMulti, Group>> {}
4 changes: 2 additions & 2 deletions docs/PropTypes/components/MultiValue.ts
@@ -1,8 +1,8 @@
import { Component } from 'react';
import { GroupBase, MultiValueProps, OptionBase } from 'react-select';
import { GroupBase, MultiValueProps } from 'react-select';

export default class MultiValue<
Option extends OptionBase,
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>
> extends Component<MultiValueProps<Option, IsMulti, Group>> {}
4 changes: 2 additions & 2 deletions docs/PropTypes/components/MultiValueContainer.ts
@@ -1,8 +1,8 @@
import { Component } from 'react';
import { GroupBase, MultiValueGenericProps, OptionBase } from 'react-select';
import { GroupBase, MultiValueGenericProps } from 'react-select';

export default class MultiValueContainer<
Option extends OptionBase,
Option,
IsMulti extends boolean,
Group extends GroupBase<Option>
> extends Component<MultiValueGenericProps<Option, IsMulti, Group>> {}

0 comments on commit caeef29

Please sign in to comment.