contentoh-components-library 21.2.21 → 21.2.24
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/dist/components/atoms/ListCommercialRetailers/ListCommercialRetailers.stories.js +36 -0
- package/dist/components/atoms/ListCommercialRetailers/index.js +64 -0
- package/dist/components/atoms/ListCommercialRetailers/styles.js +20 -0
- package/dist/components/atoms/MenuCommercialRetailers/MenuCommercialRetailers.stories.js +37 -0
- package/dist/components/atoms/MenuCommercialRetailers/index.js +25 -0
- package/dist/components/atoms/MenuCommercialRetailers/styles.js +20 -0
- package/dist/components/atoms/MenuProductImage/MenuProductImage.stories.js +28 -0
- package/dist/components/atoms/MenuProductImage/index.js +88 -0
- package/dist/components/atoms/MenuProductImage/styles.js +20 -0
- package/dist/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +12 -20
- package/dist/components/atoms/VerticalSideMenuMainPage/index.js +24 -34
- package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +14 -14
- package/dist/components/molecules/ApproveRejetPanel/ApproveRejetPanel.stories.js +25 -0
- package/dist/components/molecules/ApproveRejetPanel/index.js +49 -0
- package/dist/components/molecules/ApproveRejetPanel/styles.js +18 -0
- package/dist/components/molecules/SignInLoginCreationApp/SignInLogin.stories.js +28 -0
- package/dist/components/molecules/SignInLoginCreationApp/index.js +270 -0
- package/dist/components/molecules/SignInLoginCreationApp/styles.js +20 -0
- package/dist/index.js +51 -38
- package/package.json +1 -1
- package/src/components/atoms/VerticalSideMenuMainPage/VerticalSideMenuMainPage.stories.js +18 -13
- package/src/components/atoms/VerticalSideMenuMainPage/index.js +18 -33
- package/src/components/atoms/VerticalSideMenuMainPage/styles.js +33 -27
- package/src/index.js +1 -0
|
@@ -15,21 +15,26 @@ const Template = (args) => <VerticalSideMenuMainPage {...args} />;
|
|
|
15
15
|
export const VerticalSideMenuMainPageDefault = Template.bind({});
|
|
16
16
|
|
|
17
17
|
VerticalSideMenuMainPageDefault.args = {
|
|
18
|
-
|
|
19
|
-
{ icon: iconSpeedometer, path: "/Dashboard", title: "
|
|
18
|
+
menuoption : [
|
|
19
|
+
{ icon: iconSpeedometer, path: "/Dashboard", title: "Dashboard" },
|
|
20
20
|
{
|
|
21
|
-
icon:
|
|
22
|
-
path: "/
|
|
21
|
+
icon: iconGroup,
|
|
22
|
+
path: "/Products",
|
|
23
23
|
title: "Productos",
|
|
24
|
-
suboption: [{ path: "/Dashboard", title: "General" },{ path: "/AddProducts", title: "Agregar Producto" }],
|
|
25
24
|
},
|
|
26
|
-
{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
{
|
|
26
|
+
icon: iconProduct,
|
|
27
|
+
path: "/Orders",
|
|
28
|
+
title: "Proveedor",
|
|
29
|
+
suboption: [
|
|
30
|
+
{ path: "/Orders", title: "Ordenes" },
|
|
31
|
+
{ path: "/Entregas", title: "Entregas" },
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
icon: iconTask,
|
|
36
|
+
path: "/tasks",
|
|
37
|
+
title: "Tareas",
|
|
32
38
|
},
|
|
33
|
-
|
|
34
|
-
],
|
|
39
|
+
]
|
|
35
40
|
};
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { Container } from "./styles";
|
|
2
2
|
import iconLogoContentoh from "../../../assets/images/verticalSideMenuMainPage/iconLogoContentoh.svg";
|
|
3
3
|
import iconLogo from "../../../assets/images/verticalSideMenuMainPage/iconLogo.svg";
|
|
4
|
-
import openMenu from "../../../assets/images/verticalSideMenuMainPage/openMenu.svg";
|
|
5
|
-
import closeMenu from "../../../assets/images/verticalSideMenuMainPage/closeMenu.svg";
|
|
6
4
|
import React, { useState } from "react";
|
|
5
|
+
import { NavLink } from "react-router-dom";
|
|
7
6
|
|
|
8
7
|
export const VerticalSideMenuMainPage = ({ menuoption }) => {
|
|
9
|
-
const [trueBar, setTrueBar] = useState(
|
|
10
|
-
let sub;
|
|
8
|
+
const [trueBar, setTrueBar] = useState();
|
|
11
9
|
return (
|
|
12
|
-
<Container
|
|
10
|
+
<Container
|
|
11
|
+
className={trueBar}
|
|
12
|
+
bar={trueBar}
|
|
13
|
+
onMouseOver={() => setTrueBar(true)}
|
|
14
|
+
onMouseOut={() => setTrueBar(false)}
|
|
15
|
+
>
|
|
13
16
|
<div className="navbar-top">
|
|
14
17
|
<img
|
|
15
18
|
src={trueBar ? iconLogoContentoh : iconLogo}
|
|
@@ -17,45 +20,27 @@ export const VerticalSideMenuMainPage = ({ menuoption }) => {
|
|
|
17
20
|
className="logo"
|
|
18
21
|
></img>
|
|
19
22
|
<div className="option">
|
|
20
|
-
{menuoption.map((item) => (
|
|
21
|
-
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
exact
|
|
25
|
-
activeClassName="active"
|
|
26
|
-
to={item.path}
|
|
27
|
-
>
|
|
28
|
-
<img src={item.icon} alt={item.title} width={"25px"}></img>
|
|
23
|
+
{menuoption.map((item, index) => (
|
|
24
|
+
<div key={index}>
|
|
25
|
+
<NavLink to={item.path} className="option-link">
|
|
26
|
+
<img src={item.icon} alt={item.title}></img>
|
|
29
27
|
{trueBar && <p>{item.title}</p>}
|
|
30
|
-
</
|
|
31
|
-
{item.suboption
|
|
32
|
-
""
|
|
33
|
-
) : (
|
|
28
|
+
</NavLink>
|
|
29
|
+
{item.suboption !== undefined && (
|
|
34
30
|
<>
|
|
35
|
-
{
|
|
31
|
+
{item?.suboption?.map((subitem) => (
|
|
36
32
|
<div className="sub-option">
|
|
37
|
-
<
|
|
33
|
+
<NavLink to={subitem.path} className="sub-option-link">
|
|
38
34
|
{trueBar && <p>{subitem.title}</p>}
|
|
39
|
-
</
|
|
35
|
+
</NavLink>
|
|
40
36
|
</div>
|
|
41
37
|
))}
|
|
42
38
|
</>
|
|
43
39
|
)}
|
|
44
|
-
|
|
40
|
+
</div>
|
|
45
41
|
))}
|
|
46
42
|
</div>
|
|
47
43
|
</div>
|
|
48
|
-
<div className="menu-bottom">
|
|
49
|
-
<img
|
|
50
|
-
src={trueBar ? closeMenu : openMenu}
|
|
51
|
-
alt="Open Menu"
|
|
52
|
-
onClick={() => {
|
|
53
|
-
{
|
|
54
|
-
trueBar ? setTrueBar("") : setTrueBar("actived");
|
|
55
|
-
}
|
|
56
|
-
}}
|
|
57
|
-
></img>
|
|
58
|
-
</div>
|
|
59
44
|
</Container>
|
|
60
45
|
);
|
|
61
46
|
};
|
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
-
|
|
3
|
-
//styled(NavLink)
|
|
2
|
+
|
|
4
3
|
export const Container = styled.div`
|
|
5
|
-
height:
|
|
6
|
-
width: 58px;
|
|
4
|
+
height: 98%;
|
|
7
5
|
box-sizing: border-box;
|
|
8
6
|
padding: 23px 10px 70px 10px;
|
|
9
7
|
flex-direction: column;
|
|
10
8
|
justify-content: space-between;
|
|
11
9
|
overflow: auto;
|
|
12
|
-
|
|
10
|
+
width: ${({ bar }) => (bar ? 210 : 58)}px;
|
|
11
|
+
border-radius: ${({ bar }) => (bar ? 20 : 50)}px;
|
|
13
12
|
background: linear-gradient(180deg, #e33aa9 0%, #3b1366 100%);
|
|
14
13
|
scrollbar-width: none;
|
|
15
14
|
display: flex;
|
|
16
15
|
text-align: center;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
transition: width 0.3s linear;
|
|
17
|
+
margin: 10px 0 10px 20px;
|
|
18
|
+
& + * {
|
|
19
|
+
margin-left: 30px;
|
|
21
20
|
}
|
|
22
21
|
.navbar-top {
|
|
23
|
-
.
|
|
24
|
-
& + * {
|
|
25
|
-
margin-top: ${({ bar }) => (bar === "" ? 145 : 50)}%;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
22
|
+
transition: all 0.3s linear;
|
|
28
23
|
.option {
|
|
29
24
|
display: flex;
|
|
30
25
|
flex-direction: column;
|
|
31
26
|
align-items: flex-start;
|
|
27
|
+
margin-top: ${({ bar }) => (bar === "" ? 145 : 50)}%;
|
|
32
28
|
padding-left: ${({ bar }) => (bar ? 5 : 0)}px;
|
|
33
|
-
|
|
29
|
+
.active {
|
|
30
|
+
background: #e33aa9;
|
|
31
|
+
}
|
|
32
|
+
& + div {
|
|
33
|
+
margin-top: 5px;
|
|
34
|
+
}
|
|
35
|
+
a {
|
|
34
36
|
height: ${({ bar }) => (bar ? 32 : 38)}px;
|
|
35
|
-
width: ${({ bar }) => (bar ? 165 : 38)}px;
|
|
36
37
|
display: flex;
|
|
37
38
|
justify-content: ${({ bar }) => (bar ? "flex-start" : "center")};
|
|
38
39
|
border-radius: ${({ bar }) => (bar ? 18 : 100)}px;
|
|
39
40
|
align-items: center;
|
|
40
|
-
font-family:
|
|
41
|
+
font-family: sans-serif;
|
|
41
42
|
font-style: normal;
|
|
42
43
|
font-weight: 400;
|
|
43
44
|
font-size: 18px;
|
|
@@ -47,13 +48,17 @@ export const Container = styled.div`
|
|
|
47
48
|
text-decoration: none;
|
|
48
49
|
&.option-link {
|
|
49
50
|
cursor: pointer;
|
|
50
|
-
|
|
51
|
+
width: ${({ bar }) => (bar ? "160" : "38")}px;
|
|
52
|
+
margin: 5px 0;
|
|
51
53
|
padding-left: ${({ bar }) => (bar ? 15 : 0)}px;
|
|
52
54
|
}
|
|
53
55
|
p {
|
|
54
56
|
cursor: pointer;
|
|
57
|
+
margin: 0%;
|
|
58
|
+
pointer-events: none;
|
|
55
59
|
}
|
|
56
60
|
img {
|
|
61
|
+
width: 22px;
|
|
57
62
|
& + * {
|
|
58
63
|
margin-left: 12px;
|
|
59
64
|
}
|
|
@@ -68,7 +73,7 @@ export const Container = styled.div`
|
|
|
68
73
|
padding-left: ${({ bar }) => (bar ? 28 : 20)}px;
|
|
69
74
|
height: auto;
|
|
70
75
|
width: auto;
|
|
71
|
-
|
|
76
|
+
a {
|
|
72
77
|
display: flex;
|
|
73
78
|
justify-content: flex-start;
|
|
74
79
|
text-decoration: none;
|
|
@@ -77,7 +82,7 @@ export const Container = styled.div`
|
|
|
77
82
|
border-left: 1px solid #f0eef2;
|
|
78
83
|
border-radius: 0;
|
|
79
84
|
color: #f0eef2;
|
|
80
|
-
padding-top:
|
|
85
|
+
padding-top: 14px;
|
|
81
86
|
padding-left: 12px;
|
|
82
87
|
height: 25px;
|
|
83
88
|
&::before {
|
|
@@ -88,16 +93,17 @@ export const Container = styled.div`
|
|
|
88
93
|
height: 10px;
|
|
89
94
|
background-color: white;
|
|
90
95
|
position: absolute;
|
|
91
|
-
|
|
92
|
-
|
|
96
|
+
bottom: 0;
|
|
97
|
+
left: ${({ bar }) => (bar ? -4 : -34)}%;
|
|
98
|
+
}
|
|
99
|
+
&.active {
|
|
100
|
+
background: none;
|
|
101
|
+
&::before {
|
|
102
|
+
background-color: #e33aa9;
|
|
103
|
+
}
|
|
93
104
|
}
|
|
94
105
|
}
|
|
95
106
|
}
|
|
96
107
|
}
|
|
97
108
|
}
|
|
98
|
-
.menu-bottom {
|
|
99
|
-
display: flex;
|
|
100
|
-
justify-content: ${({ bar }) => (bar ? "flex-end" : "center")};
|
|
101
|
-
cursor: pointer;
|
|
102
|
-
}
|
|
103
109
|
`;
|
package/src/index.js
CHANGED
|
@@ -22,6 +22,7 @@ export * from "./components/atoms/SliderToolTip/index";
|
|
|
22
22
|
export * from "./components/atoms/Status/index";
|
|
23
23
|
export * from "./components/atoms/TabSection/index";
|
|
24
24
|
export * from "./components/atoms/ValidationPanel/index";
|
|
25
|
+
export * from "./components/atoms/VerticalSideMenuMainPage/index";
|
|
25
26
|
|
|
26
27
|
//molecules
|
|
27
28
|
export * from "./components/molecules/AvatarAndValidation/index";
|