1 | import {
|
2 | SealedInitialState,
|
3 | useSealedState,
|
4 | } from "reakit-utils/useSealedState";
|
5 | import {
|
6 | unstable_ComboboxListGridState as ComboboxListGridState,
|
7 | unstable_ComboboxListGridActions as ComboboxListGridActions,
|
8 | unstable_ComboboxListGridInitialState as ComboboxListGridInitialState,
|
9 | unstable_useComboboxListGridState as useComboboxListGridState,
|
10 | } from "./ComboboxListGridState";
|
11 | import {
|
12 | ComboboxPopoverState,
|
13 | ComboboxPopoverActions,
|
14 | ComboboxPopoverInitialState,
|
15 | useComboboxPopoverState,
|
16 | } from "./__utils/ComboboxPopoverState";
|
17 |
|
18 | export function unstable_useComboboxGridState(
|
19 | initialState: SealedInitialState<unstable_ComboboxGridInitialState> = {}
|
20 | ): unstable_ComboboxGridStateReturn {
|
21 | const sealed = useSealedState(initialState);
|
22 | const combobox = useComboboxListGridState(sealed);
|
23 | return useComboboxPopoverState(combobox, sealed);
|
24 | }
|
25 |
|
26 | export type unstable_ComboboxGridState = ComboboxPopoverState &
|
27 | ComboboxListGridState;
|
28 |
|
29 | export type unstable_ComboboxGridActions = ComboboxPopoverActions &
|
30 | ComboboxListGridActions;
|
31 |
|
32 | export type unstable_ComboboxGridInitialState = ComboboxPopoverInitialState &
|
33 | ComboboxListGridInitialState;
|
34 |
|
35 | export type unstable_ComboboxGridStateReturn = unstable_ComboboxGridState &
|
36 | unstable_ComboboxGridActions;
|