@campxdev/react-blueprint 2.1.10 → 2.1.11
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.
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/types/src/components/Layout/AppHeader/AppHeaderV2.d.ts +1 -1
- package/dist/cjs/types/src/components/Layout/AppLayout/AppLayout.d.ts +3 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/AppBar.d.ts +14 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/FloatingHelpDocs.d.ts +22 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/HelpPopup.d.ts +28 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/SideDrawer.d.ts +12 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/MenuBar.d.ts +2 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/MenuItem.d.ts +2 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/Sidebar.d.ts +8 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/interfaces.d.ts +53 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/styles.d.ts +45 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/useSidebarNavigation.d.ts +6 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/SwitchInstitutionPopup.d.ts +17 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +38 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/index.d.ts +6 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/types.d.ts +25 -0
- package/dist/cjs/types/src/components/Layout/export.d.ts +1 -0
- package/dist/cjs/types/src/components/Navigation/Sidebar/MenuItem.d.ts +1 -1
- package/dist/cjs/types/src/components/Navigation/Sidebar/SubMenuItem.d.ts +1 -1
- package/dist/cjs/types/src/components/Navigation/Sidebar/interfaces.d.ts +1 -1
- package/dist/cjs/types/src/components/Navigation/export.d.ts +0 -1
- package/dist/cjs/types/src/pages/Admin/AcademicStructure/AcademicStructure.d.ts +2 -0
- package/dist/cjs/types/src/pages/Admin/SystemSettings/SystemSettings.d.ts +2 -0
- package/dist/cjs/types/src/pages/Admin/UserManagement/UserManagement.d.ts +2 -0
- package/dist/cjs/types/src/pages/Admin.d.ts +2 -0
- package/dist/cjs/types/src/pages/Communications/Announcements/Announcements.d.ts +2 -0
- package/dist/cjs/types/src/pages/Communications.d.ts +2 -0
- package/dist/cjs/types/src/pages/Dashboard.d.ts +2 -0
- package/dist/cjs/types/src/pages/Exams/Management/Management.d.ts +2 -0
- package/dist/cjs/types/src/pages/Exams/Results/Results.d.ts +2 -0
- package/dist/cjs/types/src/pages/Exams.d.ts +2 -0
- package/dist/cjs/types/src/pages/HRMS/Attendance/Attendance.d.ts +2 -0
- package/dist/cjs/types/src/pages/HRMS/EmployeeManagement/EmployeeManagement.d.ts +2 -0
- package/dist/cjs/types/src/pages/HRMS/Performance/Performance.d.ts +2 -0
- package/dist/cjs/types/src/pages/HRMS.d.ts +2 -0
- package/dist/cjs/types/src/pages/Payments/Expenses/Expenses.d.ts +2 -0
- package/dist/cjs/types/src/pages/Payments/FeeCollection/FeeCollection.d.ts +2 -0
- package/dist/cjs/types/src/pages/Payments/FinancialReports/FinancialReports.d.ts +2 -0
- package/dist/cjs/types/src/pages/Payments.d.ts +2 -0
- package/dist/cjs/types/src/pages/Reports.d.ts +2 -0
- package/dist/cjs/types/src/pages/StudentCentral/Academic/Academic.d.ts +2 -0
- package/dist/cjs/types/src/pages/StudentCentral/Services/Services.d.ts +2 -0
- package/dist/cjs/types/src/pages/StudentCentral.d.ts +2 -0
- package/dist/cjs/types/src/pages/UMS/Classrooms/ClassroomManagement.d.ts +2 -0
- package/dist/cjs/types/src/pages/UMS/Classrooms/Classrooms.d.ts +2 -0
- package/dist/cjs/types/src/pages/UMS/Classrooms/RoomAllocation.d.ts +2 -0
- package/dist/cjs/types/src/pages/UMS/Classrooms/Timetables.d.ts +2 -0
- package/dist/cjs/types/src/pages/UMS/Courses/Courses.d.ts +2 -0
- package/dist/cjs/types/src/pages/UMS/Students/Enrollment.d.ts +2 -0
- package/dist/cjs/types/src/pages/UMS/Students/StudentList.d.ts +2 -0
- package/dist/cjs/types/src/pages/UMS/Students/StudentProfiles.d.ts +2 -0
- package/dist/cjs/types/src/pages/UMS/Students/Students.d.ts +2 -0
- package/dist/cjs/types/src/pages/UMS/Teachers/Performance.d.ts +2 -0
- package/dist/cjs/types/src/pages/UMS/Teachers/Qualifications.d.ts +2 -0
- package/dist/cjs/types/src/pages/UMS/Teachers/TeacherDirectory.d.ts +2 -0
- package/dist/cjs/types/src/pages/UMS/Teachers/Teachers.d.ts +2 -0
- package/dist/cjs/types/src/pages/UMS.d.ts +2 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/src/components/Layout/AppHeader/AppHeaderV2.d.ts +1 -1
- package/dist/esm/types/src/components/Layout/AppLayout/AppLayout.d.ts +3 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/AppBar.d.ts +14 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/FloatingHelpDocs.d.ts +22 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/HelpPopup.d.ts +28 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/SideDrawer.d.ts +12 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/MenuBar.d.ts +2 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/MenuItem.d.ts +2 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/Sidebar.d.ts +8 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/interfaces.d.ts +53 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/styles.d.ts +45 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/useSidebarNavigation.d.ts +6 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/SwitchInstitutionPopup.d.ts +17 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +38 -0
- package/dist/esm/types/src/components/Layout/AppLayout/index.d.ts +6 -0
- package/dist/esm/types/src/components/Layout/AppLayout/types.d.ts +25 -0
- package/dist/esm/types/src/components/Layout/export.d.ts +1 -0
- package/dist/esm/types/src/components/Navigation/Sidebar/MenuItem.d.ts +1 -1
- package/dist/esm/types/src/components/Navigation/Sidebar/SubMenuItem.d.ts +1 -1
- package/dist/esm/types/src/components/Navigation/Sidebar/interfaces.d.ts +1 -1
- package/dist/esm/types/src/components/Navigation/export.d.ts +0 -1
- package/dist/esm/types/src/pages/Admin/AcademicStructure/AcademicStructure.d.ts +2 -0
- package/dist/esm/types/src/pages/Admin/SystemSettings/SystemSettings.d.ts +2 -0
- package/dist/esm/types/src/pages/Admin/UserManagement/UserManagement.d.ts +2 -0
- package/dist/esm/types/src/pages/Admin.d.ts +2 -0
- package/dist/esm/types/src/pages/Communications/Announcements/Announcements.d.ts +2 -0
- package/dist/esm/types/src/pages/Communications.d.ts +2 -0
- package/dist/esm/types/src/pages/Dashboard.d.ts +2 -0
- package/dist/esm/types/src/pages/Exams/Management/Management.d.ts +2 -0
- package/dist/esm/types/src/pages/Exams/Results/Results.d.ts +2 -0
- package/dist/esm/types/src/pages/Exams.d.ts +2 -0
- package/dist/esm/types/src/pages/HRMS/Attendance/Attendance.d.ts +2 -0
- package/dist/esm/types/src/pages/HRMS/EmployeeManagement/EmployeeManagement.d.ts +2 -0
- package/dist/esm/types/src/pages/HRMS/Performance/Performance.d.ts +2 -0
- package/dist/esm/types/src/pages/HRMS.d.ts +2 -0
- package/dist/esm/types/src/pages/Payments/Expenses/Expenses.d.ts +2 -0
- package/dist/esm/types/src/pages/Payments/FeeCollection/FeeCollection.d.ts +2 -0
- package/dist/esm/types/src/pages/Payments/FinancialReports/FinancialReports.d.ts +2 -0
- package/dist/esm/types/src/pages/Payments.d.ts +2 -0
- package/dist/esm/types/src/pages/Reports.d.ts +2 -0
- package/dist/esm/types/src/pages/StudentCentral/Academic/Academic.d.ts +2 -0
- package/dist/esm/types/src/pages/StudentCentral/Services/Services.d.ts +2 -0
- package/dist/esm/types/src/pages/StudentCentral.d.ts +2 -0
- package/dist/esm/types/src/pages/UMS/Classrooms/ClassroomManagement.d.ts +2 -0
- package/dist/esm/types/src/pages/UMS/Classrooms/Classrooms.d.ts +2 -0
- package/dist/esm/types/src/pages/UMS/Classrooms/RoomAllocation.d.ts +2 -0
- package/dist/esm/types/src/pages/UMS/Classrooms/Timetables.d.ts +2 -0
- package/dist/esm/types/src/pages/UMS/Courses/Courses.d.ts +2 -0
- package/dist/esm/types/src/pages/UMS/Students/Enrollment.d.ts +2 -0
- package/dist/esm/types/src/pages/UMS/Students/StudentList.d.ts +2 -0
- package/dist/esm/types/src/pages/UMS/Students/StudentProfiles.d.ts +2 -0
- package/dist/esm/types/src/pages/UMS/Students/Students.d.ts +2 -0
- package/dist/esm/types/src/pages/UMS/Teachers/Performance.d.ts +2 -0
- package/dist/esm/types/src/pages/UMS/Teachers/Qualifications.d.ts +2 -0
- package/dist/esm/types/src/pages/UMS/Teachers/TeacherDirectory.d.ts +2 -0
- package/dist/esm/types/src/pages/UMS/Teachers/Teachers.d.ts +2 -0
- package/dist/esm/types/src/pages/UMS.d.ts +2 -0
- package/dist/index.d.ts +163 -42
- package/package.json +1 -1
- package/dist/cjs/types/src/stories/Navigation/FloatingSidebar.stories.d.ts +0 -7
- package/dist/esm/types/src/stories/Navigation/FloatingSidebar.stories.d.ts +0 -7
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SxProps } from '@mui/material';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { SideMenuItemProps } from '../../
|
|
3
|
+
import { SideMenuItemProps } from '../../Navigation/Sidebar/Sidebar';
|
|
4
4
|
export type AppHeaderV2Props = {
|
|
5
5
|
/** Custom action components to display in the header */
|
|
6
6
|
actions?: ReactNode[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SideMenuItemProps } from './Sidebar/interfaces';
|
|
3
|
+
interface AppBarProps {
|
|
4
|
+
/** Right section component (actions, profile, etc.) */
|
|
5
|
+
rightSection?: React.ReactNode;
|
|
6
|
+
/** Menu items for mobile drawer */
|
|
7
|
+
menu?: SideMenuItemProps[];
|
|
8
|
+
/** Custom className for the AppBar */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Custom styles for the AppBar */
|
|
11
|
+
sx?: any;
|
|
12
|
+
}
|
|
13
|
+
export declare const AppBar: React.FC<AppBarProps>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HelpDocsAction } from '../types';
|
|
3
|
+
interface FloatingHelpDocsProps {
|
|
4
|
+
/** Array of help actions to display */
|
|
5
|
+
actions: HelpDocsAction[];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* FloatingHelpDocs - Route-aware floating help documentation component
|
|
9
|
+
*
|
|
10
|
+
* This component renders a floating Speed Dial with contextual help actions
|
|
11
|
+
* based on the current route configuration.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* // Renders when actions are provided for current route
|
|
15
|
+
* <FloatingHelpDocs
|
|
16
|
+
* actions={[
|
|
17
|
+
* { name: 'Know how to collect fee', onClick: () => window.open('...') }
|
|
18
|
+
* ]}
|
|
19
|
+
* />
|
|
20
|
+
*/
|
|
21
|
+
export declare const FloatingHelpDocs: React.FC<FloatingHelpDocsProps>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface HelpItem {
|
|
3
|
+
key: string;
|
|
4
|
+
icon: React.ReactNode;
|
|
5
|
+
title: string;
|
|
6
|
+
description: string;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
}
|
|
9
|
+
interface HelpPopupProps {
|
|
10
|
+
/** Custom help menu items */
|
|
11
|
+
helpItems?: HelpItem[];
|
|
12
|
+
/** Custom icon for the trigger button */
|
|
13
|
+
icon?: React.ReactNode;
|
|
14
|
+
/** Custom styles for the trigger button */
|
|
15
|
+
triggerSx?: any;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Reusable Help popup component for AppLayout right section
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* // In AppLayout rightSection
|
|
22
|
+
* <HelpPopup />
|
|
23
|
+
*
|
|
24
|
+
* // With custom help items
|
|
25
|
+
* <HelpPopup helpItems={customHelpItems} />
|
|
26
|
+
*/
|
|
27
|
+
export declare const HelpPopup: React.FC<HelpPopupProps>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SideMenuItemProps } from './Sidebar/interfaces';
|
|
3
|
+
interface SideDrawerProps {
|
|
4
|
+
/** Whether the drawer is open */
|
|
5
|
+
open: boolean;
|
|
6
|
+
/** Function to close the drawer */
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
/** Menu items for navigation */
|
|
9
|
+
menu: SideMenuItemProps[];
|
|
10
|
+
}
|
|
11
|
+
export declare const SideDrawer: React.FC<SideDrawerProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export interface SideMenuItemProps {
|
|
3
|
+
name: string;
|
|
4
|
+
path: string;
|
|
5
|
+
icon: ReactElement;
|
|
6
|
+
permissionKey?: string;
|
|
7
|
+
subMenu?: SubMenuData[];
|
|
8
|
+
menu?: SideMenuItemProps[];
|
|
9
|
+
}
|
|
10
|
+
export interface SubMenuData {
|
|
11
|
+
name: string;
|
|
12
|
+
path: string;
|
|
13
|
+
permissionKey?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface MenuState {
|
|
16
|
+
menu: SideMenuItemProps[];
|
|
17
|
+
title: string | null;
|
|
18
|
+
path: string | null;
|
|
19
|
+
}
|
|
20
|
+
export interface GetActiveMenuProps {
|
|
21
|
+
menu: SideMenuItemProps[];
|
|
22
|
+
pathArray: string[];
|
|
23
|
+
previousMenuState: any;
|
|
24
|
+
}
|
|
25
|
+
export interface InternalMenuClickHandlerProps {
|
|
26
|
+
menuTitle: string;
|
|
27
|
+
menuPath: string;
|
|
28
|
+
internalMenu: SideMenuItemProps[];
|
|
29
|
+
}
|
|
30
|
+
export interface SidebarNavigationHook {
|
|
31
|
+
menuPosition: number;
|
|
32
|
+
currentMenuState: MenuState;
|
|
33
|
+
history: MenuState[];
|
|
34
|
+
internalMenuClickHandler: (params: InternalMenuClickHandlerProps) => void;
|
|
35
|
+
previousMenuClickHandler: () => void;
|
|
36
|
+
}
|
|
37
|
+
export interface MenuItemProps {
|
|
38
|
+
index: number;
|
|
39
|
+
menuItem: SideMenuItemProps;
|
|
40
|
+
currentMenuPath: string | null;
|
|
41
|
+
internalMenuClickHandler: (params: InternalMenuClickHandlerProps) => void;
|
|
42
|
+
}
|
|
43
|
+
export interface SubMenuItemProps {
|
|
44
|
+
index: number;
|
|
45
|
+
subMenuItem: SubMenuData;
|
|
46
|
+
subMenuButtonPath: string;
|
|
47
|
+
}
|
|
48
|
+
export interface MenuBarProps {
|
|
49
|
+
currentMenuState: MenuState;
|
|
50
|
+
menuPosition: number;
|
|
51
|
+
internalMenuClickHandler: (params: InternalMenuClickHandlerProps) => void;
|
|
52
|
+
previousMenuClickHandler: () => void;
|
|
53
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface StyledLinkButtonProps {
|
|
2
|
+
match: any;
|
|
3
|
+
}
|
|
4
|
+
export interface StyledListItemButtonProps {
|
|
5
|
+
collapsed?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const SidebarContainer: import("@mui/styled-engine").StyledComponent<import("@mui/material").StackOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("@types/react").DetailedHTMLProps<import("@types/react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
8
|
+
ref?: import("@types/react").Ref<HTMLDivElement>;
|
|
9
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/material").StackOwnProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
10
|
+
export declare const MenuBarContainer: import("@mui/styled-engine").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("@types/react").DetailedHTMLProps<import("@types/react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
11
|
+
ref?: import("@types/react").Ref<HTMLDivElement>;
|
|
12
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
13
|
+
export declare const MenuHeaderContainer: import("@mui/styled-engine").StyledComponent<import("@mui/material").StackOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("@types/react").DetailedHTMLProps<import("@types/react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
14
|
+
ref?: import("@types/react").Ref<HTMLDivElement>;
|
|
15
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/material").StackOwnProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
16
|
+
export declare const MenuItemContainer: import("@mui/styled-engine").StyledComponent<import("@mui/material").ListItemOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("@types/react").DetailedHTMLProps<import("@types/react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
17
|
+
ref?: import("@types/react").Ref<HTMLLIElement>;
|
|
18
|
+
}, "className" | "style" | "classes" | "alignItems" | "children" | "sx" | "dense" | "components" | "componentsProps" | "divider" | "slots" | "slotProps" | "disablePadding" | "disableGutters" | "ContainerComponent" | "ContainerProps" | "secondaryAction"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
19
|
+
export declare const MenuItemButton: import("@mui/styled-engine").StyledComponent<import("@mui/material").ListItemButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("@types/react").DetailedHTMLProps<import("@types/react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
20
|
+
ref?: import("@types/react").Ref<HTMLDivElement>;
|
|
21
|
+
}, "className" | "style" | "classes" | "alignItems" | "children" | "sx" | "autoFocus" | "tabIndex" | "disabled" | "action" | "selected" | "dense" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "divider" | "disableGutters"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
22
|
+
export declare const MenuItemIcon: import("@mui/styled-engine").StyledComponent<import("@mui/material").ListItemIconProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
23
|
+
export declare const MenuLink: import("@mui/styled-engine").StyledComponent<import("react-router-dom").LinkProps & import("@types/react").RefAttributes<HTMLAnchorElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & StyledLinkButtonProps, {}, {}>;
|
|
24
|
+
export declare const SubMenuContainer: import("@mui/styled-engine").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("@types/react").DetailedHTMLProps<import("@types/react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
25
|
+
ref?: import("@types/react").Ref<HTMLDivElement>;
|
|
26
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & StyledLinkButtonProps, {}, {}>;
|
|
27
|
+
export declare const SubMenuItemContainer: import("@mui/styled-engine").StyledComponent<import("@mui/material").StackOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("@types/react").DetailedHTMLProps<import("@types/react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
28
|
+
ref?: import("@types/react").Ref<HTMLDivElement>;
|
|
29
|
+
}, keyof import("@mui/material/OverridableComponent").CommonProps | keyof import("@mui/material").StackOwnProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
30
|
+
export declare const HoverIcon: import("@mui/styled-engine").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/material").Theme> & Omit<Omit<import("@types/react").DetailedHTMLProps<import("@types/react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
31
|
+
ref?: import("@types/react").Ref<HTMLDivElement>;
|
|
32
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/material").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
33
|
+
export declare const AnimationWrapper: import("@mui/styled-engine").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, import("@types/react").DetailedHTMLProps<import("@types/react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
34
|
+
export declare const desktopOnlyStyles: {
|
|
35
|
+
display: {
|
|
36
|
+
xs: string;
|
|
37
|
+
md: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export declare const mobileOnlyStyles: {
|
|
41
|
+
display: {
|
|
42
|
+
xs: string;
|
|
43
|
+
md: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/useSidebarNavigation.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SideMenuItemProps, SidebarNavigationHook } from './interfaces';
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook for managing sidebar navigation state and transitions
|
|
4
|
+
* Provides centralized state management for menu navigation, history, and animations
|
|
5
|
+
*/
|
|
6
|
+
export declare const useSidebarNavigation: (menu: SideMenuItemProps[]) => SidebarNavigationHook;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface SwitchInstitutionPopupProps {
|
|
3
|
+
/** Institution data for switching */
|
|
4
|
+
institutionsData?: any[];
|
|
5
|
+
/** Custom text for the menu item */
|
|
6
|
+
menuText?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Reusable SwitchInstitution popup component that renders as a dropdown menu item
|
|
10
|
+
* Designed to be used within profile actions
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* // In UserProfilePopup profileActions
|
|
14
|
+
* <SwitchInstitutionPopup institutionsData={institutions} />
|
|
15
|
+
*/
|
|
16
|
+
export declare const SwitchInstitutionPopup: React.FC<SwitchInstitutionPopupProps>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface UserProfilePopupProps {
|
|
3
|
+
/** User's full name */
|
|
4
|
+
userFullName: string;
|
|
5
|
+
/** User's designation/role */
|
|
6
|
+
designation?: string;
|
|
7
|
+
/** Profile dropdown actions (including SwitchInstitution if needed) */
|
|
8
|
+
profileActions?: React.ReactNode[];
|
|
9
|
+
/** Custom styles for the profile component */
|
|
10
|
+
profileSx?: any;
|
|
11
|
+
/** Whether to show active devices option */
|
|
12
|
+
showActiveDevices?: boolean;
|
|
13
|
+
/** Logout click handler */
|
|
14
|
+
onLogout?: () => void;
|
|
15
|
+
/** Profile image URL */
|
|
16
|
+
profileUrl?: string;
|
|
17
|
+
/** Whether to show avatar */
|
|
18
|
+
showAvatar?: boolean;
|
|
19
|
+
/** Whether to show navigation icon */
|
|
20
|
+
showNavigationIcon?: boolean;
|
|
21
|
+
/** Change password component */
|
|
22
|
+
changePassword?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Reusable User Profile popup component for AppLayout right section
|
|
26
|
+
* Institution switching should be passed as a profile action if needed
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* // In AppLayout rightSection
|
|
30
|
+
* <UserProfilePopup
|
|
31
|
+
* userFullName="John Doe"
|
|
32
|
+
* designation="Administrator"
|
|
33
|
+
* profileActions={[<SwitchInstitutionPopup />, <MenuItem>Settings</MenuItem>]}
|
|
34
|
+
* onLogout={handleLogout}
|
|
35
|
+
* />
|
|
36
|
+
*/
|
|
37
|
+
export declare const UserProfilePopup: React.FC<UserProfilePopupProps>;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { AppLayout } from './AppLayout';
|
|
2
|
+
export type { AppLayoutProps, HelpDocsAction, HelpDocsConfig } from './types';
|
|
3
|
+
export { FloatingHelpDocs } from './components/FloatingHelpDocs';
|
|
4
|
+
export { HelpPopup } from './components/HelpPopup';
|
|
5
|
+
export { SwitchInstitutionPopup } from './components/SwitchInstitutionPopup';
|
|
6
|
+
export { UserProfilePopup } from './components/UserProfilePopup';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SideMenuItemProps } from './components/Sidebar/interfaces';
|
|
3
|
+
export interface HelpDocsAction {
|
|
4
|
+
name: string;
|
|
5
|
+
onClick: () => void;
|
|
6
|
+
backgroundColor?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface HelpDocsConfig {
|
|
9
|
+
[path: string]: {
|
|
10
|
+
actions: HelpDocsAction[];
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface AppLayoutProps {
|
|
14
|
+
/** Main content to be rendered */
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
/** Navigation menu items */
|
|
17
|
+
menu: SideMenuItemProps[];
|
|
18
|
+
/** AppBar customization - Primary approach */
|
|
19
|
+
rightSection?: ReactNode;
|
|
20
|
+
/** Layout customization */
|
|
21
|
+
sidebarWidth?: number;
|
|
22
|
+
mainContainerSx?: any;
|
|
23
|
+
/** Help documentation configuration for route-based contextual help */
|
|
24
|
+
helpDocsConfig?: HelpDocsConfig;
|
|
25
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SideMenuItemProps } from '../export';
|
|
2
1
|
import { InternalMenuClickHandlerProps } from './interfaces';
|
|
2
|
+
import { SideMenuItemProps } from './Sidebar';
|
|
3
3
|
export declare const SideBarMenuItem: ({ index, collapsed, setCollapsed, menuItem, currentMenuPath, internalMenuClickHandler, }: {
|
|
4
4
|
index: number;
|
|
5
5
|
collapsed: boolean;
|
|
@@ -9,7 +9,6 @@ export * from './DropDownMenu/DropDownMenu';
|
|
|
9
9
|
export * from './DropDownMenu/DropdownMenuItem';
|
|
10
10
|
export * from './PreviewFiles/PreviewFiles';
|
|
11
11
|
export * from './Sidebar/Sidebar';
|
|
12
|
-
export * from './Sidebar/SidebarV2';
|
|
13
12
|
export * from './Stepper/Stepper';
|
|
14
13
|
export * from './TabsContainer/TabsContainer';
|
|
15
14
|
export * from './UploadDialog/UploadDialog';
|