@foodpilot/foods 0.1.83 → 0.1.84

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.
@@ -0,0 +1,52 @@
1
+ /// <reference types="react" />
2
+ import { NormalCssProperties } from "@mui/material/styles/createMixins";
3
+ export type SidebarOptions = {
4
+ isExpanded?: boolean;
5
+ notExpandedSize?: NormalCssProperties["width"];
6
+ expandedSize?: NormalCssProperties["width"];
7
+ };
8
+ export type SidebarTexts = {
9
+ manageProfile: string;
10
+ shortenSidebar: string;
11
+ logout: string;
12
+ };
13
+ export type NavbarLinkType = {
14
+ icon: JSX.Element;
15
+ isSelected: boolean;
16
+ action: () => void;
17
+ label: string;
18
+ };
19
+ export type UserActionType = {
20
+ icon: JSX.Element;
21
+ action: () => void;
22
+ label: string;
23
+ };
24
+ export type NavbarDrawerType = {
25
+ label: string;
26
+ icon: JSX.Element;
27
+ items: NavbarLinkType[];
28
+ };
29
+ export type NavbarButtonType = {
30
+ type: "drawer";
31
+ } & NavbarDrawerType | {
32
+ type: "link";
33
+ } & NavbarLinkType;
34
+ export type User = {
35
+ firstname: string;
36
+ lastname: string;
37
+ picture?: string;
38
+ };
39
+ export type Organization = {
40
+ name: string;
41
+ picture?: string;
42
+ };
43
+ export type FoodsNavbarProps = {
44
+ buttons: NavbarButtonType[];
45
+ connectedUser: User;
46
+ organization: Organization;
47
+ sidebarTexts: SidebarTexts;
48
+ sidebarOptions?: SidebarOptions;
49
+ logoutAction: () => void;
50
+ userActions: UserActionType[];
51
+ };
52
+ export declare const FoodsNavbar: (props: FoodsNavbarProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { SidebarTexts, User, UserActionType } from "../FoodsNavbar";
2
+ type FooterProps = {
3
+ user: User;
4
+ userActions: UserActionType[];
5
+ isExpanded: boolean;
6
+ toggleSidebar: () => void;
7
+ textOptions: SidebarTexts;
8
+ logout: () => void;
9
+ };
10
+ export declare const Footer: (props: FooterProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,10 @@
1
+ import { SidebarTexts, User, UserActionType } from "../FoodsNavbar";
2
+ type UserButtonProps = {
3
+ user: User;
4
+ userActions: UserActionType[];
5
+ isExpanded: boolean;
6
+ textOptions: SidebarTexts;
7
+ logout: () => void;
8
+ };
9
+ export declare const UserButton: (props: UserButtonProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,12 @@
1
+ import { SidebarTexts, UserActionType } from "../FoodsNavbar";
2
+ type UserPopoverProps = {
3
+ isExpanded: boolean;
4
+ userActions: UserActionType[];
5
+ isPopoverOpen: boolean;
6
+ anchor: HTMLElement | null;
7
+ onClose: () => void;
8
+ logout: () => void;
9
+ textOptions: SidebarTexts;
10
+ };
11
+ export declare const UserPopover: (props: UserPopoverProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1 @@
1
+ export { Footer } from "./Footer";
@@ -0,0 +1,8 @@
1
+ import { NavbarButtonType } from "./FoodsNavbar";
2
+ type NavbarActionsProps = {
3
+ button: NavbarButtonType;
4
+ isExpanded: boolean;
5
+ extendSidebar: () => void;
6
+ };
7
+ export declare const NavbarAction: (props: NavbarActionsProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ type OrganizationProps = {
2
+ isOpen: boolean;
3
+ name: string;
4
+ picture?: string;
5
+ };
6
+ export declare const Organization: (props: OrganizationProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ export { FoodsNavbar } from "./FoodsNavbar";
2
+ export type { FoodsNavbarProps } from "./FoodsNavbar";
@@ -1,2 +1,3 @@
1
1
  export * from "./IconThread";
2
2
  export * from "./Navbar";
3
+ export * from "./FoodsNavBar";