form-input-fields 1.0.7 → 1.0.8

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,26 +1,15 @@
1
- import { default as React } from 'react';
2
- import { FieldProps } from 'formik';
3
- import { SwitchProps } from '@mui/material/Switch';
4
1
  export interface FormSwitchProps {
2
+ id: string;
3
+ checked: boolean;
5
4
  /**
6
5
  * Label text displayed next to the switch
7
6
  */
8
7
  label?: string;
9
- /**
10
- * Position of the label relative to the switch
11
- * @default 'end'
12
- */
13
- labelPlacement?: 'top' | 'start' | 'bottom' | 'end';
14
8
  /**
15
9
  * Color of the switch when checked
16
10
  * @default 'primary'
17
11
  */
18
12
  color?: 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning' | 'default';
19
- /**
20
- * Size of the switch
21
- * @default 'medium'
22
- */
23
- size?: 'small' | 'medium';
24
13
  /**
25
14
  * Whether the switch is disabled
26
15
  * @default false
@@ -34,14 +23,7 @@ export interface FormSwitchProps {
34
23
  /**
35
24
  * Custom onChange handler with additional switch-related data
36
25
  */
37
- onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean, context: {
38
- fieldName: string;
39
- formikValue: boolean;
40
- }) => void;
41
- /**
42
- * Custom onBlur handler
43
- */
44
- onBlur?: (event: React.FocusEvent<HTMLButtonElement>) => void;
26
+ onChange: () => void;
45
27
  /**
46
28
  * Helper text to display below the switch
47
29
  */
@@ -55,6 +37,6 @@ export interface FormSwitchProps {
55
37
  */
56
38
  className?: string;
57
39
  }
58
- export type FormSwitchComponentProps = FieldProps & SwitchProps & FormSwitchProps;
40
+ export type FormSwitchComponentProps = FormSwitchProps;
59
41
  export declare const FormSwitch: (props: FormSwitchComponentProps) => import("react/jsx-runtime").JSX.Element;
60
42
  //# sourceMappingURL=FormSwitch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormSwitch.d.ts","sourceRoot":"","sources":["../../../src/controls/FormSwitch/FormSwitch.tsx"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