@tracktor/design-system 4.4.0 → 4.6.0
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,7 +1,6 @@
|
|
|
1
1
|
import { AutocompleteProps as MuiAutocompleteProps, ChipTypeMap } from '@mui/material';
|
|
2
2
|
import { AutocompleteChangeDetails, AutocompleteChangeReason } from '@mui/material/useAutocomplete/useAutocomplete';
|
|
3
3
|
import { ElementType, ReactNode, SyntheticEvent } from 'react';
|
|
4
|
-
import * as React from "react";
|
|
5
4
|
export type AutocompleteFilterOption<T = unknown> = {
|
|
6
5
|
id?: string | number | null;
|
|
7
6
|
label?: ReactNode;
|
|
@@ -10,6 +9,10 @@ export type AutocompleteFilterOption<T = unknown> = {
|
|
|
10
9
|
value?: T;
|
|
11
10
|
};
|
|
12
11
|
export interface AutocompleteFilterProps<Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends false, ChipComponent extends ElementType = ChipTypeMap["defaultComponent"], Value extends unknown = unknown> extends Omit<MuiAutocompleteProps<AutocompleteFilterOption<Value>, Multiple, DisableClearable, FreeSolo, ChipComponent>, "options" | "onChange" | "freeSolo" | "renderInput" | "value"> {
|
|
12
|
+
/**
|
|
13
|
+
* Variant of the Autocomplete
|
|
14
|
+
*/
|
|
15
|
+
variant?: "standard" | "chip";
|
|
13
16
|
/**
|
|
14
17
|
* Value
|
|
15
18
|
* @default undefined
|
|
@@ -62,7 +65,7 @@ export interface AutocompleteFilterProps<Multiple extends boolean | undefined, D
|
|
|
62
65
|
reset?: string;
|
|
63
66
|
};
|
|
64
67
|
}
|
|
65
|
-
declare const _default:
|
|
68
|
+
declare const _default: import('react').ForwardRefExoticComponent<Omit<AutocompleteFilterProps<boolean | undefined, boolean | undefined, false, ElementType, unknown> & {
|
|
66
69
|
inputValue?: string;
|
|
67
|
-
}, "ref"> &
|
|
70
|
+
}, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
68
71
|
export default _default;
|
|
@@ -34,7 +34,11 @@ interface ChipFilterBaseProps {
|
|
|
34
34
|
* Indicates if there should be a separator between the label menu and the options selected in the menu.
|
|
35
35
|
* Defaults to ":"
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
separatorBetweenLabelAndOptionSelected?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Indicates if the label should only be displayed after a selection is made.
|
|
40
|
+
*/
|
|
41
|
+
labelOnlyAfterSelection?: boolean;
|
|
38
42
|
}
|
|
39
43
|
export interface ChipFilterSingleProps extends ChipFilterBaseProps {
|
|
40
44
|
/**
|
|
@@ -67,5 +71,5 @@ export interface ChipFilterMultipleProps extends ChipFilterBaseProps {
|
|
|
67
71
|
onChange?: (value: string[]) => void;
|
|
68
72
|
}
|
|
69
73
|
export type ChipFilterProps = ChipFilterSingleProps | ChipFilterMultipleProps;
|
|
70
|
-
declare const ChipFilter: ({ label, value, onChange, options, variant, disabled, labelMenu,
|
|
74
|
+
declare const ChipFilter: ({ label, value, onChange, options, variant, disabled, labelMenu, labelOnlyAfterSelection, separatorBetweenLabelAndOptionSelected, multiple, size, }: ChipFilterProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
71
75
|
export default ChipFilter;
|