@react-types/listbox
Advanced tools
Comparing version
{ | ||
"name": "@react-types/listbox", | ||
"version": "3.0.0-nightly-641446f65-240905", | ||
"version": "3.0.0-nightly-6503446c0-250620", | ||
"description": "Spectrum UI components in React", | ||
@@ -12,11 +12,10 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@react-types/shared": "^3.0.0-nightly-641446f65-240905" | ||
"@react-types/shared": "3.0.0-nightly-6503446c0-250620" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"stableVersion": "3.5.1" | ||
} | ||
} |
@@ -23,3 +23,13 @@ /* | ||
interface AriaListBoxPropsBase<T> extends ListBoxProps<T>, DOMProps, AriaLabelingProps {} | ||
interface AriaListBoxPropsBase<T> extends ListBoxProps<T>, DOMProps, AriaLabelingProps { | ||
/** | ||
* Whether pressing the escape key should clear selection in the listbox or not. | ||
* | ||
* Most experiences should not modify this option as it eliminates a keyboard user's ability to | ||
* easily clear selection. Only use if the escape key is being handled externally or should not | ||
* trigger selection clearing contextually. | ||
* @default 'clearSelection' | ||
*/ | ||
escapeKeyBehavior?: 'clearSelection' | 'none' | ||
} | ||
export interface AriaListBoxProps<T> extends AriaListBoxPropsBase<T> { | ||
@@ -32,2 +42,6 @@ /** | ||
selectionBehavior?: SelectionBehavior, | ||
/** Whether selection should occur on press up instead of press down. */ | ||
shouldSelectOnPressUp?: boolean, | ||
/** Whether options should be focused when the user hovers over them. */ | ||
shouldFocusOnHover?: boolean, | ||
/** | ||
@@ -34,0 +48,0 @@ * Handler that is called when a user performs an action on an item. The exact user event depends on |
3096
24.79%49
40%+ Added
- Removed