@react-types/select 3.12.0 → 3.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/index.d.ts +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/select",
3
- "version": "3.12.0",
3
+ "version": "3.12.1",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  "url": "https://github.com/adobe/react-spectrum"
10
10
  },
11
11
  "dependencies": {
12
- "@react-types/shared": "^3.32.1"
12
+ "@react-types/shared": "^3.33.0"
13
13
  },
14
14
  "peerDependencies": {
15
15
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
@@ -17,5 +17,5 @@
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
20
- "gitHead": "4d838da5bfe36abb35aed166995a9ef63825370f"
20
+ "gitHead": "66e51757606b43a89ed02c574ca24517323a2ab9"
21
21
  }
package/src/index.d.ts CHANGED
@@ -32,10 +32,11 @@ import {
32
32
  } from '@react-types/shared';
33
33
 
34
34
  export type SelectionMode = 'single' | 'multiple';
35
- export type ValueType<M extends SelectionMode> = M extends 'single' ? Key | null : Key[];
35
+ export type ValueType<M extends SelectionMode> = M extends 'single' ? Key | null : readonly Key[];
36
+ export type ChangeValueType<M extends SelectionMode> = M extends 'single' ? Key | null : Key[];
36
37
  type ValidationType<M extends SelectionMode> = M extends 'single' ? Key : Key[];
37
38
 
38
- export interface SelectProps<T, M extends SelectionMode = 'single'> extends CollectionBase<T>, Omit<InputBase, 'isReadOnly'>, ValueBase<ValueType<M>>, Validation<ValidationType<M>>, HelpTextProps, LabelableProps, TextInputBase, FocusableProps {
39
+ export interface SelectProps<T, M extends SelectionMode = 'single'> extends CollectionBase<T>, Omit<InputBase, 'isReadOnly'>, ValueBase<ValueType<M>, ChangeValueType<M>>, Validation<ValidationType<M>>, HelpTextProps, LabelableProps, TextInputBase, FocusableProps {
39
40
  /**
40
41
  * Whether single or multiple selection is enabled.
41
42
  * @default 'single'