@react-solutions/inputs 0.2.8 → 0.3.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.
- package/dist/index.d.mts +23 -23
- package/dist/index.d.ts +23 -23
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -688,7 +688,7 @@ type FieldError$a = {
|
|
|
688
688
|
* Extended Date Picker Field Props
|
|
689
689
|
* Extends MUI DatePickerProps with custom form field props
|
|
690
690
|
*/
|
|
691
|
-
interface IDatePickerFieldProps extends Omit<DatePickerProps,
|
|
691
|
+
interface IDatePickerFieldProps extends Omit<DatePickerProps, "value" | "onChange" | "defaultValue" | "slots" | "slotProps" | "renderInput"> {
|
|
692
692
|
/** Field name for form identification */
|
|
693
693
|
name?: string;
|
|
694
694
|
/** Label text for the date picker */
|
|
@@ -719,11 +719,11 @@ interface IDatePickerFieldProps extends Omit<DatePickerProps, 'value' | 'onChang
|
|
|
719
719
|
/** Function to disable specific years */
|
|
720
720
|
shouldDisableYear?: (year: Date) => boolean;
|
|
721
721
|
/** TextField size */
|
|
722
|
-
size?: TextFieldProps[
|
|
722
|
+
size?: TextFieldProps["size"];
|
|
723
723
|
/** TextField variant */
|
|
724
|
-
variant?: TextFieldProps[
|
|
724
|
+
variant?: TextFieldProps["variant"];
|
|
725
725
|
/** TextField color */
|
|
726
|
-
color?: TextFieldProps[
|
|
726
|
+
color?: TextFieldProps["color"];
|
|
727
727
|
/** Placeholder text */
|
|
728
728
|
placeholder?: string;
|
|
729
729
|
/** Whether the field is read-only */
|
|
@@ -737,21 +737,21 @@ interface IDatePickerFieldProps extends Omit<DatePickerProps, 'value' | 'onChang
|
|
|
737
737
|
/** Reference date for the calendar */
|
|
738
738
|
referenceDate?: Date;
|
|
739
739
|
/** Controlled view state */
|
|
740
|
-
view?:
|
|
740
|
+
view?: "day" | "month" | "year";
|
|
741
741
|
/** Format for displaying the date */
|
|
742
742
|
format?: string;
|
|
743
743
|
/** Whether to open the calendar on focus */
|
|
744
|
-
openTo?:
|
|
744
|
+
openTo?: "day" | "month" | "year";
|
|
745
745
|
/** Custom styles for the DatePicker */
|
|
746
|
-
pickerStyles?: DatePickerProps[
|
|
746
|
+
pickerStyles?: DatePickerProps["sx"];
|
|
747
747
|
/** Custom styles for FormControl */
|
|
748
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
748
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>["sx"];
|
|
749
749
|
/** Custom styles for FormLabel */
|
|
750
|
-
formLabelStyles?: FormLabelProps[
|
|
750
|
+
formLabelStyles?: FormLabelProps["sx"];
|
|
751
751
|
/** Custom styles for the container Box */
|
|
752
|
-
containerStyles?: React__default.ComponentProps<typeof Box>[
|
|
752
|
+
containerStyles?: React__default.ComponentProps<typeof Box>["sx"];
|
|
753
753
|
/** Custom styles for the TextField */
|
|
754
|
-
textFieldStyles?: TextFieldProps[
|
|
754
|
+
textFieldStyles?: TextFieldProps["sx"];
|
|
755
755
|
/** Callback fired when the date changes */
|
|
756
756
|
onChange?: (value: Date | null) => void;
|
|
757
757
|
/** Callback fired when the field receives focus */
|
|
@@ -759,7 +759,7 @@ interface IDatePickerFieldProps extends Omit<DatePickerProps, 'value' | 'onChang
|
|
|
759
759
|
/** Callback fired when the field loses focus */
|
|
760
760
|
onBlur?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
761
761
|
/** Callback fired when a view change is requested */
|
|
762
|
-
onViewChange?: (view:
|
|
762
|
+
onViewChange?: (view: "day" | "month" | "year") => void;
|
|
763
763
|
/** Callback fired when a month change is requested */
|
|
764
764
|
onMonthChange?: (month: Date) => void;
|
|
765
765
|
/** Callback fired when a year change is requested */
|
|
@@ -769,9 +769,9 @@ interface IDatePickerFieldProps extends Omit<DatePickerProps, 'value' | 'onChang
|
|
|
769
769
|
/** Callback fired when the calendar closes */
|
|
770
770
|
onClose?: () => void;
|
|
771
771
|
/** Custom slot props for MUI v7 */
|
|
772
|
-
slotProps?: DatePickerProps[
|
|
772
|
+
slotProps?: DatePickerProps["slotProps"];
|
|
773
773
|
/** Custom slots for MUI v7 */
|
|
774
|
-
slots?: DatePickerProps[
|
|
774
|
+
slots?: DatePickerProps["slots"];
|
|
775
775
|
/** Date adapter to use (defaults to AdapterDateFns) */
|
|
776
776
|
dateAdapter?: typeof AdapterDateFns;
|
|
777
777
|
/** Whether to reduce animations */
|
|
@@ -953,7 +953,7 @@ type FieldError$7 = {
|
|
|
953
953
|
* Extended Autocomplete Input Props
|
|
954
954
|
* Extends MUI AutocompleteProps with custom form field props
|
|
955
955
|
*/
|
|
956
|
-
interface IAutoCompleteInputProps<T extends AutoCompleteOption = AutoCompleteOption, Multiple extends boolean = false, DisableClearable extends boolean = false, FreeSolo extends boolean = false> extends Omit<AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>,
|
|
956
|
+
interface IAutoCompleteInputProps<T extends AutoCompleteOption = AutoCompleteOption, Multiple extends boolean = false, DisableClearable extends boolean = false, FreeSolo extends boolean = false> extends Omit<AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>, "renderInput" | "options" | "value" | "onChange" | "getOptionLabel" | "isOptionEqualToValue" | "renderOption"> {
|
|
957
957
|
/** Field name for form identification */
|
|
958
958
|
name?: string;
|
|
959
959
|
/** Label text for the input field */
|
|
@@ -971,11 +971,11 @@ interface IAutoCompleteInputProps<T extends AutoCompleteOption = AutoCompleteOpt
|
|
|
971
971
|
/** Placeholder text */
|
|
972
972
|
placeholder?: string;
|
|
973
973
|
/** TextField variant */
|
|
974
|
-
variant?: TextFieldProps[
|
|
974
|
+
variant?: TextFieldProps["variant"];
|
|
975
975
|
/** TextField size */
|
|
976
|
-
size?: TextFieldProps[
|
|
976
|
+
size?: TextFieldProps["size"];
|
|
977
977
|
/** TextField color */
|
|
978
|
-
color?: TextFieldProps[
|
|
978
|
+
color?: TextFieldProps["color"];
|
|
979
979
|
/** Full width of the field */
|
|
980
980
|
fullWidth?: boolean;
|
|
981
981
|
/** Required field indicator */
|
|
@@ -1000,11 +1000,11 @@ interface IAutoCompleteInputProps<T extends AutoCompleteOption = AutoCompleteOpt
|
|
|
1000
1000
|
/** Custom icon for popup indicator */
|
|
1001
1001
|
popupIcon?: React__default.ReactNode;
|
|
1002
1002
|
/** Custom styles for the TextField */
|
|
1003
|
-
inputStyles?: TextFieldProps[
|
|
1003
|
+
inputStyles?: TextFieldProps["sx"];
|
|
1004
1004
|
/** Custom styles for the Autocomplete */
|
|
1005
|
-
autocompleteStyles?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>[
|
|
1005
|
+
autocompleteStyles?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>["sx"];
|
|
1006
1006
|
/** Custom styles for FormControl */
|
|
1007
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
1007
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>["sx"];
|
|
1008
1008
|
/** Whether to show loading state */
|
|
1009
1009
|
loading?: boolean;
|
|
1010
1010
|
/** Text to show when loading */
|
|
@@ -1024,9 +1024,9 @@ interface IAutoCompleteInputProps<T extends AutoCompleteOption = AutoCompleteOpt
|
|
|
1024
1024
|
/** Whether to disable list wrapping */
|
|
1025
1025
|
disableListWrap?: boolean;
|
|
1026
1026
|
/** Custom slot props for MUI v7 */
|
|
1027
|
-
slotProps?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>[
|
|
1027
|
+
slotProps?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>["slotProps"];
|
|
1028
1028
|
/** Custom slots for MUI v7 */
|
|
1029
|
-
slots?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>[
|
|
1029
|
+
slots?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>["slots"];
|
|
1030
1030
|
}
|
|
1031
1031
|
declare const AutoCompleteField: React__default.NamedExoticComponent<Omit<IAutoCompleteInputProps<AutoCompleteOption, boolean, boolean, boolean>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
1032
1032
|
|
package/dist/index.d.ts
CHANGED
|
@@ -688,7 +688,7 @@ type FieldError$a = {
|
|
|
688
688
|
* Extended Date Picker Field Props
|
|
689
689
|
* Extends MUI DatePickerProps with custom form field props
|
|
690
690
|
*/
|
|
691
|
-
interface IDatePickerFieldProps extends Omit<DatePickerProps,
|
|
691
|
+
interface IDatePickerFieldProps extends Omit<DatePickerProps, "value" | "onChange" | "defaultValue" | "slots" | "slotProps" | "renderInput"> {
|
|
692
692
|
/** Field name for form identification */
|
|
693
693
|
name?: string;
|
|
694
694
|
/** Label text for the date picker */
|
|
@@ -719,11 +719,11 @@ interface IDatePickerFieldProps extends Omit<DatePickerProps, 'value' | 'onChang
|
|
|
719
719
|
/** Function to disable specific years */
|
|
720
720
|
shouldDisableYear?: (year: Date) => boolean;
|
|
721
721
|
/** TextField size */
|
|
722
|
-
size?: TextFieldProps[
|
|
722
|
+
size?: TextFieldProps["size"];
|
|
723
723
|
/** TextField variant */
|
|
724
|
-
variant?: TextFieldProps[
|
|
724
|
+
variant?: TextFieldProps["variant"];
|
|
725
725
|
/** TextField color */
|
|
726
|
-
color?: TextFieldProps[
|
|
726
|
+
color?: TextFieldProps["color"];
|
|
727
727
|
/** Placeholder text */
|
|
728
728
|
placeholder?: string;
|
|
729
729
|
/** Whether the field is read-only */
|
|
@@ -737,21 +737,21 @@ interface IDatePickerFieldProps extends Omit<DatePickerProps, 'value' | 'onChang
|
|
|
737
737
|
/** Reference date for the calendar */
|
|
738
738
|
referenceDate?: Date;
|
|
739
739
|
/** Controlled view state */
|
|
740
|
-
view?:
|
|
740
|
+
view?: "day" | "month" | "year";
|
|
741
741
|
/** Format for displaying the date */
|
|
742
742
|
format?: string;
|
|
743
743
|
/** Whether to open the calendar on focus */
|
|
744
|
-
openTo?:
|
|
744
|
+
openTo?: "day" | "month" | "year";
|
|
745
745
|
/** Custom styles for the DatePicker */
|
|
746
|
-
pickerStyles?: DatePickerProps[
|
|
746
|
+
pickerStyles?: DatePickerProps["sx"];
|
|
747
747
|
/** Custom styles for FormControl */
|
|
748
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
748
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>["sx"];
|
|
749
749
|
/** Custom styles for FormLabel */
|
|
750
|
-
formLabelStyles?: FormLabelProps[
|
|
750
|
+
formLabelStyles?: FormLabelProps["sx"];
|
|
751
751
|
/** Custom styles for the container Box */
|
|
752
|
-
containerStyles?: React__default.ComponentProps<typeof Box>[
|
|
752
|
+
containerStyles?: React__default.ComponentProps<typeof Box>["sx"];
|
|
753
753
|
/** Custom styles for the TextField */
|
|
754
|
-
textFieldStyles?: TextFieldProps[
|
|
754
|
+
textFieldStyles?: TextFieldProps["sx"];
|
|
755
755
|
/** Callback fired when the date changes */
|
|
756
756
|
onChange?: (value: Date | null) => void;
|
|
757
757
|
/** Callback fired when the field receives focus */
|
|
@@ -759,7 +759,7 @@ interface IDatePickerFieldProps extends Omit<DatePickerProps, 'value' | 'onChang
|
|
|
759
759
|
/** Callback fired when the field loses focus */
|
|
760
760
|
onBlur?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
761
761
|
/** Callback fired when a view change is requested */
|
|
762
|
-
onViewChange?: (view:
|
|
762
|
+
onViewChange?: (view: "day" | "month" | "year") => void;
|
|
763
763
|
/** Callback fired when a month change is requested */
|
|
764
764
|
onMonthChange?: (month: Date) => void;
|
|
765
765
|
/** Callback fired when a year change is requested */
|
|
@@ -769,9 +769,9 @@ interface IDatePickerFieldProps extends Omit<DatePickerProps, 'value' | 'onChang
|
|
|
769
769
|
/** Callback fired when the calendar closes */
|
|
770
770
|
onClose?: () => void;
|
|
771
771
|
/** Custom slot props for MUI v7 */
|
|
772
|
-
slotProps?: DatePickerProps[
|
|
772
|
+
slotProps?: DatePickerProps["slotProps"];
|
|
773
773
|
/** Custom slots for MUI v7 */
|
|
774
|
-
slots?: DatePickerProps[
|
|
774
|
+
slots?: DatePickerProps["slots"];
|
|
775
775
|
/** Date adapter to use (defaults to AdapterDateFns) */
|
|
776
776
|
dateAdapter?: typeof AdapterDateFns;
|
|
777
777
|
/** Whether to reduce animations */
|
|
@@ -953,7 +953,7 @@ type FieldError$7 = {
|
|
|
953
953
|
* Extended Autocomplete Input Props
|
|
954
954
|
* Extends MUI AutocompleteProps with custom form field props
|
|
955
955
|
*/
|
|
956
|
-
interface IAutoCompleteInputProps<T extends AutoCompleteOption = AutoCompleteOption, Multiple extends boolean = false, DisableClearable extends boolean = false, FreeSolo extends boolean = false> extends Omit<AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>,
|
|
956
|
+
interface IAutoCompleteInputProps<T extends AutoCompleteOption = AutoCompleteOption, Multiple extends boolean = false, DisableClearable extends boolean = false, FreeSolo extends boolean = false> extends Omit<AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>, "renderInput" | "options" | "value" | "onChange" | "getOptionLabel" | "isOptionEqualToValue" | "renderOption"> {
|
|
957
957
|
/** Field name for form identification */
|
|
958
958
|
name?: string;
|
|
959
959
|
/** Label text for the input field */
|
|
@@ -971,11 +971,11 @@ interface IAutoCompleteInputProps<T extends AutoCompleteOption = AutoCompleteOpt
|
|
|
971
971
|
/** Placeholder text */
|
|
972
972
|
placeholder?: string;
|
|
973
973
|
/** TextField variant */
|
|
974
|
-
variant?: TextFieldProps[
|
|
974
|
+
variant?: TextFieldProps["variant"];
|
|
975
975
|
/** TextField size */
|
|
976
|
-
size?: TextFieldProps[
|
|
976
|
+
size?: TextFieldProps["size"];
|
|
977
977
|
/** TextField color */
|
|
978
|
-
color?: TextFieldProps[
|
|
978
|
+
color?: TextFieldProps["color"];
|
|
979
979
|
/** Full width of the field */
|
|
980
980
|
fullWidth?: boolean;
|
|
981
981
|
/** Required field indicator */
|
|
@@ -1000,11 +1000,11 @@ interface IAutoCompleteInputProps<T extends AutoCompleteOption = AutoCompleteOpt
|
|
|
1000
1000
|
/** Custom icon for popup indicator */
|
|
1001
1001
|
popupIcon?: React__default.ReactNode;
|
|
1002
1002
|
/** Custom styles for the TextField */
|
|
1003
|
-
inputStyles?: TextFieldProps[
|
|
1003
|
+
inputStyles?: TextFieldProps["sx"];
|
|
1004
1004
|
/** Custom styles for the Autocomplete */
|
|
1005
|
-
autocompleteStyles?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>[
|
|
1005
|
+
autocompleteStyles?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>["sx"];
|
|
1006
1006
|
/** Custom styles for FormControl */
|
|
1007
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
1007
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>["sx"];
|
|
1008
1008
|
/** Whether to show loading state */
|
|
1009
1009
|
loading?: boolean;
|
|
1010
1010
|
/** Text to show when loading */
|
|
@@ -1024,9 +1024,9 @@ interface IAutoCompleteInputProps<T extends AutoCompleteOption = AutoCompleteOpt
|
|
|
1024
1024
|
/** Whether to disable list wrapping */
|
|
1025
1025
|
disableListWrap?: boolean;
|
|
1026
1026
|
/** Custom slot props for MUI v7 */
|
|
1027
|
-
slotProps?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>[
|
|
1027
|
+
slotProps?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>["slotProps"];
|
|
1028
1028
|
/** Custom slots for MUI v7 */
|
|
1029
|
-
slots?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>[
|
|
1029
|
+
slots?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>["slots"];
|
|
1030
1030
|
}
|
|
1031
1031
|
declare const AutoCompleteField: React__default.NamedExoticComponent<Omit<IAutoCompleteInputProps<AutoCompleteOption, boolean, boolean, boolean>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
1032
1032
|
|