@campxdev/react-blueprint 0.1.41 → 0.1.43
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 +6 -4
- package/src/components/Assets/Icons/IconComponents/ActiveDevicesIcon.tsx +1 -3
- package/src/components/Assets/Icons/IconComponents/AdministratorIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/AppsIcon.tsx +1 -3
- package/src/components/Assets/Icons/IconComponents/BulbIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/CampxFullLogoIcon.tsx +0 -1
- package/src/components/Assets/Icons/IconComponents/CampxIcon.tsx +2 -3
- package/src/components/Assets/Icons/IconComponents/CareerIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/CheckedCheckBoxIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/CheckedRadioIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/ClogWheelIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/CommutexIcon.tsx +37 -0
- package/src/components/Assets/Icons/IconComponents/CrossIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/DashBoardIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/DeviceIcon.tsx +1 -3
- package/src/components/Assets/Icons/IconComponents/EnrollIcon.tsx +35 -0
- package/src/components/Assets/Icons/IconComponents/ExamResultIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/ExamxIcon.tsx +34 -0
- package/src/components/Assets/Icons/IconComponents/HelpIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/HomeIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/HostelxIcon.tsx +51 -0
- package/src/components/Assets/Icons/IconComponents/InfoIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/InstitutionsIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/LeftIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/LocationIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/LogoutIcon.tsx +4 -2
- package/src/components/Assets/Icons/IconComponents/NavigationIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/NotificationIcon.tsx +1 -3
- package/src/components/Assets/Icons/IconComponents/PayxIcon.tsx +49 -0
- package/src/components/Assets/Icons/IconComponents/PeoplexIcon.tsx +35 -0
- package/src/components/Assets/Icons/IconComponents/ProductFeaturesIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/ProfileIcon.tsx +2 -3
- package/src/components/Assets/Icons/IconComponents/RightIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/TicketsIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/ToursIcon.tsx +68 -0
- package/src/components/Assets/Icons/IconComponents/UncheckCheckBoxIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/UncheckedRadioIcon.tsx +1 -2
- package/src/components/Assets/Icons/IconComponents/Union4Icon.tsx +35 -0
- package/src/components/Assets/Icons/IconComponents/XIcon.tsx +24 -0
- package/src/components/Assets/Icons/Icons.tsx +24 -6
- package/src/components/Feedback/Tutorial/Tutorial.tsx +113 -0
- package/src/components/Feedback/exports.ts +1 -0
- package/src/components/Layout/AppHeader/AppHeader.tsx +1 -1
- package/src/stories/Feedback/Tutorial.stories.tsx +56 -0
- package/src/themes/commonTheme.ts +1 -2
- /package/src/stories/{Layout → Navigation}/FloatingSidebar.stories.tsx +0 -0
package/package.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@campxdev/react-blueprint",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.43",
|
|
4
4
|
"main": "./export.ts",
|
|
5
5
|
"private": false,
|
|
6
6
|
"dependencies": {
|
|
7
|
+
"@campxdev/campx-web-utils": "^0.1.3",
|
|
7
8
|
"@emotion/react": "^11.11.4",
|
|
8
9
|
"@emotion/styled": "^11.11.5",
|
|
9
10
|
"@mui/icons-material": "^5.15.20",
|
|
@@ -11,9 +12,6 @@
|
|
|
11
12
|
"@mui/x-data-grid": "^7.5.1",
|
|
12
13
|
"@storybook/addon-backgrounds": "^8.1.5",
|
|
13
14
|
"@storybook/addon-designs": "^8.0.2",
|
|
14
|
-
"axios": "^1.7.2",
|
|
15
|
-
"framer-motion": "^11.2.9",
|
|
16
|
-
"js-cookie": "^3.0.5",
|
|
17
15
|
"@testing-library/jest-dom": "^5.14.1",
|
|
18
16
|
"@testing-library/react": "^13.0.0",
|
|
19
17
|
"@testing-library/user-event": "^13.2.1",
|
|
@@ -22,11 +20,15 @@
|
|
|
22
20
|
"@types/react": "^18.0.0",
|
|
23
21
|
"@types/react-dom": "^18.3.0",
|
|
24
22
|
"@types/react-router-dom": "^5.3.3",
|
|
23
|
+
"axios": "^1.7.2",
|
|
24
|
+
"framer-motion": "^11.2.9",
|
|
25
|
+
"js-cookie": "^3.0.5",
|
|
25
26
|
"lodash": "^4.17.21",
|
|
26
27
|
"pullstate": "^1.24.0",
|
|
27
28
|
"react": "^18.3.1",
|
|
28
29
|
"react-dom": "^18.3.1",
|
|
29
30
|
"react-error-boundary": "^3.1.4",
|
|
31
|
+
"react-joyride": "^2.8.2",
|
|
30
32
|
"react-router-dom": "^6.24.0",
|
|
31
33
|
"react-scripts": "^5.0.1",
|
|
32
34
|
"storybook-dark-mode": "^4.0.1",
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useTheme } from "@mui/material";
|
|
2
2
|
|
|
3
|
-
export const CampxIcon = () => {
|
|
4
|
-
const size = 32;
|
|
3
|
+
export const CampxIcon = ({ size = 32 }) => {
|
|
5
4
|
const theme = useTheme();
|
|
6
5
|
|
|
7
6
|
const color = theme.palette.mode === "dark" ? "white" : "blue";
|
|
8
|
-
|
|
7
|
+
|
|
9
8
|
return (
|
|
10
9
|
<svg
|
|
11
10
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useTheme } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export const CommutexIcon = ({ size = 32 }) => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
const color = theme.palette.text.primary;
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
id="Group_4542"
|
|
9
|
+
data-name="Group 4542"
|
|
10
|
+
width={size}
|
|
11
|
+
height={size}
|
|
12
|
+
viewBox="0 0 290.182 400"
|
|
13
|
+
style={{
|
|
14
|
+
stroke: color,
|
|
15
|
+
}}
|
|
16
|
+
>
|
|
17
|
+
<defs>
|
|
18
|
+
<linearGradient
|
|
19
|
+
id="linear-gradient"
|
|
20
|
+
x1="0.5"
|
|
21
|
+
x2="0.5"
|
|
22
|
+
y2="1"
|
|
23
|
+
gradientUnits="objectBoundingBox"
|
|
24
|
+
>
|
|
25
|
+
<stop offset="0" stop-color="#6a2886" />
|
|
26
|
+
<stop offset="1" stop-color="#8234a4" />
|
|
27
|
+
</linearGradient>
|
|
28
|
+
</defs>
|
|
29
|
+
<path
|
|
30
|
+
id="Union_49"
|
|
31
|
+
data-name="Union 49"
|
|
32
|
+
d="M192.681,400l-47.861-65.881L96.953,400H.975L0,399.287,135.693,212.52H.09v-25h136.26L48.761,67.083l-.02.024L0,.029.02,0H97.5l47.866,65.876L193.223,0H289.2l.98.707L154.448,187.524h135.64v25H153.867l87.549,120.4.02-.024,48.742,67.079-.02.029Z"
|
|
33
|
+
fill="url(#linear-gradient)"
|
|
34
|
+
/>
|
|
35
|
+
</svg>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { useTheme } from "@mui/material";
|
|
2
2
|
|
|
3
|
-
export const DeviceIcon = () => {
|
|
4
|
-
const size = 32;
|
|
3
|
+
export const DeviceIcon = ({ size = 32 }) => {
|
|
5
4
|
const theme = useTheme();
|
|
6
5
|
const color = theme.palette.text.primary;
|
|
7
6
|
return (
|
|
8
7
|
<div>
|
|
9
8
|
<svg
|
|
10
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
11
9
|
width={size}
|
|
12
10
|
height={size}
|
|
13
11
|
viewBox="0 0 20 20"
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useTheme } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export const EnrollxIcon = ({ size = 32 }) => {
|
|
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 362.673 400"
|
|
11
|
+
style={{
|
|
12
|
+
stroke: color,
|
|
13
|
+
}}
|
|
14
|
+
>
|
|
15
|
+
<defs>
|
|
16
|
+
<linearGradient
|
|
17
|
+
id="linear-gradient"
|
|
18
|
+
x1="0.5"
|
|
19
|
+
x2="0.5"
|
|
20
|
+
y2="1"
|
|
21
|
+
gradientUnits="objectBoundingBox"
|
|
22
|
+
>
|
|
23
|
+
<stop offset="0" stop-color="#007ab1" />
|
|
24
|
+
<stop offset="1" stop-color="#149ecd" />
|
|
25
|
+
</linearGradient>
|
|
26
|
+
</defs>
|
|
27
|
+
<path
|
|
28
|
+
id="Union_6"
|
|
29
|
+
data-name="Union 6"
|
|
30
|
+
d="M0,400H.017L0,399.971l48.484-66.726.02.027L145.335,200h95.476l.972.706L96.985,400Zm179.158-80.166L266.226,200H361.7l.972.7L276.121,319.834ZM361.7,200Zm0,0H266.228l-87.2-120.01h96.963l86.68,119.3Zm-216.367,0L48.5,66.729l-.02.027L0,.027.017,0h96.97L241.782,199.294l-.972.706ZM217.908.046h0ZM217.91.046Zm-97,0-.015-.02.02-.027h96.968l.032.042v0ZM0,0H.017Z"
|
|
31
|
+
fill="url(#linear-gradient)"
|
|
32
|
+
/>
|
|
33
|
+
</svg>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useTheme } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export const ExamxIcon = ({ size = 32 }) => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
const color = theme.palette.text.primary;
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
id="Group_4477"
|
|
9
|
+
data-name="Group 4477"
|
|
10
|
+
width={size}
|
|
11
|
+
height={size}
|
|
12
|
+
viewBox="0 0 388.283 400"
|
|
13
|
+
>
|
|
14
|
+
<defs>
|
|
15
|
+
<linearGradient
|
|
16
|
+
id="linear-gradient"
|
|
17
|
+
x1="0.5"
|
|
18
|
+
x2="0.5"
|
|
19
|
+
y2="1"
|
|
20
|
+
gradientUnits="objectBoundingBox"
|
|
21
|
+
>
|
|
22
|
+
<stop offset="0" stop-color="#d86b00" />
|
|
23
|
+
<stop offset="1" stop-color="#ed9035" />
|
|
24
|
+
</linearGradient>
|
|
25
|
+
</defs>
|
|
26
|
+
<path
|
|
27
|
+
id="Subtraction_66"
|
|
28
|
+
data-name="Subtraction 66"
|
|
29
|
+
d="M388.261,400H291.294l-.021-.027L.018,400,0,399.973l48.481-66.729.018.023L145.334,200,48.5,66.728l-.018.027L0,.03.018,0H388.264l.019.03L339.8,66.755l-.018-.027L242.943,200l96.837,133.268.018-.023,48.486,66.729-.021.026ZM153.486,77.69h0l38.344,52.8V269.442l-38.346,52.8,81.253-.052-38.286-52.746V130.491l38.286-52.749-81.251-.051Z"
|
|
30
|
+
fill="url(#linear-gradient)"
|
|
31
|
+
/>
|
|
32
|
+
</svg>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { useTheme } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export const HostelxIcon = ({ size = 32 }) => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
const color = theme.palette.text.primary;
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
id="Group_4511"
|
|
9
|
+
data-name="Group 4511"
|
|
10
|
+
width={size}
|
|
11
|
+
height={size}
|
|
12
|
+
viewBox="0 0 580.128 400"
|
|
13
|
+
style={{
|
|
14
|
+
stroke: color,
|
|
15
|
+
}}
|
|
16
|
+
>
|
|
17
|
+
<defs>
|
|
18
|
+
<linearGradient
|
|
19
|
+
id="linear-gradient"
|
|
20
|
+
x1="0.5"
|
|
21
|
+
x2="0.5"
|
|
22
|
+
y2="1"
|
|
23
|
+
gradientUnits="objectBoundingBox"
|
|
24
|
+
>
|
|
25
|
+
<stop offset="0" stop-color="#573dab" />
|
|
26
|
+
<stop offset="1" stop-color="#7251dd" />
|
|
27
|
+
</linearGradient>
|
|
28
|
+
</defs>
|
|
29
|
+
<path
|
|
30
|
+
id="Subtraction_9"
|
|
31
|
+
data-name="Subtraction 9"
|
|
32
|
+
d="M99.7,205.6H.02L0,205.576l49.844-68.6.019.026L148.351,1.456l48.808,67.169.019-.027,1.034,1.423L99.7,205.6ZM248.052,1.421h0L247.019,0h.538l1,.725-.5.694Z"
|
|
33
|
+
transform="translate(141.741 194.395)"
|
|
34
|
+
fill="url(#linear-gradient)"
|
|
35
|
+
/>
|
|
36
|
+
<path
|
|
37
|
+
id="Union_40"
|
|
38
|
+
data-name="Union 40"
|
|
39
|
+
d="M99.7,400H.02L0,399.968l49.846-68.594.016.024,98.491-135.549.231.316,43-59.186.02.028L290.09,1.456l.486.668.3-.417L438.488,204.88l-.1.073L530.266,331.4l.02-.024,49.842,68.594-.021.029H480.422L381.915,264.414l.039-.052-49.86-68.574-.017.024,0,0v0l-.5-.692.024-.018-9.8-13.486.129.02-31.532-43.4L241.445,205.6h-.474l-44.659,61.423L99.7,400v0ZM191.174,1.74,189.928.032,189.949,0h2.489l-1.263,1.74v0ZM389.79,1.42,388.759,0h.538l1,.728-.5.692Z"
|
|
40
|
+
fill="url(#linear-gradient)"
|
|
41
|
+
/>
|
|
42
|
+
<path
|
|
43
|
+
id="Subtraction_10"
|
|
44
|
+
data-name="Subtraction 10"
|
|
45
|
+
d="M247.558,205.6H149.408L51.1,70.308l49.841-68.6L248.556,204.879l-1,.725ZM1.244,1.741h0L0,.03.019,0H2.508L1.245,1.74Z"
|
|
46
|
+
transform="translate(189.93 194.394)"
|
|
47
|
+
fill="url(#linear-gradient)"
|
|
48
|
+
/>
|
|
49
|
+
</svg>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
@@ -5,8 +5,10 @@ interface LogoutIconProps {
|
|
|
5
5
|
hoverColor?: string;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
export const LogoutIcon: React.FC<LogoutIconProps> = (
|
|
9
|
-
|
|
8
|
+
export const LogoutIcon: React.FC<LogoutIconProps> = (
|
|
9
|
+
{ hoverColor },
|
|
10
|
+
{ size = 32 }
|
|
11
|
+
) => {
|
|
10
12
|
const theme = useTheme();
|
|
11
13
|
const [isHovered, setIsHovered] = useState(false);
|
|
12
14
|
const defaultColor = theme.palette.text.primary;
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { useTheme } from "@mui/material";
|
|
2
2
|
|
|
3
|
-
export const NotificationIcon = () => {
|
|
4
|
-
const size = 32;
|
|
3
|
+
export const NotificationIcon = ({ size = 32 }) => {
|
|
5
4
|
const theme = useTheme();
|
|
6
5
|
const color = theme.palette.text.primary;
|
|
7
6
|
return (
|
|
8
7
|
<>
|
|
9
8
|
<svg
|
|
10
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
11
9
|
width={size}
|
|
12
10
|
height={size}
|
|
13
11
|
viewBox="0 0 20 20"
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useTheme } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export const PayxIcon = ({ size = 32 }) => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
const color = theme.palette.text.primary;
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
id="Group_4464"
|
|
9
|
+
data-name="Group 4464"
|
|
10
|
+
width={size}
|
|
11
|
+
height={size}
|
|
12
|
+
viewBox="0 0 281.535 400"
|
|
13
|
+
style={{
|
|
14
|
+
stroke: color,
|
|
15
|
+
}}
|
|
16
|
+
>
|
|
17
|
+
<defs>
|
|
18
|
+
<linearGradient
|
|
19
|
+
id="linear-gradient"
|
|
20
|
+
x1="0.222"
|
|
21
|
+
y1="1"
|
|
22
|
+
x2="0.787"
|
|
23
|
+
gradientUnits="objectBoundingBox"
|
|
24
|
+
>
|
|
25
|
+
<stop offset="0" stop-color="#88b053" />
|
|
26
|
+
<stop offset="1" stop-color="#50840b" />
|
|
27
|
+
</linearGradient>
|
|
28
|
+
</defs>
|
|
29
|
+
<g id="Group_4461" data-name="Group 4461" transform="translate(0 0)">
|
|
30
|
+
<g id="Group_4460" data-name="Group 4460">
|
|
31
|
+
<path
|
|
32
|
+
id="Subtraction_8"
|
|
33
|
+
data-name="Subtraction 8"
|
|
34
|
+
d="M99.731,205.606,248.585.725l-1-.725H149.435L49.888,137.006l-.019-.027L.026,205.577l.019.029H99.731Z"
|
|
35
|
+
transform="translate(32.95 194.394)"
|
|
36
|
+
fill="url(#linear-gradient)"
|
|
37
|
+
/>
|
|
38
|
+
<path
|
|
39
|
+
id="Subtraction_8-2"
|
|
40
|
+
data-name="Subtraction 8"
|
|
41
|
+
d="M148.88,0,.026,204.881l1,.725H99.176L198.723,68.6l.019.027L248.585.029,248.566,0H148.88Z"
|
|
42
|
+
transform="translate(-0.026 0)"
|
|
43
|
+
fill="url(#linear-gradient)"
|
|
44
|
+
/>
|
|
45
|
+
</g>
|
|
46
|
+
</g>
|
|
47
|
+
</svg>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useTheme } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export const PeoplexIcon = ({ size = 32 }) => {
|
|
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 532.854 400"
|
|
11
|
+
style={{
|
|
12
|
+
stroke: color,
|
|
13
|
+
}}
|
|
14
|
+
>
|
|
15
|
+
<defs>
|
|
16
|
+
<linearGradient
|
|
17
|
+
id="linear-gradient"
|
|
18
|
+
x1="0.5"
|
|
19
|
+
x2="0.5"
|
|
20
|
+
y2="1"
|
|
21
|
+
gradientUnits="objectBoundingBox"
|
|
22
|
+
>
|
|
23
|
+
<stop offset="0" stop-color="#d0002b" />
|
|
24
|
+
<stop offset="1" stop-color="#ea4a6b" />
|
|
25
|
+
</linearGradient>
|
|
26
|
+
</defs>
|
|
27
|
+
<path
|
|
28
|
+
id="Union_42"
|
|
29
|
+
data-name="Union 42"
|
|
30
|
+
d="M279.636,400H151.53l-.024-.038,51.2-70.468L191.03,313.422,128.13,400H.024L0,399.959,64.052,311.8l.024.035,126.57-174.2.62.853,0-.006L266.8,242.03l75.965-103.542.006.009.385-.53,189.7,261.1-1.283.932H405.438l-62.9-86.573-11.8,16.247,50.617,69.389-1.283.932H279.64Zm0,0h0ZM290.045,50.418v0a50.416,50.416,0,1,1,100.832,0v0a50.416,50.416,0,1,1-100.832,0Zm-149.881,0v0a50.417,50.417,0,0,1,100.833,0v0a50.417,50.417,0,0,1-100.833,0Z"
|
|
31
|
+
fill="url(#linear-gradient)"
|
|
32
|
+
/>
|
|
33
|
+
</svg>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useTheme } from "@mui/material";
|
|
2
2
|
|
|
3
|
-
export const ProfileIcon = () => {
|
|
4
|
-
const size = 32;
|
|
3
|
+
export const ProfileIcon = ({ size = 32 }) => {
|
|
5
4
|
const theme = useTheme();
|
|
6
5
|
const color = theme.palette.text.primary;
|
|
7
6
|
|
|
@@ -15,7 +14,7 @@ export const ProfileIcon = () => {
|
|
|
15
14
|
height={size}
|
|
16
15
|
viewBox="0 0 16 16"
|
|
17
16
|
style={{
|
|
18
|
-
fill: color,
|
|
17
|
+
fill: color,
|
|
19
18
|
}}
|
|
20
19
|
>
|
|
21
20
|
<g id="user-octagon">
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export const ToursIcon = () => {
|
|
2
|
+
return (
|
|
3
|
+
<svg
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="118"
|
|
6
|
+
height="118"
|
|
7
|
+
viewBox="0 0 118 118"
|
|
8
|
+
>
|
|
9
|
+
<defs>
|
|
10
|
+
<filter
|
|
11
|
+
id="Rectangle_24558"
|
|
12
|
+
x="0"
|
|
13
|
+
y="0"
|
|
14
|
+
width="118"
|
|
15
|
+
height="118"
|
|
16
|
+
filterUnits="userSpaceOnUse"
|
|
17
|
+
>
|
|
18
|
+
<feOffset dx="6" dy="6" />
|
|
19
|
+
<feGaussianBlur stdDeviation="8" result="blur" />
|
|
20
|
+
<feFlood flood-opacity="0.059" />
|
|
21
|
+
<feComposite operator="in" in2="blur" />
|
|
22
|
+
<feComposite in="SourceGraphic" />
|
|
23
|
+
</filter>
|
|
24
|
+
</defs>
|
|
25
|
+
<g
|
|
26
|
+
id="Group_9777"
|
|
27
|
+
data-name="Group 9777"
|
|
28
|
+
transform="translate(-1822 -982)"
|
|
29
|
+
>
|
|
30
|
+
<g
|
|
31
|
+
id="Group_9776"
|
|
32
|
+
data-name="Group 9776"
|
|
33
|
+
transform="translate(1840 1000)"
|
|
34
|
+
>
|
|
35
|
+
<g
|
|
36
|
+
transform="matrix(1, 0, 0, 1, -18, -18)"
|
|
37
|
+
filter="url(#Rectangle_24558)"
|
|
38
|
+
>
|
|
39
|
+
<rect
|
|
40
|
+
id="Rectangle_24558-2"
|
|
41
|
+
data-name="Rectangle 24558"
|
|
42
|
+
width="70"
|
|
43
|
+
height="70"
|
|
44
|
+
rx="35"
|
|
45
|
+
transform="translate(18 18)"
|
|
46
|
+
fill="#fff"
|
|
47
|
+
/>
|
|
48
|
+
</g>
|
|
49
|
+
<rect
|
|
50
|
+
id="Rectangle_24559"
|
|
51
|
+
data-name="Rectangle 24559"
|
|
52
|
+
width="54"
|
|
53
|
+
height="54"
|
|
54
|
+
rx="27"
|
|
55
|
+
transform="translate(8 8)"
|
|
56
|
+
fill="#d0d0e3"
|
|
57
|
+
/>
|
|
58
|
+
</g>
|
|
59
|
+
<path
|
|
60
|
+
id="sun"
|
|
61
|
+
d="M4.914,11.712a.971.971,0,0,0-.971-.971H2.971a.971.971,0,0,0,0,1.942h.971A.971.971,0,0,0,4.914,11.712Zm.622,4.856-.69.69a.968.968,0,0,0,1.369,1.369l.69-.69a.971.971,0,0,0-1.369-1.369ZM11.712,4.914a.971.971,0,0,0,.971-.971V2.971a.971.971,0,0,0-1.942,0v.971A.971.971,0,0,0,11.712,4.914Zm5.5,2.273a.971.971,0,0,0,.68-.282l.69-.69a.971.971,0,1,0-1.369-1.369l-.641.69a.967.967,0,0,0,.641,1.651ZM5.555,6.9A.968.968,0,0,0,6.924,5.535l-.69-.69A.975.975,0,0,0,4.846,6.215Zm14.9,3.836h-.971a.971.971,0,0,0,0,1.942h.971a.971.971,0,0,0,0-1.942Zm-2.564,5.827a.971.971,0,0,0-1.321,1.321l.69.69a.968.968,0,1,0,1.369-1.369ZM11.712,6.37a5.342,5.342,0,1,0,5.342,5.342A5.342,5.342,0,0,0,11.712,6.37Zm0,8.741a3.4,3.4,0,1,1,3.4-3.4,3.4,3.4,0,0,1-3.4,3.4Zm0,3.4a.971.971,0,0,0-.971.971v.971a.971.971,0,0,0,1.942,0v-.971A.971.971,0,0,0,11.712,18.51Z"
|
|
62
|
+
transform="translate(1863.288 1023.288)"
|
|
63
|
+
fill="#323167"
|
|
64
|
+
/>
|
|
65
|
+
</g>
|
|
66
|
+
</svg>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { useTheme } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export const Union4Icon = ({ size = 32 }) => {
|
|
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 287.642 400"
|
|
11
|
+
style={{
|
|
12
|
+
stroke: color,
|
|
13
|
+
}}
|
|
14
|
+
>
|
|
15
|
+
<defs>
|
|
16
|
+
<linearGradient
|
|
17
|
+
id="linear-gradient"
|
|
18
|
+
x1="0.5"
|
|
19
|
+
x2="0.5"
|
|
20
|
+
y2="1"
|
|
21
|
+
gradientUnits="objectBoundingBox"
|
|
22
|
+
>
|
|
23
|
+
<stop offset="0" stop-color="#cba100" />
|
|
24
|
+
<stop offset="1" stop-color="#f8d759" />
|
|
25
|
+
</linearGradient>
|
|
26
|
+
</defs>
|
|
27
|
+
<path
|
|
28
|
+
id="Union_4"
|
|
29
|
+
data-name="Union 4"
|
|
30
|
+
d="M241.763,400h.02Zm-96.968,0-.972-1.343L142.847,400H45.879l-.015-.024L73.94,361.328l20.405-28.086.02.024.972-1.338L0,200.7l.972-.7H96.445l47.378,65.2L191.2,200l-47.373-65.2L96.445,200H.972L0,199.3,95.337,68.071l-.972-1.338-.02.024L45.864.024,45.884,0h96.963l.977,1.343L144.795,0h96.968l.02.024L193.3,66.758l-.02-.024-.972,1.338L287.642,199.3l-.967.7.967.7L192.3,331.929l.972,1.338.02-.024,48.486,66.733-.02.024ZM45.864,0h.02Z"
|
|
31
|
+
fill="url(#linear-gradient)"
|
|
32
|
+
/>
|
|
33
|
+
</svg>
|
|
34
|
+
);
|
|
35
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useTheme } from "@mui/material";
|
|
2
|
+
|
|
3
|
+
export const XIcon = ({ size = 32 }) => {
|
|
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 689.881 714.902"
|
|
11
|
+
style={{
|
|
12
|
+
stroke: color,
|
|
13
|
+
}}
|
|
14
|
+
>
|
|
15
|
+
<path
|
|
16
|
+
id="Subtraction_130"
|
|
17
|
+
data-name="Subtraction 130"
|
|
18
|
+
d="M-3274.271-9547.1h-168.235l-99.271-136.635,86.525-119.091,184.132,253.437-3.152,2.289Zm-515.342,0h-168.234l-3.152-2.289,258.416-355.679L-3961-10260.741l1.733-1.259h170.4l172.806,237.845.035-.048,86.524,119.09-.035.049.12.164-86.525,119.091-.118-.162L-3789.613-9547.1h0Zm333.661-459.245h0l-86.525-119.091,99.222-136.567h170.4l1.733,1.259-184.833,254.4Z"
|
|
19
|
+
transform="translate(3961 10262)"
|
|
20
|
+
fill="#1e1ef5"
|
|
21
|
+
/>
|
|
22
|
+
</svg>
|
|
23
|
+
);
|
|
24
|
+
};
|
|
@@ -1,35 +1,44 @@
|
|
|
1
1
|
import { ActiveDevicesIcon } from "./IconComponents/ActiveDevicesIcon";
|
|
2
|
+
import { AdministratorIcon } from "./IconComponents/AdministratorIcon";
|
|
2
3
|
import { AppsIcon } from "./IconComponents/AppsIcon";
|
|
4
|
+
import { BulbIcon } from "./IconComponents/BulbIcon";
|
|
5
|
+
import { CampxFullLogoIcon } from "./IconComponents/CampxFullLogoIcon";
|
|
6
|
+
import { CampxIcon } from "./IconComponents/CampxIcon";
|
|
3
7
|
import { CareerIcon } from "./IconComponents/CareerIcon";
|
|
4
8
|
import { CheckedCheckboxIcon } from "./IconComponents/CheckedCheckBoxIcon";
|
|
5
9
|
import { CheckedRadioIcon } from "./IconComponents/CheckedRadioIcon";
|
|
6
10
|
import { ClogWheelIcon } from "./IconComponents/ClogWheelIcon";
|
|
11
|
+
import { CommutexIcon } from "./IconComponents/CommutexIcon";
|
|
12
|
+
import { CrossIcon } from "./IconComponents/CrossIcon";
|
|
7
13
|
import { DashBoardIcon } from "./IconComponents/DashBoardIcon";
|
|
8
14
|
import { DeviceIcon } from "./IconComponents/DeviceIcon";
|
|
15
|
+
import { EnrollxIcon } from "./IconComponents/EnrollIcon";
|
|
9
16
|
import { ExamResultIcon } from "./IconComponents/ExamResultIcon";
|
|
17
|
+
import { ExamxIcon } from "./IconComponents/ExamxIcon";
|
|
10
18
|
import { ExportIcon } from "./IconComponents/ExportIcon";
|
|
11
19
|
import { FilterIcon } from "./IconComponents/FilterIcon";
|
|
12
20
|
import { HelpIcon } from "./IconComponents/HelpIcon";
|
|
13
21
|
import { HomeIcon } from "./IconComponents/HomeIcon";
|
|
22
|
+
import { HostelxIcon } from "./IconComponents/HostelxIcon";
|
|
14
23
|
import { InfoIcon } from "./IconComponents/InfoIcon";
|
|
15
|
-
|
|
16
|
-
import { BulbIcon } from "./IconComponents/BulbIcon";
|
|
17
|
-
import { CampxIcon } from "./IconComponents/CampxIcon";
|
|
18
|
-
import { CrossIcon } from "./IconComponents/CrossIcon";
|
|
19
24
|
import { InstitutionsIcon } from "./IconComponents/InstitutionsIcon";
|
|
20
25
|
import { LeftIcon } from "./IconComponents/LeftIcon";
|
|
21
26
|
import { LocationIcon } from "./IconComponents/LocationIcon";
|
|
22
27
|
import { LogoutIcon } from "./IconComponents/LogoutIcon";
|
|
23
28
|
import { NavigationIcon } from "./IconComponents/NavigationIcon";
|
|
24
29
|
import { NotificationIcon } from "./IconComponents/NotificationIcon";
|
|
30
|
+
import { PayxIcon } from "./IconComponents/PayxIcon";
|
|
31
|
+
import { PeoplexIcon } from "./IconComponents/PeoplexIcon";
|
|
25
32
|
import { ProductFeaturesIcon } from "./IconComponents/ProductFeaturesIcon";
|
|
26
33
|
import { ProfileIcon } from "./IconComponents/ProfileIcon";
|
|
27
34
|
import { RightIcon } from "./IconComponents/RightIcon";
|
|
28
35
|
import { TicketsIcon } from "./IconComponents/TicketsIcon";
|
|
36
|
+
import { ToursIcon } from "./IconComponents/ToursIcon";
|
|
29
37
|
import { UnCheckedCheckboxIcon } from "./IconComponents/UncheckCheckBoxIcon";
|
|
30
38
|
import { UnCheckedRadioIcon } from "./IconComponents/UncheckedRadioIcon";
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
39
|
+
import { Union4Icon } from "./IconComponents/Union4Icon";
|
|
40
|
+
import { XIcon } from "./IconComponents/XIcon";
|
|
41
|
+
|
|
33
42
|
export const Icons = {
|
|
34
43
|
AppsIcon,
|
|
35
44
|
CareerIcon,
|
|
@@ -62,4 +71,13 @@ export const Icons = {
|
|
|
62
71
|
CampxIcon,
|
|
63
72
|
AdministratorIcon,
|
|
64
73
|
CampxFullLogoIcon,
|
|
74
|
+
CommutexIcon,
|
|
75
|
+
EnrollxIcon,
|
|
76
|
+
PeoplexIcon,
|
|
77
|
+
PayxIcon,
|
|
78
|
+
HostelxIcon,
|
|
79
|
+
ExamxIcon,
|
|
80
|
+
Union4Icon,
|
|
81
|
+
XIcon,
|
|
82
|
+
ToursIcon,
|
|
65
83
|
};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { axios } from "@campxdev/campx-web-utils";
|
|
2
|
+
import { IconButton } from "@mui/material";
|
|
3
|
+
import { ReactNode, useEffect, useState, useCallback } from "react";
|
|
4
|
+
import ReactJoyride, { Step, CallBackProps, ACTIONS } from "react-joyride";
|
|
5
|
+
import { ToursIcon } from "../../Assets/Icons/IconComponents/ToursIcon";
|
|
6
|
+
import { Tooltip } from "../Tooltip/Tooltip";
|
|
7
|
+
import { Typography } from "../../DataDisplay/Typography/Typography";
|
|
8
|
+
|
|
9
|
+
export interface TutorialProps {
|
|
10
|
+
steps: Step[];
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
tourName: string;
|
|
13
|
+
iconPosition?: "left" | "right";
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const Tutorial = ({
|
|
17
|
+
steps,
|
|
18
|
+
children,
|
|
19
|
+
tourName,
|
|
20
|
+
iconPosition = "right",
|
|
21
|
+
}: TutorialProps) => {
|
|
22
|
+
const [run, setRun] = useState(false);
|
|
23
|
+
const userTours = localStorage.getItem("userTours") || "[]";
|
|
24
|
+
|
|
25
|
+
const startTour = useCallback(() => {
|
|
26
|
+
setRun(true);
|
|
27
|
+
}, []);
|
|
28
|
+
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (userTours && !userTours.includes(tourName)) {
|
|
31
|
+
startTour();
|
|
32
|
+
}
|
|
33
|
+
}, [userTours, tourName, startTour]);
|
|
34
|
+
|
|
35
|
+
const handleJoyrideCallback = (data: CallBackProps) => {
|
|
36
|
+
const { action, status } = data;
|
|
37
|
+
|
|
38
|
+
if (action === ACTIONS.RESET) {
|
|
39
|
+
setRun(false);
|
|
40
|
+
completeTour().catch((err) => {
|
|
41
|
+
console.error("Failed to mark tour as complete:", err);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const completeTour = async () => {
|
|
47
|
+
try {
|
|
48
|
+
if (!userTours.includes(tourName)) {
|
|
49
|
+
localStorage.setItem(
|
|
50
|
+
"userTours",
|
|
51
|
+
JSON.stringify([...JSON.parse(userTours), tourName])
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
await axios.post("/square/tours/complete", { tourName });
|
|
55
|
+
} catch (error) {
|
|
56
|
+
console.error("Error completing the tour:", error);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
return (
|
|
61
|
+
<div style={{ textAlign: iconPosition }}>
|
|
62
|
+
<Tooltip
|
|
63
|
+
title={<Typography variant="body1">Start Tour</Typography>}
|
|
64
|
+
placement="left"
|
|
65
|
+
>
|
|
66
|
+
<IconButton
|
|
67
|
+
onClick={startTour}
|
|
68
|
+
style={{ cursor: "pointer" }}
|
|
69
|
+
aria-label={`Start ${tourName} tour`}
|
|
70
|
+
>
|
|
71
|
+
<ToursIcon />
|
|
72
|
+
</IconButton>
|
|
73
|
+
</Tooltip>
|
|
74
|
+
|
|
75
|
+
<ReactJoyride
|
|
76
|
+
callback={handleJoyrideCallback}
|
|
77
|
+
steps={steps}
|
|
78
|
+
continuous={true}
|
|
79
|
+
run={run}
|
|
80
|
+
showSkipButton={true}
|
|
81
|
+
locale={{
|
|
82
|
+
last: "Finish",
|
|
83
|
+
next: "Next",
|
|
84
|
+
skip: "Skip",
|
|
85
|
+
back: "Previous",
|
|
86
|
+
}}
|
|
87
|
+
styles={{
|
|
88
|
+
buttonNext: {
|
|
89
|
+
backgroundColor: "#D27D2D",
|
|
90
|
+
color: "white",
|
|
91
|
+
height: "28px",
|
|
92
|
+
width: "100px",
|
|
93
|
+
padding: "0px",
|
|
94
|
+
fontFamily: "Roboto, sans-serif",
|
|
95
|
+
},
|
|
96
|
+
buttonBack: {
|
|
97
|
+
backgroundColor: "transparent",
|
|
98
|
+
color: "black",
|
|
99
|
+
borderRadius: "4px",
|
|
100
|
+
height: "28px",
|
|
101
|
+
width: "100px",
|
|
102
|
+
gap: "10px",
|
|
103
|
+
marginLeft: "5px",
|
|
104
|
+
padding: "0px",
|
|
105
|
+
border: "1px solid black",
|
|
106
|
+
fontFamily: "Roboto, sans-serif",
|
|
107
|
+
},
|
|
108
|
+
}}
|
|
109
|
+
/>
|
|
110
|
+
{children}
|
|
111
|
+
</div>
|
|
112
|
+
);
|
|
113
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Tutorial } from "../../components/Feedback/Tutorial/Tutorial";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Feedback/Tutorial",
|
|
6
|
+
component: Tutorial,
|
|
7
|
+
parameters: {
|
|
8
|
+
controls: {
|
|
9
|
+
exclude: ["children"],
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
iconPosition: {
|
|
14
|
+
control: { type: "radio" },
|
|
15
|
+
options: ["left", "right"],
|
|
16
|
+
defaultValue: "right",
|
|
17
|
+
},
|
|
18
|
+
tourName: { control: "text" },
|
|
19
|
+
steps: { control: "object" },
|
|
20
|
+
},
|
|
21
|
+
} as Meta<typeof Tutorial>;
|
|
22
|
+
|
|
23
|
+
export const PrimaryTutorial: StoryObj<typeof Tutorial> = {
|
|
24
|
+
render: (args) => (
|
|
25
|
+
<div>
|
|
26
|
+
{/* Placeholder elements for the tutorial */}
|
|
27
|
+
<div
|
|
28
|
+
className="tutorial-target"
|
|
29
|
+
style={{ margin: "20px", border: "2px solid blue", padding: "10px" }}
|
|
30
|
+
>
|
|
31
|
+
Target 1: This element is the first target of the tutorial.
|
|
32
|
+
</div>
|
|
33
|
+
<div
|
|
34
|
+
className="next-target"
|
|
35
|
+
style={{ margin: "20px", border: "2px solid green", padding: "10px" }}
|
|
36
|
+
>
|
|
37
|
+
Target 2: This element is the next target of the tutorial.
|
|
38
|
+
</div>
|
|
39
|
+
|
|
40
|
+
<Tutorial {...args} />
|
|
41
|
+
</div>
|
|
42
|
+
),
|
|
43
|
+
args: {
|
|
44
|
+
tourName: "Active Batches",
|
|
45
|
+
steps: [
|
|
46
|
+
{
|
|
47
|
+
target: ".tutorial-target",
|
|
48
|
+
content: "This is my first step",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
target: ".next-target",
|
|
52
|
+
content: "This is the next step",
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
};
|
|
@@ -187,8 +187,7 @@ export const getCommonTheme = (mode: Theme) => {
|
|
|
187
187
|
styleOverrides: {
|
|
188
188
|
tooltip: {
|
|
189
189
|
backgroundColor: ColorTokens.surface.paperBackground,
|
|
190
|
-
padding: "20px
|
|
191
|
-
minWidth: "300px",
|
|
190
|
+
padding: "20px 20px",
|
|
192
191
|
boxShadow: `0px 2px 5px ${ColorTokens.secondary.main}`,
|
|
193
192
|
border: `1px solid ${ColorTokens.secondary.main}`,
|
|
194
193
|
},
|
|
File without changes
|