@foodpilot/foods 0.1.16 → 0.1.19

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,5 +1,6 @@
1
1
  /// <reference types="react" />
2
+ import { BoxProps } from "@mui/material/Box/Box";
2
3
  export type SolidGreyBoxProps = {
3
4
  children: JSX.Element | JSX.Element[];
4
- };
5
+ } & BoxProps;
5
6
  export declare const SolidGreyBox: (props: SolidGreyBoxProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,18 @@
1
1
  import { CheckboxProps } from "@mui/material";
2
- export type CheckboxProperties = Record<string, boolean>;
2
+ export type CheckboxProperties = Record<string, CheckboxPropertyValue>;
3
+ export type CheckboxPropertyValue = {
4
+ name: string;
5
+ state: boolean;
6
+ };
3
7
  type PrimaryCheckboxProps = Omit<CheckboxProps, "onChange"> & {
4
8
  values: CheckboxProperties;
5
- onChange: (label: string, isChecked: boolean) => void;
9
+ onChange: (newCheckbox: CheckboxProperties) => void;
6
10
  };
7
11
  export declare const PrimaryCheckbox: (props: PrimaryCheckboxProps) => import("react/jsx-runtime").JSX.Element;
12
+ export type MandatoryFields = {
13
+ id: string;
14
+ displayName: string;
15
+ };
16
+ export declare const checkboxToAny: <T extends MandatoryFields, U extends T>(startingValues: T[], allValues: CheckboxProperties, defaultValue: (fields: MandatoryFields) => U) => T[];
17
+ export declare const anyToCheckbox: <T extends MandatoryFields>(selectedValues: T[], allValues: T[]) => CheckboxProperties;
8
18
  export {};
@@ -6,4 +6,4 @@ export type TextFieldProps = RoundInputProps & {
6
6
  value?: string;
7
7
  description?: string;
8
8
  };
9
- export declare function TextField(props: TextFieldProps): JSX.Element;
9
+ export declare const TextField: import("react").ForwardRefExoticComponent<Omit<TextFieldProps, "ref"> & import("react").RefAttributes<unknown>>;
@@ -15,5 +15,7 @@ export type FormBaseProps = {
15
15
  title: string;
16
16
  icon: JSX.Element;
17
17
  pages: Page[];
18
+ onPageChange?: (page: number) => void;
19
+ onSaveDraft?: () => void;
18
20
  };
19
21
  export declare const FormBase: (props: FormBaseProps) => JSX.Element;
@@ -1,11 +1,12 @@
1
1
  /// <reference types="react" />
2
- import { Icon } from "./IconThread";
2
+ import { Icon } from "../Navigation/IconThread";
3
3
  type FormTopBarProps = {
4
4
  title: string;
5
5
  icon: JSX.Element;
6
6
  pageIcons: Icon[];
7
7
  currentPage: number;
8
8
  setPage: (value: number) => void;
9
+ onSaveDraft?: () => void;
9
10
  };
10
11
  export declare const FormTopBar: (props: FormTopBarProps) => import("react/jsx-runtime").JSX.Element;
11
12
  export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import type { InputBaseProps } from "@mui/material";
2
3
  export type RoundInputProps = InputBaseProps;
3
- export declare const RoundInput: (props: RoundInputProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const RoundInput: import("react").ForwardRefExoticComponent<Omit<InputBaseProps, "ref"> & import("react").RefAttributes<unknown>>;
@@ -1,3 +1,3 @@
1
- export * from "./FormTopBar";
1
+ export * from "../Form/FormTopBar";
2
2
  export * from "./IconThread";
3
3
  export * from "./Navbar";