@campxdev/react-blueprint 2.3.1 → 2.3.3

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,5 @@
1
+ export declare const ActivitiesIcon: ({ sx, color, size, }: {
2
+ sx?: any;
3
+ color?: string;
4
+ size?: number;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -11,6 +11,7 @@ export type IconsType = {
11
11
  AcademicFeesIcon: IconComponent;
12
12
  ChallansIcon: IconComponent;
13
13
  AcademicsIcon: IconComponent;
14
+ ActivitiesIcon: IconComponent;
14
15
  AccordionArrow: IconComponent;
15
16
  ActiveDevicesIcon: IconComponent;
16
17
  ActivitylogsIcon: IconComponent;
@@ -4,6 +4,7 @@ export type AppHeaderProps = {
4
4
  actions?: ReactNode[];
5
5
  profileActions?: ReactNode[];
6
6
  appsMenu?: ReactNode;
7
+ centerContent?: ReactNode;
7
8
  clientLogoUrl?: string;
8
9
  clientName?: string;
9
10
  userFullName: string;
@@ -19,4 +20,4 @@ export type AppHeaderProps = {
19
20
  onChangeInstitutionClick?: () => void;
20
21
  onAvatarClick?: () => void;
21
22
  };
22
- export declare const AppHeader: ({ actions, profileActions, profileSx, clientLogoUrl, onLogoutClick, designation, clientName, userFullName, collapsed, institutionsData, showActiveDevices, headerSx, onAccountClick, onActiveDevicesClick, onChangeInstitutionClick, onAvatarClick, }: AppHeaderProps) => import("react/jsx-runtime").JSX.Element;
23
+ export declare const AppHeader: ({ actions, profileActions, profileSx, clientLogoUrl, onLogoutClick, designation, clientName, userFullName, collapsed, institutionsData, showActiveDevices, headerSx, centerContent, onAccountClick, onActiveDevicesClick, onChangeInstitutionClick, onAvatarClick, }: AppHeaderProps) => import("react/jsx-runtime").JSX.Element;
@@ -3,6 +3,8 @@ import { SideMenuItemProps } from './Sidebar/interfaces';
3
3
  interface AppBarProps {
4
4
  /** Right section component (actions, profile, etc.) */
5
5
  rightSection?: React.ReactNode;
6
+ /** Center section component (workspace switcher, etc.) */
7
+ centerSection?: React.ReactNode;
6
8
  /** Menu items for mobile drawer */
7
9
  menu?: SideMenuItemProps[];
8
10
  /** Custom className for the AppBar */
@@ -17,6 +17,8 @@ export interface AppLayoutProps {
17
17
  menu: SideMenuItemProps[];
18
18
  /** AppBar customization - Primary approach */
19
19
  rightSection?: ReactNode;
20
+ /** AppBar center section customization */
21
+ centerSection?: ReactNode;
20
22
  /** Layout customization */
21
23
  mainContainerSx?: any;
22
24
  /** Help documentation configuration for route-based contextual help */
package/dist/index.d.ts CHANGED
@@ -78,6 +78,7 @@ type IconsType = {
78
78
  AcademicFeesIcon: IconComponent;
79
79
  ChallansIcon: IconComponent;
80
80
  AcademicsIcon: IconComponent;
81
+ ActivitiesIcon: IconComponent;
81
82
  AccordionArrow: IconComponent;
82
83
  ActiveDevicesIcon: IconComponent;
83
84
  ActivitylogsIcon: IconComponent;
@@ -941,6 +942,8 @@ interface AppLayoutProps {
941
942
  menu: SideMenuItemProps$1[];
942
943
  /** AppBar customization - Primary approach */
943
944
  rightSection?: ReactNode;
945
+ /** AppBar center section customization */
946
+ centerSection?: ReactNode;
944
947
  /** Layout customization */
945
948
  mainContainerSx?: any;
946
949
  /** Help documentation configuration for route-based contextual help */
@@ -1056,6 +1059,7 @@ type AppHeaderProps = {
1056
1059
  actions?: ReactNode[];
1057
1060
  profileActions?: ReactNode[];
1058
1061
  appsMenu?: ReactNode;
1062
+ centerContent?: ReactNode;
1059
1063
  clientLogoUrl?: string;
1060
1064
  clientName?: string;
1061
1065
  userFullName: string;
@@ -1071,7 +1075,7 @@ type AppHeaderProps = {
1071
1075
  onChangeInstitutionClick?: () => void;
1072
1076
  onAvatarClick?: () => void;
1073
1077
  };
1074
- declare const AppHeader: ({ actions, profileActions, profileSx, clientLogoUrl, onLogoutClick, designation, clientName, userFullName, collapsed, institutionsData, showActiveDevices, headerSx, onAccountClick, onActiveDevicesClick, onChangeInstitutionClick, onAvatarClick, }: AppHeaderProps) => react_jsx_runtime.JSX.Element;
1078
+ declare const AppHeader: ({ actions, profileActions, profileSx, clientLogoUrl, onLogoutClick, designation, clientName, userFullName, collapsed, institutionsData, showActiveDevices, headerSx, centerContent, onAccountClick, onActiveDevicesClick, onChangeInstitutionClick, onAvatarClick, }: AppHeaderProps) => react_jsx_runtime.JSX.Element;
1075
1079
 
1076
1080
  declare const Sidebar: ({ menu, collapsed, setCollapsed, }: {
1077
1081
  menu: SideMenuItemProps[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/react-blueprint",
3
- "version": "2.3.1",
3
+ "version": "2.3.3",
4
4
  "description": "React UI component library for CampX applications",
5
5
  "author": "CampX",
6
6
  "license": "MIT",
@@ -0,0 +1,47 @@
1
+ import { useTheme } from '@mui/material';
2
+
3
+ export const ActivitiesIcon = ({
4
+ sx = {},
5
+ color,
6
+ size = 20,
7
+ }: {
8
+ sx?: any;
9
+ color?: string;
10
+ size?: number;
11
+ }) => {
12
+ const theme = useTheme();
13
+ color = color ?? theme.palette.text.primary;
14
+
15
+ return (
16
+ <svg
17
+ width={size}
18
+ height={size}
19
+ viewBox="0 0 20 20"
20
+ fill="none"
21
+ xmlns="http://www.w3.org/2000/svg"
22
+ style={{
23
+ fill: color,
24
+ ...sx,
25
+ }}
26
+ >
27
+ <path
28
+ d="M9.9999 10.2058C9.62801 10.2045 9.26198 10.113 8.93323 9.93915L3.50857 7.01649C3.26556 6.87846 3.06348 6.67849 2.9229 6.43696C2.78231 6.19543 2.70825 5.92095 2.70825 5.64149C2.70825 5.36202 2.78231 5.08754 2.9229 4.84601C3.06348 4.60448 3.26556 4.40451 3.50857 4.26649L8.93323 1.33915C9.25964 1.16271 9.62485 1.07031 9.9959 1.07031C10.3669 1.07031 10.7322 1.16271 11.0586 1.33915L16.4832 4.26449C16.7262 4.40251 16.9283 4.60248 17.0689 4.84401C17.2095 5.08554 17.2835 5.36002 17.2835 5.63949C17.2835 5.91895 17.2095 6.19343 17.0689 6.43496C16.9283 6.6765 16.7262 6.87646 16.4832 7.01449L11.0586 9.93915C10.7345 10.1177 10.3699 10.2096 9.9999 10.2058ZM9.9999 2.31382C9.83348 2.31465 9.66997 2.35753 9.52457 2.43849L4.10857 5.35782C4.06027 5.38706 4.02081 5.42885 3.99439 5.47875C3.96798 5.52864 3.95559 5.58477 3.95857 5.64115C3.95496 5.69654 3.96714 5.75181 3.99369 5.80054C4.02024 5.84928 4.06008 5.88948 4.10857 5.91649L9.53323 8.84115C9.67797 8.91917 9.83981 8.96001 10.0042 8.96001C10.1687 8.96001 10.3305 8.91917 10.4752 8.84115L15.8999 5.91649C15.9459 5.88676 15.9837 5.846 16.0099 5.7979C16.0361 5.74981 16.0499 5.69592 16.0499 5.64115C16.0535 5.58577 16.0413 5.5305 16.0148 5.48176C15.9882 5.43303 15.9484 5.39282 15.8999 5.36582L10.4752 2.44115C10.3298 2.3602 10.1663 2.31732 9.9999 2.31649V2.31382Z"
29
+ fill={color}
30
+ stroke={color}
31
+ strokeWidth="0.4"
32
+ />
33
+ <path
34
+ d="M8.15 18.9331C7.90982 18.9313 7.67327 18.8743 7.45867 18.7664L2.40867 16.2511C1.9971 16.0451 1.65116 15.7284 1.40973 15.3366C1.1683 14.9448 1.04095 14.4933 1.042 14.0331V9.26645C1.04194 9.00247 1.10941 8.74287 1.238 8.51233C1.36659 8.2818 1.55202 8.08799 1.77665 7.94935C2.00129 7.8107 2.25766 7.73184 2.52138 7.72024C2.7851 7.70865 3.0474 7.76472 3.28333 7.88311L8.33333 10.3998C8.74523 10.605 9.09151 10.9213 9.33302 11.3131C9.57453 11.7048 9.70165 12.1563 9.7 12.6164V17.3844C9.70102 17.6484 9.63409 17.9082 9.50566 18.1388C9.37723 18.3694 9.19161 18.563 8.96667 18.7011C8.722 18.8544 8.43873 18.9349 8.15 18.9331ZM2.592 8.96645C2.53687 8.96801 2.48283 8.98215 2.434 9.00778C2.39013 9.03488 2.35405 9.0729 2.32928 9.11813C2.3045 9.16335 2.29189 9.21422 2.29267 9.26578V14.0324C2.29159 14.2604 2.35417 14.4842 2.47337 14.6785C2.59256 14.8729 2.76364 15.0301 2.96733 15.1324L8.00867 17.6578C8.05417 17.6805 8.10459 17.6916 8.15542 17.6901C8.20626 17.6886 8.25593 17.6745 8.3 17.6491C8.34399 17.6221 8.3802 17.5841 8.4051 17.5389C8.42999 17.4937 8.44271 17.4427 8.442 17.3911V12.6244C8.44301 12.3964 8.38033 12.1726 8.26101 11.9783C8.1417 11.7839 7.97049 11.6267 7.76667 11.5244L2.72533 8.99978C2.68426 8.978 2.63849 8.96656 2.592 8.96645Z"
35
+ fill={color}
36
+ stroke={color}
37
+ strokeWidth="0.4"
38
+ />
39
+ <path
40
+ d="M11.8501 18.9333C11.5612 18.9347 11.2779 18.8538 11.0334 18.7C10.8084 18.5619 10.6228 18.3682 10.4944 18.1376C10.366 17.907 10.299 17.6472 10.3001 17.3833V12.6166C10.2993 12.1566 10.4267 11.7055 10.6681 11.3139C10.9096 10.9224 11.2554 10.6059 11.6667 10.4L16.7081 7.8753C16.944 7.75691 17.2063 7.70084 17.47 7.71243C17.7337 7.72402 17.9901 7.80289 18.2147 7.94154C18.4394 8.08018 18.6248 8.27398 18.7534 8.50452C18.882 8.73506 18.9495 8.99466 18.9494 9.25863V14.0253C18.9502 14.4853 18.8227 14.9364 18.5813 15.328C18.3399 15.7196 17.9941 16.0361 17.5827 16.242L12.5414 18.7666C12.3282 18.8783 12.0907 18.9356 11.8501 18.9333ZM17.4081 8.96663C17.3616 8.96674 17.3158 8.97818 17.2747 8.99997L12.2334 11.5253C12.0289 11.6267 11.8571 11.7837 11.7376 11.9782C11.6182 12.1728 11.556 12.397 11.5581 12.6253V17.392C11.5572 17.4436 11.5697 17.4946 11.5945 17.54C11.6193 17.5853 11.6554 17.6235 11.6994 17.6506C11.7429 17.6781 11.7929 17.6933 11.8443 17.6947C11.8957 17.6961 11.9465 17.6837 11.9914 17.6586L17.0334 15.1333C17.2372 15.031 17.4084 14.8738 17.5277 14.6795C17.6471 14.4851 17.7097 14.2613 17.7087 14.0333V9.26663C17.7094 9.21501 17.6967 9.1641 17.6718 9.11887C17.6469 9.07364 17.6107 9.03566 17.5667 9.00863C17.5178 8.98267 17.4635 8.9683 17.4081 8.96663Z"
41
+ fill={color}
42
+ stroke={color}
43
+ strokeWidth="0.4"
44
+ />
45
+ </svg>
46
+ );
47
+ };
@@ -1,5 +1,6 @@
1
1
  import { AcademicFeesIcon } from './IconComponents/AcademicFeesIcon';
2
2
  import { AcademicsIcon } from './IconComponents/AcademicIcon';
3
+ import { ActivitiesIcon } from './IconComponents/ActivitiesIcon';
3
4
  import { AccordionArrow } from './IconComponents/AccordionArrow';
4
5
  import { ActiveDevicesIcon } from './IconComponents/ActiveDevicesIcon';
5
6
  import { ActivitylogsIcon } from './IconComponents/ActivityLogsIcon';
@@ -188,6 +189,7 @@ export type IconsType = {
188
189
  AcademicFeesIcon: IconComponent;
189
190
  ChallansIcon: IconComponent;
190
191
  AcademicsIcon: IconComponent;
192
+ ActivitiesIcon: IconComponent;
191
193
  AccordionArrow: IconComponent;
192
194
  ActiveDevicesIcon: IconComponent;
193
195
  ActivitylogsIcon: IconComponent;
@@ -363,6 +365,7 @@ export type IconsType = {
363
365
  export const Icons: IconsType = {
364
366
  AcademicFeesIcon,
365
367
  AcademicsIcon,
368
+ ActivitiesIcon,
366
369
  ChallansIcon,
367
370
  AccordionArrow,
368
371
  ActiveDevicesIcon,
@@ -8,6 +8,7 @@ export type AppHeaderProps = {
8
8
  actions?: ReactNode[];
9
9
  profileActions?: ReactNode[];
10
10
  appsMenu?: ReactNode;
11
+ centerContent?: ReactNode;
11
12
  clientLogoUrl?: string;
12
13
  clientName?: string;
13
14
  userFullName: string;
@@ -38,6 +39,7 @@ export const AppHeader = ({
38
39
  institutionsData,
39
40
  showActiveDevices = true,
40
41
  headerSx,
42
+ centerContent,
41
43
  // Destructuring the new onClick props
42
44
  onAccountClick,
43
45
  onActiveDevicesClick,
@@ -57,6 +59,13 @@ export const AppHeader = ({
57
59
  {clientName}
58
60
  </Typography>
59
61
 
62
+ {/* Center Content Section */}
63
+ {centerContent && (
64
+ <Stack alignItems={'center'} justifyContent={'center'} flex={1}>
65
+ {centerContent}
66
+ </Stack>
67
+ )}
68
+
60
69
  <Stack alignItems={'center'} gap={'12px'} flexDirection={'row'}>
61
70
  {actions.map((action) => action)}
62
71
 
@@ -8,6 +8,7 @@ export const AppLayout: React.FC<AppLayoutProps> = ({
8
8
  children,
9
9
  menu,
10
10
  rightSection,
11
+ centerSection,
11
12
  mainContainerSx = {},
12
13
  helpDocsConfig,
13
14
  }) => {
@@ -30,7 +31,11 @@ export const AppLayout: React.FC<AppLayoutProps> = ({
30
31
  return (
31
32
  <AppLayoutContainer>
32
33
  {/* AppBar - Full width at the top */}
33
- <AppBar rightSection={rightSection} menu={menu} />
34
+ <AppBar
35
+ rightSection={rightSection}
36
+ centerSection={centerSection}
37
+ menu={menu}
38
+ />
34
39
 
35
40
  {/* Main Content - Single column, centered with max-width */}
36
41
  <MainContent
@@ -17,6 +17,7 @@ const AppBarContainer = styled('header')(({ theme }: { theme?: any }) => ({
17
17
  flexDirection: 'row',
18
18
  alignItems: 'center',
19
19
  justifyContent: 'space-between',
20
+ position: 'relative', // Add relative positioning for absolute center positioning
20
21
  width: '100%',
21
22
  height: '64px',
22
23
  minHeight: '64px',
@@ -39,6 +40,8 @@ const AppBarContainer = styled('header')(({ theme }: { theme?: any }) => ({
39
40
  interface AppBarProps {
40
41
  /** Right section component (actions, profile, etc.) */
41
42
  rightSection?: React.ReactNode;
43
+ /** Center section component (workspace switcher, etc.) */
44
+ centerSection?: React.ReactNode;
42
45
  /** Menu items for mobile drawer */
43
46
  menu?: SideMenuItemProps[];
44
47
  /** Custom className for the AppBar */
@@ -49,6 +52,7 @@ interface AppBarProps {
49
52
 
50
53
  export const AppBar: React.FC<AppBarProps> = ({
51
54
  rightSection,
55
+ centerSection,
52
56
  menu = [],
53
57
  className = 'appHeaderV2',
54
58
  sx = {},
@@ -79,9 +83,31 @@ export const AppBar: React.FC<AppBarProps> = ({
79
83
  {isMobile ? <CampxIconV2 /> : <CampxFullLogoIconV2 size={28} />}
80
84
  </Stack>
81
85
 
86
+ {/* Center section - Custom content from props */}
87
+ {centerSection && (
88
+ <Stack
89
+ direction="row"
90
+ alignItems="center"
91
+ gap="12px"
92
+ sx={{
93
+ position: 'absolute',
94
+ left: '50%',
95
+ transform: 'translateX(-50%)',
96
+ zIndex: 1,
97
+ }}
98
+ >
99
+ {centerSection}
100
+ </Stack>
101
+ )}
102
+
82
103
  {/* Right section - Custom content from props */}
83
104
  {rightSection && (
84
- <Stack direction="row" alignItems="center" gap="12px">
105
+ <Stack
106
+ direction="row"
107
+ alignItems="center"
108
+ gap="12px"
109
+ sx={{ zIndex: 2 }}
110
+ >
85
111
  {rightSection}
86
112
  </Stack>
87
113
  )}
@@ -23,6 +23,9 @@ export interface AppLayoutProps {
23
23
  /** AppBar customization - Primary approach */
24
24
  rightSection?: ReactNode;
25
25
 
26
+ /** AppBar center section customization */
27
+ centerSection?: ReactNode;
28
+
26
29
  /** Layout customization */
27
30
  mainContainerSx?: any;
28
31