@react-solutions/inputs 0.2.5 → 0.2.7
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 +126 -128
- package/dist/index.d.ts +126 -128
- 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
|
@@ -5,7 +5,7 @@ import { DateCalendarProps, TimeClockProps, TimeView, TimePickerProps, DatePicke
|
|
|
5
5
|
import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
|
|
6
6
|
import { FilterOptionsState } from '@mui/material/useAutocomplete';
|
|
7
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
8
|
-
import { FieldValues
|
|
8
|
+
import { FieldValues } from 'react-hook-form';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Error object type
|
|
@@ -438,7 +438,7 @@ type FieldError$d = {
|
|
|
438
438
|
* Extended Date Calendar Field Props
|
|
439
439
|
* Extends MUI DateCalendarProps with custom form field props
|
|
440
440
|
*/
|
|
441
|
-
interface IDateCalendarFieldProps extends Omit<DateCalendarProps,
|
|
441
|
+
interface IDateCalendarFieldProps extends Omit<DateCalendarProps, 'value' | 'onChange' | 'defaultValue' | 'slots' | 'slotProps'> {
|
|
442
442
|
/** Field name for form identification */
|
|
443
443
|
name?: string;
|
|
444
444
|
/** Label text for the calendar */
|
|
@@ -468,25 +468,25 @@ interface IDateCalendarFieldProps extends Omit<DateCalendarProps, "value" | "onC
|
|
|
468
468
|
/** Function to disable specific years */
|
|
469
469
|
shouldDisableYear?: (year: Date) => boolean;
|
|
470
470
|
/** Custom styles for the DateCalendar */
|
|
471
|
-
calendarStyles?: DateCalendarProps[
|
|
471
|
+
calendarStyles?: DateCalendarProps['sx'];
|
|
472
472
|
/** Custom styles for FormControl */
|
|
473
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
473
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>['sx'];
|
|
474
474
|
/** Custom styles for FormLabel */
|
|
475
|
-
formLabelStyles?: FormLabelProps[
|
|
475
|
+
formLabelStyles?: FormLabelProps['sx'];
|
|
476
476
|
/** Custom styles for the container Box */
|
|
477
|
-
containerStyles?: React__default.ComponentProps<typeof Box>[
|
|
477
|
+
containerStyles?: React__default.ComponentProps<typeof Box>['sx'];
|
|
478
478
|
/** Callback fired when the date changes */
|
|
479
479
|
onChange?: (value: Date | null) => void;
|
|
480
480
|
/** Callback fired when a view change is requested */
|
|
481
|
-
onViewChange?: (view:
|
|
481
|
+
onViewChange?: (view: 'day' | 'month' | 'year') => void;
|
|
482
482
|
/** Callback fired when a month change is requested */
|
|
483
483
|
onMonthChange?: (month: Date) => void;
|
|
484
484
|
/** Callback fired when a year change is requested */
|
|
485
485
|
onYearChange?: (year: Date) => void;
|
|
486
486
|
/** Custom slot props for MUI v7 */
|
|
487
|
-
slotProps?: DateCalendarProps[
|
|
487
|
+
slotProps?: DateCalendarProps['slotProps'];
|
|
488
488
|
/** Custom slots for MUI v7 */
|
|
489
|
-
slots?: DateCalendarProps[
|
|
489
|
+
slots?: DateCalendarProps['slots'];
|
|
490
490
|
/** Date adapter to use (defaults to AdapterDateFns) */
|
|
491
491
|
dateAdapter?: typeof AdapterDateFns;
|
|
492
492
|
/** Whether to show days outside current month */
|
|
@@ -498,7 +498,7 @@ interface IDateCalendarFieldProps extends Omit<DateCalendarProps, "value" | "onC
|
|
|
498
498
|
/** Reference date for the calendar */
|
|
499
499
|
referenceDate?: Date;
|
|
500
500
|
/** Controlled view state */
|
|
501
|
-
view?:
|
|
501
|
+
view?: 'day' | 'month' | 'year';
|
|
502
502
|
}
|
|
503
503
|
declare const DateCalendarField: React__default.ForwardRefExoticComponent<IDateCalendarFieldProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
504
504
|
|
|
@@ -512,7 +512,7 @@ type FieldError$c = {
|
|
|
512
512
|
* Extended Time Clock Field Props
|
|
513
513
|
* Extends MUI TimeClockProps with custom form field props
|
|
514
514
|
*/
|
|
515
|
-
interface ITimeClockFieldProps extends Omit<TimeClockProps<TimeView>,
|
|
515
|
+
interface ITimeClockFieldProps extends Omit<TimeClockProps<TimeView>, 'value' | 'onChange' | 'defaultValue' | 'slots' | 'slotProps' | 'view' | 'onViewChange'> {
|
|
516
516
|
/** Field name for form identification */
|
|
517
517
|
name?: string;
|
|
518
518
|
/** Label text for the time clock */
|
|
@@ -548,19 +548,19 @@ interface ITimeClockFieldProps extends Omit<TimeClockProps<TimeView>, "value" |
|
|
|
548
548
|
/** Function to disable specific times */
|
|
549
549
|
shouldDisableTime?: (time: Date, view: TimeView) => boolean;
|
|
550
550
|
/** Custom styles for the TimeClock */
|
|
551
|
-
clockStyles?: TimeClockProps<TimeView>[
|
|
551
|
+
clockStyles?: TimeClockProps<TimeView>['sx'];
|
|
552
552
|
/** Custom styles for FormControl */
|
|
553
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
553
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>['sx'];
|
|
554
554
|
/** Custom styles for FormLabel */
|
|
555
|
-
formLabelStyles?: FormLabelProps[
|
|
555
|
+
formLabelStyles?: FormLabelProps['sx'];
|
|
556
556
|
/** Custom styles for the container Box */
|
|
557
|
-
containerStyles?: React__default.ComponentProps<typeof Box>[
|
|
557
|
+
containerStyles?: React__default.ComponentProps<typeof Box>['sx'];
|
|
558
558
|
/** Custom styles for the view buttons Stack */
|
|
559
|
-
buttonsStackStyles?: React__default.ComponentProps<typeof Stack>[
|
|
559
|
+
buttonsStackStyles?: React__default.ComponentProps<typeof Stack>['sx'];
|
|
560
560
|
/** Custom styles for view buttons */
|
|
561
|
-
buttonStyles?: ButtonProps[
|
|
561
|
+
buttonStyles?: ButtonProps['sx'];
|
|
562
562
|
/** Custom styles for active view button */
|
|
563
|
-
activeButtonStyles?: ButtonProps[
|
|
563
|
+
activeButtonStyles?: ButtonProps['sx'];
|
|
564
564
|
/** Whether to show view selector buttons */
|
|
565
565
|
showViewButtons?: boolean;
|
|
566
566
|
/** Initial view */
|
|
@@ -572,9 +572,9 @@ interface ITimeClockFieldProps extends Omit<TimeClockProps<TimeView>, "value" |
|
|
|
572
572
|
/** Callback fired when a view change is requested */
|
|
573
573
|
onViewChange?: (view: TimeView) => void;
|
|
574
574
|
/** Custom slot props for MUI v7 */
|
|
575
|
-
slotProps?: TimeClockProps<TimeView>[
|
|
575
|
+
slotProps?: TimeClockProps<TimeView>['slotProps'];
|
|
576
576
|
/** Custom slots for MUI v7 */
|
|
577
|
-
slots?: TimeClockProps<TimeView>[
|
|
577
|
+
slots?: TimeClockProps<TimeView>['slots'];
|
|
578
578
|
/** Date adapter to use (defaults to AdapterDateFns) */
|
|
579
579
|
dateAdapter?: typeof AdapterDateFns;
|
|
580
580
|
/** Auto focus */
|
|
@@ -592,7 +592,7 @@ type FieldError$b = {
|
|
|
592
592
|
* Extended Time Picker Field Props
|
|
593
593
|
* Extends MUI TimePickerProps with custom form field props
|
|
594
594
|
*/
|
|
595
|
-
interface ITimePickerFieldProps extends Omit<TimePickerProps,
|
|
595
|
+
interface ITimePickerFieldProps extends Omit<TimePickerProps, 'value' | 'onChange' | 'defaultValue' | 'slots' | 'slotProps' | 'renderInput' | 'onViewChange'> {
|
|
596
596
|
/** Field name for form identification */
|
|
597
597
|
name?: string;
|
|
598
598
|
/** Label text for the time picker */
|
|
@@ -616,13 +616,13 @@ interface ITimePickerFieldProps extends Omit<TimePickerProps, "value" | "onChang
|
|
|
616
616
|
/** Maximum selectable time */
|
|
617
617
|
maxTime?: Date;
|
|
618
618
|
/** Function to disable specific times */
|
|
619
|
-
shouldDisableTime?: (time: Date, view:
|
|
619
|
+
shouldDisableTime?: (time: Date, view: 'hours' | 'minutes' | 'seconds') => boolean;
|
|
620
620
|
/** TextField size */
|
|
621
|
-
size?: TextFieldProps[
|
|
621
|
+
size?: TextFieldProps['size'];
|
|
622
622
|
/** TextField variant */
|
|
623
|
-
variant?: TextFieldProps[
|
|
623
|
+
variant?: TextFieldProps['variant'];
|
|
624
624
|
/** TextField color */
|
|
625
|
-
color?: TextFieldProps[
|
|
625
|
+
color?: TextFieldProps['color'];
|
|
626
626
|
/** Placeholder text */
|
|
627
627
|
placeholder?: string;
|
|
628
628
|
/** Whether the field is read-only */
|
|
@@ -636,23 +636,23 @@ interface ITimePickerFieldProps extends Omit<TimePickerProps, "value" | "onChang
|
|
|
636
636
|
/** Whether to use 12-hour format */
|
|
637
637
|
ampm?: boolean;
|
|
638
638
|
/** Available views (hours, minutes, seconds) */
|
|
639
|
-
views?: (
|
|
639
|
+
views?: ('hours' | 'minutes' | 'seconds')[];
|
|
640
640
|
/** Controlled view state */
|
|
641
|
-
view?:
|
|
641
|
+
view?: 'hours' | 'minutes' | 'seconds';
|
|
642
642
|
/** Default view */
|
|
643
|
-
openTo?:
|
|
643
|
+
openTo?: 'hours' | 'minutes' | 'seconds';
|
|
644
644
|
/** Format for displaying the time */
|
|
645
645
|
format?: string;
|
|
646
646
|
/** Custom styles for the TimePicker */
|
|
647
|
-
pickerStyles?: TimePickerProps[
|
|
647
|
+
pickerStyles?: TimePickerProps['sx'];
|
|
648
648
|
/** Custom styles for FormControl */
|
|
649
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
649
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>['sx'];
|
|
650
650
|
/** Custom styles for FormLabel */
|
|
651
|
-
formLabelStyles?: FormLabelProps[
|
|
651
|
+
formLabelStyles?: FormLabelProps['sx'];
|
|
652
652
|
/** Custom styles for the container Box */
|
|
653
|
-
containerStyles?: React__default.ComponentProps<typeof Box>[
|
|
653
|
+
containerStyles?: React__default.ComponentProps<typeof Box>['sx'];
|
|
654
654
|
/** Custom styles for the TextField */
|
|
655
|
-
textFieldStyles?: TextFieldProps[
|
|
655
|
+
textFieldStyles?: TextFieldProps['sx'];
|
|
656
656
|
/** Callback fired when the time changes */
|
|
657
657
|
onChange?: (value: Date | null) => void;
|
|
658
658
|
/** Callback fired when the field receives focus */
|
|
@@ -660,15 +660,15 @@ interface ITimePickerFieldProps extends Omit<TimePickerProps, "value" | "onChang
|
|
|
660
660
|
/** Callback fired when the field loses focus */
|
|
661
661
|
onBlur?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
662
662
|
/** Callback fired when a view change is requested */
|
|
663
|
-
onViewChange?: (view:
|
|
663
|
+
onViewChange?: (view: 'hours' | 'minutes' | 'seconds' | 'meridiem') => void;
|
|
664
664
|
/** Callback fired when the picker opens */
|
|
665
665
|
onOpen?: () => void;
|
|
666
666
|
/** Callback fired when the picker closes */
|
|
667
667
|
onClose?: () => void;
|
|
668
668
|
/** Custom slot props for MUI v7 */
|
|
669
|
-
slotProps?: TimePickerProps[
|
|
669
|
+
slotProps?: TimePickerProps['slotProps'];
|
|
670
670
|
/** Custom slots for MUI v7 */
|
|
671
|
-
slots?: TimePickerProps[
|
|
671
|
+
slots?: TimePickerProps['slots'];
|
|
672
672
|
/** Date adapter to use (defaults to AdapterDateFns) */
|
|
673
673
|
dateAdapter?: typeof AdapterDateFns;
|
|
674
674
|
/** Auto focus the input */
|
|
@@ -686,7 +686,7 @@ type FieldError$a = {
|
|
|
686
686
|
* Extended Date Picker Field Props
|
|
687
687
|
* Extends MUI DatePickerProps with custom form field props
|
|
688
688
|
*/
|
|
689
|
-
interface IDatePickerFieldProps extends Omit<DatePickerProps,
|
|
689
|
+
interface IDatePickerFieldProps extends Omit<DatePickerProps, 'value' | 'onChange' | 'defaultValue' | 'slots' | 'slotProps' | 'renderInput'> {
|
|
690
690
|
/** Field name for form identification */
|
|
691
691
|
name?: string;
|
|
692
692
|
/** Label text for the date picker */
|
|
@@ -716,11 +716,11 @@ interface IDatePickerFieldProps extends Omit<DatePickerProps, "value" | "onChang
|
|
|
716
716
|
/** Function to disable specific years */
|
|
717
717
|
shouldDisableYear?: (year: Date) => boolean;
|
|
718
718
|
/** TextField size */
|
|
719
|
-
size?: TextFieldProps[
|
|
719
|
+
size?: TextFieldProps['size'];
|
|
720
720
|
/** TextField variant */
|
|
721
|
-
variant?: TextFieldProps[
|
|
721
|
+
variant?: TextFieldProps['variant'];
|
|
722
722
|
/** TextField color */
|
|
723
|
-
color?: TextFieldProps[
|
|
723
|
+
color?: TextFieldProps['color'];
|
|
724
724
|
/** Placeholder text */
|
|
725
725
|
placeholder?: string;
|
|
726
726
|
/** Whether the field is read-only */
|
|
@@ -734,21 +734,21 @@ interface IDatePickerFieldProps extends Omit<DatePickerProps, "value" | "onChang
|
|
|
734
734
|
/** Reference date for the calendar */
|
|
735
735
|
referenceDate?: Date;
|
|
736
736
|
/** Controlled view state */
|
|
737
|
-
view?:
|
|
737
|
+
view?: 'day' | 'month' | 'year';
|
|
738
738
|
/** Format for displaying the date */
|
|
739
739
|
format?: string;
|
|
740
740
|
/** Whether to open the calendar on focus */
|
|
741
|
-
openTo?:
|
|
741
|
+
openTo?: 'day' | 'month' | 'year';
|
|
742
742
|
/** Custom styles for the DatePicker */
|
|
743
|
-
pickerStyles?: DatePickerProps[
|
|
743
|
+
pickerStyles?: DatePickerProps['sx'];
|
|
744
744
|
/** Custom styles for FormControl */
|
|
745
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
745
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>['sx'];
|
|
746
746
|
/** Custom styles for FormLabel */
|
|
747
|
-
formLabelStyles?: FormLabelProps[
|
|
747
|
+
formLabelStyles?: FormLabelProps['sx'];
|
|
748
748
|
/** Custom styles for the container Box */
|
|
749
|
-
containerStyles?: React__default.ComponentProps<typeof Box>[
|
|
749
|
+
containerStyles?: React__default.ComponentProps<typeof Box>['sx'];
|
|
750
750
|
/** Custom styles for the TextField */
|
|
751
|
-
textFieldStyles?: TextFieldProps[
|
|
751
|
+
textFieldStyles?: TextFieldProps['sx'];
|
|
752
752
|
/** Callback fired when the date changes */
|
|
753
753
|
onChange?: (value: Date | null) => void;
|
|
754
754
|
/** Callback fired when the field receives focus */
|
|
@@ -756,7 +756,7 @@ interface IDatePickerFieldProps extends Omit<DatePickerProps, "value" | "onChang
|
|
|
756
756
|
/** Callback fired when the field loses focus */
|
|
757
757
|
onBlur?: (event: React__default.FocusEvent<HTMLInputElement>) => void;
|
|
758
758
|
/** Callback fired when a view change is requested */
|
|
759
|
-
onViewChange?: (view:
|
|
759
|
+
onViewChange?: (view: 'day' | 'month' | 'year') => void;
|
|
760
760
|
/** Callback fired when a month change is requested */
|
|
761
761
|
onMonthChange?: (month: Date) => void;
|
|
762
762
|
/** Callback fired when a year change is requested */
|
|
@@ -766,9 +766,9 @@ interface IDatePickerFieldProps extends Omit<DatePickerProps, "value" | "onChang
|
|
|
766
766
|
/** Callback fired when the calendar closes */
|
|
767
767
|
onClose?: () => void;
|
|
768
768
|
/** Custom slot props for MUI v7 */
|
|
769
|
-
slotProps?: DatePickerProps[
|
|
769
|
+
slotProps?: DatePickerProps['slotProps'];
|
|
770
770
|
/** Custom slots for MUI v7 */
|
|
771
|
-
slots?: DatePickerProps[
|
|
771
|
+
slots?: DatePickerProps['slots'];
|
|
772
772
|
/** Date adapter to use (defaults to AdapterDateFns) */
|
|
773
773
|
dateAdapter?: typeof AdapterDateFns;
|
|
774
774
|
/** Whether to reduce animations */
|
|
@@ -788,7 +788,7 @@ type FieldError$9 = {
|
|
|
788
788
|
* Extended File Upload Field Props
|
|
789
789
|
* Extends MUI TextFieldProps with custom file upload props
|
|
790
790
|
*/
|
|
791
|
-
interface IFileUploadFieldProps extends Omit<TextFieldProps,
|
|
791
|
+
interface IFileUploadFieldProps extends Omit<TextFieldProps, 'value' | 'onChange' | 'name' | 'type' | 'error' | 'onDrop'> {
|
|
792
792
|
/** Field name for form identification */
|
|
793
793
|
name?: string;
|
|
794
794
|
/** Label text for the file upload field */
|
|
@@ -820,11 +820,11 @@ interface IFileUploadFieldProps extends Omit<TextFieldProps, "value" | "onChange
|
|
|
820
820
|
/** Placeholder text */
|
|
821
821
|
placeholder?: string;
|
|
822
822
|
/** TextField variant */
|
|
823
|
-
variant?: TextFieldProps[
|
|
823
|
+
variant?: TextFieldProps['variant'];
|
|
824
824
|
/** TextField size */
|
|
825
|
-
size?: TextFieldProps[
|
|
825
|
+
size?: TextFieldProps['size'];
|
|
826
826
|
/** TextField color */
|
|
827
|
-
color?: TextFieldProps[
|
|
827
|
+
color?: TextFieldProps['color'];
|
|
828
828
|
/** Full width of the field */
|
|
829
829
|
fullWidth?: boolean;
|
|
830
830
|
/** Required field indicator */
|
|
@@ -832,11 +832,11 @@ interface IFileUploadFieldProps extends Omit<TextFieldProps, "value" | "onChange
|
|
|
832
832
|
/** Upload button text */
|
|
833
833
|
buttonText?: string;
|
|
834
834
|
/** Upload button variant */
|
|
835
|
-
buttonVariant?: ButtonProps[
|
|
835
|
+
buttonVariant?: ButtonProps['variant'];
|
|
836
836
|
/** Upload button color */
|
|
837
|
-
buttonColor?: ButtonProps[
|
|
837
|
+
buttonColor?: ButtonProps['color'];
|
|
838
838
|
/** Upload button size */
|
|
839
|
-
buttonSize?: ButtonProps[
|
|
839
|
+
buttonSize?: ButtonProps['size'];
|
|
840
840
|
/** Custom upload icon */
|
|
841
841
|
uploadIcon?: React__default.ReactNode;
|
|
842
842
|
/** Callback fired when file(s) change */
|
|
@@ -850,17 +850,17 @@ interface IFileUploadFieldProps extends Omit<TextFieldProps, "value" | "onChange
|
|
|
850
850
|
/** Callback fired when file is dropped (drag and drop) */
|
|
851
851
|
onDrop?: (files: FileList) => void;
|
|
852
852
|
/** Custom styles for the TextField */
|
|
853
|
-
inputStyles?: TextFieldProps[
|
|
853
|
+
inputStyles?: TextFieldProps['sx'];
|
|
854
854
|
/** Custom styles for the Button */
|
|
855
|
-
buttonStyles?: ButtonProps[
|
|
855
|
+
buttonStyles?: ButtonProps['sx'];
|
|
856
856
|
/** Custom styles for FormControl */
|
|
857
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
857
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>['sx'];
|
|
858
858
|
/** Custom styles for the container */
|
|
859
859
|
containerStyles?: React__default.CSSProperties;
|
|
860
860
|
/** Custom slot props for MUI v7 */
|
|
861
|
-
slotProps?: TextFieldProps[
|
|
861
|
+
slotProps?: TextFieldProps['slotProps'];
|
|
862
862
|
/** Custom slots for MUI v7 */
|
|
863
|
-
slots?: TextFieldProps[
|
|
863
|
+
slots?: TextFieldProps['slots'];
|
|
864
864
|
}
|
|
865
865
|
declare const FileUploadField: React__default.ForwardRefExoticComponent<Omit<IFileUploadFieldProps, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
|
|
866
866
|
|
|
@@ -873,11 +873,11 @@ type FieldError$8 = {
|
|
|
873
873
|
/**
|
|
874
874
|
* Color format types
|
|
875
875
|
*/
|
|
876
|
-
type ColorFormat =
|
|
876
|
+
type ColorFormat = 'hex' | 'rgb' | 'rgba' | 'hsl' | 'hsla';
|
|
877
877
|
/**
|
|
878
878
|
* Extended Color Picker Field Props
|
|
879
879
|
*/
|
|
880
|
-
interface IColorPickerFieldProps extends Omit<TextFieldProps,
|
|
880
|
+
interface IColorPickerFieldProps extends Omit<TextFieldProps, 'value' | 'onChange' | 'name' | 'type' | 'error' | 'inputRef' | 'multiline' | 'variant' | 'size'> {
|
|
881
881
|
/** Field name for form identification */
|
|
882
882
|
name?: string;
|
|
883
883
|
/** Label text for the color picker field */
|
|
@@ -893,11 +893,11 @@ interface IColorPickerFieldProps extends Omit<TextFieldProps, "value" | "onChang
|
|
|
893
893
|
/** Placeholder text */
|
|
894
894
|
placeholder?: string;
|
|
895
895
|
/** TextField variant */
|
|
896
|
-
variant?: TextFieldProps[
|
|
896
|
+
variant?: TextFieldProps['variant'];
|
|
897
897
|
/** TextField size */
|
|
898
|
-
size?: TextFieldProps[
|
|
898
|
+
size?: TextFieldProps['size'];
|
|
899
899
|
/** TextField color */
|
|
900
|
-
color?: TextFieldProps[
|
|
900
|
+
color?: TextFieldProps['color'];
|
|
901
901
|
/** Full width of the field */
|
|
902
902
|
fullWidth?: boolean;
|
|
903
903
|
/** Required field indicator */
|
|
@@ -925,13 +925,13 @@ interface IColorPickerFieldProps extends Omit<TextFieldProps, "value" | "onChang
|
|
|
925
925
|
/** Custom styles for the color preview swatch */
|
|
926
926
|
previewStyles?: React__default.CSSProperties;
|
|
927
927
|
/** Custom styles for FormControl */
|
|
928
|
-
formControlStyles?: FormControlProps[
|
|
928
|
+
formControlStyles?: FormControlProps['sx'];
|
|
929
929
|
/** Custom styles for TextField */
|
|
930
|
-
inputStyles?: TextFieldProps[
|
|
930
|
+
inputStyles?: TextFieldProps['sx'];
|
|
931
931
|
/** Custom slot props for MUI v7 */
|
|
932
|
-
slotProps?: TextFieldProps[
|
|
932
|
+
slotProps?: TextFieldProps['slotProps'];
|
|
933
933
|
/** Custom slots for MUI v7 */
|
|
934
|
-
slots?: TextFieldProps[
|
|
934
|
+
slots?: TextFieldProps['slots'];
|
|
935
935
|
}
|
|
936
936
|
declare const ColorPickerField: React__default.NamedExoticComponent<Omit<IColorPickerFieldProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
937
937
|
|
|
@@ -950,7 +950,7 @@ type FieldError$7 = {
|
|
|
950
950
|
* Extended Autocomplete Input Props
|
|
951
951
|
* Extends MUI AutocompleteProps with custom form field props
|
|
952
952
|
*/
|
|
953
|
-
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>,
|
|
953
|
+
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'> {
|
|
954
954
|
/** Field name for form identification */
|
|
955
955
|
name?: string;
|
|
956
956
|
/** Label text for the input field */
|
|
@@ -968,11 +968,11 @@ interface IAutoCompleteInputProps<T extends AutoCompleteOption = AutoCompleteOpt
|
|
|
968
968
|
/** Placeholder text */
|
|
969
969
|
placeholder?: string;
|
|
970
970
|
/** TextField variant */
|
|
971
|
-
variant?: TextFieldProps[
|
|
971
|
+
variant?: TextFieldProps['variant'];
|
|
972
972
|
/** TextField size */
|
|
973
|
-
size?: TextFieldProps[
|
|
973
|
+
size?: TextFieldProps['size'];
|
|
974
974
|
/** TextField color */
|
|
975
|
-
color?: TextFieldProps[
|
|
975
|
+
color?: TextFieldProps['color'];
|
|
976
976
|
/** Full width of the field */
|
|
977
977
|
fullWidth?: boolean;
|
|
978
978
|
/** Required field indicator */
|
|
@@ -997,11 +997,11 @@ interface IAutoCompleteInputProps<T extends AutoCompleteOption = AutoCompleteOpt
|
|
|
997
997
|
/** Custom icon for popup indicator */
|
|
998
998
|
popupIcon?: React__default.ReactNode;
|
|
999
999
|
/** Custom styles for the TextField */
|
|
1000
|
-
inputStyles?: TextFieldProps[
|
|
1000
|
+
inputStyles?: TextFieldProps['sx'];
|
|
1001
1001
|
/** Custom styles for the Autocomplete */
|
|
1002
|
-
autocompleteStyles?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>[
|
|
1002
|
+
autocompleteStyles?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>['sx'];
|
|
1003
1003
|
/** Custom styles for FormControl */
|
|
1004
|
-
formControlStyles?: React__default.ComponentProps<typeof FormControl>[
|
|
1004
|
+
formControlStyles?: React__default.ComponentProps<typeof FormControl>['sx'];
|
|
1005
1005
|
/** Whether to show loading state */
|
|
1006
1006
|
loading?: boolean;
|
|
1007
1007
|
/** Text to show when loading */
|
|
@@ -1021,9 +1021,9 @@ interface IAutoCompleteInputProps<T extends AutoCompleteOption = AutoCompleteOpt
|
|
|
1021
1021
|
/** Whether to disable list wrapping */
|
|
1022
1022
|
disableListWrap?: boolean;
|
|
1023
1023
|
/** Custom slot props for MUI v7 */
|
|
1024
|
-
slotProps?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>[
|
|
1024
|
+
slotProps?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>['slotProps'];
|
|
1025
1025
|
/** Custom slots for MUI v7 */
|
|
1026
|
-
slots?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>[
|
|
1026
|
+
slots?: AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>['slots'];
|
|
1027
1027
|
}
|
|
1028
1028
|
declare const AutoCompleteField: React__default.NamedExoticComponent<Omit<IAutoCompleteInputProps<AutoCompleteOption, boolean, boolean, boolean>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
1029
1029
|
|
|
@@ -1568,8 +1568,6 @@ interface IFormInputFields<TFieldValues extends FieldValues = FieldValues> {
|
|
|
1568
1568
|
label?: string;
|
|
1569
1569
|
/** React Hook Form control object */
|
|
1570
1570
|
control?: any;
|
|
1571
|
-
/** React Hook Form errors object */
|
|
1572
|
-
errors: FieldErrors<TFieldValues>;
|
|
1573
1571
|
/** Default value for the field */
|
|
1574
1572
|
defaultValue?: any;
|
|
1575
1573
|
/** Placeholder text */
|
|
@@ -1694,80 +1692,80 @@ interface IFormInputCheckBoxGroupFields<TFieldValues extends FieldValues = Field
|
|
|
1694
1692
|
labelPlacement?: "end" | "start" | "top" | "bottom";
|
|
1695
1693
|
}
|
|
1696
1694
|
|
|
1697
|
-
declare const FormInputTextField: React__default.MemoExoticComponent<({ name, label, control,
|
|
1695
|
+
declare const FormInputTextField: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1698
1696
|
|
|
1699
|
-
declare const FormInputTextArea: React__default.MemoExoticComponent<({ name, label, control,
|
|
1697
|
+
declare const FormInputTextArea: React__default.MemoExoticComponent<({ name, label, control, rows, minRows, maxRows, resize, defaultValue, onChange, ...props }: IFormInputTextAreaFields) => react_jsx_runtime.JSX.Element>;
|
|
1700
1698
|
|
|
1701
|
-
declare const FormInputPasswordField: React__default.MemoExoticComponent<({ name, label, control,
|
|
1699
|
+
declare const FormInputPasswordField: React__default.MemoExoticComponent<({ name, label, control, size, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1702
1700
|
|
|
1703
|
-
declare const FormInputNumberField: React__default.MemoExoticComponent<({ name, label, control,
|
|
1701
|
+
declare const FormInputNumberField: React__default.MemoExoticComponent<({ name, label, control, pattern, min, max, step, allowDecimals, decimalPlaces, defaultValue, onChange, ...props }: IFormInputNumberFields) => react_jsx_runtime.JSX.Element>;
|
|
1704
1702
|
|
|
1705
|
-
declare const FormInputTelField: React__default.MemoExoticComponent<({ name, label, control,
|
|
1703
|
+
declare const FormInputTelField: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1706
1704
|
|
|
1707
|
-
declare const FormInputSearchField: React__default.MemoExoticComponent<({ name, label, control,
|
|
1705
|
+
declare const FormInputSearchField: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1708
1706
|
|
|
1709
|
-
declare const FormInputOTPField: React__default.MemoExoticComponent<({ name, label, control,
|
|
1707
|
+
declare const FormInputOTPField: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1710
1708
|
|
|
1711
|
-
declare const FormInputSelect: React__default.MemoExoticComponent<({ name, label, control,
|
|
1709
|
+
declare const FormInputSelect: React__default.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1712
1710
|
|
|
1713
|
-
declare const FormInputMultiSelect: React__default.MemoExoticComponent<({ name, label, control,
|
|
1711
|
+
declare const FormInputMultiSelect: React__default.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1714
1712
|
|
|
1715
|
-
declare const FormInputAutoComplete: React__default.MemoExoticComponent<({ name, label, control,
|
|
1713
|
+
declare const FormInputAutoComplete: React__default.MemoExoticComponent<({ name, label, control, options, disabled, placeholder, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1716
1714
|
|
|
1717
|
-
declare const FormInputMultiAutoComplete: React__default.MemoExoticComponent<({ name, label, control,
|
|
1715
|
+
declare const FormInputMultiAutoComplete: React__default.MemoExoticComponent<({ name, label, control, options, disabled, placeholder, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1718
1716
|
|
|
1719
|
-
declare const FormInputColorPicker: React__default.MemoExoticComponent<({ name, label, control,
|
|
1717
|
+
declare const FormInputColorPicker: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1720
1718
|
|
|
1721
|
-
declare const FormInputFileUpload: React__default.MemoExoticComponent<({ name, label, control,
|
|
1719
|
+
declare const FormInputFileUpload: React__default.MemoExoticComponent<({ name, label, control, size, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1722
1720
|
|
|
1723
|
-
declare const FormInputDatePicker: React__default.MemoExoticComponent<({ name, label, control,
|
|
1721
|
+
declare const FormInputDatePicker: React__default.MemoExoticComponent<({ name, label, control, size, readOnly, shouldDisableDate, disabled, placeholder, defaultValue, onChange, ...props }: IFormInputDateFields) => react_jsx_runtime.JSX.Element>;
|
|
1724
1722
|
|
|
1725
|
-
declare const FormInputTimePicker: React__default.MemoExoticComponent<({ name, label, control,
|
|
1723
|
+
declare const FormInputTimePicker: React__default.MemoExoticComponent<({ name, label, control, ampm, timezone, defaultValue, onChange, ...props }: IFormInputDateFields) => react_jsx_runtime.JSX.Element>;
|
|
1726
1724
|
|
|
1727
|
-
declare const FormInputTimeClock: React__default.MemoExoticComponent<({ name, label, control,
|
|
1725
|
+
declare const FormInputTimeClock: React__default.MemoExoticComponent<({ name, label, control, readOnly, disabled, ampm, views, ampmInClock, disablePast, defaultValue, onChange, ...props }: IFormInputDateFields) => react_jsx_runtime.JSX.Element>;
|
|
1728
1726
|
|
|
1729
|
-
declare const FormInputCalendar: React__default.MemoExoticComponent<({ name, label, control,
|
|
1727
|
+
declare const FormInputCalendar: React__default.MemoExoticComponent<({ name, label, control, readOnly, disabled, defaultValue, onChange, ...props }: IFormInputDateFields) => react_jsx_runtime.JSX.Element>;
|
|
1730
1728
|
|
|
1731
|
-
declare const FormInputCheckBox: React__default.MemoExoticComponent<({ name, label, control,
|
|
1729
|
+
declare const FormInputCheckBox: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1732
1730
|
|
|
1733
|
-
declare const FormInputCheckBoxGroup: React__default.MemoExoticComponent<({ name, label, control,
|
|
1731
|
+
declare const FormInputCheckBoxGroup: React__default.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, row, color, labelPlacement, ...props }: IFormInputCheckBoxGroupFields) => react_jsx_runtime.JSX.Element>;
|
|
1734
1732
|
|
|
1735
|
-
declare const FormInputSwitch: React__default.MemoExoticComponent<({ name, label, control,
|
|
1733
|
+
declare const FormInputSwitch: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1736
1734
|
|
|
1737
|
-
declare const FormInputSlider: React__default.MemoExoticComponent<({ name, label, control,
|
|
1735
|
+
declare const FormInputSlider: React__default.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1738
1736
|
|
|
1739
|
-
declare const FormInputRadioButton: React__default.MemoExoticComponent<({ name, label, control,
|
|
1737
|
+
declare const FormInputRadioButton: React__default.MemoExoticComponent<({ name, label, control, checked, defaultValue, onChange, color, labelPlacement, ...props }: IFormInputRadioFields) => react_jsx_runtime.JSX.Element>;
|
|
1740
1738
|
|
|
1741
|
-
declare const FormInputRadioButtonGroup: React__default.MemoExoticComponent<({ name, label, control,
|
|
1739
|
+
declare const FormInputRadioButtonGroup: React__default.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1742
1740
|
|
|
1743
1741
|
declare const NormalForm: () => react_jsx_runtime.JSX.Element;
|
|
1744
1742
|
|
|
1745
1743
|
declare const ReactHookForm: () => react_jsx_runtime.JSX.Element;
|
|
1746
1744
|
|
|
1747
1745
|
declare const FormFields: {
|
|
1748
|
-
FormInputTextField: React.MemoExoticComponent<({ name, label, control,
|
|
1749
|
-
FormInputTextArea: React.MemoExoticComponent<({ name, label, control,
|
|
1750
|
-
FormInputPasswordField: React.MemoExoticComponent<({ name, label, control,
|
|
1751
|
-
FormInputNumberField: React.MemoExoticComponent<({ name, label, control,
|
|
1752
|
-
FormInputTelField: React.MemoExoticComponent<({ name, label, control,
|
|
1753
|
-
FormInputSearchField: React.MemoExoticComponent<({ name, label, control,
|
|
1754
|
-
FormInputOTPField: React.MemoExoticComponent<({ name, label, control,
|
|
1755
|
-
FormInputSelect: React.MemoExoticComponent<({ name, label, control,
|
|
1756
|
-
FormInputMultiSelect: React.MemoExoticComponent<({ name, label, control,
|
|
1757
|
-
FormInputAutoComplete: React.MemoExoticComponent<({ name, label, control,
|
|
1758
|
-
FormInputMultiAutoComplete: React.MemoExoticComponent<({ name, label, control,
|
|
1759
|
-
FormInputColorPicker: React.MemoExoticComponent<({ name, label, control,
|
|
1760
|
-
FormInputFileUpload: React.MemoExoticComponent<({ name, label, control,
|
|
1761
|
-
FormInputDatePicker: React.MemoExoticComponent<({ name, label, control,
|
|
1762
|
-
FormInputTimePicker: React.MemoExoticComponent<({ name, label, control,
|
|
1763
|
-
FormInputTimeClock: React.MemoExoticComponent<({ name, label, control,
|
|
1764
|
-
FormInputCalendar: React.MemoExoticComponent<({ name, label, control,
|
|
1765
|
-
FormInputCheckBox: React.MemoExoticComponent<({ name, label, control,
|
|
1766
|
-
FormInputCheckBoxGroup: React.MemoExoticComponent<({ name, label, control,
|
|
1767
|
-
FormInputSwitch: React.MemoExoticComponent<({ name, label, control,
|
|
1768
|
-
FormInputSlider: React.MemoExoticComponent<({ name, label, control,
|
|
1769
|
-
FormInputSingleRadio: React.MemoExoticComponent<({ name, label, control,
|
|
1770
|
-
FormInputRadioButtonGroup: React.MemoExoticComponent<({ name, label, control,
|
|
1746
|
+
FormInputTextField: React.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1747
|
+
FormInputTextArea: React.MemoExoticComponent<({ name, label, control, rows, minRows, maxRows, resize, defaultValue, onChange, ...props }: IFormInputTextAreaFields) => react_jsx_runtime.JSX.Element>;
|
|
1748
|
+
FormInputPasswordField: React.MemoExoticComponent<({ name, label, control, size, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1749
|
+
FormInputNumberField: React.MemoExoticComponent<({ name, label, control, pattern, min, max, step, allowDecimals, decimalPlaces, defaultValue, onChange, ...props }: IFormInputNumberFields) => react_jsx_runtime.JSX.Element>;
|
|
1750
|
+
FormInputTelField: React.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1751
|
+
FormInputSearchField: React.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1752
|
+
FormInputOTPField: React.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1753
|
+
FormInputSelect: React.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1754
|
+
FormInputMultiSelect: React.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1755
|
+
FormInputAutoComplete: React.MemoExoticComponent<({ name, label, control, options, disabled, placeholder, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1756
|
+
FormInputMultiAutoComplete: React.MemoExoticComponent<({ name, label, control, options, disabled, placeholder, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1757
|
+
FormInputColorPicker: React.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1758
|
+
FormInputFileUpload: React.MemoExoticComponent<({ name, label, control, size, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1759
|
+
FormInputDatePicker: React.MemoExoticComponent<({ name, label, control, size, readOnly, shouldDisableDate, disabled, placeholder, defaultValue, onChange, ...props }: IFormInputDateFields) => react_jsx_runtime.JSX.Element>;
|
|
1760
|
+
FormInputTimePicker: React.MemoExoticComponent<({ name, label, control, ampm, timezone, defaultValue, onChange, ...props }: IFormInputDateFields) => react_jsx_runtime.JSX.Element>;
|
|
1761
|
+
FormInputTimeClock: React.MemoExoticComponent<({ name, label, control, readOnly, disabled, ampm, views, ampmInClock, disablePast, defaultValue, onChange, ...props }: IFormInputDateFields) => react_jsx_runtime.JSX.Element>;
|
|
1762
|
+
FormInputCalendar: React.MemoExoticComponent<({ name, label, control, readOnly, disabled, defaultValue, onChange, ...props }: IFormInputDateFields) => react_jsx_runtime.JSX.Element>;
|
|
1763
|
+
FormInputCheckBox: React.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1764
|
+
FormInputCheckBoxGroup: React.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, row, color, labelPlacement, ...props }: IFormInputCheckBoxGroupFields) => react_jsx_runtime.JSX.Element>;
|
|
1765
|
+
FormInputSwitch: React.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1766
|
+
FormInputSlider: React.MemoExoticComponent<({ name, label, control, defaultValue, onChange, ...props }: IFormInputFields) => react_jsx_runtime.JSX.Element>;
|
|
1767
|
+
FormInputSingleRadio: React.MemoExoticComponent<({ name, label, control, checked, defaultValue, onChange, color, labelPlacement, ...props }: IFormInputRadioFields) => react_jsx_runtime.JSX.Element>;
|
|
1768
|
+
FormInputRadioButtonGroup: React.MemoExoticComponent<({ name, label, control, options, defaultValue, onChange, ...props }: IFormInputFieldsWithOptions) => react_jsx_runtime.JSX.Element>;
|
|
1771
1769
|
TextInputField: React.NamedExoticComponent<Omit<ITextInputFieldProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
1772
1770
|
PasswordField: React.NamedExoticComponent<Omit<IPasswordFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
1773
1771
|
NumberField: React.NamedExoticComponent<Omit<INumberInputFieldProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|