@foodpilot/foods 0.1.71 → 0.1.72
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/components/Checkbox/BaseCheckbox.d.ts +6 -5
- package/dist/components/Checkbox/FoodsCheckbox.d.ts +2 -1
- package/dist/components/Radio/BaseRadio.d.ts +7 -2
- package/dist/components/Radio/FoodsRadioList.d.ts +3 -2
- package/dist/components/Radio/RadioBoolean.d.ts +4 -1
- package/dist/main.js +979 -964
- package/dist/main.umd.cjs +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CheckboxProps } from "@mui/material";
|
|
1
|
+
import { CheckboxProps, FormGroupProps, FormControlLabelProps } from "@mui/material";
|
|
2
2
|
export type CheckboxId = string | number;
|
|
3
3
|
export type CheckboxName = string | number;
|
|
4
4
|
export type CheckboxProperties<T> = Record<CheckboxId, CheckboxPropertyValue<T>>;
|
|
@@ -8,11 +8,12 @@ export type CheckboxPropertyValue<T> = {
|
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
rawData: T;
|
|
10
10
|
};
|
|
11
|
-
export type
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
export type BaseCheckboxOverrides = {
|
|
12
|
+
FormGroupProps?: FormGroupProps;
|
|
13
|
+
FormControlLabelProps?: Omit<FormControlLabelProps, "control" | "label">;
|
|
14
|
+
CheckboxProps?: Omit<CheckboxProps, "onChange">;
|
|
14
15
|
};
|
|
15
|
-
type BaseCheckboxProps<T> =
|
|
16
|
+
type BaseCheckboxProps<T> = BaseCheckboxOverrides & {
|
|
16
17
|
values: CheckboxProperties<T>;
|
|
17
18
|
onChange: (newCheckbox: CheckboxProperties<T>) => void;
|
|
18
19
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RadioProps } from "@mui/material";
|
|
1
|
+
import { RadioProps, FormControlProps, FormControlLabelProps } from "@mui/material";
|
|
2
2
|
import { CSSProperties } from "react";
|
|
3
3
|
export type RadioProperties<T> = Record<string | number, RadioPropertyValue<T>>;
|
|
4
4
|
export type RadioPropertyValue<T> = {
|
|
@@ -7,7 +7,12 @@ export type RadioPropertyValue<T> = {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
rawData?: T;
|
|
9
9
|
};
|
|
10
|
-
type
|
|
10
|
+
export type BaseRadioOverrides = {
|
|
11
|
+
FormControlProps?: FormControlProps;
|
|
12
|
+
FormControlLabelProps?: Omit<FormControlLabelProps, "onChange" | "control" | "label" | "key">;
|
|
13
|
+
RadioProps?: RadioProps;
|
|
14
|
+
};
|
|
15
|
+
type BaseRadioProps<T> = BaseRadioOverrides & {
|
|
11
16
|
values: RadioProperties<T>;
|
|
12
17
|
onChange: (newRadio: RadioProperties<T>) => void;
|
|
13
18
|
flexDirection?: CSSProperties["flexDirection"];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { BaseRadioOverrides } from "./BaseRadio";
|
|
2
|
+
export type FoodsRadioListProps<T> = BaseRadioOverrides & {
|
|
3
|
+
selectedItem: T | undefined;
|
|
3
4
|
values: T[];
|
|
4
5
|
onChange: (newValue: T) => void;
|
|
5
6
|
getId?: (item: T) => string | number;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { BaseRadioOverrides } from "./BaseRadio";
|
|
2
|
+
export type RadioBooleanProps = BaseRadioOverrides & {
|
|
2
3
|
value: boolean | undefined;
|
|
3
4
|
onChange: (value: boolean) => void;
|
|
5
|
+
trueKeyName?: string;
|
|
6
|
+
falseKeyName?: string;
|
|
4
7
|
};
|
|
5
8
|
export declare const RadioBoolean: (props: RadioBooleanProps) => import("react/jsx-runtime").JSX.Element;
|