@campxdev/react-blueprint 2.3.8 → 2.3.9
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/AppLayout/components/AppBar.d.ts +4 -3
- package/dist/cjs/types/src/components/Layout/AppLayout/components/PersistentSidebar.d.ts +14 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/Sidebar/interfaces.d.ts +2 -0
- package/dist/cjs/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +3 -2
- package/dist/cjs/types/src/components/Layout/AppLayout/types.d.ts +7 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/src/components/Layout/AppLayout/components/AppBar.d.ts +4 -3
- package/dist/esm/types/src/components/Layout/AppLayout/components/PersistentSidebar.d.ts +14 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/Sidebar/interfaces.d.ts +2 -0
- package/dist/esm/types/src/components/Layout/AppLayout/components/UserProfilePopup.d.ts +3 -2
- package/dist/esm/types/src/components/Layout/AppLayout/types.d.ts +7 -0
- package/dist/index.d.ts +48 -40
- package/package.json +1 -1
- package/src/App.tsx +9 -37
- package/src/components/Layout/AppLayout/AppLayout.tsx +61 -20
- package/src/components/Layout/AppLayout/components/AppBar.tsx +35 -49
- package/src/components/Layout/AppLayout/components/PersistentSidebar.tsx +171 -0
- package/src/components/Layout/AppLayout/components/Sidebar/MenuBar.tsx +8 -4
- package/src/components/Layout/AppLayout/components/Sidebar/MenuItem.tsx +123 -46
- package/src/components/Layout/AppLayout/components/Sidebar/interfaces.ts +2 -0
- package/src/components/Layout/AppLayout/components/Sidebar/styles.ts +0 -2
- package/src/components/Layout/AppLayout/components/UserProfilePopup.tsx +42 -12
- package/src/components/Layout/AppLayout/types.ts +9 -0
- package/src/components/Layout/PageHeader/components/Views/Views.tsx +3 -2
- package/src/components/Navigation/Breadcrumbs/Breadcrumbs.tsx +1 -1
- package/src/components/Navigation/Sidebar/SidebarV2.tsx +1 -1
- package/src/themes/colorTokens/darkColorTokens.tsx +1 -1
- package/src/themes/colorTokens/lightColorTokens.ts +1 -1
- package/src/themes/commonTheme.ts +1 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { SideMenuItemProps } from './Sidebar/interfaces';
|
|
3
2
|
interface AppBarProps {
|
|
4
3
|
/** Right section component (actions, profile, etc.) */
|
|
5
4
|
rightSection?: React.ReactNode;
|
|
6
5
|
/** Center section component (workspace switcher, etc.) */
|
|
7
6
|
centerSection?: React.ReactNode;
|
|
8
|
-
/** Menu items for mobile drawer */
|
|
9
|
-
menu?: SideMenuItemProps[];
|
|
10
7
|
/** Custom className for the AppBar */
|
|
11
8
|
className?: string;
|
|
12
9
|
/** Custom styles for the AppBar */
|
|
13
10
|
sx?: any;
|
|
11
|
+
/** Hide hamburger menu (for persistent sidebar mode) */
|
|
12
|
+
hideHamburger?: boolean;
|
|
13
|
+
/** Callback to toggle sidebar (for persistent sidebar mode on mobile) */
|
|
14
|
+
onToggleSidebar?: () => void;
|
|
14
15
|
}
|
|
15
16
|
export declare const AppBar: React.FC<AppBarProps>;
|
|
16
17
|
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SideMenuItemProps } from './Sidebar/interfaces';
|
|
3
|
+
import { UserProfilePopupProps } from './UserProfilePopup';
|
|
4
|
+
interface PersistentSidebarProps {
|
|
5
|
+
/** Menu items for navigation */
|
|
6
|
+
menu: SideMenuItemProps[];
|
|
7
|
+
userProfileParams: UserProfilePopupProps;
|
|
8
|
+
/** Whether the sidebar is collapsed */
|
|
9
|
+
collapsed: boolean;
|
|
10
|
+
/** Function to toggle sidebar collapse state */
|
|
11
|
+
onToggle: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const PersistentSidebar: React.FC<PersistentSidebarProps>;
|
|
14
|
+
export {};
|
|
@@ -40,6 +40,7 @@ export interface MenuItemProps {
|
|
|
40
40
|
currentMenuPath: string | null;
|
|
41
41
|
internalMenuClickHandler: (params: InternalMenuClickHandlerProps) => void;
|
|
42
42
|
onClose?: () => void;
|
|
43
|
+
collapsed?: boolean;
|
|
43
44
|
}
|
|
44
45
|
export interface SubMenuItemProps {
|
|
45
46
|
index: number;
|
|
@@ -52,4 +53,5 @@ export interface MenuBarProps {
|
|
|
52
53
|
internalMenuClickHandler: (params: InternalMenuClickHandlerProps) => void;
|
|
53
54
|
previousMenuClickHandler: () => void;
|
|
54
55
|
onClose?: () => void;
|
|
56
|
+
collapsed?: boolean;
|
|
55
57
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface UserProfilePopupProps {
|
|
2
|
+
export interface UserProfilePopupProps {
|
|
3
3
|
/** User's full name */
|
|
4
4
|
userFullName: string;
|
|
5
5
|
/** User's designation/role */
|
|
@@ -18,6 +18,8 @@ interface UserProfilePopupProps {
|
|
|
18
18
|
onActiveDevicesClick?: () => void;
|
|
19
19
|
/** Account section click handler */
|
|
20
20
|
onAccountClick?: () => void;
|
|
21
|
+
/**Persistant Side bar collapsed - boolean */
|
|
22
|
+
collapsed?: boolean;
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Independent User Profile popup component for AppLayout right section
|
|
@@ -38,4 +40,3 @@ interface UserProfilePopupProps {
|
|
|
38
40
|
* />
|
|
39
41
|
*/
|
|
40
42
|
export declare const UserProfilePopup: React.FC<UserProfilePopupProps>;
|
|
41
|
-
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { SideMenuItemProps } from './components/Sidebar/interfaces';
|
|
3
|
+
import { UserProfilePopupProps } from './components/UserProfilePopup';
|
|
3
4
|
export interface HelpDocsAction {
|
|
4
5
|
name: string;
|
|
5
6
|
onClick: () => void;
|
|
@@ -15,6 +16,8 @@ export interface AppLayoutProps {
|
|
|
15
16
|
children: ReactNode;
|
|
16
17
|
/** Navigation menu items */
|
|
17
18
|
menu: SideMenuItemProps[];
|
|
19
|
+
/**User profile parameters */
|
|
20
|
+
userProfileParams: UserProfilePopupProps;
|
|
18
21
|
/** AppBar customization - Primary approach */
|
|
19
22
|
rightSection?: ReactNode;
|
|
20
23
|
/** AppBar center section customization */
|
|
@@ -23,4 +26,8 @@ export interface AppLayoutProps {
|
|
|
23
26
|
mainContainerSx?: any;
|
|
24
27
|
/** Help documentation configuration for route-based contextual help */
|
|
25
28
|
helpDocsConfig?: HelpDocsConfig;
|
|
29
|
+
/**
|
|
30
|
+
* Initial collapsed state for persistent sidebar
|
|
31
|
+
*/
|
|
32
|
+
initialCollapsed?: boolean;
|
|
26
33
|
}
|