l-min-components 0.2.0

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.
Files changed (137) hide show
  1. package/package.json +38 -0
  2. package/src/assets/Icon.svg +3 -0
  3. package/src/assets/friendrequest.png +0 -0
  4. package/src/assets/images/User-avatar.svg.png +0 -0
  5. package/src/assets/images/Vector19.png +0 -0
  6. package/src/assets/images/android.png +0 -0
  7. package/src/assets/images/avatar.png +0 -0
  8. package/src/assets/images/banner.png +0 -0
  9. package/src/assets/images/dashboardImage.png +0 -0
  10. package/src/assets/images/figma.png +0 -0
  11. package/src/assets/images/linkedin.png +0 -0
  12. package/src/assets/images/logo.png +0 -0
  13. package/src/assets/images/onboarding.png +0 -0
  14. package/src/assets/images/sign_up.png +0 -0
  15. package/src/assets/react.svg +1 -0
  16. package/src/assets/svg/Frame 4534413.svg +7 -0
  17. package/src/assets/svg/Property 44.svg +5 -0
  18. package/src/assets/svg/Property 55.svg +10 -0
  19. package/src/assets/svg/add.jsx +14 -0
  20. package/src/assets/svg/arrow-down.jsx +14 -0
  21. package/src/assets/svg/arrow-right.svg +4 -0
  22. package/src/assets/svg/book.jsx +34 -0
  23. package/src/assets/svg/calendar.jsx +64 -0
  24. package/src/assets/svg/close.jsx +15 -0
  25. package/src/assets/svg/coolicon.svg +3 -0
  26. package/src/assets/svg/download.jsx +32 -0
  27. package/src/assets/svg/eos-icons_machine-learning-outlined.svg +6 -0
  28. package/src/assets/svg/learning.jsx +21 -0
  29. package/src/assets/svg/logout.svg +5 -0
  30. package/src/assets/svg/material-symbols_spatial-audio-outline-rounded.svg +3 -0
  31. package/src/assets/svg/message.jsx +39 -0
  32. package/src/assets/svg/notification.jsx +32 -0
  33. package/src/assets/svg/people.jsx +17 -0
  34. package/src/assets/svg/search.jsx +24 -0
  35. package/src/assets/svg/setting.jsx +14 -0
  36. package/src/components/ApiProgress/ApiConsumption/assets/Vector.jsx +8 -0
  37. package/src/components/ApiProgress/ApiConsumption/index.jsx +60 -0
  38. package/src/components/ApiProgress/ApiConsumption/styles/index.jsx +61 -0
  39. package/src/components/ApiProgress/ApiProgressBar/index.jsx +99 -0
  40. package/src/components/ApiProgress/ApiProgressBar/styles/index.jsx +122 -0
  41. package/src/components/ApiProgress/toggle/index.jsx +34 -0
  42. package/src/components/ApiProgress/toggle/styles/index.jsx +72 -0
  43. package/src/components/AppMainLayout/index.jsx +50 -0
  44. package/src/components/AppMainLayout/index.styled.js +37 -0
  45. package/src/components/Arrow.jsx +24 -0
  46. package/src/components/apiBar/bar.jsx +46 -0
  47. package/src/components/apiBar/index.jsx +55 -0
  48. package/src/components/authentication/assets/images/sign_up.png +0 -0
  49. package/src/components/authentication/index.styled.js +32 -0
  50. package/src/components/authentication/mainLayout.jsx +14 -0
  51. package/src/components/banner/assets/Vector19.png +0 -0
  52. package/src/components/banner/assets/banner.png +0 -0
  53. package/src/components/banner/index.jsx +41 -0
  54. package/src/components/banner/styles/index.jsx +81 -0
  55. package/src/components/bar/styles.css +19 -0
  56. package/src/components/button/index.jsx +329 -0
  57. package/src/components/button/socialBtn.jsx +38 -0
  58. package/src/components/calender/input.jsx +202 -0
  59. package/src/components/calender/styles/input.jsx +127 -0
  60. package/src/components/checkBoxes/checkbox/doc.md +36 -0
  61. package/src/components/checkBoxes/checkbox/index.jsx +53 -0
  62. package/src/components/checkBoxes/checkbox/styles/index.jsx +64 -0
  63. package/src/components/checkBoxes/checkboxGroup/doc.md +55 -0
  64. package/src/components/checkBoxes/checkboxGroup/index.jsx +47 -0
  65. package/src/components/checkBoxes/checkboxGroup/styles/index.jsx +7 -0
  66. package/src/components/course/courseList/index.jsx +32 -0
  67. package/src/components/course/courseList/styles/index.jsx +10 -0
  68. package/src/components/course/coursecard/index.jsx +56 -0
  69. package/src/components/course/coursecard/styles/index.jsx +70 -0
  70. package/src/components/developerAPIdocs/assets/icons.jsx +46 -0
  71. package/src/components/developerAPIdocs/assets/learngual_developer_api_doc.png +0 -0
  72. package/src/components/developerAPIdocs/index.jsx +154 -0
  73. package/src/components/developerAPIdocs/index.styled.js +137 -0
  74. package/src/components/dropdown component/index.jsx +139 -0
  75. package/src/components/dropdown component/styles.js +82 -0
  76. package/src/components/friendRequest/friendRequestCard/doc.md +49 -0
  77. package/src/components/friendRequest/friendRequestCard/index.jsx +82 -0
  78. package/src/components/friendRequest/friendRequestCard/styles/index.jsx +109 -0
  79. package/src/components/friendRequest/friendRequestList/doc.md +61 -0
  80. package/src/components/friendRequest/friendRequestList/index.jsx +58 -0
  81. package/src/components/friendRequest/friendRequestList/styles/index.jsx +34 -0
  82. package/src/components/graph/graphData.jsx +119 -0
  83. package/src/components/graph/index.jsx +111 -0
  84. package/src/components/graph/index.styled.js +261 -0
  85. package/src/components/header/account-dropdown.jsx +86 -0
  86. package/src/components/header/assets/images/User-avatar.svg.png +0 -0
  87. package/src/components/header/assets/images/android.png +0 -0
  88. package/src/components/header/assets/images/avatar.png +0 -0
  89. package/src/components/header/assets/images/figma.png +0 -0
  90. package/src/components/header/assets/images/linkedin.png +0 -0
  91. package/src/components/header/assets/images/logo.png +0 -0
  92. package/src/components/header/assets/images/sign_up.png +0 -0
  93. package/src/components/header/assets/svg/add.jsx +14 -0
  94. package/src/components/header/assets/svg/arrow-down.jsx +14 -0
  95. package/src/components/header/assets/svg/book.jsx +34 -0
  96. package/src/components/header/assets/svg/close.jsx +15 -0
  97. package/src/components/header/assets/svg/coolicon.svg +3 -0
  98. package/src/components/header/assets/svg/message.jsx +39 -0
  99. package/src/components/header/assets/svg/notification.jsx +32 -0
  100. package/src/components/header/assets/svg/people.jsx +17 -0
  101. package/src/components/header/assets/svg/search.jsx +24 -0
  102. package/src/components/header/assets/svg/setting.jsx +14 -0
  103. package/src/components/header/index.jsx +134 -0
  104. package/src/components/header/index.styled.js +486 -0
  105. package/src/components/header/login-header.jsx +71 -0
  106. package/src/components/input/index.jsx +68 -0
  107. package/src/components/input/index.styled.js +45 -0
  108. package/src/components/loader/index.jsx +70 -0
  109. package/src/components/notificationProgressBar/index.jsx +187 -0
  110. package/src/components/notificationProgressBar/styles/index.jsx +122 -0
  111. package/src/components/notificationThreshold/index.jsx +111 -0
  112. package/src/components/notificationThreshold/index.styled.js +129 -0
  113. package/src/components/notificationThreshold/slider.jsx +46 -0
  114. package/src/components/progressBar/index.jsx +32 -0
  115. package/src/components/progressBar/styles/index.jsx +44 -0
  116. package/src/components/radio/doc.md +41 -0
  117. package/src/components/radio/index.jsx +70 -0
  118. package/src/components/radio/styles/index.jsx +56 -0
  119. package/src/components/searchBar/doc.md +68 -0
  120. package/src/components/searchBar/index.jsx +108 -0
  121. package/src/components/searchBar/styles/index.jsx +89 -0
  122. package/src/components/select/doc.md +0 -0
  123. package/src/components/select/index.jsx +122 -0
  124. package/src/components/select/styles/index.jsx +98 -0
  125. package/src/components/sideBar/sideMenu/index.jsx +95 -0
  126. package/src/components/sideBar/sideMenu/styles/index.jsx +135 -0
  127. package/src/components/sideBar/userCard/index.jsx +32 -0
  128. package/src/components/sideBar/userCard/styles/index.jsx +37 -0
  129. package/src/components/sideNav/index.jsx +28 -0
  130. package/src/components/sideNav/styles/index.jsx +159 -0
  131. package/src/components/subscriptionPreview/index.jsx +55 -0
  132. package/src/components/subscriptionPreview/style/style.js +85 -0
  133. package/src/components/successCard/assets/PartyingFace.png +0 -0
  134. package/src/components/successCard/index.jsx +29 -0
  135. package/src/components/successCard/index.styled.js +33 -0
  136. package/src/components/toggle button/index.jsx +43 -0
  137. package/src/components/toggle button/styles.js +26 -0
@@ -0,0 +1,99 @@
1
+ import React, { useState } from "react";
2
+ import PropTypes from "prop-types";
3
+ import {
4
+ Container,
5
+ HandleValue,
6
+ MaxValue,
7
+ MinValue,
8
+ ProgressBarAvailable,
9
+ ProgressBarContainer,
10
+ ProgressBarTotal,
11
+ ProgressBarUsed,
12
+ ProgressHandle,
13
+ } from "./styles";
14
+
15
+ const defaultSize = "md";
16
+
17
+ const ProgressBar = ({
18
+ total,
19
+ used,
20
+ available,
21
+ max,
22
+ size,
23
+ disabled,
24
+ onAdjust,
25
+ }) => {
26
+ const [handlePosition, setHandlePosition] = useState((used / max) * 100);
27
+
28
+ const handleAdjust = (e) => {
29
+ if (!disabled) {
30
+ const containerWidth = e.currentTarget.offsetWidth;
31
+ const newPosition = Math.min(
32
+ 100,
33
+ Math.max(
34
+ 0,
35
+ ((e.clientX - e.currentTarget.getBoundingClientRect().left) /
36
+ containerWidth) *
37
+ 100
38
+ )
39
+ );
40
+ setHandlePosition(newPosition);
41
+ const newUsed = Math.floor((newPosition / 100) * max);
42
+ onAdjust(newUsed);
43
+ }
44
+ };
45
+
46
+ const usedWidth = (used / total) * 100;
47
+ const availableWidth = (available / max) * 100;
48
+
49
+ return (
50
+ <Container disabled={disabled}>
51
+ <ProgressBarContainer
52
+ onClick={handleAdjust}
53
+ disabled={disabled}
54
+ size={size}
55
+ >
56
+ <ProgressBarTotal
57
+ color="#FEBF10"
58
+ width={100}
59
+ left={0}
60
+ disabled={disabled}
61
+ />
62
+ <ProgressBarUsed
63
+ color="#30D568"
64
+ width={usedWidth}
65
+ left={0}
66
+ disabled={disabled}
67
+ />
68
+ <ProgressBarAvailable
69
+ color="#00C2C2"
70
+ width={availableWidth}
71
+ left={0}
72
+ disabled={disabled}
73
+ />
74
+ <ProgressHandle left={handlePosition} disabled={disabled}>
75
+ <HandleValue disabled={disabled}>{used}</HandleValue>
76
+ </ProgressHandle>
77
+ <MinValue disabled={disabled}>{0}</MinValue>
78
+ <MaxValue disabled={disabled}>{max}</MaxValue>
79
+ </ProgressBarContainer>
80
+ </Container>
81
+ );
82
+ };
83
+
84
+ ProgressBar.propTypes = {
85
+ total: PropTypes.number,
86
+ used: PropTypes.number,
87
+ available: PropTypes.number,
88
+ max: PropTypes.number,
89
+ size: PropTypes.oneOf(["xs", "sm", "md", "lg", "xl"]),
90
+ disabled: PropTypes.bool,
91
+ onAdjust: PropTypes.func,
92
+ };
93
+
94
+ ProgressBar.defaultProps = {
95
+ size: defaultSize,
96
+ disabled: false,
97
+ };
98
+
99
+ export default ProgressBar;
@@ -0,0 +1,122 @@
1
+ import styled from "styled-components";
2
+
3
+ export const sizes = {
4
+ xs: {
5
+ height: "8px",
6
+ borderRadius: "4px",
7
+ },
8
+ sm: {
9
+ height: "12px",
10
+ borderRadius: "6px",
11
+ },
12
+ md: {
13
+ height: "16px",
14
+ borderRadius: "8px",
15
+ },
16
+ lg: {
17
+ height: "24px",
18
+ borderRadius: "12px",
19
+ },
20
+ xl: {
21
+ height: "32px",
22
+ borderRadius: "16px",
23
+ },
24
+ };
25
+
26
+ export const Container = styled.div`
27
+ width: 100%;
28
+ padding: 32px 37px 48px;
29
+ border-radius: 22px;
30
+ display: flex;
31
+ justify-content: center;
32
+ align-items: center;
33
+
34
+ background-color: ${(props) =>
35
+ props.disabled ? "transparent" : "rgba(0, 194, 194, 0.06)"};
36
+ border: 0.552705px solid
37
+ ${(props) => (props.disabled ? "#fff" : "#00C2C2")};
38
+ position: relative;
39
+
40
+ .switch {
41
+ position: absolute;
42
+ top: 10px;
43
+ left: 10px;
44
+ }
45
+ `;
46
+ export const ProgressBarContainer = styled.div`
47
+ position: relative;
48
+ width: 100%;
49
+ height: ${(props) => sizes[props.size].height};
50
+ border-radius: ${(props) => sizes[props.size].borderRadius};
51
+ `;
52
+
53
+ export const ProgressBarTotal = styled.div`
54
+ position: absolute;
55
+ height: 100%;
56
+ border-radius: 10px;
57
+ background-color: ${(props) => (props.disabled ? "rgba(255, 255, 255, 0.069)" : props.color)};
58
+ left: ${(props) => props.left}%;
59
+ width: ${(props) => props.width}%;
60
+ z-index: 1;
61
+ `;
62
+
63
+ export const ProgressBarUsed = styled(ProgressBarTotal)`
64
+ background-color: ${(props) => (props.disabled ? "#ffffff" : props.color)};
65
+ z-index: 2;
66
+ `;
67
+
68
+ export const ProgressBarAvailable = styled(ProgressBarTotal)`
69
+ background-color: ${(props) =>
70
+ props.disabled ? "rgba(255, 255, 255, 0.069)" : props.color};
71
+ left: ${(props) => props.left}%;
72
+ width: ${(props) => props.width}%;
73
+ z-index: 1;
74
+ `;
75
+
76
+ export const ProgressHandle = styled.div`
77
+ position: absolute;
78
+ top: 50%;
79
+ left: ${(props) => props.left - "0.5"}%;
80
+ ${(props) =>
81
+ props.disabled
82
+ ? ``
83
+ : `
84
+ width: 20px;
85
+ height: 20px;
86
+ border-radius: 50%;
87
+ background-color: white;
88
+ border: 2px solid rgba(0, 194, 194, 1);
89
+ `}
90
+
91
+ transform: translate(-50%, -50%);
92
+ cursor: pointer;
93
+ display: flex;
94
+ /* visibility: ${(props) => (props.disabled ? "hidden" : "visible")}; */
95
+ flex-direction: column;
96
+ align-items: center;
97
+ justify-content: center;
98
+ z-index: 3;
99
+ `;
100
+
101
+ export const HandleValue = styled.div`
102
+ position: absolute;
103
+ bottom: -30px;
104
+ font-size: 12px;
105
+ color: ${(props) => (props.disabled ? "#ffffff" : props.color)};
106
+ `;
107
+
108
+ export const MinValue = styled.span`
109
+ position: absolute;
110
+ left: 0;
111
+ bottom: -30px;
112
+ font-size: 12px;
113
+ color: ${(props) => (props.disabled ? "#ffffff" : props.color)};
114
+ `;
115
+
116
+ export const MaxValue = styled.span`
117
+ position: absolute;
118
+ right: 0;
119
+ bottom: -30px;
120
+ font-size: 12px;
121
+ color: ${(props) => (props.disabled ? "#ffffff" : props.color)};
122
+ `;
@@ -0,0 +1,34 @@
1
+ import React, { useState } from "react";
2
+ import {
3
+ SwitchContainer,
4
+ SwitchInput,
5
+ SwitchLabel,
6
+ SwitchSlider,
7
+ } from "./styles";
8
+
9
+ const Switch = ({ defaultChecked, color, icon, onChange }) => {
10
+ const [checked, setChecked] = useState(defaultChecked);
11
+
12
+ const handleChange = (e) => {
13
+ setChecked(e.target.checked);
14
+ onChange && onChange(e);
15
+ };
16
+
17
+ return (
18
+ <SwitchContainer>
19
+ <SwitchLabel>
20
+ <SwitchInput
21
+ type="checkbox"
22
+ checked={checked}
23
+ color={color}
24
+ onChange={handleChange}
25
+ />
26
+ <SwitchSlider color={color}>
27
+ <div className="icon">{icon}</div>
28
+ </SwitchSlider>
29
+ </SwitchLabel>
30
+ </SwitchContainer>
31
+ );
32
+ };
33
+
34
+ export default Switch;
@@ -0,0 +1,72 @@
1
+ import styled from "styled-components";
2
+
3
+ export const SwitchContainer = styled.div`
4
+ display: flex;
5
+ align-items: center;
6
+ `;
7
+
8
+ export const SwitchLabel = styled.label`
9
+ position: relative;
10
+ display: inline-block;
11
+ width: 50px;
12
+ height: 24px;
13
+ `;
14
+
15
+ export const SwitchSlider = styled.span`
16
+ position: absolute;
17
+ cursor: pointer;
18
+ top: 0;
19
+ left: 0;
20
+ right: 0;
21
+ bottom: 0;
22
+ background-color: ${({ color }) => color};
23
+ -webkit-transition: 0.4s;
24
+ transition: 0.4s;
25
+ border-radius: 34px;
26
+
27
+ .icon {
28
+ position: absolute;
29
+ content: "";
30
+ height: 16px;
31
+ width: 16px;
32
+ right: 4px;
33
+ bottom: 4px;
34
+ display: flex;
35
+ justify-content: center;
36
+ align-items: center;
37
+ background-color: #dfe5e5;
38
+
39
+ color: transparent;
40
+ -webkit-transition: 0.4s;
41
+ transition: 0.4s;
42
+ border-radius: 50%;
43
+ }
44
+ `;
45
+
46
+ export const SwitchInput = styled.input`
47
+ opacity: 0;
48
+ width: 0;
49
+ height: 0;
50
+
51
+ &:not(:checked) + ${SwitchSlider} {
52
+ /* background-color: rgb(198, 204, 204); */
53
+
54
+ color: ${({ color }) => color};
55
+ .icon {
56
+ color: ${({ color }) => color};
57
+
58
+ background-color: #fff;
59
+ }
60
+ }
61
+ &:checked + ${SwitchSlider} {
62
+ background-color: ${({ color }) => (color ? "rgb(198, 204, 204)" : color)};
63
+ }
64
+
65
+ &:focus + ${SwitchSlider} {
66
+ box-shadow: 0 0 1px rgba(198, 204, 204, 0.3);
67
+ }
68
+
69
+ &:checked + ${SwitchSlider} .icon {
70
+ transform: translateX(-26px);
71
+ }
72
+ `;
@@ -0,0 +1,50 @@
1
+ import { useState, useEffect } from "react";
2
+ import { useLocation } from "react-router-dom";
3
+ import {
4
+ Layout,
5
+ CenterLayout,
6
+ LeftLayout,
7
+ RightLayout,
8
+ MainLayout,
9
+ } from "./index.styled";
10
+ import HeaderComponent from "../header";
11
+ import Banner from "../banner";
12
+ import SideBar from "../sideNav";
13
+ import { leftNavMenu, user, sideMenuOptions } from "../../hooks/leftNavMenu";
14
+ import SideMenu from "../sideBar/sideMenu";
15
+
16
+ const AppMainLayout = (props) => {
17
+ const [isOpen, setIsOpen] = useState(true);
18
+ const location = useLocation();
19
+
20
+ console.log(location);
21
+
22
+ useEffect(() => {
23
+ if (location.pathname === "/documentation") setIsOpen(false);
24
+ }, [isOpen]);
25
+
26
+ return (
27
+ <Layout>
28
+ <HeaderComponent />
29
+ <MainLayout>
30
+ <LeftLayout>
31
+ <SideBar routes={leftNavMenu} />
32
+ <SideMenu
33
+ user={user}
34
+ routes={sideMenuOptions}
35
+ userType={"developer"}
36
+ isOpen={isOpen}
37
+ setIsOpen={setIsOpen}
38
+ />
39
+ </LeftLayout>
40
+ <CenterLayout>{props.children}</CenterLayout>
41
+
42
+ <RightLayout>
43
+ <Banner />
44
+ </RightLayout>
45
+ </MainLayout>
46
+ </Layout>
47
+ );
48
+ };
49
+
50
+ export default AppMainLayout;
@@ -0,0 +1,37 @@
1
+ import styled from "styled-components";
2
+
3
+ /* styles for main layout component */
4
+ export const Layout = styled.div`
5
+ background-color: #e5e5e5;
6
+ min-height: 100vh;
7
+ width: 100%;
8
+ `;
9
+
10
+ export const MainLayout = styled.div`
11
+ background-color: #e5e5e5;
12
+ display: flex;
13
+ justify-content: space-between;
14
+ width: 100%;
15
+ padding: 84px 20px 20px 0;
16
+ `;
17
+
18
+ export const LeftLayout = styled.div`
19
+ background-color: transparent;
20
+ /* width: 100%;
21
+ max-width: 350px; */
22
+ `;
23
+
24
+ export const CenterLayout = styled.div`
25
+ width: 100%;
26
+ /* max-width: 900px; */
27
+ margin: 0 20px;
28
+ `;
29
+
30
+ export const RightLayout = styled.div`
31
+ width: 100%;
32
+ max-width: 232px;
33
+
34
+ > div {
35
+ width: 100%;
36
+ }
37
+ `;
@@ -0,0 +1,24 @@
1
+ const Arrow = () => {
2
+ return (
3
+ <svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
4
+ <path
5
+ d="M14.4301 5.93005L20.5001 12.0001L14.4301 18.0701"
6
+ stroke="#F5F7F7"
7
+ stroke-width="1.5"
8
+ stroke-miterlimit="10"
9
+ stroke-linecap="round"
10
+ stroke-linejoin="round"
11
+ />
12
+ <path
13
+ d="M3.5 12H20.33"
14
+ stroke="#F5F7F7"
15
+ stroke-width="1.5"
16
+ stroke-miterlimit="10"
17
+ stroke-linecap="round"
18
+ stroke-linejoin="round"
19
+ />
20
+ </svg>
21
+ );
22
+ };
23
+
24
+ export default Arrow;
@@ -0,0 +1,46 @@
1
+ import React, { useState } from 'react';
2
+
3
+ const Bar = () => {
4
+ const [width, setWidth] = useState(50); // initial width of the bar is 50%
5
+
6
+ const handleClick = (e) => {
7
+ const { width: barWidth, left } = e.currentTarget.getBoundingClientRect();
8
+ const newWidth = Math.floor((e.clientX - left) / barWidth * 100);
9
+ setWidth(newWidth);
10
+ }
11
+
12
+ return (
13
+ <div
14
+ style={{
15
+ width: '100%',
16
+ height: 30,
17
+ backgroundColor: 'lightgray',
18
+ position: 'relative'
19
+ }}
20
+ onClick={handleClick}
21
+ >
22
+ <div
23
+ style={{
24
+ width: `${width}%`,
25
+ height: '100%',
26
+ position: 'absolute',
27
+ top: 0,
28
+ left: 0,
29
+ backgroundColor: 'red'
30
+ }}
31
+ />
32
+ <div
33
+ style={{
34
+ width: `${100 - width}%`,
35
+ height: '100%',
36
+ position: 'absolute',
37
+ top: 0,
38
+ right: 0,
39
+ backgroundColor: 'blue'
40
+ }}
41
+ />
42
+ </div>
43
+ );
44
+ };
45
+
46
+ export default Bar;
@@ -0,0 +1,55 @@
1
+ import React, { useState, useEffect } from "react";
2
+ import styled from "styled-components";
3
+
4
+ const ProgressBarContainer = styled.div`
5
+ display: flex;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ `;
9
+
10
+ const ProgressBarInput = styled.input`
11
+ width: 100%;
12
+ `;
13
+
14
+ const ProgressBarFill = styled.div`
15
+ width: ${(props) => props.progress}%;
16
+ height: 30px;
17
+ border-radius: 5px;
18
+ background-color: ${(props) => props.color};
19
+ transition: width 0.5s ease-in-out;
20
+ `;
21
+
22
+ const ProgressBar = ({ initialProgress = 50 }) => {
23
+ const [progress, setProgress] = useState(initialProgress);
24
+ const [color, setColor] = useState("#6ab04c");
25
+
26
+ useEffect(() => {
27
+ if (progress < 30) {
28
+ setColor("#ff0000"); // Red
29
+ } else if (progress < 70) {
30
+ setColor("#ffa500"); // Orange
31
+ } else {
32
+ setColor("#6ab04c"); // Green
33
+ }
34
+ }, [progress]);
35
+
36
+ const handleSlide = (event) => {
37
+ const newProgress = Number(event.target.value);
38
+ setProgress(newProgress);
39
+ };
40
+
41
+ return (
42
+ <ProgressBarContainer>
43
+ <ProgressBarInput
44
+ type="range"
45
+ min="0"
46
+ max="100"
47
+ value={progress}
48
+ onChange={handleSlide}
49
+ />
50
+ <ProgressBarFill progress={progress} color={color} />
51
+ </ProgressBarContainer>
52
+ );
53
+ };
54
+
55
+ export default ProgressBar;
@@ -0,0 +1,32 @@
1
+ import styled from "styled-components";
2
+
3
+ /* styles for authentication main layout component */
4
+ export const Layout = styled.div`
5
+ /* background-color: #e5e5e5; */
6
+ display: flex;
7
+ justify-content: space-between;
8
+ min-height: calc(100vh - 89.5px);
9
+ padding-top: 88px;
10
+ `;
11
+
12
+ export const LeftLayout = styled.div`
13
+ background-color: transparent;
14
+ width: 40%;
15
+
16
+ background-image: url("../../assets/images/sign_up.png") !important;
17
+ background-position: center center !important;
18
+ background-repeat: no-repeat !important;
19
+ background-size: cover !important;
20
+
21
+ & img {
22
+ width: 100%;
23
+ }
24
+ `;
25
+
26
+ export const RightLayout = styled.div`
27
+ background-color: rgba(255, 255, 255, 1);
28
+ width: 60%;
29
+ border-radius: 20px;
30
+ padding: 35px;
31
+ margin: 25px 35px;
32
+ `;
@@ -0,0 +1,14 @@
1
+ import { Layout, LeftLayout, RightLayout } from "./index.styled";
2
+
3
+ const MainLayout = (props) => {
4
+ return (
5
+ <Layout>
6
+ <LeftLayout>
7
+ <img src={props.img} alt="authentication image" />
8
+ </LeftLayout>
9
+ <RightLayout>{props.children}</RightLayout>
10
+ </Layout>
11
+ );
12
+ };
13
+
14
+ export default MainLayout;
@@ -0,0 +1,41 @@
1
+ import {
2
+ AbsoluteSVG,
3
+ ArrowIcon,
4
+ BannerCTA,
5
+ BannerImage,
6
+ BannerSubtitle,
7
+ BannerTitle,
8
+ BannerWrapper,
9
+ } from "./styles";
10
+ import BannerImg from "./assets/banner.png";
11
+ import Button from "../button";
12
+ import { FaArrowRight } from "react-icons/fa";
13
+
14
+ const Banner = () => {
15
+ return (
16
+ <BannerWrapper>
17
+ <BannerTitle>Learn Languages, anytime, anywhere.</BannerTitle>
18
+ <BannerSubtitle>
19
+ Join millions of users from all over the world to learn foreign
20
+ languages
21
+ </BannerSubtitle>
22
+ <BannerImage src={BannerImg} alt="Banner" />
23
+ <Button
24
+ type="primary"
25
+ text="Get Started"
26
+ icon={{
27
+ jsx: FaArrowRight,
28
+ right: true,
29
+ }}
30
+ styles={{
31
+ marginTop: "29px",
32
+ fontSize: "16px",
33
+ width: "200px",
34
+ gap: "8px",
35
+ }}
36
+ />
37
+ </BannerWrapper>
38
+ );
39
+ };
40
+
41
+ export default Banner;