@react-types/select 3.11.0 → 3.12.0

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 +2 -2
  2. package/src/index.d.ts +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/select",
3
- "version": "3.11.0",
3
+ "version": "3.12.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -17,5 +17,5 @@
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
20
- "gitHead": "0bda51183baa23306342af32a82012ea0fe0f2dc"
20
+ "gitHead": "4d838da5bfe36abb35aed166995a9ef63825370f"
21
21
  }
package/src/index.d.ts CHANGED
@@ -61,7 +61,9 @@ export interface SelectProps<T, M extends SelectionMode = 'single'> extends Coll
61
61
  /** Sets the default open state of the menu. */
62
62
  defaultOpen?: boolean,
63
63
  /** Method that is called when the open state of the menu changes. */
64
- onOpenChange?: (isOpen: boolean) => void
64
+ onOpenChange?: (isOpen: boolean) => void,
65
+ /** Whether the select should be allowed to be open when the collection is empty. */
66
+ allowsEmptyCollection?: boolean
65
67
  }
66
68
 
67
69
  export interface AriaSelectProps<T, M extends SelectionMode = 'single'> extends SelectProps<T, M>, DOMProps, AriaLabelingProps, FocusableDOMProps {
@@ -81,7 +83,7 @@ export interface AriaSelectProps<T, M extends SelectionMode = 'single'> extends
81
83
  form?: string
82
84
  }
83
85
 
84
- export interface SpectrumPickerProps<T> extends Omit<AriaSelectProps<T>, 'selectionMode' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange' | 'value' | 'defaultValue' | 'onChange'>, Omit<SingleSelection, 'disallowEmptySelection'>, AsyncLoadable, SpectrumLabelableProps, StyleProps {
86
+ export interface SpectrumPickerProps<T> extends Omit<AriaSelectProps<T>, 'selectionMode' | 'selectedKey' | 'defaultSelectedKey' | 'onSelectionChange' | 'value' | 'defaultValue' | 'onChange' | 'allowsEmptyCollection'>, Omit<SingleSelection, 'disallowEmptySelection'>, AsyncLoadable, SpectrumLabelableProps, StyleProps {
85
87
  /** Whether the textfield should be displayed with a quiet style. */
86
88
  isQuiet?: boolean,
87
89
  /** Alignment of the menu relative to the input target.