Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
MoritzKn committed Mar 20, 2024
2 parents 51ea7a0 + 06e3488 commit 454863f
Show file tree
Hide file tree
Showing 23 changed files with 587 additions and 120 deletions.
1 change: 1 addition & 0 deletions cypress/fixtures/selectors.json
Expand Up @@ -10,6 +10,7 @@
"indicatorClear": ".react-select__clear-indicator",
"indicatorDropdown": ".react-select__dropdown-indicator",
"menu": ".react-select__menu",
"control": ".react-select__control",
"menuOption": ".react-select__option",
"noOptionsValue": ".react-select__menu-notice--no-options",
"placeholder": ".react-select__placeholder",
Expand Down
6 changes: 5 additions & 1 deletion cypress/integration/single-select.spec.ts
Expand Up @@ -107,7 +107,11 @@ describe('Single Select', () => {
.click({ force: true })
.find('input')
.should('exist')
.should('be.disabled');
.should('be.disabled')
// control should have aria-disabled
.get(selector.singleBasicSelect)
.find(selector.control)
.should('have.attr', 'aria-disabled', 'true');
});

it(`Should filter options when searching in view: ${viewport}`, () => {
Expand Down
9 changes: 7 additions & 2 deletions docs/pages/typescript/index.tsx
Expand Up @@ -84,14 +84,19 @@ const onChange = (option: readonly Option[], actionMeta: ActionMeta<Option>) =>
}
~~~
The \`actionMeta\` parameter is optional. \`ActionMeta\` is a union that is discriminated on the \`action\` type. Take a look at at [types.ts](https://github.com/JedWatson/react-select/blob/master/packages/react-select/src/types.ts) in the source code to see its full definition.
The \`actionMeta\` parameter is optional. \`ActionMeta\` is a union that is discriminated on the \`action\` type. Take a look at [types.ts](https://github.com/JedWatson/react-select/blob/master/packages/react-select/src/types.ts) in the source code to see its full definition.
## Custom Select props
You can use module augmentation to add custom props to the \`Select\` prop types:
~~~jsx
declare module 'react-select/dist/declarations/src/Select' {
import type {} from 'react-select/base';
// This import is necessary for module augmentation.
// It allows us to extend the 'Props' interface in the 'react-select/base' module
// and add our custom property 'myCustomProp' to it.
declare module 'react-select/base' {
export interface Props<
Option,
IsMulti extends boolean,
Expand Down
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -58,7 +58,8 @@
"jest-in-case": "^1.0.2",
"prettier": "^2.2.1",
"style-loader": "^0.23.1",
"typescript": "^4.1.3"
"typescript": "^4.1.3",
"user-agent-data-types": "^0.4.2"
},
"scripts": {
"build": "preconstruct build",
Expand Down
40 changes: 40 additions & 0 deletions packages/react-select/CHANGELOG.md
@@ -1,5 +1,45 @@
# react-select

## 5.8.0

### Minor Changes

- [`884f1c42`](https://github.com/JedWatson/react-select/commit/884f1c42549faad7cb210169223b427ad6f0c9fd) [#5758](https://github.com/JedWatson/react-select/pull/5758) Thanks [@Ke1sy](https://github.com/Ke1sy)! - 1. Added 'aria-activedescendant' for input and functionality to calculate it;

2. Added role 'option' and 'aria-selected' for option;
3. Added role 'listbox' for menu;
4. Added tests for 'aria-activedescendant';
5. Changes in aria-live region:

- the instructions how to use select will be announced only one time when user focuses the input for the first time.
- instructions for menu or selected value will be announced only once after focusing them.
- removed aria-live for focused option because currently with correct aria-attributes it will be announced by screenreader natively as well as the status of this option (active or disabled).
- separated ariaContext into ariaFocused, ariaResults, ariaGuidance to avoid announcing redundant information and higlight only current change.

## 5.7.7

### Patch Changes

- [`224a8f0d`](https://github.com/JedWatson/react-select/commit/224a8f0d01a5b6200ff10280a0d7a9b613383032) [#5666](https://github.com/JedWatson/react-select/pull/5666) Thanks [@yhy-1](https://github.com/yhy-1)! - Add aria-disabled to select's control component.

## 5.7.6

### Patch Changes

- [`f6315cd5`](https://github.com/JedWatson/react-select/commit/f6315cd5feddb2e9ea168bcad391b29990b53afb) [#5672](https://github.com/JedWatson/react-select/pull/5672) Thanks [@tu4mo](https://github.com/tu4mo)! - Fix for calling non-cancellable scroll events

## 5.7.5

### Patch Changes

- [`9d1730ba`](https://github.com/JedWatson/react-select/commit/9d1730ba4f97a51d25c7e704acd1a4c2be8f7182) [#5347](https://github.com/JedWatson/react-select/pull/5347) Thanks [@aszmyd](https://github.com/aszmyd)! - Make scroll lock div work on a document context it belongs to

## 5.7.4

### Patch Changes

- [`16414bb5`](https://github.com/JedWatson/react-select/commit/16414bb53295b362690d2b089d74182ddeabc1dd) [#5689](https://github.com/JedWatson/react-select/pull/5689) Thanks [@Rall3n](https://github.com/Rall3n)! - Resolve `defaultProps` deprecation warning for React v18+.

## 5.7.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-select/package.json
@@ -1,6 +1,6 @@
{
"name": "react-select",
"version": "5.7.3",
"version": "5.8.0",
"description": "A Select control built with and for ReactJS",
"main": "dist/react-select.cjs.js",
"module": "dist/react-select.esm.js",
Expand Down

0 comments on commit 454863f

Please sign in to comment.