@react-types/listbox 3.3.6-nightly.3712 → 3.3.6-nightly.3715
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.
- package/package.json +3 -3
- package/src/index.d.ts +17 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-types/listbox",
|
|
3
|
-
"version": "3.3.6-nightly.
|
|
3
|
+
"version": "3.3.6-nightly.3715+86aa89b4e",
|
|
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.0.0-nightly.
|
|
12
|
+
"@react-types/shared": "3.0.0-nightly.2015+86aa89b4e"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
"publishConfig": {
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
|
-
"gitHead": "
|
|
20
|
+
"gitHead": "86aa89b4e1a5c343bfc865e465c37496ceb47ee4"
|
|
21
21
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import {AriaLabelingProps, AsyncLoadable, CollectionBase, DOMProps, FocusEvents, FocusStrategy, MultipleSelection, StyleProps} from '@react-types/shared';
|
|
13
|
+
import {AriaLabelingProps, AsyncLoadable, CollectionBase, DOMProps, FocusEvents, FocusStrategy, MultipleSelection, SelectionBehavior, StyleProps} from '@react-types/shared';
|
|
14
|
+
import {Key, ReactNode} from 'react';
|
|
14
15
|
|
|
15
16
|
export interface ListBoxProps<T> extends CollectionBase<T>, MultipleSelection, FocusEvents {
|
|
16
17
|
/** Whether to auto focus the listbox or an option. */
|
|
@@ -19,7 +20,20 @@ export interface ListBoxProps<T> extends CollectionBase<T>, MultipleSelection, F
|
|
|
19
20
|
shouldFocusWrap?: boolean
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
interface AriaListBoxPropsBase<T> extends ListBoxProps<T>, DOMProps, AriaLabelingProps {}
|
|
24
|
+
export interface AriaListBoxProps<T> extends AriaListBoxPropsBase<T> {
|
|
25
|
+
/**
|
|
26
|
+
* An optional visual label for the listbox.
|
|
27
|
+
*/
|
|
28
|
+
label?: ReactNode,
|
|
29
|
+
/** How multiple selection should behave in the collection. */
|
|
30
|
+
selectionBehavior?: SelectionBehavior,
|
|
31
|
+
/**
|
|
32
|
+
* Handler that is called when a user performs an action on an item. The exact user event depends on
|
|
33
|
+
* the collection's `selectionBehavior` prop and the interaction modality.
|
|
34
|
+
*/
|
|
35
|
+
onAction?: (key: Key) => void
|
|
36
|
+
}
|
|
23
37
|
|
|
24
|
-
export interface SpectrumListBoxProps<T> extends
|
|
38
|
+
export interface SpectrumListBoxProps<T> extends AriaListBoxPropsBase<T>, AsyncLoadable, StyleProps {
|
|
25
39
|
}
|