@omnic/widget-locations 1.1.81 → 1.1.82
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.
|
@@ -1,5 +1,18 @@
|
|
|
1
|
-
import type { FC, ReactNode, RefObject } from "react";
|
|
1
|
+
import type { ChangeEvent, FC, ReactNode, RefObject } from "react";
|
|
2
2
|
import type { UsePlaceAutocompleteReturn } from '../../hooks/usePlaceAutocomplete';
|
|
3
|
+
/** Props passed to custom input when using render prop. */
|
|
4
|
+
export interface PlaceAutocompleteInputProps {
|
|
5
|
+
value: string;
|
|
6
|
+
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
7
|
+
inputRef?: RefObject<HTMLInputElement>;
|
|
8
|
+
onFocus?: () => void;
|
|
9
|
+
onBlur?: () => void;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
name?: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
endAdornment?: ReactNode;
|
|
15
|
+
}
|
|
3
16
|
interface PlaceAutocompleteProps {
|
|
4
17
|
autocomplete: UsePlaceAutocompleteReturn;
|
|
5
18
|
className?: string;
|
|
@@ -11,6 +24,8 @@ interface PlaceAutocompleteProps {
|
|
|
11
24
|
onClick?: () => void;
|
|
12
25
|
onFocus?: () => void;
|
|
13
26
|
onBlur?: () => void;
|
|
27
|
+
/** Custom input. If not provided, default Input is used. */
|
|
28
|
+
children?: (props: PlaceAutocompleteInputProps) => ReactNode;
|
|
14
29
|
}
|
|
15
30
|
export declare const PlaceAutocomplete: FC<PlaceAutocompleteProps>;
|
|
16
31
|
export {};
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -14,3 +14,5 @@ export * from "./types/points";
|
|
|
14
14
|
export * from "./types/regions";
|
|
15
15
|
export * from "./context/WidgetLocations";
|
|
16
16
|
export * from "./context/WidgetLocations/components/MapPlaceholder";
|
|
17
|
+
export * from "./components/PlaceAutocomplete";
|
|
18
|
+
export * from "./hooks/usePlaceAutocomplete";
|