@australiangreens/ag-internal-components 0.0.61 → 0.0.62
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/dist/.gitignore +0 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/FetchAutocomplete/FetchAutocomplete.d.ts +7 -4
- package/dist/components/FetchAutocomplete/FetchAutocomplete.d.ts.map +1 -1
- package/dist/components/SingleAutocomplete/index.d.ts +4 -1
- package/dist/components/SingleAutocomplete/index.d.ts.map +1 -1
- package/dist/esm/index.js +551 -548
- package/dist/esm/index.js.map +1 -1
- package/package.json +19 -21
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SyntheticEvent } from 'react';
|
|
1
|
+
import { SyntheticEvent, ReactNode } from 'react';
|
|
2
2
|
import { Theme, SxProps } from '@mui/material';
|
|
3
3
|
import { AutocompleteGenericEntity, FetchAutocompleteChangeReason } from '../types';
|
|
4
4
|
export interface FetchAutocompleteProps<EntityType extends AutocompleteGenericEntity> {
|
|
@@ -25,7 +25,10 @@ export interface FetchAutocompleteProps<EntityType extends AutocompleteGenericEn
|
|
|
25
25
|
*/
|
|
26
26
|
preLoadedOptions?: EntityType[] | undefined;
|
|
27
27
|
/** The popup icon */
|
|
28
|
-
popupIcon?:
|
|
28
|
+
popupIcon?: ReactNode;
|
|
29
|
+
/**If true, the Popper content will be under the DOM hierarchy of the parent
|
|
30
|
+
* component. Passed directly to underlying MUI Autocomplete component.*/
|
|
31
|
+
disablePortal?: boolean;
|
|
29
32
|
/**
|
|
30
33
|
* When testing, it is useful to give data-testid attributes to parts inside
|
|
31
34
|
* the component. This prefix is useful to distinguish one FetchAutocomplete
|
|
@@ -35,7 +38,7 @@ export interface FetchAutocompleteProps<EntityType extends AutocompleteGenericEn
|
|
|
35
38
|
loadingText?: string;
|
|
36
39
|
noOptionsText?: string;
|
|
37
40
|
error?: boolean;
|
|
38
|
-
helperText?:
|
|
41
|
+
helperText?: ReactNode;
|
|
39
42
|
enableHighlighting?: boolean;
|
|
40
43
|
sx?: SxProps<Theme>;
|
|
41
44
|
textFieldColor?: 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
@@ -46,5 +49,5 @@ export interface FetchAutocompleteProps<EntityType extends AutocompleteGenericEn
|
|
|
46
49
|
* as-you-type fetching from an api and styled the way we want it across the app
|
|
47
50
|
* by default.
|
|
48
51
|
*/
|
|
49
|
-
export default function FetchAutocomplete<EntityType extends AutocompleteGenericEntity>({ lookup, enableHighlighting, onChange, minLength, label, value, dataTestidPrefix, sx, textFieldColor, textFieldVariant, loadingText, noOptionsText, popupIcon, error, helperText, preLoadedOptions, }: FetchAutocompleteProps<EntityType>): JSX.Element;
|
|
52
|
+
export default function FetchAutocomplete<EntityType extends AutocompleteGenericEntity>({ lookup, enableHighlighting, onChange, minLength, label, value, dataTestidPrefix, sx, textFieldColor, textFieldVariant, loadingText, noOptionsText, popupIcon, error, helperText, preLoadedOptions, disablePortal, }: FetchAutocompleteProps<EntityType>): JSX.Element;
|
|
50
53
|
//# sourceMappingURL=FetchAutocomplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FetchAutocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/FetchAutocomplete/FetchAutocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"FetchAutocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/FetchAutocomplete/FetchAutocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAgC,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAChF,OAAO,EASL,KAAK,EACL,OAAO,EACR,MAAM,eAAe,CAAC;AAKvB,OAAO,EACL,yBAAyB,EAEzB,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,sBAAsB,CAAC,UAAU,SA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B,QAAQ,EACR,SAAS,EACT,KAAK,EACL,KAAK,EACL,gBAAgB,EAChB,EAAE,EACF,cAAc,EACd,gBAA2B,EAC3B,WAA0B,EAC1B,aAA4B,EAC5B,SAAgC,EAChC,KAAa,EACb,UAAe,EACf,gBAA4B,EAC5B,aAAqB,GACtB,EAAE,sBAAsB,CAAC,UAAU,CAAC,eAgOpC"}
|
|
@@ -15,12 +15,15 @@ type Props<EntityType extends AutocompleteGenericEntity> = {
|
|
|
15
15
|
/** The lookup function, for looking up EntityType options from a remote resource. */
|
|
16
16
|
lookup: (lookupValue: string, abortSignal: AbortSignal) => Promise<EntityType[] | undefined | null | void>;
|
|
17
17
|
dataTestidPrefix?: string;
|
|
18
|
+
/**If true, the Popper content will be under the DOM hierarchy of the parent
|
|
19
|
+
* component. Passed directly to underlying MUI Autocomplete component.*/
|
|
20
|
+
disablePortal?: boolean;
|
|
18
21
|
minLength?: number;
|
|
19
22
|
hideButton?: boolean;
|
|
20
23
|
sx?: SxProps<Theme>;
|
|
21
24
|
textFieldColor?: 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning';
|
|
22
25
|
textFieldVariant?: 'filled' | 'outlined' | 'standard';
|
|
23
26
|
};
|
|
24
|
-
declare const SingleAutocomplete: <EntityType extends AutocompleteGenericEntity>({ lookup, onChange, label, value, sx, textFieldColor, textFieldVariant, dataTestidPrefix, minLength, }: Props<EntityType>) => JSX.Element;
|
|
27
|
+
declare const SingleAutocomplete: <EntityType extends AutocompleteGenericEntity>({ lookup, onChange, label, value, sx, textFieldColor, textFieldVariant, dataTestidPrefix, minLength, disablePortal, }: Props<EntityType>) => JSX.Element;
|
|
25
28
|
export default SingleAutocomplete;
|
|
26
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SingleAutocomplete/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,OAAO,EAAa,KAAK,E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