@ehfuse/mui-form-controls 1.3.21 → 2.0.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/README.md +9 -10
- package/dist/ToggleButtonGroup.d.ts +10 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.js +2 -9
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +2 -9
- package/dist/index.mjs.map +4 -4
- package/dist/types.d.ts +3 -9
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -20,7 +20,6 @@ import type { StepperProps as MuiStepperProps } from "@mui/material/Stepper";
|
|
|
20
20
|
import type { AutocompleteProps as MuiAutocompleteProps } from "@mui/material/Autocomplete";
|
|
21
21
|
import type { SelectProps as MuiSelectProps, SelectChangeEvent } from "@mui/material/Select";
|
|
22
22
|
import type { FormControlProps } from "@mui/material/FormControl";
|
|
23
|
-
import type { FormControlLabelProps } from "@mui/material/FormControlLabel";
|
|
24
23
|
import type { InputBaseComponentProps } from "@mui/material/InputBase";
|
|
25
24
|
export type TextFieldProps = MuiTextFieldProps;
|
|
26
25
|
export type ButtonGroupProps = MuiButtonGroupProps;
|
|
@@ -69,11 +68,6 @@ export type SwitchProps = Omit<MuiSwitchProps, "checked" | "onChange" | "form">
|
|
|
69
68
|
label?: React.ReactNode;
|
|
70
69
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>, checked: boolean) => void;
|
|
71
70
|
};
|
|
72
|
-
export type SwitchFieldProps = Omit<SwitchProps, "label"> & {
|
|
73
|
-
label: React.ReactNode;
|
|
74
|
-
labelPlacement?: FormControlLabelProps["labelPlacement"];
|
|
75
|
-
sx?: SxProps<Theme>;
|
|
76
|
-
};
|
|
77
71
|
export type RadioOption = {
|
|
78
72
|
value: string;
|
|
79
73
|
label: React.ReactNode;
|
|
@@ -120,14 +114,14 @@ export type ToggleButtonProps = Omit<MuiToggleButtonProps, "value" | "onChange"
|
|
|
120
114
|
selected?: boolean;
|
|
121
115
|
onChange?: (event: React.MouseEvent<HTMLElement>, value: any) => void;
|
|
122
116
|
};
|
|
123
|
-
export type
|
|
117
|
+
export type ToggleButtonGroupOption = {
|
|
124
118
|
label: React.ReactNode;
|
|
125
119
|
value: string | number | boolean;
|
|
126
120
|
disabled?: boolean;
|
|
127
121
|
};
|
|
128
|
-
export type
|
|
122
|
+
export type ToggleButtonGroupProps = Omit<MuiToggleButtonGroupProps, "value" | "onChange" | "children"> & BaseTextFieldProps & {
|
|
129
123
|
name?: string;
|
|
130
|
-
options:
|
|
124
|
+
options: ToggleButtonGroupOption[];
|
|
131
125
|
value?: unknown;
|
|
132
126
|
exclusive?: boolean;
|
|
133
127
|
fullWidth?: boolean;
|