@bluemarble/bm-components 0.0.18 → 0.0.19
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,12 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
import { Autocomplete as MuiAutocomplete, AutocompleteProps as MuiAutocompleteProps, AutocompleteRenderInputParams } from "@mui/material";
|
|
3
|
-
declare type MuiAutocomplete<T> = Omit<MuiAutocompleteProps<T, boolean, undefined, boolean>, "renderInput">;
|
|
3
|
+
declare type MuiAutocomplete<T> = Omit<MuiAutocompleteProps<T, boolean, undefined, boolean>, "renderInput" | "getOptionLabel">;
|
|
4
4
|
declare type AutocompleteProps<T> = AutocompleteWithoutProps<T> | AutocompleteWithFormikProps<T>;
|
|
5
5
|
interface AutocompleteWithoutProps<T> extends MuiAutocomplete<T> {
|
|
6
6
|
name?: never;
|
|
7
7
|
withFormik: false;
|
|
8
8
|
getOptionValue?: never;
|
|
9
9
|
label?: string;
|
|
10
|
+
getOptionLabel: (option: T) => string;
|
|
10
11
|
renderInput?: (params: AutocompleteRenderInputParams) => ReactNode;
|
|
11
12
|
}
|
|
12
13
|
interface AutocompleteWithFormikProps<T> extends MuiAutocomplete<T> {
|
|
@@ -14,6 +15,7 @@ interface AutocompleteWithFormikProps<T> extends MuiAutocomplete<T> {
|
|
|
14
15
|
withFormik?: true;
|
|
15
16
|
label?: string;
|
|
16
17
|
renderInput?: (params: AutocompleteRenderInputParams) => ReactNode;
|
|
18
|
+
getOptionLabel: (option: T) => string;
|
|
17
19
|
getOptionValue: (option: T) => string | number;
|
|
18
20
|
}
|
|
19
21
|
export declare function Autocomplete<T>({ withFormik, name, getOptionValue, ...rest }: AutocompleteProps<T>): JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -100,13 +100,14 @@ interface SelectProps extends SelectProps$1 {
|
|
|
100
100
|
}
|
|
101
101
|
declare const Select: FC<SelectProps>;
|
|
102
102
|
|
|
103
|
-
declare type MuiAutocomplete<T> = Omit<AutocompleteProps$1<T, boolean, undefined, boolean>, "renderInput">;
|
|
103
|
+
declare type MuiAutocomplete<T> = Omit<AutocompleteProps$1<T, boolean, undefined, boolean>, "renderInput" | "getOptionLabel">;
|
|
104
104
|
declare type AutocompleteProps<T> = AutocompleteWithoutProps<T> | AutocompleteWithFormikProps<T>;
|
|
105
105
|
interface AutocompleteWithoutProps<T> extends MuiAutocomplete<T> {
|
|
106
106
|
name?: never;
|
|
107
107
|
withFormik: false;
|
|
108
108
|
getOptionValue?: never;
|
|
109
109
|
label?: string;
|
|
110
|
+
getOptionLabel: (option: T) => string;
|
|
110
111
|
renderInput?: (params: AutocompleteRenderInputParams) => ReactNode;
|
|
111
112
|
}
|
|
112
113
|
interface AutocompleteWithFormikProps<T> extends MuiAutocomplete<T> {
|
|
@@ -114,6 +115,7 @@ interface AutocompleteWithFormikProps<T> extends MuiAutocomplete<T> {
|
|
|
114
115
|
withFormik?: true;
|
|
115
116
|
label?: string;
|
|
116
117
|
renderInput?: (params: AutocompleteRenderInputParams) => ReactNode;
|
|
118
|
+
getOptionLabel: (option: T) => string;
|
|
117
119
|
getOptionValue: (option: T) => string | number;
|
|
118
120
|
}
|
|
119
121
|
declare function Autocomplete<T>({ withFormik, name, getOptionValue, ...rest }: AutocompleteProps<T>): JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluemarble/bm-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "BM components",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
],
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"rollup": "rollup -c"
|
|
12
|
+
"rollup": "rollup -c",
|
|
13
|
+
"deploy": "rollup -c && npm publish"
|
|
13
14
|
},
|
|
14
15
|
"keywords": [],
|
|
15
16
|
"author": "",
|