@campxdev/campx-web-utils 0.5.5 → 0.5.7
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,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@campxdev/campx-web-utils",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.7",
|
|
4
4
|
"main": "./export.ts",
|
|
5
5
|
"private": false,
|
|
6
6
|
"peerDependencies": {
|
|
7
|
-
"@campxdev/react-blueprint": ">=1.9.
|
|
7
|
+
"@campxdev/react-blueprint": ">=1.9.3",
|
|
8
8
|
"@emotion/react": ">=^11.13.3",
|
|
9
9
|
"@emotion/styled": ">=^11.13.0",
|
|
10
10
|
"@mui/icons-material": ">=6.1.5",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"react-redux": "=>9.1.2"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@campxdev/react-blueprint": "1.9.
|
|
18
|
-
"@hookform/resolvers": "
|
|
17
|
+
"@campxdev/react-blueprint": "1.9.3",
|
|
18
|
+
"@hookform/resolvers": "2.9.10",
|
|
19
19
|
"@mui/x-date-pickers": "^7.22.1",
|
|
20
20
|
"axios": "^1.7.2",
|
|
21
21
|
"cookie-js": "^0.0.1",
|
|
@@ -20,6 +20,7 @@ type Props = {
|
|
|
20
20
|
designation?: string;
|
|
21
21
|
clientName?: string;
|
|
22
22
|
institutionData?: any[];
|
|
23
|
+
defaultCollapsed?: boolean;
|
|
23
24
|
helpDocsConfig?: Record<
|
|
24
25
|
string,
|
|
25
26
|
{ actions: { name: string; onClick: () => void }[] }
|
|
@@ -37,9 +38,10 @@ export const AppLayout: React.FC<Props> = ({
|
|
|
37
38
|
userName = '',
|
|
38
39
|
designation = '',
|
|
39
40
|
clientName = '',
|
|
41
|
+
defaultCollapsed = true,
|
|
40
42
|
helpDocsConfig,
|
|
41
43
|
}) => {
|
|
42
|
-
const [collapsed, setCollapsed] = useState(
|
|
44
|
+
const [collapsed, setCollapsed] = useState(defaultCollapsed);
|
|
43
45
|
const theme = useTheme();
|
|
44
46
|
const isSmallScreen = useMediaQuery(theme.breakpoints.down('md'));
|
|
45
47
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Icons } from '@campxdev/react-blueprint';
|
|
2
|
-
import { useTheme } from '@mui/material';
|
|
2
|
+
import { Backdrop, useTheme } from '@mui/material';
|
|
3
3
|
import Box from '@mui/material/Box';
|
|
4
4
|
import SpeedDial from '@mui/material/SpeedDial';
|
|
5
5
|
import SpeedDialAction from '@mui/material/SpeedDialAction';
|
|
@@ -31,12 +31,15 @@ const HelpDocs: React.FC<HelpDocsProps> = ({ actions }) => {
|
|
|
31
31
|
zIndex: 1000,
|
|
32
32
|
}}
|
|
33
33
|
>
|
|
34
|
+
<Backdrop open={open} />
|
|
34
35
|
<SpeedDial
|
|
35
36
|
ariaLabel="Custom Help Docs"
|
|
36
37
|
sx={{
|
|
37
38
|
position: 'absolute',
|
|
38
|
-
bottom:
|
|
39
|
-
right:
|
|
39
|
+
bottom: 0,
|
|
40
|
+
right: 40,
|
|
41
|
+
display: 'flex',
|
|
42
|
+
alignItems: 'flex-end',
|
|
40
43
|
'& .MuiFab-primary': {
|
|
41
44
|
backgroundColor: theme.palette.highlight.highlightBlue,
|
|
42
45
|
borderRadius: '8px',
|
|
@@ -49,12 +52,18 @@ const HelpDocs: React.FC<HelpDocsProps> = ({ actions }) => {
|
|
|
49
52
|
backgroundColor: theme.palette.highlight.highlightBlue,
|
|
50
53
|
},
|
|
51
54
|
},
|
|
55
|
+
'& .MuiSpeedDialAction-fab': {
|
|
56
|
+
margin: '0 0 16px 0',
|
|
57
|
+
'&:not(:last-child)': {
|
|
58
|
+
marginBottom: '8px',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
52
61
|
}}
|
|
53
62
|
icon={<Icons.HelpDocsIcon size={20} />}
|
|
54
63
|
onClose={handleClose}
|
|
55
64
|
onOpen={handleOpen}
|
|
56
65
|
open={open}
|
|
57
|
-
direction="
|
|
66
|
+
direction="up"
|
|
58
67
|
>
|
|
59
68
|
{actions.map((action: HelpDocsActionType) => (
|
|
60
69
|
<SpeedDialAction
|