@enonic/ui 1.0.1 → 1.0.2
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.
|
@@ -116,10 +116,9 @@ export declare const Combobox: {
|
|
|
116
116
|
({ className, ...props }: ComboboxToggleProps): ReactElement;
|
|
117
117
|
displayName: string;
|
|
118
118
|
};
|
|
119
|
-
Apply: {
|
|
120
|
-
(
|
|
121
|
-
|
|
122
|
-
};
|
|
119
|
+
Apply: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<ComboboxApplyProps> & {
|
|
120
|
+
ref?: import('preact').Ref<HTMLButtonElement> | undefined;
|
|
121
|
+
}>;
|
|
123
122
|
Portal: {
|
|
124
123
|
({ container, forceMount, children }: ComboboxPortalProps): ReactElement | null;
|
|
125
124
|
displayName: string;
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { ReactElement, ReactNode, RefObject } from 'react';
|
|
2
2
|
export type ContentType = 'listbox' | 'tree' | 'auto';
|
|
3
|
+
export type ComboboxOpenOptions = {
|
|
4
|
+
restoreFocus?: boolean;
|
|
5
|
+
};
|
|
3
6
|
export type ComboboxContextValue = {
|
|
4
7
|
baseId: string;
|
|
8
|
+
contentRef: RefObject<HTMLDivElement>;
|
|
5
9
|
controlRef: RefObject<HTMLDivElement> | null;
|
|
10
|
+
applyRef: RefObject<HTMLButtonElement>;
|
|
11
|
+
popupRef: RefObject<HTMLDivElement>;
|
|
12
|
+
restoreFocusOnCloseRef: RefObject<boolean>;
|
|
13
|
+
ignoreFocusExitCloseRef: RefObject<boolean>;
|
|
6
14
|
open: boolean;
|
|
7
|
-
setOpen: (next: boolean) => void;
|
|
15
|
+
setOpen: (next: boolean, options?: ComboboxOpenOptions) => void;
|
|
8
16
|
closeOnBlur: boolean;
|
|
9
17
|
inputValue: string;
|
|
10
18
|
setInputValue: (value: string) => void;
|