@me1a/ui 1.1.2 → 1.2.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/example/index/example/index.d.ts +1 -0
- package/dist/example/index/example/simple.d.ts +4 -0
- package/dist/example/index/hook-forms/form-provider.d.ts +8 -0
- package/dist/example/index/hook-forms/index.d.ts +9 -0
- package/dist/example/index/hook-forms/rhf-autocomplete.d.ts +11 -0
- package/dist/example/index/hook-forms/rhf-checkbox.d.ts +19 -0
- package/dist/example/index/hook-forms/rhf-radio-group.d.ts +13 -0
- package/dist/example/index/hook-forms/rhf-select.d.ts +11 -0
- package/dist/example/index/hook-forms/rhf-slider.d.ts +7 -0
- package/dist/example/index/hook-forms/rhf-switch.d.ts +7 -0
- package/dist/example/index/hook-forms/rhf-text-field.d.ts +6 -0
- package/dist/example/index/index.cjs.js +1381 -0
- package/dist/example/index/index.cjs.js.map +1 -0
- package/dist/example/index/index.d.ts +2 -0
- package/dist/example/index/index.es.js +1379 -0
- package/dist/example/index/index.es.js.map +1 -0
- package/dist/hook-forms/index/example/index.d.ts +1 -0
- package/dist/hook-forms/index/example/simple.d.ts +4 -0
- package/dist/hook-forms/index/hook-forms/form-provider.d.ts +8 -0
- package/dist/hook-forms/index/hook-forms/index.d.ts +9 -0
- package/dist/hook-forms/index/hook-forms/rhf-autocomplete.d.ts +11 -0
- package/dist/hook-forms/index/hook-forms/rhf-checkbox.d.ts +19 -0
- package/dist/hook-forms/index/hook-forms/rhf-radio-group.d.ts +13 -0
- package/dist/hook-forms/index/hook-forms/rhf-select.d.ts +11 -0
- package/dist/hook-forms/index/hook-forms/rhf-slider.d.ts +7 -0
- package/dist/hook-forms/index/hook-forms/rhf-switch.d.ts +7 -0
- package/dist/hook-forms/index/hook-forms/rhf-text-field.d.ts +6 -0
- package/dist/{index.cjs.js → hook-forms/index/index.cjs.js} +280 -359
- package/dist/hook-forms/index/index.cjs.js.map +1 -0
- package/dist/hook-forms/index/index.d.ts +2 -0
- package/dist/{index.es.js → hook-forms/index/index.es.js} +280 -359
- package/dist/hook-forms/index/index.es.js.map +1 -0
- package/dist/index/example/index.d.ts +1 -0
- package/dist/index/example/simple.d.ts +4 -0
- package/dist/index/hook-forms/form-provider.d.ts +8 -0
- package/dist/index/hook-forms/index.d.ts +9 -0
- package/dist/index/hook-forms/rhf-autocomplete.d.ts +11 -0
- package/dist/index/hook-forms/rhf-checkbox.d.ts +19 -0
- package/dist/index/hook-forms/rhf-radio-group.d.ts +13 -0
- package/dist/index/hook-forms/rhf-select.d.ts +11 -0
- package/dist/index/hook-forms/rhf-slider.d.ts +7 -0
- package/dist/index/hook-forms/rhf-switch.d.ts +7 -0
- package/dist/index/hook-forms/rhf-text-field.d.ts +6 -0
- package/dist/index/index.cjs.js +27272 -0
- package/dist/index/index.cjs.js.map +1 -0
- package/dist/index/index.d.ts +2 -0
- package/dist/index/index.es.js +27232 -0
- package/dist/index/index.es.js.map +1 -0
- package/package.json +3 -3
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.d.ts +0 -74
- package/dist/index.es.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./simple";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UseFormReturn, FieldValues } from "react-hook-form";
|
|
2
|
+
type Props<T extends FieldValues> = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
methods: UseFormReturn<T>;
|
|
5
|
+
onSubmit?: VoidFunction;
|
|
6
|
+
};
|
|
7
|
+
export default function FormProvider<T extends FieldValues>({ children, onSubmit, methods, }: Props<T>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { FormProvider as FormProviderController } from "react-hook-form";
|
|
2
|
+
export * from "react-hook-form";
|
|
3
|
+
export * from "./rhf-select";
|
|
4
|
+
export * from "./rhf-checkbox";
|
|
5
|
+
export { default as RHFSwitch } from "./rhf-switch";
|
|
6
|
+
export { default as RHFSlider } from "./rhf-slider";
|
|
7
|
+
export { default as RHFTextField } from "./rhf-text-field";
|
|
8
|
+
export { default as RHFRadioGroup } from "./rhf-radio-group";
|
|
9
|
+
export { default as FormProvider } from "./form-provider";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AutocompleteProps } from "@mui/material/Autocomplete";
|
|
2
|
+
interface Props<T, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined> extends AutocompleteProps<T, Multiple, DisableClearable, FreeSolo> {
|
|
3
|
+
name: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
helperText?: React.ReactNode;
|
|
7
|
+
optionKey?: string;
|
|
8
|
+
optionLabel?: string;
|
|
9
|
+
}
|
|
10
|
+
export default function RHFAutocomplete<T, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined>({ name, label, placeholder, optionKey, options, optionLabel, helperText, ...other }: Omit<Props<T, Multiple, DisableClearable, FreeSolo>, "renderInput">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FormControlLabelProps } from "@mui/material/FormControlLabel";
|
|
2
|
+
interface RHFCheckboxProps extends Omit<FormControlLabelProps, "control"> {
|
|
3
|
+
name: string;
|
|
4
|
+
helperText?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export declare function RHFCheckbox({ name, helperText, ...other }: RHFCheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
interface RHFMultiCheckboxProps extends Omit<FormControlLabelProps, "control" | "label"> {
|
|
8
|
+
name: string;
|
|
9
|
+
options: {
|
|
10
|
+
label: string;
|
|
11
|
+
value: number | string;
|
|
12
|
+
}[];
|
|
13
|
+
row?: boolean;
|
|
14
|
+
label?: string;
|
|
15
|
+
spacing?: number;
|
|
16
|
+
helperText?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export declare function RHFMultiCheckbox({ row, name, label, options, spacing, helperText, sx, ...other }: RHFMultiCheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RadioGroupProps } from "@mui/material/RadioGroup";
|
|
2
|
+
type Props = RadioGroupProps & {
|
|
3
|
+
name: string;
|
|
4
|
+
options: {
|
|
5
|
+
label: string;
|
|
6
|
+
value: any;
|
|
7
|
+
}[];
|
|
8
|
+
label?: string;
|
|
9
|
+
spacing?: number;
|
|
10
|
+
helperText?: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
export default function RHFRadioGroup({ row, name, label, options, spacing, helperText, ...other }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Theme, SxProps } from "@mui/material/styles";
|
|
2
|
+
import { TextFieldProps } from "@mui/material/TextField";
|
|
3
|
+
type RHFSelectProps = TextFieldProps & {
|
|
4
|
+
name: string;
|
|
5
|
+
native?: boolean;
|
|
6
|
+
maxHeight?: boolean | number;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
PaperPropsSx?: SxProps<Theme>;
|
|
9
|
+
};
|
|
10
|
+
export declare function RHFSelect({ name, native, maxHeight, helperText, children, PaperPropsSx, ...other }: RHFSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FormControlLabelProps } from "@mui/material/FormControlLabel";
|
|
2
|
+
interface Props extends Omit<FormControlLabelProps, "control"> {
|
|
3
|
+
name: string;
|
|
4
|
+
helperText?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export default function RHFSwitch({ name, helperText, ...other }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|