contentoh-components-library 0.1.1 → 6.0.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.
- package/.env.development +16 -3
- package/.env.production +14 -1
- package/CHANGELOG.md +40 -0
- package/package.json +10 -4
- package/src/assets/images/arrow/arrowIcon.svg +3 -0
- package/src/assets/images/arrow/polygon.svg +3 -0
- package/src/assets/images/card/masterCardIcon.svg +5 -0
- package/src/assets/images/componentAssigned/assignedImage1.svg +9 -0
- package/src/assets/images/componentAssigned/assignedImage2.svg +9 -0
- package/src/assets/images/componentAssigned/clock.svg +4 -0
- package/src/assets/images/componentAssigned/flag.svg +3 -0
- package/src/assets/images/defaultImages/defaultUpdate.png +0 -0
- package/src/assets/images/editField/editField.svg +3 -0
- package/src/assets/images/generalButton/deleteIcon.svg +13 -0
- package/src/assets/images/generalButton/deleteIconHover.svg +13 -0
- package/src/assets/images/generalButton/saveIcon.svg +3 -0
- package/src/assets/images/generalButton/saveIconHover.svg +3 -0
- package/src/assets/images/generalImage/assigned.svg +14 -0
- package/src/assets/images/generalImage/bags.svg +25 -0
- package/src/assets/images/generalImage/clock.svg +4 -0
- package/src/assets/images/generalImage/flag.svg +3 -0
- package/src/assets/images/genericModal/genericModalCheck.svg +3 -0
- package/src/assets/images/genericModal/genericModalClose.svg +3 -0
- package/src/assets/images/genericModal/genericModalDown.svg +3 -0
- package/src/assets/images/genericModal/genericModalUp.svg +3 -0
- package/src/assets/images/genericModal/genericModalWarning.svg +12 -0
- package/src/assets/images/logo/logoLogin.svg +15 -0
- package/src/assets/images/menuNotification/menuNotificationComment.svg +3 -0
- package/src/assets/images/menuNotification/menuNotificationProduct.svg +3 -0
- package/src/assets/images/menuProfile/logOut.svg +3 -0
- package/src/assets/images/menuProfile/myAccount.svg +3 -0
- package/src/assets/images/menuProfile/settings.svg +3 -0
- package/src/assets/images/modalsSVGs/attributesSent.svg +208 -0
- package/src/assets/images/modalsSVGs/descriptionSent.svg +237 -0
- package/src/assets/images/modalsSVGs/providerSent.svg +445 -0
- package/src/assets/images/modalsSVGs/uploadingImages.svg +148 -0
- package/src/assets/images/productNotification/productNotification.svg +3 -0
- package/src/assets/images/profileHeader/profilePicture.svg +9 -0
- package/src/components/atoms/AsignationOption/index.js +6 -4
- package/src/components/atoms/AsignationOption/styles.js +3 -1
- package/src/components/atoms/AtomList/index.js +4 -2
- package/src/components/atoms/AtomList/styles.js +4 -2
- package/src/components/atoms/Avatar/index.js +2 -1
- package/src/components/atoms/Card/Card.stories.js +12 -0
- package/src/components/atoms/Card/index.js +9 -0
- package/src/components/atoms/Card/styles.js +8 -0
- package/src/components/atoms/CheckBox/index.js +1 -1
- package/src/components/atoms/Commentary/Commentary.stories.js +0 -0
- package/src/components/atoms/Commentary/index.js +9 -0
- package/src/components/atoms/Commentary/styles.js +15 -0
- package/src/components/atoms/CustomerTypeImage/index.js +1 -1
- package/src/components/atoms/EditField/EditField.stories.js +13 -0
- package/src/components/atoms/EditField/index.js +15 -0
- package/src/components/atoms/EditField/styles.js +35 -0
- package/src/components/atoms/GeneralButton/GeneralButton.stories.js +3 -0
- package/src/components/atoms/GeneralButton/index.js +7 -1
- package/src/components/atoms/GeneralButton/styles.js +56 -9
- package/src/components/atoms/GeneralInput/index.js +62 -9
- package/src/components/atoms/GeneralInput/styles.js +3 -1
- package/src/components/atoms/GeneralTextBox/index.js +7 -6
- package/src/components/atoms/GeneralTextBox/styles.js +1 -1
- package/src/components/atoms/GenericModal/GenericModal.stories.js +140 -0
- package/src/components/atoms/GenericModal/index.js +12 -0
- package/src/components/atoms/GenericModal/styles.js +126 -0
- package/src/components/atoms/GradientPanel/GradientPanel.stories.js +110 -3
- package/src/components/atoms/GradientPanel/index.js +4 -2
- package/src/components/atoms/GradientPanel/styles.js +111 -8
- package/src/components/atoms/Graphic/Graphic.stories.js +21 -0
- package/src/components/atoms/Graphic/index.js +18 -0
- package/src/components/atoms/Graphic/styles.js +4 -0
- package/src/components/atoms/Input/index.js +14 -0
- package/src/components/atoms/Input/style.js +27 -0
- package/src/components/atoms/LabelToInput/index.js +27 -0
- package/src/components/atoms/LabelToInput/style.js +30 -0
- package/src/components/atoms/LoadImageMenu/LoadImageMenu.stories.js +17 -0
- package/src/components/atoms/LoadImageMenu/index.js +58 -0
- package/src/components/atoms/LoadImageMenu/styles.js +72 -0
- package/src/components/atoms/LogoImage/LogoImage.stories.js +10 -0
- package/src/components/atoms/LogoImage/index.js +10 -0
- package/src/components/atoms/LogoImage/styles.js +12 -0
- package/src/components/atoms/MenuNotification/MenuNotification.stories.js +17 -0
- package/src/components/atoms/MenuNotification/index.js +30 -0
- package/src/components/atoms/MenuNotification/styles.js +50 -0
- package/src/components/atoms/MenuProfile/MenuProfile.stories.js +13 -0
- package/src/components/atoms/MenuProfile/index.js +31 -0
- package/src/components/atoms/MenuProfile/styles.js +57 -0
- package/src/components/atoms/Notification/Notification.stories.js +16 -0
- package/src/components/atoms/Notification/index.js +20 -0
- package/src/components/atoms/Notification/styles.js +42 -0
- package/src/components/atoms/Percent/Percent.stories.js +38 -0
- package/src/components/atoms/Percent/index.js +15 -0
- package/src/components/atoms/Percent/styles.js +79 -0
- package/src/components/atoms/PriorityFlag/index.js +1 -1
- package/src/components/atoms/ProductImage/styles.js +1 -1
- package/src/components/atoms/ProgressBar/index.js +2 -2
- package/src/components/atoms/ProgressBar/styles.js +53 -3
- package/src/components/atoms/ScreenHeader/ScreenHeader.stories.js +9 -0
- package/src/components/atoms/ScreenHeader/index.js +4 -1
- package/src/components/atoms/ScreenHeader/styles.js +17 -6
- package/src/components/atoms/Select/index.js +33 -0
- package/src/components/atoms/Select/style.js +77 -0
- package/src/components/atoms/StatusTag/styles.js +9 -1
- package/src/components/atoms/ValidationPanel/index.js +3 -3
- package/src/components/molecules/AddProvidersAndProducts/AddProvidersAndProducts.stories.js +16 -0
- package/src/components/molecules/AddProvidersAndProducts/index.js +19 -0
- package/src/components/molecules/AddProvidersAndProducts/styles.js +23 -0
- package/src/components/molecules/AssignedWork/AssignedWork.stories.js +41 -0
- package/src/components/molecules/AssignedWork/index.js +40 -0
- package/src/components/molecules/AssignedWork/styles.js +111 -0
- package/src/components/molecules/AvatarAndValidation/index.js +24 -6
- package/src/components/molecules/AvatarAndValidation/styles.js +1 -1
- package/src/components/molecules/EditionActiveImage/index.js +5 -2
- package/src/components/molecules/FeaturesBar/index.js +21 -8
- package/src/components/molecules/FeaturesBar/styles.js +9 -2
- package/src/components/molecules/GalleryElement/index.js +59 -37
- package/src/components/molecules/GalleryElement/styles.js +38 -11
- package/src/components/molecules/GalleryHeader/GalleryHeader.stories.js +10 -0
- package/src/components/molecules/GalleryHeader/index.js +19 -0
- package/src/components/molecules/GalleryHeader/styles.js +45 -0
- package/src/components/molecules/ImageSelector/index.js +14 -11
- package/src/components/molecules/ParentComponent/ParentComponent.stories.js +18 -0
- package/src/components/molecules/ParentComponent/index.js +66 -0
- package/src/components/molecules/ParentComponent/styles.js +7 -0
- package/src/components/molecules/PayMethod/PayMethod.stories.js +12 -0
- package/src/components/molecules/PayMethod/index.js +46 -0
- package/src/components/molecules/PayMethod/styles.js +31 -0
- package/src/components/molecules/PlanSelection/PlanSelection.stories.js +1 -3
- package/src/components/molecules/PlanSelection/index.js +1 -1
- package/src/components/molecules/PlanSelection/styles.js +2 -2
- package/src/components/molecules/ProductNameHeader/index.js +1 -2
- package/src/components/molecules/ProductNotification/ProductNotification.stories.js +13 -0
- package/src/components/molecules/ProductNotification/index.js +53 -0
- package/src/components/molecules/ProductNotification/styles.js +37 -0
- package/src/components/molecules/ProfileHeader/ProfileHeader.stories.js +16 -0
- package/src/components/molecules/ProfileHeader/index.js +54 -0
- package/src/components/molecules/ProfileHeader/styles.js +30 -0
- package/src/components/molecules/RetailerSelector/RetailerSelector.stories.js +35 -0
- package/src/components/molecules/RetailerSelector/index.js +63 -0
- package/src/components/molecules/RetailerSelector/styles.js +18 -0
- package/src/components/molecules/SidebarNotification/SidebarNotification.stories.js +101 -0
- package/src/components/molecules/SidebarNotification/index.js +95 -0
- package/src/components/molecules/SidebarNotification/styles.js +63 -0
- package/src/components/molecules/StatusAsignationInfo/index.js +55 -19
- package/src/components/molecules/StatusAsignationInfo/styles.js +10 -0
- package/src/components/molecules/TableHeader/index.js +5 -2
- package/src/components/molecules/TabsMenu/index.js +6 -2
- package/src/components/molecules/TagAndInput/index.js +35 -2
- package/src/components/molecules/TagAndInput/styles.js +1 -1
- package/src/components/organisms/FullProductNameHeader/index.js +28 -7
- package/src/components/organisms/FullTabsMenu/index.js +13 -2
- package/src/components/organisms/FullTabsMenu/styles.js +1 -1
- package/src/components/organisms/Fullplan/FullPlan.stories.js +7 -9
- package/src/components/organisms/Fullplan/index.js +1 -1
- package/src/components/organisms/Fullplan/styles.js +2 -2
- package/src/components/organisms/ImageDataTable/index.js +77 -11
- package/src/components/organisms/ImageDataTable/styles.js +8 -0
- package/src/components/organisms/ImagePreviewer/index.js +5 -10
- package/src/components/organisms/InputGroup/index.js +56 -11
- package/src/components/organisms/InputGroup/styles.js +3 -0
- package/src/components/organisms/ProductImageModal/ProductImageModal.stories.js +77 -74
- package/src/components/organisms/ProductImageModal/index.js +29 -12
- package/src/components/organisms/ProductImageModal/styles.js +4 -0
- package/src/components/pages/CustomerLogin/CustomerLogin.stories.js +76 -0
- package/src/components/pages/CustomerLogin/index.js +22 -0
- package/src/components/pages/CustomerLogin/styles.js +12 -0
- package/src/components/pages/CustomerPayMethod/CustomerPayMethod.stories.js +56 -0
- package/src/components/pages/CustomerPayMethod/index.js +23 -0
- package/src/components/pages/CustomerPayMethod/styles.js +21 -0
- package/src/components/pages/CustomerType/CustomerType.stories.js +8 -8
- package/src/components/pages/CustomerType/styles.js +1 -1
- package/src/components/pages/OnboardPlan/OnboardPlan.stories.js +36 -21
- package/src/components/pages/OnboardPlan/index.js +8 -9
- package/src/components/pages/OnboardPlan/styles.js +16 -10
- package/src/components/pages/RetailerPlan/RetailerPlan.stories.js +49 -0
- package/src/components/pages/RetailerPlan/index.js +24 -0
- package/src/components/pages/RetailerPlan/styles.js +27 -0
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +104 -317
- package/src/components/pages/RetailerProductEdition/index.js +809 -34
- package/src/components/pages/RetailerProductEdition/styles.js +54 -5
- package/src/global-files/data.js +152 -0
- package/src/global-files/global-styles.css +10 -0
- package/src/global-files/variables.js +1 -0
- package/src/components/molecules/TextAndGradient/TextAndGradient.stories.js +0 -23
- package/src/components/molecules/TextAndGradient/index.js +0 -23
- package/src/components/molecules/TextAndGradient/styles.js +0 -37
|
@@ -10,12 +10,12 @@ export const Container = styled.div`
|
|
|
10
10
|
|
|
11
11
|
.buttons-container {
|
|
12
12
|
position: absolute;
|
|
13
|
-
top:
|
|
13
|
+
top: 5px;
|
|
14
|
+
left: 5px;
|
|
14
15
|
width: 100%;
|
|
15
16
|
display: flex;
|
|
16
17
|
align-items: center;
|
|
17
18
|
justify-content: space-between;
|
|
18
|
-
padding: 0 5px;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.image-container {
|
|
@@ -40,10 +40,10 @@ export const Container = styled.div`
|
|
|
40
40
|
&.row-gallery {
|
|
41
41
|
display: flex;
|
|
42
42
|
align-items: center;
|
|
43
|
+
padding-right: 10px;
|
|
43
44
|
|
|
44
45
|
.buttons-container {
|
|
45
46
|
position: relative;
|
|
46
|
-
width: 58px;
|
|
47
47
|
display: flex;
|
|
48
48
|
align-items: center;
|
|
49
49
|
justify-content: space-between;
|
|
@@ -52,18 +52,17 @@ export const Container = styled.div`
|
|
|
52
52
|
.image-container {
|
|
53
53
|
display: flex;
|
|
54
54
|
align-items: center;
|
|
55
|
+
flex: 1;
|
|
55
56
|
.information-container {
|
|
56
57
|
display: flex;
|
|
58
|
+
flex: 1;
|
|
57
59
|
|
|
58
60
|
p {
|
|
59
61
|
font-family: ${FontFamily.Lato};
|
|
60
62
|
color: ${GlobalColors.s4};
|
|
61
63
|
font-size: 14px;
|
|
62
64
|
line-height: 17px;
|
|
63
|
-
|
|
64
|
-
& + p {
|
|
65
|
-
margin-left: 18px;
|
|
66
|
-
}
|
|
65
|
+
text-align: center;
|
|
67
66
|
|
|
68
67
|
&.highlighted-data {
|
|
69
68
|
font-family: ${FontFamily.AvenirNext};
|
|
@@ -75,12 +74,40 @@ export const Container = styled.div`
|
|
|
75
74
|
line-height: 18px;
|
|
76
75
|
padding: 0 10px;
|
|
77
76
|
}
|
|
77
|
+
|
|
78
|
+
&:nth-child(1) {
|
|
79
|
+
//min-width: calc(20% - 76px);
|
|
80
|
+
//flex: 1 0 20%;
|
|
81
|
+
min-width: 22%;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:nth-child(2),
|
|
85
|
+
&:nth-child(3) {
|
|
86
|
+
text-align: center;
|
|
87
|
+
}
|
|
88
|
+
&:nth-child(2) {
|
|
89
|
+
max-width: 90px;
|
|
90
|
+
min-width: 90px;
|
|
91
|
+
}
|
|
92
|
+
&:nth-child(3) {
|
|
93
|
+
max-width: 60px;
|
|
94
|
+
min-width: 60px;
|
|
95
|
+
}
|
|
96
|
+
/* &:nth-child(4) {
|
|
97
|
+
max-width: 90px;
|
|
98
|
+
min-width: 90px;
|
|
99
|
+
}
|
|
100
|
+
&:nth-child(5) {
|
|
101
|
+
max-width: 80px;
|
|
102
|
+
min-width: 80px;
|
|
103
|
+
} */
|
|
78
104
|
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
105
|
|
|
82
|
-
|
|
83
|
-
|
|
106
|
+
& > * {
|
|
107
|
+
flex: 1;
|
|
108
|
+
padding: 5px;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
84
111
|
}
|
|
85
112
|
}
|
|
86
113
|
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { GalleryHeader } from ".";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/molecules/GalleryHeader",
|
|
5
|
+
component: GalleryHeader,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => <GalleryHeader {...args} />;
|
|
9
|
+
export const GalleryHeaderDefault = Template.bind({});
|
|
10
|
+
GalleryHeaderDefault.args = {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { CheckBox } from "../../atoms/CheckBox";
|
|
3
|
+
|
|
4
|
+
export const GalleryHeader = () => {
|
|
5
|
+
return (
|
|
6
|
+
<Container>
|
|
7
|
+
<div>
|
|
8
|
+
<CheckBox />
|
|
9
|
+
</div>
|
|
10
|
+
<p className="image-header">Image</p>
|
|
11
|
+
<p className="image-name">Nombre</p>
|
|
12
|
+
<p className="image-size">Tamaño</p>
|
|
13
|
+
<p className="image-format">Formato</p>
|
|
14
|
+
<p className="">Tipo de toma</p>
|
|
15
|
+
<p className="">Tipo de imagen</p>
|
|
16
|
+
<p className="">Tipo de empaque</p>
|
|
17
|
+
</Container>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
display: flex;
|
|
6
|
+
padding: 10px;
|
|
7
|
+
padding-left: 0;
|
|
8
|
+
align-items: center;
|
|
9
|
+
|
|
10
|
+
p {
|
|
11
|
+
font-family: ${FontFamily.AvenirNext};
|
|
12
|
+
font-style: normal;
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
line-height: 21px;
|
|
16
|
+
letter-spacing: -0.015em;
|
|
17
|
+
color: ${GlobalColors.s5};
|
|
18
|
+
flex: 1;
|
|
19
|
+
text-align: center;
|
|
20
|
+
|
|
21
|
+
&.value-header {
|
|
22
|
+
max-width: 60px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&.image-header {
|
|
26
|
+
max-width: 60px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.image-name {
|
|
30
|
+
min-width: 20%;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.image-format {
|
|
34
|
+
max-width: 60px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.image-size {
|
|
38
|
+
max-width: 90px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.image-identifier {
|
|
42
|
+
max-width: 80px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
import { Container } from "./styles";
|
|
2
2
|
import { ProductImage } from "../../atoms/ProductImage/index";
|
|
3
3
|
|
|
4
|
-
export const ImageSelector = ({
|
|
4
|
+
export const ImageSelector = ({
|
|
5
|
+
images = [],
|
|
6
|
+
setActiveImage,
|
|
7
|
+
modalSelector,
|
|
8
|
+
}) => {
|
|
5
9
|
return (
|
|
6
10
|
<Container className={modalSelector && "modal-image-selector"}>
|
|
7
|
-
{images
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
))}
|
|
11
|
+
{images?.values?.map((image, index) => (
|
|
12
|
+
<ProductImage
|
|
13
|
+
key={index}
|
|
14
|
+
img={image.src}
|
|
15
|
+
altText={image.altText}
|
|
16
|
+
imageType={modalSelector ? "catalogue-modal-image" : "carousel-image"}
|
|
17
|
+
onClick={() => setActiveImage(index)}
|
|
18
|
+
/>
|
|
19
|
+
))}
|
|
17
20
|
</Container>
|
|
18
21
|
);
|
|
19
22
|
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ParentComponent } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/molecules/ParentComponent",
|
|
5
|
+
component: ParentComponent,
|
|
6
|
+
decorators: [
|
|
7
|
+
(Story) => (
|
|
8
|
+
<ParentComponent>
|
|
9
|
+
<Story />
|
|
10
|
+
</ParentComponent>
|
|
11
|
+
),
|
|
12
|
+
],
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const Template = (args) => <ParentComponent {...args} />;
|
|
16
|
+
export const ParentComponentDefault = Template.bind({});
|
|
17
|
+
|
|
18
|
+
ParentComponentDefault.args = {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { SidebarNotification } from "../SidebarNotification/index";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import profileImg from "../../../assets/images/defaultImages/defaultProfileImage.svg";
|
|
5
|
+
|
|
6
|
+
export const ParentComponent = () => {
|
|
7
|
+
const [showSidebar, setShowSidebar] = useState(true);
|
|
8
|
+
const array = [
|
|
9
|
+
{
|
|
10
|
+
dates: "2/16/2022",
|
|
11
|
+
notifications: [
|
|
12
|
+
{
|
|
13
|
+
profilePicture: profileImg,
|
|
14
|
+
notification: "ODT 23441244",
|
|
15
|
+
newNotification: true,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
profilePicture: profileImg,
|
|
19
|
+
notification: "ODT 23441244",
|
|
20
|
+
newNotification: true,
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
dates: "2/14/2022",
|
|
26
|
+
notifications: [
|
|
27
|
+
{
|
|
28
|
+
profilePicture: profileImg,
|
|
29
|
+
notification: "ODT 23441244",
|
|
30
|
+
newNotification: true,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
profilePicture: profileImg,
|
|
34
|
+
notification: "ODT 23441244",
|
|
35
|
+
newNotification: true,
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
dates: "2/17/2022",
|
|
41
|
+
notifications: [
|
|
42
|
+
{
|
|
43
|
+
profilePicture: profileImg,
|
|
44
|
+
notification: "ODT 23441244",
|
|
45
|
+
newNotification: true,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
profilePicture: profileImg,
|
|
49
|
+
notification: "ODT 23441244",
|
|
50
|
+
newNotification: true,
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
];
|
|
55
|
+
return (
|
|
56
|
+
<Container>
|
|
57
|
+
{showSidebar && (
|
|
58
|
+
<SidebarNotification
|
|
59
|
+
array={array}
|
|
60
|
+
showSidebar={showSidebar}
|
|
61
|
+
setShowSidebar={setShowSidebar}
|
|
62
|
+
></SidebarNotification>
|
|
63
|
+
)}
|
|
64
|
+
</Container>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PayMethod } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/molecules/PayMethod",
|
|
5
|
+
component: PayMethod,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => <PayMethod {...args} />;
|
|
9
|
+
|
|
10
|
+
export const PayMethodDefault = Template.bind({});
|
|
11
|
+
|
|
12
|
+
PayMethodDefault.args = {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { ScreenHeader } from "../../atoms/ScreenHeader/index";
|
|
3
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
4
|
+
import { Card } from "../../atoms/Card";
|
|
5
|
+
import { TagAndInput } from "../TagAndInput";
|
|
6
|
+
import masterCardIcon from "../../../assets/images/card/masterCardIcon.svg";
|
|
7
|
+
|
|
8
|
+
export const PayMethod = ({}) => {
|
|
9
|
+
return (
|
|
10
|
+
<Container key={`pay`}>
|
|
11
|
+
<div className="master">
|
|
12
|
+
<ScreenHeader
|
|
13
|
+
fontFamily={FontFamily.AvenirNext}
|
|
14
|
+
color={GlobalColors.s5}
|
|
15
|
+
headerType={"input-name-header"}
|
|
16
|
+
text={"Agrega tarjeta de credito"}
|
|
17
|
+
/>
|
|
18
|
+
<Card cardIcon={masterCardIcon} altText={"master-card-icon"} />
|
|
19
|
+
</div>
|
|
20
|
+
<div className="card-number">
|
|
21
|
+
<TagAndInput
|
|
22
|
+
inputType={"text"}
|
|
23
|
+
label={"Número de tarjeta de credito"}
|
|
24
|
+
inputPlaceHolder={"1234 5678 1234 5678"}
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
<div className="card-data">
|
|
28
|
+
<TagAndInput
|
|
29
|
+
inputType={"text"}
|
|
30
|
+
label={"Nombre del titular"}
|
|
31
|
+
inputPlaceHolder={"Bart Simpson"}
|
|
32
|
+
/>
|
|
33
|
+
<TagAndInput
|
|
34
|
+
inputType={"text"}
|
|
35
|
+
label={"Expira"}
|
|
36
|
+
inputPlaceHolder={"22/27"}
|
|
37
|
+
/>
|
|
38
|
+
<TagAndInput
|
|
39
|
+
inputType={"text"}
|
|
40
|
+
label={"CVV"}
|
|
41
|
+
inputPlaceHolder={"***"}
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
</Container>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
border: 2px solid ${GlobalColors.s2};
|
|
6
|
+
border-radius: 7px;
|
|
7
|
+
padding: 15px 25px;
|
|
8
|
+
|
|
9
|
+
.card-number{
|
|
10
|
+
& + * {
|
|
11
|
+
margin-top: 5px;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
.master {
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
}
|
|
18
|
+
.card-data {
|
|
19
|
+
display: flex;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
.input-container {
|
|
22
|
+
flex: 1;
|
|
23
|
+
&:first-child {
|
|
24
|
+
flex: 3;
|
|
25
|
+
}
|
|
26
|
+
& + * {
|
|
27
|
+
margin-left: 10px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { PlanSelection } from "./index";
|
|
2
|
-
|
|
3
|
-
// import { GeneralTextBox } from "../../atoms/GeneralTextBox";
|
|
4
|
-
// import { GeneralTextBoxDefault } from "../../atoms/GeneralTextBox/GeneralTextBox.stories";
|
|
2
|
+
|
|
5
3
|
|
|
6
4
|
export default {
|
|
7
5
|
title: "Components/molecules/PlanSelection",
|
|
@@ -12,7 +12,7 @@ export const PlanSelection = ({ planSelection , setbuttonActive }) => {
|
|
|
12
12
|
};
|
|
13
13
|
return (
|
|
14
14
|
<Container>
|
|
15
|
-
{planSelection
|
|
15
|
+
{planSelection?.map((plan,index)=>
|
|
16
16
|
<GeneralTextBox
|
|
17
17
|
className="button-plan"
|
|
18
18
|
onClick= {(e) => setActivePlan(e)}
|
|
@@ -8,7 +8,6 @@ export const ProductNameHeader = ({
|
|
|
8
8
|
productName,
|
|
9
9
|
statusType,
|
|
10
10
|
percent,
|
|
11
|
-
backgroundColor,
|
|
12
11
|
priority,
|
|
13
12
|
date,
|
|
14
13
|
}) => {
|
|
@@ -16,7 +15,7 @@ export const ProductNameHeader = ({
|
|
|
16
15
|
<Container>
|
|
17
16
|
<ScreenHeader headerType={"product-name-header"} text={productName} />
|
|
18
17
|
<StatusTag statusType={statusType} />
|
|
19
|
-
<ProgressBar percent={percent}
|
|
18
|
+
<ProgressBar percent={percent} progressBarType={statusType} />
|
|
20
19
|
<PriorityFlag priority={priority} />
|
|
21
20
|
<ScreenHeader headerType={"date-header"} text={date} />
|
|
22
21
|
</Container>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ProductNotification } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/molecules/ProductNotification",
|
|
5
|
+
component: ProductNotification,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => <ProductNotification {...args} />;
|
|
9
|
+
export const ProductNotificationDefault = Template.bind({});
|
|
10
|
+
|
|
11
|
+
ProductNotificationDefault.args = {
|
|
12
|
+
notification: false,
|
|
13
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { Avatar } from "../../atoms/Avatar/index";
|
|
3
|
+
import { useState, useEffect } from "react";
|
|
4
|
+
import { MenuNotification } from "../../atoms/MenuNotification";
|
|
5
|
+
import productNotification from "../../../assets/images/productNotification/productNotification.svg";
|
|
6
|
+
|
|
7
|
+
export const ProductNotification = ({ notification }) => {
|
|
8
|
+
const [showMenu, setShowMenu] = useState(false);
|
|
9
|
+
const closeMenu = (e) => {
|
|
10
|
+
if (!e.target.closest("#menu-notification") && showMenu) {
|
|
11
|
+
document.removeEventListener("click", closeMenu, false);
|
|
12
|
+
setShowMenu(false);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
if (showMenu) {
|
|
17
|
+
document.addEventListener("click", closeMenu, false);
|
|
18
|
+
}
|
|
19
|
+
}, [showMenu]);
|
|
20
|
+
const content = [
|
|
21
|
+
{
|
|
22
|
+
notificationType: "productComment",
|
|
23
|
+
label: "Asignaron el producto 23441244",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
notificationType: "productAssignation",
|
|
27
|
+
label: "Ajustaron el nombre del producto",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
notificationType: "productAssignation",
|
|
31
|
+
label: "Agregaron comentario en producto 123",
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
return (
|
|
35
|
+
<Container
|
|
36
|
+
onClick={(e) => {
|
|
37
|
+
e.stopPropagation();
|
|
38
|
+
setShowMenu(!showMenu);
|
|
39
|
+
if (showMenu) {
|
|
40
|
+
document.removeEventListener("click", closeMenu, false);
|
|
41
|
+
}
|
|
42
|
+
}}
|
|
43
|
+
className={notification && "new-notification"}
|
|
44
|
+
>
|
|
45
|
+
<Avatar
|
|
46
|
+
image={productNotification}
|
|
47
|
+
imageType={"big-image"}
|
|
48
|
+
altText={"Notification Picture"}
|
|
49
|
+
/>
|
|
50
|
+
{showMenu && <MenuNotification content={content} />}
|
|
51
|
+
</Container>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.button`
|
|
5
|
+
background-color: ${GlobalColors.s2};
|
|
6
|
+
border-radius: 100%;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
padding: 3px;
|
|
12
|
+
width: 50px;
|
|
13
|
+
height: 50px;
|
|
14
|
+
border: none;
|
|
15
|
+
position: relative;
|
|
16
|
+
&.new-notification::before {
|
|
17
|
+
content: "";
|
|
18
|
+
width: 10px;
|
|
19
|
+
height: 10px;
|
|
20
|
+
display: block;
|
|
21
|
+
border-radius: 100%;
|
|
22
|
+
background-color: #ff0094;
|
|
23
|
+
position: absolute;
|
|
24
|
+
left: 56%;
|
|
25
|
+
top: 11px;
|
|
26
|
+
z-index: 1;
|
|
27
|
+
animation: pulse 0.4s alternate infinite;
|
|
28
|
+
@keyframes pulse {
|
|
29
|
+
from {
|
|
30
|
+
transform: scale(1);
|
|
31
|
+
}
|
|
32
|
+
to {
|
|
33
|
+
transform: scale(1.1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
`;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ProfileHeader } from "./index";
|
|
2
|
+
import customerProfileImg from "../../../assets/images/profileHeader/profilePicture.svg";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/molecules/ProfileHeader",
|
|
6
|
+
component: ProfileHeader,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = (args) => <ProfileHeader {...args} />;
|
|
10
|
+
export const ProfileHeaderDefault = Template.bind({});
|
|
11
|
+
|
|
12
|
+
ProfileHeaderDefault.args = {
|
|
13
|
+
customerProfileImg: customerProfileImg,
|
|
14
|
+
customerName: "Name default",
|
|
15
|
+
customer: "Customer default",
|
|
16
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { ScreenHeader } from "../../atoms/ScreenHeader/index";
|
|
3
|
+
import { GlobalColors } from "../../../global-files/variables";
|
|
4
|
+
import { Avatar } from "../../atoms/Avatar/index";
|
|
5
|
+
import { useState, useEffect } from "react";
|
|
6
|
+
import { MenuProfile } from "../../atoms/MenuProfile";
|
|
7
|
+
|
|
8
|
+
export const ProfileHeader = ({
|
|
9
|
+
customerProfileImg,
|
|
10
|
+
customerName,
|
|
11
|
+
customer,
|
|
12
|
+
}) => {
|
|
13
|
+
const [showMenu, setShowMenu] = useState(false);
|
|
14
|
+
const closeMenu = (e) => {
|
|
15
|
+
if (!e.target.closest("#menu-profile") && showMenu) {
|
|
16
|
+
document.removeEventListener("click", closeMenu, false);
|
|
17
|
+
setShowMenu(false);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (showMenu) {
|
|
22
|
+
document.addEventListener("click", closeMenu, false);
|
|
23
|
+
}
|
|
24
|
+
}, [showMenu]);
|
|
25
|
+
const MenuInfo = {
|
|
26
|
+
user: "Administrador",
|
|
27
|
+
};
|
|
28
|
+
return (
|
|
29
|
+
<Container
|
|
30
|
+
onClick={(e) => {
|
|
31
|
+
e.stopPropagation();
|
|
32
|
+
setShowMenu(!showMenu);
|
|
33
|
+
if (showMenu) {
|
|
34
|
+
document.removeEventListener("click", closeMenu, false);
|
|
35
|
+
}
|
|
36
|
+
}}
|
|
37
|
+
>
|
|
38
|
+
<Avatar
|
|
39
|
+
image={customerProfileImg}
|
|
40
|
+
imageType={"profile-image"}
|
|
41
|
+
altText={"Profile Picture"}
|
|
42
|
+
/>
|
|
43
|
+
<div className="user-info">
|
|
44
|
+
<ScreenHeader
|
|
45
|
+
headerType={"retailer-name-header"}
|
|
46
|
+
text={customerName}
|
|
47
|
+
color={GlobalColors.original_magenta}
|
|
48
|
+
/>
|
|
49
|
+
{customer && <p>{customer}</p>}
|
|
50
|
+
</div>
|
|
51
|
+
{showMenu && <MenuProfile user={MenuInfo.user} />}
|
|
52
|
+
</Container>
|
|
53
|
+
);
|
|
54
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { GlobalColors, FontFamily } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.button`
|
|
5
|
+
background-color: ${GlobalColors.s2};
|
|
6
|
+
border-radius: 25px;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
padding: 5px 20px 6px 5px;
|
|
11
|
+
width: 195px;
|
|
12
|
+
height: 50px;
|
|
13
|
+
border: none;
|
|
14
|
+
position: relative;
|
|
15
|
+
.profile-image {
|
|
16
|
+
& + * {
|
|
17
|
+
margin-left: 12px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
.user-info {
|
|
21
|
+
text-align: right;
|
|
22
|
+
p {
|
|
23
|
+
font-family: ${FontFamily.Raleway};
|
|
24
|
+
color: ${GlobalColors.s4};
|
|
25
|
+
font-style: normal;
|
|
26
|
+
font-weight: normal;
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { RetailerSelector } from "./index";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/molecules/RetailerSelector",
|
|
5
|
+
component: RetailerSelector,
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Template = (args) => <RetailerSelector {...args} />;
|
|
9
|
+
|
|
10
|
+
export const RetailerSelectorDefault = Template.bind({});
|
|
11
|
+
RetailerSelectorDefault.args = {
|
|
12
|
+
retailers: [
|
|
13
|
+
{
|
|
14
|
+
id: 2,
|
|
15
|
+
name: "Walmart Mercancías Generales",
|
|
16
|
+
country: "México",
|
|
17
|
+
id_region: 1,
|
|
18
|
+
active: 1,
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
id: 3,
|
|
22
|
+
name: "Sam´s Club",
|
|
23
|
+
country: "México",
|
|
24
|
+
id_region: 1,
|
|
25
|
+
active: 1,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
id: 14,
|
|
29
|
+
name: "Maskota y Petsy",
|
|
30
|
+
country: "México",
|
|
31
|
+
id_region: 1,
|
|
32
|
+
active: 1,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
};
|