@foodpilot/foods 0.1.56 → 0.1.58

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,8 +1,7 @@
1
1
  import { BoxProps } from "@mui/material";
2
2
  import { ReactNode } from "react";
3
3
  export type BadgeProps = Omit<BoxProps, "content"> & {
4
- value?: number;
5
4
  size?: "small" | "medium" | "big";
6
- children?: ReactNode | number;
5
+ children: ReactNode;
7
6
  };
8
7
  export declare const Badge: (props: BadgeProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,16 +1,8 @@
1
1
  import { CheckboxProps } from "@mui/material";
2
- export type CheckboxProperties = Record<string, CheckboxPropertyValue>;
3
- export type CheckboxPropertyValue = {
4
- name: string;
5
- state: boolean;
6
- };
2
+ import { CheckboxProperties } from "./types";
7
3
  type PrimaryCheckboxProps = Omit<CheckboxProps, "onChange"> & {
8
4
  values: CheckboxProperties;
9
5
  onChange: (newCheckbox: CheckboxProperties) => void;
10
6
  };
11
7
  export declare const PrimaryCheckbox: (props: PrimaryCheckboxProps) => import("react/jsx-runtime").JSX.Element;
12
- export type MandatoryFields = {
13
- id: number;
14
- displayName: string;
15
- };
16
8
  export {};
@@ -1,3 +1,3 @@
1
- import { MandatoryFields, CheckboxProperties } from ".";
2
- export declare function checkboxToAny<T extends MandatoryFields, U extends T>(startingValues: T[], allValues: CheckboxProperties, defaultValue: (fields: MandatoryFields) => U): T[];
3
- export declare function anyToCheckbox<T extends MandatoryFields>(selectedValues: T[], allValues: T[]): CheckboxProperties;
1
+ import { CheckboxProperties, MandatoryFields } from "./types";
2
+ export declare const checkboxToAny: <T extends MandatoryFields, U extends T>(startingValues: T[], checkboxProperties: CheckboxProperties, defaultValue: (fields: MandatoryFields) => U) => T[];
3
+ export declare const anyToCheckbox: <T extends MandatoryFields, U extends MandatoryFields>(allValues: T[], selectedValues: U[]) => CheckboxProperties;
@@ -1,2 +1,3 @@
1
1
  export * from "./PrimaryCheckbox";
2
2
  export * from "./helperFunctions";
3
+ export * from "./types";
@@ -0,0 +1,9 @@
1
+ export type CheckboxProperties = Record<string, CheckboxPropertyValue>;
2
+ export type CheckboxPropertyValue = {
3
+ name: string;
4
+ state: boolean;
5
+ };
6
+ export type MandatoryFields = {
7
+ id: number;
8
+ name: string;
9
+ };
@@ -0,0 +1,6 @@
1
+ import { TypographyProps } from "@mui/material";
2
+ export type CustomTypographyProps = {
3
+ value: string[];
4
+ maxLength: number;
5
+ } & TypographyProps;
6
+ export declare const CustomTypography: (props: CustomTypographyProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./CustomTypography";
@@ -2,20 +2,15 @@ import { ReactNode } from "react";
2
2
  import { SavingStateProps } from "./FormTopBar";
3
3
  export type Page = {
4
4
  title: string;
5
- subTitle?: string;
5
+ subTitle?: ReactNode;
6
6
  info?: JSX.Element;
7
7
  bigIcon: JSX.Element;
8
- smallIcon?: {
9
- selected: JSX.Element;
10
- unselected: JSX.Element;
11
- };
12
- icon: ReactNode;
8
+ icon?: ReactNode;
13
9
  content: JSX.Element | JSX.Element[];
14
10
  usesBaseLayout?: boolean;
15
11
  };
16
12
  export type FormBaseProps = {
17
13
  title: string;
18
- icon?: JSX.Element;
19
14
  subtitle?: string;
20
15
  pages: Page[];
21
16
  pageIndexToDisplay?: number;
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from "react";
2
2
  type FormTopBarProps = {
3
3
  title: string;
4
- subtitle?: ReactNode | string;
4
+ subtitle?: ReactNode;
5
5
  icons?: ReactNode[];
6
6
  steps?: number;
7
7
  currentPage: number;
@@ -1,4 +1,4 @@
1
1
  import { ReactNode } from "react";
2
2
  export declare function ArrayCell(props: {
3
- value: (ReactNode | string)[];
3
+ value: ReactNode[];
4
4
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +1,4 @@
1
1
  import { ReactNode } from "react";
2
2
  export declare function GreyTextCell(props: {
3
- value: ReactNode | string;
3
+ value: ReactNode;
4
4
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,4 @@
1
1
  import { ReactNode } from "react";
2
- export type Icon = {
3
- selected: JSX.Element;
4
- unselected: JSX.Element;
5
- };
6
2
  export type IconThreadProps = {
7
3
  icons?: ReactNode[];
8
4
  steps?: number;
@@ -1,4 +1,5 @@
1
1
  import { RadioProps } from "@mui/material";
2
+ import { CSSProperties } from "react";
2
3
  export type RadioProperties = Record<string, RadioPropertyValue>;
3
4
  export type RadioPropertyValue = {
4
5
  name: string;
@@ -8,7 +9,10 @@ export type RadioPropertyValue = {
8
9
  type RadioListProps = Omit<RadioProps, "onChange"> & {
9
10
  values: RadioProperties;
10
11
  onChange: (newRadio: RadioProperties) => void;
11
- variant: "primary" | "secondary";
12
+ flexDirection?: CSSProperties["flexDirection"];
13
+ variant?: "primary" | "secondary";
14
+ title?: string;
15
+ description?: string;
12
16
  };
13
17
  export declare const RadioList: (props: RadioListProps) => import("react/jsx-runtime").JSX.Element;
14
18
  export {};
@@ -3,6 +3,6 @@ import { customTypographyVariants } from "../../themes/ThemeExtensions";
3
3
  export type TextTitleProps = {
4
4
  title: string;
5
5
  titleSize?: customTypographyVariants;
6
- badge: ReactNode | number;
6
+ badge: ReactNode;
7
7
  };
8
8
  export declare const TextTitle: (props: TextTitleProps) => import("react/jsx-runtime").JSX.Element;
@@ -13,6 +13,7 @@ export * from "./Navigation";
13
13
  export * from "./Popover";
14
14
  export * from "./Ssq";
15
15
  export * from "./Text";
16
+ export * from "./CustomTypography";
16
17
  export * from "./Number";
17
18
  export * from "./Radio";
18
19
  export * from "./Badge";