@foodpilot/foods 0.1.104 → 0.1.107

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.
Files changed (24) hide show
  1. package/dist/components/Button/FoodsIconButton.d.ts +5 -0
  2. package/dist/components/Navigation/FoodsNavBar/FoodsNavbar.d.ts +1 -6
  3. package/dist/components/Navigation/FoodsNavBar/Footer/DefaultUserAction.d.ts +7 -0
  4. package/dist/components/Navigation/FoodsNavBar/Footer/Footer.d.ts +3 -2
  5. package/dist/components/Navigation/FoodsNavBar/Footer/UserButton.d.ts +3 -2
  6. package/dist/components/Navigation/FoodsNavBar/Footer/UserPopover.d.ts +3 -2
  7. package/dist/components/Navigation/FoodsNavBar/index.d.ts +2 -2
  8. package/dist/components/Popover/AnchoredPopover.d.ts +1 -0
  9. package/dist/components/Select/FoodsSelect/FoodsSelect.d.ts +24 -0
  10. package/dist/components/Select/FoodsSelect/Options/Header/OptionHeader.d.ts +9 -0
  11. package/dist/components/Select/FoodsSelect/Options/Header/SearchBar.d.ts +0 -0
  12. package/dist/components/Select/FoodsSelect/Options/Line/Default.d.ts +6 -0
  13. package/dist/components/Select/FoodsSelect/Options/Line/LineBox.d.ts +2 -0
  14. package/dist/components/Select/FoodsSelect/Options/Line/OptionLine.d.ts +7 -0
  15. package/dist/components/Select/FoodsSelect/Options/Line/Selected.d.ts +6 -0
  16. package/dist/components/Select/FoodsSelect/Options/SelectOptions.d.ts +11 -0
  17. package/dist/components/Select/FoodsSelect/Select.d.ts +15 -0
  18. package/dist/components/Select/FoodsSelect/index.d.ts +1 -0
  19. package/dist/components/Select/index.d.ts +1 -0
  20. package/dist/components/index.d.ts +1 -0
  21. package/dist/main.js +7611 -7318
  22. package/dist/main.umd.cjs +104 -104
  23. package/dist/themes/ThemeExtensions.d.ts +1 -1
  24. package/package.json +1 -1
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export type FoodsIconButton = {
3
+ icon: JSX.Element;
4
+ };
5
+ export declare const FoodsIconButton: (props: FoodsIconButton) => import("react/jsx-runtime").JSX.Element;
@@ -15,11 +15,6 @@ export type NavbarLinkType = {
15
15
  action: () => void;
16
16
  label: string;
17
17
  };
18
- export type UserActionType = {
19
- icon: JSX.Element;
20
- action: () => void;
21
- label: string;
22
- };
23
18
  export type NavbarDrawerType = {
24
19
  label: string;
25
20
  icon: JSX.Element;
@@ -47,6 +42,6 @@ export type FoodsNavbarProps = {
47
42
  sidebarOptions?: SidebarOptions;
48
43
  logoutAction: () => void;
49
44
  sidebarStatusHandler: (isExpanded: boolean) => void;
50
- userActions: UserActionType[];
45
+ userActions: JSX.Element[];
51
46
  };
52
47
  export declare const FoodsNavbar: (props: FoodsNavbarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export type DefaultUserActionProps = {
3
+ icon: JSX.Element;
4
+ action: () => void;
5
+ label: string;
6
+ };
7
+ export declare const DefaultUserAction: (props: DefaultUserActionProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,8 @@
1
- import { SidebarTexts, User, UserActionType } from "../FoodsNavbar";
1
+ /// <reference types="react" />
2
+ import { SidebarTexts, User } from "../FoodsNavbar";
2
3
  type FooterProps = {
3
4
  user: User;
4
- userActions: UserActionType[];
5
+ userActions: JSX.Element[];
5
6
  isExpanded: boolean;
6
7
  toggleSidebar: () => void;
7
8
  textOptions: SidebarTexts;
@@ -1,7 +1,8 @@
1
- import { SidebarTexts, User, UserActionType } from "../FoodsNavbar";
1
+ /// <reference types="react" />
2
+ import { SidebarTexts, User } from "../FoodsNavbar";
2
3
  type UserButtonProps = {
3
4
  user: User;
4
- userActions: UserActionType[];
5
+ userActions: JSX.Element[];
5
6
  isExpanded: boolean;
6
7
  textOptions: SidebarTexts;
7
8
  logout: () => void;
@@ -1,7 +1,8 @@
1
- import { SidebarTexts, UserActionType } from "../FoodsNavbar";
1
+ /// <reference types="react" />
2
+ import { SidebarTexts } from "../FoodsNavbar";
2
3
  type UserPopoverProps = {
3
4
  isExpanded: boolean;
4
- userActions: UserActionType[];
5
+ userActions: JSX.Element[];
5
6
  isPopoverOpen: boolean;
6
7
  anchor: HTMLElement | null;
7
8
  onClose: () => void;
@@ -1,2 +1,2 @@
1
- export { FoodsNavbar } from "./FoodsNavbar";
2
- export type { FoodsNavbarProps } from "./FoodsNavbar";
1
+ export * from "./FoodsNavbar";
2
+ export * from "./Footer/DefaultUserAction";
@@ -7,6 +7,7 @@ export interface IAnchoredPopoverProps {
7
7
  anchorPosition?: "leftside" | "center" | "rightside";
8
8
  children: JSX.Element | JSX.Element[];
9
9
  variant?: "themed" | "headless";
10
+ paperProps?: SxProps;
10
11
  sx?: SxProps;
11
12
  }
12
13
  export declare function AnchoredPopover(props: IAnchoredPopoverProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { SyntheticEvent } from "react";
2
+ type TextOptions = {
3
+ emptyOptionsText: string;
4
+ placeholder: string;
5
+ defaultValueText?: string;
6
+ };
7
+ type SelectConfiguration = {
8
+ closeOnSelect?: boolean;
9
+ };
10
+ export type FoodsSelectProps<T> = {
11
+ selectedOption: T | null;
12
+ options: T[];
13
+ onChange: (event: SyntheticEvent<Element, Event>, selectedValue: T | null) => void;
14
+ getId: (item: T) => number | string;
15
+ getName: (item: T) => string;
16
+ getIcon?: (item: T) => JSX.Element;
17
+ textOptions: TextOptions;
18
+ originalValue?: T;
19
+ noValue?: string;
20
+ disabled?: boolean;
21
+ config?: SelectConfiguration;
22
+ };
23
+ export declare const FoodsSelect: <T>(props: FoodsSelectProps<T>) => import("react/jsx-runtime").JSX.Element;
24
+ export {};
@@ -0,0 +1,9 @@
1
+ import { SyntheticEvent } from "react";
2
+ export type OptionHeaderProps<T> = {
3
+ noValue: string | undefined;
4
+ selectedOption: T | null;
5
+ getName: (item: T) => string;
6
+ getIcon?: (item: T) => JSX.Element;
7
+ onChange: (event: SyntheticEvent<Element, Event>, selectedValue: T | null) => void;
8
+ };
9
+ export declare const OptionsHeader: <T>(props: OptionHeaderProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export type DefaultLineProps = {
3
+ displayText: string;
4
+ icon: JSX.Element | null;
5
+ };
6
+ export declare const DefaultLine: (props: DefaultLineProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { BoxProps } from "@mui/material";
2
+ export declare const LineBox: (props: BoxProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export type OptionLineProps = {
3
+ isSelected: boolean;
4
+ icon: JSX.Element | null;
5
+ displayText: string;
6
+ };
7
+ export declare const OptionLine: (props: OptionLineProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export type SelectedProps = {
3
+ displayText: string;
4
+ icon: JSX.Element | null;
5
+ };
6
+ export declare const SelectedLine: (props: SelectedProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { SyntheticEvent } from "react";
2
+ export type SelectOptionsProps<T> = {
3
+ selectedOption: T | null;
4
+ options: T[];
5
+ noValue: string | undefined;
6
+ getId: (item: T) => number | string;
7
+ getName: (item: T) => string;
8
+ getIcon?: (item: T) => JSX.Element;
9
+ onChange: (event: SyntheticEvent<Element, Event>, selectedValue: T | null) => void;
10
+ };
11
+ export declare const SelectOptions: <T>(props: SelectOptionsProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,15 @@
1
+ import { SyntheticEvent } from "react";
2
+ export type SelectProps<T> = {
3
+ options: T[];
4
+ emptyOptionsText: string;
5
+ getId: (item: T) => number | string;
6
+ getName: (item: T) => string;
7
+ getIcon?: (item: T) => JSX.Element;
8
+ onChange: (event: SyntheticEvent<Element, Event>, selectedValue: T | null) => void;
9
+ placeholder: string;
10
+ selectedOption: T | null;
11
+ disabled: boolean;
12
+ closeOnSelect: boolean;
13
+ noValue: string | undefined;
14
+ };
15
+ export declare const Select: <T>(props: SelectProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./FoodsSelect";
@@ -0,0 +1 @@
1
+ export * from "./FoodsSelect";
@@ -18,6 +18,7 @@ export * from "./Navigation";
18
18
  export * from "./Number";
19
19
  export * from "./Popover";
20
20
  export * from "./Radio";
21
+ export * from "./Select";
21
22
  export * from "./Ssq";
22
23
  export * from "./Tabs";
23
24
  export * from "./Text";