@react-solutions/inputs 1.0.0 → 1.0.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/index.d.mts +28 -28
- package/dist/index.d.ts +28 -28
- 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
|
@@ -596,7 +596,7 @@ type FieldError$b = {
|
|
|
596
596
|
* Extended Time Picker Field Props
|
|
597
597
|
* Extends MUI TimePickerProps with custom form field props
|
|
598
598
|
*/
|
|
599
|
-
interface ITimePickerFieldProps extends Omit<TimePickerProps,
|
|
599
|
+
interface ITimePickerFieldProps extends Omit<TimePickerProps, "value" | "onChange" | "defaultValue" | "slots" | "slotProps" | "renderInput" | "onViewChange"> {
|
|
600
600
|
/** Field name for form identification */
|
|
601
601
|
name?: string;
|
|
602
602
|
/** Label text for the time picker */
|
|
@@ -622,13 +622,13 @@ interface ITimePickerFieldProps extends Omit<TimePickerProps, 'value' | 'onChang
|
|
|
622
622
|
/** Maximum selectable time */
|
|
623
623
|
maxTime?: Date;
|
|
624
624
|
/** Function to disable specific times */
|
|
625
|
-
shouldDisableTime?: (time: Date, view:
|
|
625
|
+
shouldDisableTime?: (time: Date, view: "hours" | "minutes" | "seconds") => boolean;
|
|
626
626
|
/** TextField size */
|
|
627
|
-
size?: TextFieldProps[
|
|
627
|
+
size?: TextFieldProps["size"];
|
|
628
628
|
/** TextField variant */
|
|
629
|
-
variant?: TextFieldProps[
|
|
629
|
+
variant?: TextFieldProps["variant"];
|
|
630
630
|
/** TextField color */
|
|
631
|
-
color?: TextFieldProps[
|
|
631
|
+
color?: TextFieldProps["color"];
|
|
632
632
|
/** Placeholder text */
|
|
633
633
|
placeholder?: string;
|
|
634
634
|
/** Whether the field is read-only */
|
|
@@ -642,23 +642,23 @@ interface ITimePickerFieldProps extends Omit<TimePickerProps, 'value' | 'onChang
|
|
|
642
642
|
/** Whether to use 12-hour format */
|
|
643
643
|
ampm?: boolean;
|
|
644
644
|
/** Available views (hours, minutes, seconds) */
|
|
645
|
-
views?: (
|
|
645
|
+
views?: ("hours" | "minutes" | "seconds")[];
|
|
646
646
|
/** Controlled view state */
|
|
647
|
-
view?:
|
|
647
|
+
view?: "hours" | "minutes" | "seconds";
|
|
648
648
|
/** Default view */
|
|
649
|
-
openTo?:
|
|
649
|
+
openTo?: "hours" | "minutes" | "seconds";
|
|
650
650
|
/** Format for displaying the time */
|
|
651
651
|
format?: string;
|
|
652
652
|
/** Custom styles for the TimePicker */
|
|
653
|
-
pickerStyles?: TimePickerProps[
|
|
653
|
+
pickerStyles?: TimePickerProps["sx"];
|
|
654
654
|
/** Custom styles for FormControl */
|
|
655
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
655
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>["sx"];
|
|
656
656
|
/** Custom styles for FormLabel */
|
|
657
|
-
formLabelStyles?: FormLabelProps[
|
|
657
|
+
formLabelStyles?: FormLabelProps["sx"];
|
|
658
658
|
/** Custom styles for the container Box */
|
|
659
|
-
containerStyles?: React__default.ComponentProps<typeof Box>[
|
|
659
|
+
containerStyles?: React__default.ComponentProps<typeof Box>["sx"];
|
|
660
660
|
/** Custom styles for the TextField */
|
|
661
|
-
textFieldStyles?: TextFieldProps[
|
|
661
|
+
textFieldStyles?: TextFieldProps["sx"];
|
|
662
662
|
/** Callback fired when the time changes */
|
|
663
663
|
onChange?: (value: Date | null) => void;
|
|
664
664
|
/** Callback fired when the field receives focus */
|
|
@@ -666,15 +666,15 @@ interface ITimePickerFieldProps extends Omit<TimePickerProps, 'value' | 'onChang
|
|
|
666
666
|
/** Callback fired when the field loses focus */
|
|
667
667
|
onBlur?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
668
668
|
/** Callback fired when a view change is requested */
|
|
669
|
-
onViewChange?: (view:
|
|
669
|
+
onViewChange?: (view: "hours" | "minutes" | "seconds" | "meridiem") => void;
|
|
670
670
|
/** Callback fired when the picker opens */
|
|
671
671
|
onOpen?: () => void;
|
|
672
672
|
/** Callback fired when the picker closes */
|
|
673
673
|
onClose?: () => void;
|
|
674
674
|
/** Custom slot props for MUI v7 */
|
|
675
|
-
slotProps?: TimePickerProps[
|
|
675
|
+
slotProps?: TimePickerProps["slotProps"];
|
|
676
676
|
/** Custom slots for MUI v7 */
|
|
677
|
-
slots?: TimePickerProps[
|
|
677
|
+
slots?: TimePickerProps["slots"];
|
|
678
678
|
/** Date adapter to use (defaults to AdapterDateFns) */
|
|
679
679
|
dateAdapter?: typeof AdapterDateFns;
|
|
680
680
|
/** Auto focus the input */
|
|
@@ -795,7 +795,7 @@ type FieldError$9 = {
|
|
|
795
795
|
* Extended File Upload Field Props
|
|
796
796
|
* Extends MUI TextFieldProps with custom file upload props
|
|
797
797
|
*/
|
|
798
|
-
interface IFileUploadFieldProps extends Omit<TextFieldProps,
|
|
798
|
+
interface IFileUploadFieldProps extends Omit<TextFieldProps, "value" | "onChange" | "name" | "type" | "error" | "onDrop"> {
|
|
799
799
|
/** Field name for form identification */
|
|
800
800
|
name?: string;
|
|
801
801
|
/** Label text for the file upload field */
|
|
@@ -827,11 +827,11 @@ interface IFileUploadFieldProps extends Omit<TextFieldProps, 'value' | 'onChange
|
|
|
827
827
|
/** Placeholder text */
|
|
828
828
|
placeholder?: string;
|
|
829
829
|
/** TextField variant */
|
|
830
|
-
variant?: TextFieldProps[
|
|
830
|
+
variant?: TextFieldProps["variant"];
|
|
831
831
|
/** TextField size */
|
|
832
|
-
size?: TextFieldProps[
|
|
832
|
+
size?: TextFieldProps["size"];
|
|
833
833
|
/** TextField color */
|
|
834
|
-
color?: TextFieldProps[
|
|
834
|
+
color?: TextFieldProps["color"];
|
|
835
835
|
/** Full width of the field */
|
|
836
836
|
fullWidth?: boolean;
|
|
837
837
|
/** Required field indicator */
|
|
@@ -839,11 +839,11 @@ interface IFileUploadFieldProps extends Omit<TextFieldProps, 'value' | 'onChange
|
|
|
839
839
|
/** Upload button text */
|
|
840
840
|
buttonText?: string;
|
|
841
841
|
/** Upload button variant */
|
|
842
|
-
buttonVariant?: ButtonProps[
|
|
842
|
+
buttonVariant?: ButtonProps["variant"];
|
|
843
843
|
/** Upload button color */
|
|
844
|
-
buttonColor?: ButtonProps[
|
|
844
|
+
buttonColor?: ButtonProps["color"];
|
|
845
845
|
/** Upload button size */
|
|
846
|
-
buttonSize?: ButtonProps[
|
|
846
|
+
buttonSize?: ButtonProps["size"];
|
|
847
847
|
/** Custom upload icon */
|
|
848
848
|
uploadIcon?: React__default.ReactNode;
|
|
849
849
|
/** Callback fired when file(s) change */
|
|
@@ -857,17 +857,17 @@ interface IFileUploadFieldProps extends Omit<TextFieldProps, 'value' | 'onChange
|
|
|
857
857
|
/** Callback fired when file is dropped (drag and drop) */
|
|
858
858
|
onDrop?: (files: FileList) => void;
|
|
859
859
|
/** Custom styles for the TextField */
|
|
860
|
-
inputStyles?: TextFieldProps[
|
|
860
|
+
inputStyles?: TextFieldProps["sx"];
|
|
861
861
|
/** Custom styles for the Button */
|
|
862
|
-
buttonStyles?: ButtonProps[
|
|
862
|
+
buttonStyles?: ButtonProps["sx"];
|
|
863
863
|
/** Custom styles for FormControl */
|
|
864
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
864
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>["sx"];
|
|
865
865
|
/** Custom styles for the container */
|
|
866
866
|
containerStyles?: React__default.CSSProperties;
|
|
867
867
|
/** Custom slot props for MUI v7 */
|
|
868
|
-
slotProps?: TextFieldProps[
|
|
868
|
+
slotProps?: TextFieldProps["slotProps"];
|
|
869
869
|
/** Custom slots for MUI v7 */
|
|
870
|
-
slots?: TextFieldProps[
|
|
870
|
+
slots?: TextFieldProps["slots"];
|
|
871
871
|
}
|
|
872
872
|
declare const FileUploadField: React__default.ForwardRefExoticComponent<Omit<IFileUploadFieldProps, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
873
873
|
|
package/dist/index.d.ts
CHANGED
|
@@ -596,7 +596,7 @@ type FieldError$b = {
|
|
|
596
596
|
* Extended Time Picker Field Props
|
|
597
597
|
* Extends MUI TimePickerProps with custom form field props
|
|
598
598
|
*/
|
|
599
|
-
interface ITimePickerFieldProps extends Omit<TimePickerProps,
|
|
599
|
+
interface ITimePickerFieldProps extends Omit<TimePickerProps, "value" | "onChange" | "defaultValue" | "slots" | "slotProps" | "renderInput" | "onViewChange"> {
|
|
600
600
|
/** Field name for form identification */
|
|
601
601
|
name?: string;
|
|
602
602
|
/** Label text for the time picker */
|
|
@@ -622,13 +622,13 @@ interface ITimePickerFieldProps extends Omit<TimePickerProps, 'value' | 'onChang
|
|
|
622
622
|
/** Maximum selectable time */
|
|
623
623
|
maxTime?: Date;
|
|
624
624
|
/** Function to disable specific times */
|
|
625
|
-
shouldDisableTime?: (time: Date, view:
|
|
625
|
+
shouldDisableTime?: (time: Date, view: "hours" | "minutes" | "seconds") => boolean;
|
|
626
626
|
/** TextField size */
|
|
627
|
-
size?: TextFieldProps[
|
|
627
|
+
size?: TextFieldProps["size"];
|
|
628
628
|
/** TextField variant */
|
|
629
|
-
variant?: TextFieldProps[
|
|
629
|
+
variant?: TextFieldProps["variant"];
|
|
630
630
|
/** TextField color */
|
|
631
|
-
color?: TextFieldProps[
|
|
631
|
+
color?: TextFieldProps["color"];
|
|
632
632
|
/** Placeholder text */
|
|
633
633
|
placeholder?: string;
|
|
634
634
|
/** Whether the field is read-only */
|
|
@@ -642,23 +642,23 @@ interface ITimePickerFieldProps extends Omit<TimePickerProps, 'value' | 'onChang
|
|
|
642
642
|
/** Whether to use 12-hour format */
|
|
643
643
|
ampm?: boolean;
|
|
644
644
|
/** Available views (hours, minutes, seconds) */
|
|
645
|
-
views?: (
|
|
645
|
+
views?: ("hours" | "minutes" | "seconds")[];
|
|
646
646
|
/** Controlled view state */
|
|
647
|
-
view?:
|
|
647
|
+
view?: "hours" | "minutes" | "seconds";
|
|
648
648
|
/** Default view */
|
|
649
|
-
openTo?:
|
|
649
|
+
openTo?: "hours" | "minutes" | "seconds";
|
|
650
650
|
/** Format for displaying the time */
|
|
651
651
|
format?: string;
|
|
652
652
|
/** Custom styles for the TimePicker */
|
|
653
|
-
pickerStyles?: TimePickerProps[
|
|
653
|
+
pickerStyles?: TimePickerProps["sx"];
|
|
654
654
|
/** Custom styles for FormControl */
|
|
655
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
655
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>["sx"];
|
|
656
656
|
/** Custom styles for FormLabel */
|
|
657
|
-
formLabelStyles?: FormLabelProps[
|
|
657
|
+
formLabelStyles?: FormLabelProps["sx"];
|
|
658
658
|
/** Custom styles for the container Box */
|
|
659
|
-
containerStyles?: React__default.ComponentProps<typeof Box>[
|
|
659
|
+
containerStyles?: React__default.ComponentProps<typeof Box>["sx"];
|
|
660
660
|
/** Custom styles for the TextField */
|
|
661
|
-
textFieldStyles?: TextFieldProps[
|
|
661
|
+
textFieldStyles?: TextFieldProps["sx"];
|
|
662
662
|
/** Callback fired when the time changes */
|
|
663
663
|
onChange?: (value: Date | null) => void;
|
|
664
664
|
/** Callback fired when the field receives focus */
|
|
@@ -666,15 +666,15 @@ interface ITimePickerFieldProps extends Omit<TimePickerProps, 'value' | 'onChang
|
|
|
666
666
|
/** Callback fired when the field loses focus */
|
|
667
667
|
onBlur?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
668
668
|
/** Callback fired when a view change is requested */
|
|
669
|
-
onViewChange?: (view:
|
|
669
|
+
onViewChange?: (view: "hours" | "minutes" | "seconds" | "meridiem") => void;
|
|
670
670
|
/** Callback fired when the picker opens */
|
|
671
671
|
onOpen?: () => void;
|
|
672
672
|
/** Callback fired when the picker closes */
|
|
673
673
|
onClose?: () => void;
|
|
674
674
|
/** Custom slot props for MUI v7 */
|
|
675
|
-
slotProps?: TimePickerProps[
|
|
675
|
+
slotProps?: TimePickerProps["slotProps"];
|
|
676
676
|
/** Custom slots for MUI v7 */
|
|
677
|
-
slots?: TimePickerProps[
|
|
677
|
+
slots?: TimePickerProps["slots"];
|
|
678
678
|
/** Date adapter to use (defaults to AdapterDateFns) */
|
|
679
679
|
dateAdapter?: typeof AdapterDateFns;
|
|
680
680
|
/** Auto focus the input */
|
|
@@ -795,7 +795,7 @@ type FieldError$9 = {
|
|
|
795
795
|
* Extended File Upload Field Props
|
|
796
796
|
* Extends MUI TextFieldProps with custom file upload props
|
|
797
797
|
*/
|
|
798
|
-
interface IFileUploadFieldProps extends Omit<TextFieldProps,
|
|
798
|
+
interface IFileUploadFieldProps extends Omit<TextFieldProps, "value" | "onChange" | "name" | "type" | "error" | "onDrop"> {
|
|
799
799
|
/** Field name for form identification */
|
|
800
800
|
name?: string;
|
|
801
801
|
/** Label text for the file upload field */
|
|
@@ -827,11 +827,11 @@ interface IFileUploadFieldProps extends Omit<TextFieldProps, 'value' | 'onChange
|
|
|
827
827
|
/** Placeholder text */
|
|
828
828
|
placeholder?: string;
|
|
829
829
|
/** TextField variant */
|
|
830
|
-
variant?: TextFieldProps[
|
|
830
|
+
variant?: TextFieldProps["variant"];
|
|
831
831
|
/** TextField size */
|
|
832
|
-
size?: TextFieldProps[
|
|
832
|
+
size?: TextFieldProps["size"];
|
|
833
833
|
/** TextField color */
|
|
834
|
-
color?: TextFieldProps[
|
|
834
|
+
color?: TextFieldProps["color"];
|
|
835
835
|
/** Full width of the field */
|
|
836
836
|
fullWidth?: boolean;
|
|
837
837
|
/** Required field indicator */
|
|
@@ -839,11 +839,11 @@ interface IFileUploadFieldProps extends Omit<TextFieldProps, 'value' | 'onChange
|
|
|
839
839
|
/** Upload button text */
|
|
840
840
|
buttonText?: string;
|
|
841
841
|
/** Upload button variant */
|
|
842
|
-
buttonVariant?: ButtonProps[
|
|
842
|
+
buttonVariant?: ButtonProps["variant"];
|
|
843
843
|
/** Upload button color */
|
|
844
|
-
buttonColor?: ButtonProps[
|
|
844
|
+
buttonColor?: ButtonProps["color"];
|
|
845
845
|
/** Upload button size */
|
|
846
|
-
buttonSize?: ButtonProps[
|
|
846
|
+
buttonSize?: ButtonProps["size"];
|
|
847
847
|
/** Custom upload icon */
|
|
848
848
|
uploadIcon?: React__default.ReactNode;
|
|
849
849
|
/** Callback fired when file(s) change */
|
|
@@ -857,17 +857,17 @@ interface IFileUploadFieldProps extends Omit<TextFieldProps, 'value' | 'onChange
|
|
|
857
857
|
/** Callback fired when file is dropped (drag and drop) */
|
|
858
858
|
onDrop?: (files: FileList) => void;
|
|
859
859
|
/** Custom styles for the TextField */
|
|
860
|
-
inputStyles?: TextFieldProps[
|
|
860
|
+
inputStyles?: TextFieldProps["sx"];
|
|
861
861
|
/** Custom styles for the Button */
|
|
862
|
-
buttonStyles?: ButtonProps[
|
|
862
|
+
buttonStyles?: ButtonProps["sx"];
|
|
863
863
|
/** Custom styles for FormControl */
|
|
864
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
864
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>["sx"];
|
|
865
865
|
/** Custom styles for the container */
|
|
866
866
|
containerStyles?: React__default.CSSProperties;
|
|
867
867
|
/** Custom slot props for MUI v7 */
|
|
868
|
-
slotProps?: TextFieldProps[
|
|
868
|
+
slotProps?: TextFieldProps["slotProps"];
|
|
869
869
|
/** Custom slots for MUI v7 */
|
|
870
|
-
slots?: TextFieldProps[
|
|
870
|
+
slots?: TextFieldProps["slots"];
|
|
871
871
|
}
|
|
872
872
|
declare const FileUploadField: React__default.ForwardRefExoticComponent<Omit<IFileUploadFieldProps, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
873
873
|
|