l-min-components 1.0.160 → 1.0.167
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 +3 -1
- package/src/components/dropdown component/index.jsx +18 -6
- package/src/components/dropdown component/styles.js +6 -3
- package/src/components/errorPage/errorPage.png +0 -0
- package/src/components/errorPage/index.jsx +46 -0
- package/src/components/errorPage/style.jsx +62 -0
- package/src/components/index.js +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "l-min-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.167",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"src/assets",
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
"preview": "vite preview"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
+
"axios": "^1.4.0",
|
|
16
|
+
"axios-hooks": "^4.0.0",
|
|
15
17
|
"chart.js": "^4.2.1",
|
|
16
18
|
"classnames": "^2.3.2",
|
|
17
19
|
"moment": "^2.29.4",
|
|
@@ -48,25 +48,34 @@ const DropDownComponent = (props) => {
|
|
|
48
48
|
<ControlInput
|
|
49
49
|
placeholder={props?.inputPlaceHolder || "Select Dropdown"}
|
|
50
50
|
type="text"
|
|
51
|
+
value={selected?.name}
|
|
51
52
|
onChange={(e) => {
|
|
52
53
|
setSearchParam(e.target.value);
|
|
53
54
|
}}
|
|
55
|
+
onClick={() => setDropdown(true)}
|
|
54
56
|
/>
|
|
55
57
|
) : (
|
|
56
|
-
<p onClick={() => setDropdown(!dropdown)}>
|
|
58
|
+
<p onClick={() => setDropdown(!dropdown)}>
|
|
59
|
+
{selected?.name || "Select Dropdown"}
|
|
60
|
+
</p>
|
|
57
61
|
)}
|
|
58
62
|
<DownIcon onClick={() => setDropdown(!dropdown)} />
|
|
59
63
|
{searchParam && dropdown && (
|
|
60
64
|
<DropDownContent>
|
|
61
65
|
{props?.dropdownData?.map((dropdownItem, idx) => {
|
|
62
|
-
if (
|
|
66
|
+
if (
|
|
67
|
+
props?.dropdownData[idx]?.name
|
|
68
|
+
?.toLowerCase()
|
|
69
|
+
.includes(searchParam?.toLowerCase())
|
|
70
|
+
)
|
|
63
71
|
return (
|
|
64
72
|
<DropDownItem
|
|
65
73
|
key={idx}
|
|
66
74
|
onClick={() => {
|
|
67
75
|
setSelected(dropdownItem);
|
|
68
76
|
setDropdown();
|
|
69
|
-
}}
|
|
77
|
+
}}
|
|
78
|
+
>
|
|
70
79
|
<span>{dropdownItem?.name}</span>
|
|
71
80
|
{selected === dropdownItem && <Tick />}
|
|
72
81
|
</DropDownItem>
|
|
@@ -83,7 +92,8 @@ const DropDownComponent = (props) => {
|
|
|
83
92
|
onClick={() => {
|
|
84
93
|
setSelected(dropdownItem);
|
|
85
94
|
setDropdown();
|
|
86
|
-
}}
|
|
95
|
+
}}
|
|
96
|
+
>
|
|
87
97
|
<span>{dropdownItem?.name}</span>
|
|
88
98
|
{selected === dropdownItem && <Tick />}
|
|
89
99
|
</DropDownItem>
|
|
@@ -105,7 +115,8 @@ export const DownIcon = ({ width, height, fill, onClick }) => {
|
|
|
105
115
|
viewBox="0 0 14 8"
|
|
106
116
|
fill="none"
|
|
107
117
|
xmlns="http://www.w3.org/2000/svg"
|
|
108
|
-
onClick={onClick}
|
|
118
|
+
onClick={onClick}
|
|
119
|
+
>
|
|
109
120
|
<path
|
|
110
121
|
d="M1 1L7 7L13 1"
|
|
111
122
|
stroke={fill || "#18191B"}
|
|
@@ -123,7 +134,8 @@ export const Tick = ({ size, stroke }) => {
|
|
|
123
134
|
height={size || "16"}
|
|
124
135
|
viewBox="0 0 16 16"
|
|
125
136
|
fill="none"
|
|
126
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
137
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
138
|
+
>
|
|
127
139
|
<path
|
|
128
140
|
d="M12.3828 4.23828L5.82031 11.7383L3.00781 8.92578"
|
|
129
141
|
stroke={stroke || "white"}
|
|
@@ -42,21 +42,24 @@ export const ControlInput = styled.input`
|
|
|
42
42
|
outline: none;
|
|
43
43
|
border: none;
|
|
44
44
|
cursor: caret;
|
|
45
|
+
background: none;
|
|
45
46
|
`;
|
|
46
47
|
|
|
47
48
|
export const DropDownContent = styled.ul`
|
|
48
49
|
position: absolute;
|
|
49
|
-
top:
|
|
50
|
+
top: 35px;
|
|
50
51
|
left: 0;
|
|
51
52
|
list-style-type: none;
|
|
52
53
|
padding-left: 20px;
|
|
53
54
|
width: 100%;
|
|
54
|
-
|
|
55
|
+
max-height: 200px;
|
|
56
|
+
overflow-y: scroll;
|
|
57
|
+
// padding: 4px 10px;
|
|
55
58
|
`;
|
|
56
59
|
|
|
57
60
|
export const DropDownItem = styled.li`
|
|
58
61
|
font-family: "Nunito", sans-serif;
|
|
59
|
-
padding: 4px;
|
|
62
|
+
padding: 4px 10px;
|
|
60
63
|
font-size: 14px;
|
|
61
64
|
display: flex;
|
|
62
65
|
align-items: center;
|
|
Binary file
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React, { useContext, useLayoutEffect } from "react";
|
|
2
|
+
import { Container } from "./style";
|
|
3
|
+
import ErrorImage from "./errorPage.png";
|
|
4
|
+
import ButtonComponent from "../button";
|
|
5
|
+
import { useNavigate } from "react-router-dom";
|
|
6
|
+
|
|
7
|
+
const Index = () => {
|
|
8
|
+
// const data = useContext(OutletContext);
|
|
9
|
+
const navigate = useNavigate()
|
|
10
|
+
|
|
11
|
+
// useLayoutEffect(() => {
|
|
12
|
+
// data.setRightLayout(false);
|
|
13
|
+
// data.setLeftLayout(false)
|
|
14
|
+
// }, []);
|
|
15
|
+
|
|
16
|
+
return(
|
|
17
|
+
<Container>
|
|
18
|
+
<div className="right">
|
|
19
|
+
<h3>Opss...</h3>
|
|
20
|
+
<h2>Page not found</h2>
|
|
21
|
+
<p>Seems we can't find the page your looking for. Let's get you back home.</p>
|
|
22
|
+
<ButtonComponent
|
|
23
|
+
text="Go Back"
|
|
24
|
+
styles={{
|
|
25
|
+
width: "144px",
|
|
26
|
+
height: "50px",
|
|
27
|
+
background: "#FEBF10",
|
|
28
|
+
fontWeight: 700,
|
|
29
|
+
fontSize: "16px",
|
|
30
|
+
lineHeight: "22px",
|
|
31
|
+
marginTop: "20px",
|
|
32
|
+
}}
|
|
33
|
+
onClick={() => navigate(-1)}
|
|
34
|
+
/>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div className="left">
|
|
38
|
+
<img src={ErrorImage} alt="" />
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
</Container>
|
|
42
|
+
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default Index;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import styled from "styled-components"
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background: #fff;
|
|
9
|
+
padding-left: 5%;
|
|
10
|
+
margin: -2%;
|
|
11
|
+
height: 94vh;
|
|
12
|
+
|
|
13
|
+
@media only screen and (max-width: 1500px) {
|
|
14
|
+
margin: -3%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.right{
|
|
18
|
+
display: grid;
|
|
19
|
+
grid-gap: 10px;
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
h3{
|
|
23
|
+
font-family: 'Nunito';
|
|
24
|
+
font-style: normal;
|
|
25
|
+
font-weight: 800;
|
|
26
|
+
font-size: 40px;
|
|
27
|
+
line-height: 65px;
|
|
28
|
+
color: #313333;
|
|
29
|
+
}
|
|
30
|
+
h2{
|
|
31
|
+
font-family: 'Nunito';
|
|
32
|
+
font-style: normal;
|
|
33
|
+
font-weight: 500;
|
|
34
|
+
font-size: 38px;
|
|
35
|
+
line-height: 65px;
|
|
36
|
+
color: #313333;
|
|
37
|
+
}
|
|
38
|
+
p{
|
|
39
|
+
font-family: 'Inter';
|
|
40
|
+
font-style: normal;
|
|
41
|
+
font-weight: 400;
|
|
42
|
+
font-size: 16px;
|
|
43
|
+
line-height: 32px;
|
|
44
|
+
color: #18191F;
|
|
45
|
+
// width: 100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@media only screen and (max-width: 1800px) {
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.left{
|
|
54
|
+
@media only screen and (max-width: 1336px) {
|
|
55
|
+
img{
|
|
56
|
+
width: 773px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
`;
|
|
62
|
+
|
package/src/components/index.js
CHANGED
|
@@ -25,3 +25,4 @@ export { default as SelectDropdownGraph } from "./graph";
|
|
|
25
25
|
export { default as NotificationThresholdComponent } from "./notificationThreshold";
|
|
26
26
|
export { default as DevAPIdocs } from "./developerAPIdocs";
|
|
27
27
|
export { default as Calender } from "./calender/input";
|
|
28
|
+
export { default as ErrorPage } from "./errorPage"
|