@campxdev/react-blueprint 1.8.4 → 1.8.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/react-blueprint",
3
- "version": "1.8.4",
3
+ "version": "1.8.6",
4
4
  "main": "./export.ts",
5
5
  "dependencies": {
6
6
  "@emotion/react": "^11.13.3",
@@ -0,0 +1,36 @@
1
+ import { useTheme } from '@mui/material';
2
+
3
+ export const FeedbackStarIcon = ({ size = 16 }: { size: number }) => {
4
+ const theme = useTheme();
5
+ const color = theme.palette.text.primary;
6
+ return (
7
+ <svg
8
+ width={size}
9
+ height={size}
10
+ viewBox="0 0 20 20"
11
+ fill="none"
12
+ xmlns="http://www.w3.org/2000/svg"
13
+ style={{
14
+ fill: color,
15
+ stroke: color,
16
+ }}
17
+ >
18
+ <path
19
+ d="M7.9 17.2411C7.58329 17.2493 7.27276 17.1526 7.01666 16.9661C6.68333 16.7245 6.16666 16.0995 6.49166 14.6995L6.96666 12.6495C6.9933 12.4262 6.93037 12.2015 6.79166 12.0245L5.13083 10.3661C4.83482 10.1334 4.6127 9.81977 4.49141 9.46329C4.37011 9.10681 4.35486 8.72279 4.4475 8.35781C4.5821 8.00646 4.81612 7.70193 5.12099 7.48142C5.42585 7.26092 5.78834 7.13399 6.16416 7.11615L8.28916 6.76615C8.48892 6.71034 8.66104 6.58273 8.7725 6.40781L9.9475 4.05781C10.0739 3.69572 10.3045 3.37909 10.6104 3.14777C10.9163 2.91645 11.2838 2.78077 11.6667 2.75781C12.0486 2.78173 12.415 2.91785 12.7199 3.1491C13.0249 3.38036 13.2548 3.69647 13.3808 4.05781L14.5558 6.40781C14.6691 6.58104 14.8405 6.70812 15.0392 6.76615L17.1642 7.11615C17.5404 7.13241 17.9036 7.25872 18.2088 7.47944C18.5139 7.70015 18.7476 8.00556 18.8808 8.35781C18.9735 8.72279 18.9582 9.10681 18.8369 9.46329C18.7156 9.81977 18.4935 10.1334 18.1975 10.3661L16.5392 12.0245C16.47 12.1118 16.4189 12.2121 16.3889 12.3194C16.3588 12.4267 16.3504 12.5389 16.3642 12.6495L16.8392 14.6995C17.1642 16.1078 16.6475 16.7245 16.3142 16.9661C15.9808 17.2078 15.2392 17.5161 13.9892 16.7745L12 15.5911C11.8929 15.5417 11.7763 15.5162 11.6583 15.5162C11.5404 15.5162 11.4238 15.5417 11.3167 15.5911L9.325 16.7745C8.90157 17.0573 8.40872 17.2188 7.9 17.2411ZM11.6667 4.00781C11.5333 4.00781 11.2917 4.16615 11.0667 4.61615L9.89166 6.96615C9.7487 7.23078 9.5491 7.4606 9.3071 7.63921C9.0651 7.81783 8.78667 7.94085 8.49166 7.99948L6.36666 8.34948C5.89166 8.43281 5.675 8.60781 5.63333 8.74115C5.59166 8.87448 5.66666 9.14115 6.00833 9.48281L7.66666 11.1411C7.88442 11.3785 8.04436 11.6629 8.13399 11.9723C8.22362 12.2816 8.2405 12.6075 8.18333 12.9245L7.70833 14.9745C7.56666 15.5661 7.65833 15.8828 7.75 15.9578C7.84166 16.0328 8.175 16.0161 8.69166 15.6995L10.6917 14.5161C10.9905 14.3522 11.3258 14.2662 11.6667 14.2662C12.0075 14.2662 12.3429 14.3522 12.6417 14.5161L14.6333 15.6995C15.1583 16.0078 15.4917 16.0245 15.5833 15.9578C15.675 15.8911 15.7667 15.5745 15.625 14.9745L15.15 12.9245C15.0902 12.6075 15.1058 12.281 15.1955 11.9712C15.2853 11.6614 15.4467 11.377 15.6667 11.1411L17.325 9.48281C17.6667 9.14115 17.7417 8.86615 17.7 8.74115C17.6583 8.61615 17.4417 8.43281 16.9667 8.34948L14.8417 7.99948C14.5467 7.94085 14.2682 7.81783 14.0262 7.63921C13.7842 7.4606 13.5846 7.23078 13.4417 6.96615L12.2667 4.61615C12.0417 4.16615 11.7975 4.00781 11.6667 4.00781Z"
20
+ stroke-width="0.4"
21
+ />
22
+ <path
23
+ d="M6.66699 4.79102H1.66699C1.50157 4.78992 1.34323 4.72373 1.22626 4.60675C1.10928 4.48978 1.04308 4.33144 1.04199 4.16602C1.04308 4.00059 1.10928 3.84225 1.22626 3.72528C1.34323 3.60831 1.50157 3.54211 1.66699 3.54102H6.66699C6.83242 3.54211 6.99075 3.60831 7.10773 3.72528C7.2247 3.84225 7.2909 4.00059 7.29199 4.16602C7.2909 4.33144 7.2247 4.48978 7.10773 4.60675C6.99075 4.72373 6.83242 4.78992 6.66699 4.79102Z"
24
+ stroke-width="0.4"
25
+ />
26
+ <path
27
+ d="M4.16699 16.459H1.66699C1.50157 16.4579 1.34323 16.3917 1.22626 16.2747C1.10928 16.1577 1.04308 15.9994 1.04199 15.834C1.04308 15.6686 1.10928 15.5102 1.22626 15.3932C1.34323 15.2763 1.50157 15.2101 1.66699 15.209H4.16699C4.33242 15.2101 4.49075 15.2763 4.60773 15.3932C4.7247 15.5102 4.7909 15.6686 4.79199 15.834C4.7909 15.9994 4.7247 16.1577 4.60773 16.2747C4.49075 16.3917 4.33242 16.4579 4.16699 16.459Z"
28
+ stroke-width="0.4"
29
+ />
30
+ <path
31
+ d="M2.50033 10.625H1.66699C1.50157 10.6239 1.34323 10.5577 1.22626 10.4407C1.10928 10.3238 1.04308 10.1654 1.04199 10C1.04308 9.83458 1.10928 9.67624 1.22626 9.55926C1.34323 9.44229 1.50157 9.37609 1.66699 9.375H2.50033C2.66575 9.37609 2.82409 9.44229 2.94106 9.55926C3.05803 9.67624 3.12423 9.83458 3.12533 10C3.12423 10.1654 3.05803 10.3238 2.94106 10.4407C2.82409 10.5577 2.66575 10.6239 2.50033 10.625Z"
32
+ stroke-width="0.4"
33
+ />
34
+ </svg>
35
+ );
36
+ };
@@ -56,6 +56,7 @@ import { ExpandIcon } from './IconComponents/ExpandIcon';
56
56
  import { ExportIcon } from './IconComponents/ExportIcon';
57
57
  import { ExportMenuIcon } from './IconComponents/ExportMenuIcon';
58
58
  import { FeePaymentIcon } from './IconComponents/FeePaymentIcon';
59
+ import { FeedbackStarIcon } from './IconComponents/FeedbackStarIcon';
59
60
  import { FilterIcon } from './IconComponents/FilterIcon';
60
61
  import { HamburgerMenuIcon } from './IconComponents/HamburgerMenuIcon';
61
62
  import { HandoutsIcon } from './IconComponents/HandoutsIcon';
@@ -262,4 +263,5 @@ export const Icons = {
262
263
  WorkFlowDocsIcon,
263
264
  RaiseTicketIcon,
264
265
  HelpDocsIcon,
266
+ FeedbackStarIcon,
265
267
  };
@@ -1,19 +1,20 @@
1
1
  import {
2
+ AccordionDetails,
3
+ AccordionSummary,
2
4
  Box,
3
- Accordion as MuiAccordion,
4
- AccordionDetails as MuiAccordionDetails,
5
5
  AccordionProps as MuiAccordionProps,
6
- AccordionSummary as MuiAccordionSummary,
7
6
  Stack,
8
7
  } from '@mui/material';
9
8
  import { ReactNode } from 'react';
10
9
  import { Icons, Typography } from '../../export';
10
+ import { StyledMuiAccordion } from './styles';
11
11
 
12
12
  export type AccordionProps = {
13
13
  title: ReactNode;
14
14
  content: ReactNode;
15
15
  actions?: ReactNode;
16
16
  index?: number;
17
+ errorKeys?: string[];
17
18
  expanded?: boolean | number;
18
19
  } & Omit<
19
20
  MuiAccordionProps,
@@ -25,29 +26,29 @@ export const Accordion = (props: AccordionProps) => {
25
26
  props;
26
27
 
27
28
  return (
28
- <MuiAccordion
29
+ <StyledMuiAccordion
29
30
  key={index}
30
31
  onChange={onChange}
31
32
  expanded={typeof expanded == 'number' ? expanded === index : expanded}
32
33
  {...restProps}
33
34
  >
34
35
  <Stack direction="row" justifyContent="space-between" alignItems="center">
35
- <MuiAccordionSummary expandIcon={<Icons.AccordionArrow />}>
36
+ <AccordionSummary expandIcon={<Icons.AccordionArrow />}>
36
37
  {typeof title === 'string' ? (
37
38
  <Typography variant="subtitle2">{title}</Typography>
38
39
  ) : (
39
40
  title
40
41
  )}
41
- </MuiAccordionSummary>
42
+ </AccordionSummary>
42
43
  <Box>{actions}</Box>
43
44
  </Stack>
44
- <MuiAccordionDetails>
45
+ <AccordionDetails>
45
46
  {typeof content === 'string' ? (
46
47
  <Typography variant="label1">{content}</Typography>
47
48
  ) : (
48
49
  content
49
50
  )}
50
- </MuiAccordionDetails>
51
- </MuiAccordion>
51
+ </AccordionDetails>
52
+ </StyledMuiAccordion>
52
53
  );
53
54
  };
@@ -0,0 +1,10 @@
1
+ import { Accordion as MuiAccordion, styled } from '@mui/material';
2
+
3
+ export const StyledMuiAccordion = styled(MuiAccordion)(() => ({
4
+ '&:before': {
5
+ display: 'none',
6
+ },
7
+ '&.Mui-expanded': {
8
+ margin: '0px',
9
+ },
10
+ }));
@@ -1,14 +1,35 @@
1
- import { Box, SxProps } from '@mui/material';
2
- import { SyntheticEvent, useState } from 'react';
1
+ import { SxProps } from '@mui/material';
2
+ import { SyntheticEvent, useEffect, useState } from 'react';
3
3
  import { Accordion, AccordionProps } from '../Accordion/Accordion';
4
+ import { StyledAccordionContainer } from './styles';
4
5
 
5
6
  type AccordionGroupProps = {
6
7
  data: AccordionProps[];
7
8
  containerSx?: SxProps;
9
+ defaultExpandedIndex?: number;
10
+ errorField?: string;
8
11
  };
9
12
 
10
- export const AccordionGroup = ({ data, containerSx }: AccordionGroupProps) => {
11
- const [expanded, setExpanded] = useState<number | false>(false);
13
+ export const AccordionGroup = ({
14
+ data,
15
+ containerSx,
16
+ defaultExpandedIndex,
17
+ errorField,
18
+ }: AccordionGroupProps) => {
19
+ const [expanded, setExpanded] = useState<number | false>(
20
+ defaultExpandedIndex ?? false,
21
+ );
22
+
23
+ useEffect(() => {
24
+ if (errorField) {
25
+ const errorIndex = data.findIndex((item) =>
26
+ Array.isArray(item.errorKeys)
27
+ ? item.errorKeys.includes(errorField)
28
+ : false,
29
+ );
30
+ if (errorIndex !== -1) setExpanded(errorIndex);
31
+ }
32
+ }, [errorField, data]);
12
33
 
13
34
  const handleChange =
14
35
  (panel: number) => (event: SyntheticEvent, isExpanded: boolean) => {
@@ -16,16 +37,16 @@ export const AccordionGroup = ({ data, containerSx }: AccordionGroupProps) => {
16
37
  };
17
38
 
18
39
  return (
19
- <Box sx={{ ...containerSx }}>
40
+ <StyledAccordionContainer sx={{ ...containerSx }}>
20
41
  {data?.map((itemProps, index) => (
21
42
  <Accordion
22
43
  elevation={0}
23
- {...itemProps}
24
44
  expanded={expanded}
45
+ {...itemProps}
25
46
  index={index}
26
47
  onChange={handleChange(index)}
27
48
  />
28
49
  ))}
29
- </Box>
50
+ </StyledAccordionContainer>
30
51
  );
31
52
  };
@@ -0,0 +1,8 @@
1
+ import { Box, styled } from '@mui/material';
2
+
3
+ export const StyledAccordionContainer = styled(Box)(({ theme }) => ({
4
+ display: 'flex',
5
+ gap: '4px',
6
+ flexDirection: 'column',
7
+ backgroundColor: theme.palette.surface.defaultBackground,
8
+ }));
@@ -1,8 +1,9 @@
1
1
  import { TimelineContent, TimelineItem, TimelineSeparator } from '@mui/lab';
2
- import { Box, Stack, Typography, useTheme } from '@mui/material';
2
+ import { Box, Stack, SxProps, Typography, useTheme } from '@mui/material';
3
3
  import { format, isToday } from 'date-fns';
4
4
  import _ from 'lodash';
5
5
  import { useState } from 'react';
6
+ import { AddSquare } from '../../Assets/Icons/IconComponents/AddSquare';
6
7
  import { Button, DatePicker, Spinner } from '../../export';
7
8
  import { EmptyIllustration } from '../EmptyIllustration/EmptyIllustration';
8
9
  import {
@@ -14,7 +15,6 @@ import {
14
15
  import {
15
16
  StyledActivityLogViewBox,
16
17
  StyledIconBox,
17
- StyledSectionTitle,
18
18
  StyledSpinnerBox,
19
19
  StyledTimeline,
20
20
  StyledTimelineConnector,
@@ -24,8 +24,8 @@ import {
24
24
  export type ActivityAction = 'create' | 'update' | 'delete';
25
25
 
26
26
  export interface Activity {
27
- userName: string;
28
- action: ActivityAction;
27
+ userName?: string;
28
+ action?: ActivityAction;
29
29
  message: string;
30
30
  timestamp: string;
31
31
  }
@@ -40,6 +40,9 @@ interface ActivityLogProps {
40
40
  setFromDate: (date: Date | null) => void;
41
41
  setToDate: (date: Date | null) => void;
42
42
  isLoading: boolean;
43
+ hideLogFilter?: boolean;
44
+ timelineContentSx?: SxProps;
45
+ timelineSx?: SxProps;
43
46
  }
44
47
 
45
48
  const ActivityLogFilter = ({
@@ -115,6 +118,9 @@ export const ActivityLogView = ({
115
118
  setFromDate,
116
119
  setToDate,
117
120
  isLoading,
121
+ hideLogFilter = false,
122
+ timelineContentSx = {},
123
+ timelineSx = {},
118
124
  }: ActivityLogProps) => {
119
125
  const theme = useTheme();
120
126
  const lastItemRef = useIntersectionObserver(() => {
@@ -134,14 +140,14 @@ export const ActivityLogView = ({
134
140
  });
135
141
 
136
142
  const renderMessage = (activity: Activity) =>
137
- activity.message.split('\n').map((part, index) => (
138
- <Typography key={index} component="div">
139
- {index === 0 && (
143
+ activity.message?.split('\n').map((part, index) => (
144
+ <Typography key={index} variant="body1" sx={{ fontWeight: 500 }}>
145
+ {index === 0 && activity.userName && (
140
146
  <span style={{ color: theme.palette.text.primary }}>
141
147
  {activity.userName}
142
148
  </span>
143
149
  )}{' '}
144
- {part.split(/('[^']*')/g).map((text, idx) => {
150
+ {part?.split(/('[^']*')/g).map((text, idx) => {
145
151
  const isQuotedText = text.startsWith("'") && text.endsWith("'");
146
152
  return (
147
153
  <span
@@ -161,14 +167,16 @@ export const ActivityLogView = ({
161
167
 
162
168
  return (
163
169
  <StyledActivityLogViewBox className="scrollable-activity-log">
164
- <ActivityLogFilter
165
- fromDate={fromDate}
166
- toDate={toDate}
167
- setFromDate={setFromDate}
168
- setToDate={setToDate}
169
- fetchNextPage={fetchNextPage}
170
- isLoading={isLoading}
171
- />
170
+ {!hideLogFilter && (
171
+ <ActivityLogFilter
172
+ fromDate={fromDate}
173
+ toDate={toDate}
174
+ setFromDate={setFromDate}
175
+ setToDate={setToDate}
176
+ fetchNextPage={fetchNextPage}
177
+ isLoading={isLoading}
178
+ />
179
+ )}
172
180
 
173
181
  {loading ? (
174
182
  <StyledSpinnerBox>
@@ -179,8 +187,8 @@ export const ActivityLogView = ({
179
187
  ) : (
180
188
  Object.entries(groupedActivities).map(([section, activities]) => (
181
189
  <Box key={section}>
182
- <StyledSectionTitle>{section}</StyledSectionTitle>
183
- <StyledTimeline>
190
+ <Typography variant="caption">{section}</Typography>
191
+ <StyledTimeline sx={{ ...timelineSx }}>
184
192
  {activities.map((activity, index) => (
185
193
  <TimelineItem
186
194
  key={index}
@@ -189,7 +197,11 @@ export const ActivityLogView = ({
189
197
  <TimelineSeparator>
190
198
  <StyledTimelineDot>
191
199
  <StyledIconBox>
192
- <ActivityIcon type={activity.action} />
200
+ {activity.action ? (
201
+ <ActivityIcon type={activity.action} />
202
+ ) : (
203
+ <AddSquare />
204
+ )}
193
205
  </StyledIconBox>
194
206
  </StyledTimelineDot>
195
207
  {index < activities.length - 1 && (
@@ -201,9 +213,12 @@ export const ActivityLogView = ({
201
213
  display: 'flex',
202
214
  justifyContent: 'space-between',
203
215
  marginTop: 1,
216
+ ...timelineContentSx,
204
217
  }}
205
218
  >
206
- <Typography>{renderMessage(activity)}</Typography>
219
+ <Typography variant="body1" sx={{ fontWeight: 500 }}>
220
+ {renderMessage(activity)}
221
+ </Typography>
207
222
  <Typography variant="caption">
208
223
  {format(
209
224
  convertUTCtoIST(activity.timestamp),
@@ -22,6 +22,8 @@ export const StyledTimeline = styled(Timeline)({
22
22
  [`& .${timelineItemClasses.root}:not(:first-of-type)`]: {
23
23
  marginTop: '0px',
24
24
  },
25
+ padding: 0,
26
+ margin: 0,
25
27
  });
26
28
 
27
29
  export const StyledTimelineDot = styled(TimelineDot)(({ theme }) => ({
@@ -1,17 +1,24 @@
1
- import { Box, styled, Theme, useTheme } from '@mui/material';
2
- import { Typography } from '../../export';
1
+ import { Box, styled, SxProps, Theme, useTheme } from '@mui/material';
2
+ import { Typography, TypographyProps } from '../../export';
3
3
 
4
4
  export type StatusCardProps = {
5
5
  color: 'green' | 'red' | 'orange' | 'yellow' | 'blue' | 'pink';
6
6
  text: string;
7
+ containerSx?: SxProps;
8
+ typographyVariant?: TypographyProps['variant'];
7
9
  };
8
10
 
9
- export const StatusCard = ({ color, text }: StatusCardProps) => {
11
+ export const StatusCard = ({
12
+ color,
13
+ text,
14
+ containerSx = {},
15
+ typographyVariant = 'label2',
16
+ }: StatusCardProps) => {
10
17
  const theme = useTheme();
11
18
  const { textColor, backgroundColor } = getStatusColor(color, theme);
12
19
  return (
13
- <StatusContainer backgroundColor={backgroundColor}>
14
- <Typography variant="label2" color={textColor}>
20
+ <StatusContainer backgroundColor={backgroundColor} sx={containerSx}>
21
+ <Typography variant={typographyVariant} color={textColor}>
15
22
  {text}
16
23
  </Typography>
17
24
  </StatusContainer>
@@ -2,7 +2,7 @@ import { Stack, StackProps } from '@mui/material';
2
2
  import { ResponsiveStyleValue } from '@mui/system';
3
3
  import { ReactNode } from 'react';
4
4
  import { LabelWrapper } from '../LabelWrapper/LabelWrapper';
5
- import { SingleCheckBox } from '../SingleCheckBox/SIngleCheckBox';
5
+ import { SingleCheckBox } from '../SingleCheckBox/SingleCheckBox';
6
6
 
7
7
  export type MultiCheckboxProps = {
8
8
  containerProps?: StackProps;
@@ -3,6 +3,7 @@ import {
3
3
  FormControlLabelProps,
4
4
  Checkbox as MuiCheckbox,
5
5
  CheckboxProps as MuiCheckboxProps,
6
+ SxProps,
6
7
  useTheme,
7
8
  } from '@mui/material';
8
9
  import { ReactNode } from 'react';
@@ -97,6 +97,7 @@ export const SingleFilter = ({
97
97
  sx: {
98
98
  padding: '0px',
99
99
  width: '250px',
100
+ minWidth: 'max-content',
100
101
  },
101
102
  }}
102
103
  anchor={({ open }: { open: (e: any) => void }) => (
@@ -109,6 +110,10 @@ export const SingleFilter = ({
109
110
  sx={{
110
111
  gap: '1px',
111
112
  borderRadius: '20px',
113
+ textWrap: 'nowrap',
114
+ textOverflow: 'ellipsis',
115
+ overflow: 'hidden',
116
+ minWidth: 'max-content',
112
117
  }}
113
118
  variant="contained"
114
119
  background={
@@ -11,7 +11,7 @@ export * from './PasswordField/PasswordField';
11
11
  export * from './RadioGroup/RadioGroup';
12
12
  export * from './SearchBar/SearchBar';
13
13
  export * from './Select/Select';
14
- export * from './SingleCheckBox/SIngleCheckBox';
14
+ export * from './SingleCheckBox/SingleCheckBox';
15
15
  export * from './SingleSelect/SingleSelect';
16
16
  export * from './Switch/Switch';
17
17
  export * from './TextField/TextField';
@@ -2,22 +2,21 @@ import { Box, BoxProps, styled } from '@mui/material';
2
2
  import { ReactNode } from 'react';
3
3
  import { Typography } from '../../export';
4
4
 
5
- export type StepperTitleProps = {
5
+ export type FloatingContainerProps = {
6
6
  title?: string;
7
- isShowTitle?: boolean;
8
7
  content: ReactNode;
9
8
  contentProps?: BoxProps;
10
9
  titleProps?: BoxProps;
11
10
  };
12
11
 
13
- const StepperTitleContainer = styled(Box)(({ theme }) => ({
12
+ const FloatingContainer = styled(Box)(({ theme }) => ({
14
13
  borderRadius: '8px',
15
14
  minHeight: '100px',
16
15
  minWidth: '60%',
17
16
  backgroundColor: theme.palette.surface.paperBackground,
18
17
  }));
19
18
 
20
- const TitleContainer = styled(Box)(({ theme }) => ({
19
+ const Title = styled(Box)(({ theme }) => ({
21
20
  backgroundColor: theme.palette.surface.grey,
22
21
  height: '45px',
23
22
  display: 'flex',
@@ -25,15 +24,15 @@ const TitleContainer = styled(Box)(({ theme }) => ({
25
24
  paddingLeft: '16px',
26
25
  }));
27
26
 
28
- export const StepperTitle = (props: StepperTitleProps) => {
27
+ export const FloatingContent = (props: FloatingContainerProps) => {
29
28
  return (
30
- <StepperTitleContainer {...props.contentProps}>
31
- {props.isShowTitle && (
32
- <TitleContainer {...props.titleProps}>
29
+ <FloatingContainer {...props.contentProps}>
30
+ {props.title && (
31
+ <Title {...props.titleProps}>
33
32
  <Typography variant="subtitle3">{props.title}</Typography>
34
- </TitleContainer>
33
+ </Title>
35
34
  )}
36
35
  {props.content}
37
- </StepperTitleContainer>
36
+ </FloatingContainer>
38
37
  );
39
38
  };
@@ -28,6 +28,7 @@ interface PageHeaderProps {
28
28
  actions?: ReactNode[];
29
29
  columns?: GridColDef[];
30
30
  searchText?: string;
31
+ defaultShowLabels?: string[];
31
32
  }
32
33
 
33
34
  const ViewTab = ({ title }: { title: string }) => {
@@ -59,13 +60,23 @@ export const PageHeader = ({
59
60
  uniqueId,
60
61
  actions = [],
61
62
  filterComponents = [],
63
+ defaultShowLabels = [],
62
64
  columns,
63
65
  viewsSlot = <Box></Box>,
64
66
  searchText = 'Search',
65
67
  }: PageHeaderProps) => {
66
68
  const [expanded, setExpanded] = useState(false);
67
69
 
68
- const [hiddenLabels, setHiddenLabels] = useState<string[]>([]);
70
+ const allFilterLabels = filterComponents.map(
71
+ (filter) => filter.props['label'] || 'Label Not Found',
72
+ );
73
+
74
+ const initialHiddenLabels = allFilterLabels.filter(
75
+ (label) => !defaultShowLabels.includes(label),
76
+ );
77
+
78
+ const [hiddenLabels, setHiddenLabels] =
79
+ useState<string[]>(initialHiddenLabels);
69
80
 
70
81
  const dispatch = useDispatch();
71
82
 
@@ -188,7 +199,7 @@ export const PageHeader = ({
188
199
  }
189
200
  }}
190
201
  handleReset={() => {
191
- setHiddenLabels([]);
202
+ setHiddenLabels(initialHiddenLabels);
192
203
  }}
193
204
  />
194
205
  </Stack>
@@ -1,6 +1,6 @@
1
1
  export * from './AppHeader/AppHeader';
2
+ export * from './FloatingContainer/FloatingContainer';
2
3
  export * from './PageContent/PageContent';
3
4
  export * from './PageHeader/components/DensitySelector/DensitySelector';
4
5
  export * from './PageHeader/PageHeader';
5
- export * from './StepperTitle/StepperTitle';
6
6
  export * from './TabsLayout/TabsLayout';
@@ -51,7 +51,7 @@ export const TabsContainer = ({
51
51
 
52
52
  useEffect(() => {
53
53
  setCurrentTab(tabs[currentTabIndex]?.key);
54
- }, []);
54
+ }, [tabs, currentTabIndex]);
55
55
 
56
56
  return (
57
57
  <>
@@ -3,7 +3,7 @@ import { useState } from 'react';
3
3
  import {
4
4
  CheckboxProps,
5
5
  SingleCheckBox,
6
- } from '../../components/Input/SingleCheckBox/SIngleCheckBox';
6
+ } from '../../components/Input/SingleCheckBox/SingleCheckBox';
7
7
 
8
8
  export default {
9
9
  title: 'Input/SingleCheckBox',
@@ -91,14 +91,11 @@ export const getCommonTheme = (mode: Theme) => {
91
91
  },
92
92
  },
93
93
  },
94
- // MuiAccordian: {
95
- // root: {},
96
- // },
97
94
  MuiAccordionSummary: {
98
95
  styleOverrides: {
99
96
  root: {
100
97
  justifyContent: 'flex-start',
101
- paddingLeft: '20px',
98
+ padding: '0px 16px',
102
99
  '&.Mui-expanded': {
103
100
  minHeight: '0px',
104
101
  },
@@ -118,6 +115,13 @@ export const getCommonTheme = (mode: Theme) => {
118
115
  },
119
116
  },
120
117
  },
118
+ MuiAccordionDetails: {
119
+ styleOverrides: {
120
+ root: {
121
+ padding: '0px 16px',
122
+ },
123
+ },
124
+ },
121
125
  MuiStepLabel: {
122
126
  styleOverrides: {
123
127
  root: {