@foodpilot/foods 0.3.8 → 0.3.10

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.
@@ -312,6 +312,9 @@ export declare const iconMapping: {
312
312
  readonly reset: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
313
313
  title?: string | undefined;
314
314
  }>;
315
+ readonly rules: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
316
+ title?: string | undefined;
317
+ }>;
315
318
  readonly save: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
316
319
  title?: string | undefined;
317
320
  }>;
@@ -342,6 +345,9 @@ export declare const iconMapping: {
342
345
  readonly suggestions: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
343
346
  title?: string | undefined;
344
347
  }>;
348
+ readonly support: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
349
+ title?: string | undefined;
350
+ }>;
345
351
  readonly sync: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
346
352
  title?: string | undefined;
347
353
  }>;
@@ -6,6 +6,11 @@ type TextOptions = {
6
6
  defaultValueText?: string;
7
7
  noResult: string;
8
8
  };
9
+ export type SearchOptions = {
10
+ search: string;
11
+ setSearch: (value: string) => void;
12
+ isSearchFound: (value: string) => boolean;
13
+ };
9
14
  export type ExtraSelectOptions = {
10
15
  textOptions: TextOptions;
11
16
  noValue?: string;
@@ -13,16 +18,13 @@ export type ExtraSelectOptions = {
13
18
  closeOnSelect?: boolean;
14
19
  disableSearch?: boolean;
15
20
  };
16
- type FoodsSelectContextInitialValues = ExtraSelectOptions & {
21
+ type FoodsSelectContextInitialValues = ExtraSelectOptions & SearchOptions & {
17
22
  disabled: boolean;
18
23
  closeOnSelect: boolean;
19
24
  disableSearch: boolean;
20
- search: string;
21
- setSearch: (value: string) => void;
22
- isSearchFound: (value: string) => boolean;
23
25
  };
24
26
  export declare const FoodsSelectContext: import("react").Context<FoodsSelectContextInitialValues | null>;
25
- type FoodsSelectContextProviderProps = ExtraSelectOptions & {
27
+ type FoodsSelectContextProviderProps = ExtraSelectOptions & SearchOptions & {
26
28
  children: ReactNode;
27
29
  };
28
30
  export declare const FoodsSelectContextProvider: (props: FoodsSelectContextProviderProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,5 @@
1
- export declare const useFoodsSelectContext: () => import("./Provider").ExtraSelectOptions & {
1
+ export declare const useFoodsSelectContext: () => import("./Provider").ExtraSelectOptions & import("./Provider").SearchOptions & {
2
2
  disabled: boolean;
3
3
  closeOnSelect: boolean;
4
4
  disableSearch: boolean;
5
- search: string;
6
- setSearch: (value: string) => void;
7
- isSearchFound: (value: string) => boolean;
8
5
  };
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { ExtraSelectOptions } from "./Context/Provider";
2
+ import { SxProps } from "@mui/material";
3
+ import { ExtraSelectOptions, SearchOptions } from "./Context/Provider";
3
4
  export type FoodsSelectProps<T> = {
4
5
  selectedOption: T | null;
5
6
  options: T[];
@@ -8,7 +9,12 @@ export type FoodsSelectProps<T> = {
8
9
  getName: (item: T) => string;
9
10
  getIcon?: (item: T) => JSX.Element;
10
11
  originalValue?: T;
12
+ BoxProps?: SxProps;
13
+ BoxOptionsProps?: SxProps;
14
+ unit?: string;
11
15
  };
12
16
  type SelectWrapperProps<T> = FoodsSelectProps<T> & ExtraSelectOptions;
13
17
  export declare const FoodsSelect: <T>(props: SelectWrapperProps<T>) => import("react/jsx-runtime").JSX.Element;
18
+ type SelectWrapperWithServerPaginationProps<T> = Omit<SelectWrapperProps<T>, "disableSearch"> & SearchOptions;
19
+ export declare const FoodsSelectServerPagination: <T>(props: Omit<SelectWrapperProps<T>, "disableSearch"> & SearchOptions) => import("react/jsx-runtime").JSX.Element;
14
20
  export {};
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { SxProps } from "@mui/material";
2
3
  export type SelectProps<T> = {
3
4
  options: T[];
4
5
  getId: (item: T) => number | string;
@@ -6,5 +7,6 @@ export type SelectProps<T> = {
6
7
  getIcon?: (item: T) => JSX.Element;
7
8
  onChange: (selectedValue: T | null) => void;
8
9
  selectedOption: T | null;
10
+ BoxOptionsProps: SxProps;
9
11
  };
10
12
  export declare const Select: <T>(props: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;