@natoora-libs/core 0.2.7 → 0.2.9-dev-doug-1
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/components/index.cjs +106 -117
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.cts +12 -71
- package/dist/components/index.d.ts +12 -71
- package/dist/components/index.js +185 -195
- package/dist/components/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { H as HeadCell, a as HeaderFilters, b as HeaderFilterOptions, c as Heade
|
|
|
5
5
|
export { B as BulkChanges, j as BulkChangesDialogProps, E as EditableCellType, k as ExportCsvDialogProps, i as TableColumnConfigurationMenuProps, d as TableDesktop, e as TableDesktopFooter, f as TableDesktopFooterProps, g as TableDesktopToolbar, h as TableDesktopToolbarProps, U as UpdateEditableCellParams } from '../TableDesktop-CZe649rr.cjs';
|
|
6
6
|
import { Control, ControllerRenderProps, ControllerFieldState, UseFormTrigger, UseFormReturn, FieldValues } from 'react-hook-form';
|
|
7
7
|
import { UseMutateAsyncFunction } from 'react-query';
|
|
8
|
-
import { SxProps, Theme, MenuProps, Typography } from '@mui/material';
|
|
8
|
+
import { SxProps, Theme, SelectProps, MenuProps, Typography } from '@mui/material';
|
|
9
9
|
import { DateRangePickerShape } from 'react-dates';
|
|
10
10
|
|
|
11
11
|
type ActiveFiltersIconButtonProps = {
|
|
@@ -102,7 +102,7 @@ interface IExtendedButton {
|
|
|
102
102
|
copy: string;
|
|
103
103
|
disabled?: boolean;
|
|
104
104
|
href?: string;
|
|
105
|
-
onClick?: () => void;
|
|
105
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
106
106
|
subcopy?: string;
|
|
107
107
|
tooltip?: string;
|
|
108
108
|
component?: React.ElementType;
|
|
@@ -120,11 +120,11 @@ interface IFilledButton {
|
|
|
120
120
|
isLoading?: boolean;
|
|
121
121
|
disabled?: boolean;
|
|
122
122
|
href?: string;
|
|
123
|
-
onClick?: () => void;
|
|
123
|
+
onClick?: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
124
124
|
type?: 'button' | 'submit';
|
|
125
125
|
variant?: 'contained' | 'outlined' | 'text';
|
|
126
126
|
}
|
|
127
|
-
declare const _default$i:
|
|
127
|
+
declare const _default$i: React__default.MemoExoticComponent<({ autoFocus, className, color, copy, disabled, href, isLoading, onClick, type, variant, }: IFilledButton) => react_jsx_runtime.JSX.Element>;
|
|
128
128
|
|
|
129
129
|
interface FilledButtonLgProps {
|
|
130
130
|
classes?: any;
|
|
@@ -172,13 +172,13 @@ interface OutlinedButtonProps {
|
|
|
172
172
|
disabled?: any;
|
|
173
173
|
href?: any;
|
|
174
174
|
isLoading?: any;
|
|
175
|
-
onClick?:
|
|
175
|
+
onClick?: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
176
176
|
startIcon?: any;
|
|
177
177
|
style?: any;
|
|
178
178
|
subcopy?: any;
|
|
179
179
|
type?: any;
|
|
180
180
|
}
|
|
181
|
-
declare const _default$f:
|
|
181
|
+
declare const _default$f: React__default.MemoExoticComponent<({ className, color, copy, disabled, href, isLoading, onClick, startIcon, style, subcopy, type, }: OutlinedButtonProps) => react_jsx_runtime.JSX.Element>;
|
|
182
182
|
|
|
183
183
|
interface AButtonProps {
|
|
184
184
|
classes?: any;
|
|
@@ -199,7 +199,7 @@ interface IRoundButton {
|
|
|
199
199
|
isContrast?: boolean;
|
|
200
200
|
isTableButton?: boolean;
|
|
201
201
|
noStrokes?: boolean;
|
|
202
|
-
onClick?: (
|
|
202
|
+
onClick?: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
203
203
|
size?: 'small' | 'medium' | 'large' | 'double';
|
|
204
204
|
tooltip?: string;
|
|
205
205
|
variant?: 'default' | 'defaultPrimary' | 'defaultError' | 'filled' | 'primary' | 'secondary';
|
|
@@ -847,89 +847,29 @@ type Option = {
|
|
|
847
847
|
disabled?: boolean;
|
|
848
848
|
};
|
|
849
849
|
interface SmartSelectProps {
|
|
850
|
-
/**
|
|
851
|
-
* The current selected value of the select input. It can be a string, number, or null.
|
|
852
|
-
* If null, it indicates that no value is selected.
|
|
853
|
-
*/
|
|
854
850
|
value?: string | number | null;
|
|
855
|
-
/**
|
|
856
|
-
* The default option that is displayed when no value is selected.
|
|
857
|
-
* This is an object with a value and a label. If null, no default option is shown.
|
|
858
|
-
*/
|
|
859
851
|
defaultOption?: Option;
|
|
860
|
-
/**
|
|
861
|
-
* An array of available options to display in the select dropdown.
|
|
862
|
-
* Each option is an object with `value` and `label` properties.
|
|
863
|
-
*/
|
|
864
852
|
options?: Option[];
|
|
865
|
-
/**
|
|
866
|
-
* A function to refetch data if there are no options available in the dropdown.
|
|
867
|
-
* It can be called when the dropdown is opened and the list of options is empty.
|
|
868
|
-
*/
|
|
869
853
|
refetch?: () => void;
|
|
870
|
-
/**
|
|
871
|
-
* A boolean indicating whether the component is fetching data.
|
|
872
|
-
* If true, the loading spinner will be shown in the dropdown.
|
|
873
|
-
*/
|
|
874
854
|
isFetching?: boolean;
|
|
875
|
-
/**
|
|
876
|
-
* Callback function called when an option is selected from the dropdown.
|
|
877
|
-
* The selected option is passed as an argument to this function.
|
|
878
|
-
*/
|
|
879
855
|
onChange: (selectedOption: Option) => void;
|
|
880
|
-
/**
|
|
881
|
-
* A label for the select input. It will be displayed above the select dropdown.
|
|
882
|
-
*/
|
|
883
856
|
inputLabel?: string;
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
*/
|
|
887
|
-
variant?: 'standard' | 'outlined' | 'filled';
|
|
888
|
-
/**
|
|
889
|
-
* Size to choose.
|
|
890
|
-
*/
|
|
891
|
-
size?: 'medium' | 'small';
|
|
892
|
-
/**
|
|
893
|
-
* A boolean indicating validation error.
|
|
894
|
-
* It allows use of error styling when validation is required.
|
|
895
|
-
*/
|
|
857
|
+
variant?: SelectProps['variant'];
|
|
858
|
+
size?: SelectProps['size'];
|
|
896
859
|
error?: boolean;
|
|
897
|
-
/**
|
|
898
|
-
* Helper text that is displayed below the select input.
|
|
899
|
-
* It can be used to provide additional information or instructions to the user.
|
|
900
|
-
*/
|
|
901
860
|
helperText?: string;
|
|
902
|
-
/**
|
|
903
|
-
* A boolean indicating whether the select input is disabled.
|
|
904
|
-
* If true, the input will be disabled, and users will not be able to interact with it.
|
|
905
|
-
*/
|
|
906
861
|
disabled?: boolean;
|
|
907
|
-
/**
|
|
908
|
-
* A boolean indicating whether the select should include a blank option.
|
|
909
|
-
*/
|
|
910
862
|
allowBlankOption?: boolean;
|
|
911
|
-
/**
|
|
912
|
-
* The `data-testid` attribute used for testing purposes.
|
|
913
|
-
* It is helpful to uniquely identify the component in automated tests.
|
|
914
|
-
*/
|
|
915
863
|
'data-testid'?: string;
|
|
916
|
-
/**
|
|
917
|
-
* A message to display when there are no options available in the dropdown.
|
|
918
|
-
* It will be shown when `isFetching` is false and `options` is empty.
|
|
919
|
-
* The default message is 'No options'.
|
|
920
|
-
*/
|
|
921
864
|
emptyMessage?: string;
|
|
922
|
-
/**
|
|
923
|
-
* Manage the MenuProps
|
|
924
|
-
*/
|
|
925
865
|
menuProps?: Partial<MenuProps>;
|
|
926
866
|
}
|
|
927
867
|
declare const SmartSelect: React.ForwardRefExoticComponent<SmartSelectProps & React.RefAttributes<unknown>>;
|
|
928
868
|
|
|
929
869
|
type SmartMultipleSelectProps = {
|
|
930
870
|
inputLabel?: string;
|
|
931
|
-
variant?: '
|
|
932
|
-
size?: '
|
|
871
|
+
variant?: SelectProps['variant'];
|
|
872
|
+
size?: SelectProps['size'];
|
|
933
873
|
values?: Option[];
|
|
934
874
|
defaultValues?: Option[];
|
|
935
875
|
onOpen?: () => void;
|
|
@@ -940,6 +880,7 @@ type SmartMultipleSelectProps = {
|
|
|
940
880
|
disabled?: boolean;
|
|
941
881
|
emptyMessage?: string;
|
|
942
882
|
helperText?: string;
|
|
883
|
+
menuProps?: Partial<MenuProps>;
|
|
943
884
|
};
|
|
944
885
|
declare const SmartMultipleSelect: FC<SmartMultipleSelectProps>;
|
|
945
886
|
|
|
@@ -5,7 +5,7 @@ import { H as HeadCell, a as HeaderFilters, b as HeaderFilterOptions, c as Heade
|
|
|
5
5
|
export { B as BulkChanges, j as BulkChangesDialogProps, E as EditableCellType, k as ExportCsvDialogProps, i as TableColumnConfigurationMenuProps, d as TableDesktop, e as TableDesktopFooter, f as TableDesktopFooterProps, g as TableDesktopToolbar, h as TableDesktopToolbarProps, U as UpdateEditableCellParams } from '../TableDesktop-CZe649rr.js';
|
|
6
6
|
import { Control, ControllerRenderProps, ControllerFieldState, UseFormTrigger, UseFormReturn, FieldValues } from 'react-hook-form';
|
|
7
7
|
import { UseMutateAsyncFunction } from 'react-query';
|
|
8
|
-
import { SxProps, Theme, MenuProps, Typography } from '@mui/material';
|
|
8
|
+
import { SxProps, Theme, SelectProps, MenuProps, Typography } from '@mui/material';
|
|
9
9
|
import { DateRangePickerShape } from 'react-dates';
|
|
10
10
|
|
|
11
11
|
type ActiveFiltersIconButtonProps = {
|
|
@@ -102,7 +102,7 @@ interface IExtendedButton {
|
|
|
102
102
|
copy: string;
|
|
103
103
|
disabled?: boolean;
|
|
104
104
|
href?: string;
|
|
105
|
-
onClick?: () => void;
|
|
105
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
106
106
|
subcopy?: string;
|
|
107
107
|
tooltip?: string;
|
|
108
108
|
component?: React.ElementType;
|
|
@@ -120,11 +120,11 @@ interface IFilledButton {
|
|
|
120
120
|
isLoading?: boolean;
|
|
121
121
|
disabled?: boolean;
|
|
122
122
|
href?: string;
|
|
123
|
-
onClick?: () => void;
|
|
123
|
+
onClick?: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
124
124
|
type?: 'button' | 'submit';
|
|
125
125
|
variant?: 'contained' | 'outlined' | 'text';
|
|
126
126
|
}
|
|
127
|
-
declare const _default$i:
|
|
127
|
+
declare const _default$i: React__default.MemoExoticComponent<({ autoFocus, className, color, copy, disabled, href, isLoading, onClick, type, variant, }: IFilledButton) => react_jsx_runtime.JSX.Element>;
|
|
128
128
|
|
|
129
129
|
interface FilledButtonLgProps {
|
|
130
130
|
classes?: any;
|
|
@@ -172,13 +172,13 @@ interface OutlinedButtonProps {
|
|
|
172
172
|
disabled?: any;
|
|
173
173
|
href?: any;
|
|
174
174
|
isLoading?: any;
|
|
175
|
-
onClick?:
|
|
175
|
+
onClick?: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
176
176
|
startIcon?: any;
|
|
177
177
|
style?: any;
|
|
178
178
|
subcopy?: any;
|
|
179
179
|
type?: any;
|
|
180
180
|
}
|
|
181
|
-
declare const _default$f:
|
|
181
|
+
declare const _default$f: React__default.MemoExoticComponent<({ className, color, copy, disabled, href, isLoading, onClick, startIcon, style, subcopy, type, }: OutlinedButtonProps) => react_jsx_runtime.JSX.Element>;
|
|
182
182
|
|
|
183
183
|
interface AButtonProps {
|
|
184
184
|
classes?: any;
|
|
@@ -199,7 +199,7 @@ interface IRoundButton {
|
|
|
199
199
|
isContrast?: boolean;
|
|
200
200
|
isTableButton?: boolean;
|
|
201
201
|
noStrokes?: boolean;
|
|
202
|
-
onClick?: (
|
|
202
|
+
onClick?: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
203
203
|
size?: 'small' | 'medium' | 'large' | 'double';
|
|
204
204
|
tooltip?: string;
|
|
205
205
|
variant?: 'default' | 'defaultPrimary' | 'defaultError' | 'filled' | 'primary' | 'secondary';
|
|
@@ -847,89 +847,29 @@ type Option = {
|
|
|
847
847
|
disabled?: boolean;
|
|
848
848
|
};
|
|
849
849
|
interface SmartSelectProps {
|
|
850
|
-
/**
|
|
851
|
-
* The current selected value of the select input. It can be a string, number, or null.
|
|
852
|
-
* If null, it indicates that no value is selected.
|
|
853
|
-
*/
|
|
854
850
|
value?: string | number | null;
|
|
855
|
-
/**
|
|
856
|
-
* The default option that is displayed when no value is selected.
|
|
857
|
-
* This is an object with a value and a label. If null, no default option is shown.
|
|
858
|
-
*/
|
|
859
851
|
defaultOption?: Option;
|
|
860
|
-
/**
|
|
861
|
-
* An array of available options to display in the select dropdown.
|
|
862
|
-
* Each option is an object with `value` and `label` properties.
|
|
863
|
-
*/
|
|
864
852
|
options?: Option[];
|
|
865
|
-
/**
|
|
866
|
-
* A function to refetch data if there are no options available in the dropdown.
|
|
867
|
-
* It can be called when the dropdown is opened and the list of options is empty.
|
|
868
|
-
*/
|
|
869
853
|
refetch?: () => void;
|
|
870
|
-
/**
|
|
871
|
-
* A boolean indicating whether the component is fetching data.
|
|
872
|
-
* If true, the loading spinner will be shown in the dropdown.
|
|
873
|
-
*/
|
|
874
854
|
isFetching?: boolean;
|
|
875
|
-
/**
|
|
876
|
-
* Callback function called when an option is selected from the dropdown.
|
|
877
|
-
* The selected option is passed as an argument to this function.
|
|
878
|
-
*/
|
|
879
855
|
onChange: (selectedOption: Option) => void;
|
|
880
|
-
/**
|
|
881
|
-
* A label for the select input. It will be displayed above the select dropdown.
|
|
882
|
-
*/
|
|
883
856
|
inputLabel?: string;
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
*/
|
|
887
|
-
variant?: 'standard' | 'outlined' | 'filled';
|
|
888
|
-
/**
|
|
889
|
-
* Size to choose.
|
|
890
|
-
*/
|
|
891
|
-
size?: 'medium' | 'small';
|
|
892
|
-
/**
|
|
893
|
-
* A boolean indicating validation error.
|
|
894
|
-
* It allows use of error styling when validation is required.
|
|
895
|
-
*/
|
|
857
|
+
variant?: SelectProps['variant'];
|
|
858
|
+
size?: SelectProps['size'];
|
|
896
859
|
error?: boolean;
|
|
897
|
-
/**
|
|
898
|
-
* Helper text that is displayed below the select input.
|
|
899
|
-
* It can be used to provide additional information or instructions to the user.
|
|
900
|
-
*/
|
|
901
860
|
helperText?: string;
|
|
902
|
-
/**
|
|
903
|
-
* A boolean indicating whether the select input is disabled.
|
|
904
|
-
* If true, the input will be disabled, and users will not be able to interact with it.
|
|
905
|
-
*/
|
|
906
861
|
disabled?: boolean;
|
|
907
|
-
/**
|
|
908
|
-
* A boolean indicating whether the select should include a blank option.
|
|
909
|
-
*/
|
|
910
862
|
allowBlankOption?: boolean;
|
|
911
|
-
/**
|
|
912
|
-
* The `data-testid` attribute used for testing purposes.
|
|
913
|
-
* It is helpful to uniquely identify the component in automated tests.
|
|
914
|
-
*/
|
|
915
863
|
'data-testid'?: string;
|
|
916
|
-
/**
|
|
917
|
-
* A message to display when there are no options available in the dropdown.
|
|
918
|
-
* It will be shown when `isFetching` is false and `options` is empty.
|
|
919
|
-
* The default message is 'No options'.
|
|
920
|
-
*/
|
|
921
864
|
emptyMessage?: string;
|
|
922
|
-
/**
|
|
923
|
-
* Manage the MenuProps
|
|
924
|
-
*/
|
|
925
865
|
menuProps?: Partial<MenuProps>;
|
|
926
866
|
}
|
|
927
867
|
declare const SmartSelect: React.ForwardRefExoticComponent<SmartSelectProps & React.RefAttributes<unknown>>;
|
|
928
868
|
|
|
929
869
|
type SmartMultipleSelectProps = {
|
|
930
870
|
inputLabel?: string;
|
|
931
|
-
variant?: '
|
|
932
|
-
size?: '
|
|
871
|
+
variant?: SelectProps['variant'];
|
|
872
|
+
size?: SelectProps['size'];
|
|
933
873
|
values?: Option[];
|
|
934
874
|
defaultValues?: Option[];
|
|
935
875
|
onOpen?: () => void;
|
|
@@ -940,6 +880,7 @@ type SmartMultipleSelectProps = {
|
|
|
940
880
|
disabled?: boolean;
|
|
941
881
|
emptyMessage?: string;
|
|
942
882
|
helperText?: string;
|
|
883
|
+
menuProps?: Partial<MenuProps>;
|
|
943
884
|
};
|
|
944
885
|
declare const SmartMultipleSelect: FC<SmartMultipleSelectProps>;
|
|
945
886
|
|