contentoh-components-library 21.0.4 → 21.0.7

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 (86) hide show
  1. package/dist/components/atoms/CharCounter/CharCounter.stories.js +31 -0
  2. package/dist/components/atoms/CharCounter/index.js +22 -0
  3. package/dist/components/atoms/CharCounter/styles.js +20 -0
  4. package/dist/components/atoms/GeneralInput/index.js +78 -49
  5. package/dist/components/atoms/GeneralInput/styles.js +4 -1
  6. package/dist/components/atoms/GradientPanel/styles.js +2 -2
  7. package/dist/components/atoms/InputFormatter/index.js +132 -66
  8. package/dist/components/atoms/InputFormatter/styles.js +2 -2
  9. package/dist/components/atoms/ProgressBar/styles.js +1 -1
  10. package/dist/components/atoms/Select/index.js +4 -2
  11. package/dist/components/atoms/Select/style.js +1 -1
  12. package/dist/components/atoms/StatusTag/styles.js +1 -1
  13. package/dist/components/molecules/CarouselImagesLogin/CarouselImagesLogin.stories.js +37 -0
  14. package/dist/components/molecules/CarouselImagesLogin/index.js +94 -0
  15. package/dist/components/molecules/CarouselImagesLogin/styles.js +21 -0
  16. package/dist/components/molecules/LoginPasswordStrength/LoginPasswordStrength.stories.js +28 -0
  17. package/dist/components/molecules/LoginPasswordStrength/index.js +131 -0
  18. package/dist/components/molecules/LoginPasswordStrength/styles.js +78 -0
  19. package/dist/components/molecules/TagAndInput/index.js +4 -2
  20. package/dist/components/organisms/InputGroup/index.js +13 -11
  21. package/dist/components/pages/ChangePasswordLogin/ChangePasswordLogin.stories.js +38 -0
  22. package/dist/components/pages/ChangePasswordLogin/index.js +131 -0
  23. package/dist/components/pages/ChangePasswordLogin/styles.js +18 -0
  24. package/dist/components/pages/EmailResetPassword/EmailResetPassword.stories.js +37 -0
  25. package/dist/components/pages/EmailResetPassword/index.js +130 -0
  26. package/dist/components/pages/EmailResetPassword/styles.js +20 -0
  27. package/dist/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +37 -0
  28. package/dist/components/pages/RegistrationLoginFirstStep/index.js +269 -0
  29. package/dist/components/pages/RegistrationLoginFirstStep/styles.js +20 -0
  30. package/dist/components/pages/RegistrationLoginSecondStep/RegistrationLoginSecondStep.stories.js +38 -0
  31. package/dist/components/pages/RegistrationLoginSecondStep/index.js +176 -0
  32. package/dist/components/pages/RegistrationLoginSecondStep/styles.js +20 -0
  33. package/dist/components/pages/RegistrationLoginThirdStep/RegistrationLoginThirdStep.stories.js +37 -0
  34. package/dist/components/pages/RegistrationLoginThirdStep/index.js +178 -0
  35. package/dist/components/pages/RegistrationLoginThirdStep/styles.js +20 -0
  36. package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +18 -28
  37. package/dist/components/pages/RetailerProductEdition/index.js +105 -66
  38. package/dist/components/pages/VerificationCodeResetPassword/VerificationCodeResetPassword.stories.js +37 -0
  39. package/dist/components/pages/VerificationCodeResetPassword/index.js +121 -0
  40. package/dist/components/pages/VerificationCodeResetPassword/styles.js +20 -0
  41. package/dist/components/pages/VerificationCodeResetPassword/utils.js +69 -0
  42. package/package.json +2 -2
  43. package/src/assets/images/carouselImagesLogin/login2.svg +117 -0
  44. package/src/assets/images/carouselImagesLogin/login3.svg +147 -0
  45. package/src/assets/images/carouselImagesLogin/loginImage.svg +301 -0
  46. package/src/components/atoms/CharCounter/CharCounter.stories.js +11 -0
  47. package/src/components/atoms/CharCounter/index.js +13 -0
  48. package/src/components/atoms/CharCounter/styles.js +10 -0
  49. package/src/components/atoms/GeneralInput/index.js +74 -50
  50. package/src/components/atoms/GeneralInput/styles.js +9 -0
  51. package/src/components/atoms/GradientPanel/styles.js +7 -1
  52. package/src/components/atoms/InputFormatter/index.js +109 -46
  53. package/src/components/atoms/InputFormatter/styles.js +6 -0
  54. package/src/components/atoms/ProgressBar/styles.js +2 -1
  55. package/src/components/atoms/Select/index.js +3 -1
  56. package/src/components/atoms/Select/style.js +1 -2
  57. package/src/components/atoms/StatusTag/styles.js +2 -1
  58. package/src/components/molecules/CarouselImagesLogin/CarouselImagesLogin.stories.js +17 -0
  59. package/src/components/molecules/CarouselImagesLogin/index.js +68 -0
  60. package/src/components/molecules/CarouselImagesLogin/styles.js +60 -0
  61. package/src/components/molecules/LoginPasswordStrength/LoginPasswordStrength.stories.js +8 -0
  62. package/src/components/molecules/LoginPasswordStrength/index.js +89 -0
  63. package/src/components/molecules/LoginPasswordStrength/styles.js +87 -0
  64. package/src/components/molecules/TagAndInput/index.js +2 -0
  65. package/src/components/organisms/InputGroup/index.js +25 -8
  66. package/src/components/pages/ChangePasswordLogin/ChangePasswordLogin.stories.js +18 -0
  67. package/src/components/pages/ChangePasswordLogin/index.js +78 -0
  68. package/src/components/pages/ChangePasswordLogin/styles.js +20 -0
  69. package/src/components/pages/EmailResetPassword/EmailResetPassword.stories.js +17 -0
  70. package/src/components/pages/EmailResetPassword/index.js +77 -0
  71. package/src/components/pages/EmailResetPassword/styles.js +27 -0
  72. package/src/components/pages/RegistrationLoginFirstStep/RegistrationLoginFirstStep.stories.js +17 -0
  73. package/src/components/pages/RegistrationLoginFirstStep/index.js +160 -0
  74. package/src/components/pages/RegistrationLoginFirstStep/styles.js +85 -0
  75. package/src/components/pages/RegistrationLoginSecondStep/RegistrationLoginSecondStep.stories.js +18 -0
  76. package/src/components/pages/RegistrationLoginSecondStep/index.js +111 -0
  77. package/src/components/pages/RegistrationLoginSecondStep/styles.js +64 -0
  78. package/src/components/pages/RegistrationLoginThirdStep/RegistrationLoginThirdStep.stories.js +17 -0
  79. package/src/components/pages/RegistrationLoginThirdStep/index.js +106 -0
  80. package/src/components/pages/RegistrationLoginThirdStep/styles.js +48 -0
  81. package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +18 -29
  82. package/src/components/pages/RetailerProductEdition/index.js +84 -22
  83. package/src/components/pages/VerificationCodeResetPassword/VerificationCodeResetPassword.stories.js +17 -0
  84. package/src/components/pages/VerificationCodeResetPassword/index.js +92 -0
  85. package/src/components/pages/VerificationCodeResetPassword/styles.js +54 -0
  86. package/src/components/pages/VerificationCodeResetPassword/utils.js +56 -0
@@ -0,0 +1,78 @@
1
+ import { Container } from "./styles";
2
+ import { CarouselImagesLogin } from "../../molecules/CarouselImagesLogin";
3
+ import { LoginPasswordStrength } from "../../molecules/LoginPasswordStrength";
4
+ import { useState } from "react";
5
+ import { Button } from "../../atoms/GeneralButton";
6
+ import { LogoImage } from "../../atoms/LogoImage";
7
+ import { ScreenHeader } from "../../atoms/ScreenHeader";
8
+ import { GlobalColors, FontFamily } from "../../../global-files/variables";
9
+ import { GradientPanel } from "../../atoms/GradientPanel";
10
+
11
+ export const ChangePasswordLogin = ({
12
+ imageArrayCarousel = [],
13
+ textCarousel,
14
+ backogroundColorCarousel,
15
+ textHeaderRight,
16
+ }) => {
17
+ const [emptyPassword, setEmptyPassword] = useState(false);
18
+ const [emptyConfirmPassword, setEmptyConfirmPassword] = useState(false);
19
+ const [matchPasswords, setMatchPasswords] = useState(true);
20
+ const validate = async (e) => {
21
+ e.preventDefault();
22
+ const password = document.querySelector("#newPasswordInput").value;
23
+ password.length < 8 ? setEmptyPassword(true) : setEmptyPassword(false);
24
+ const confirmPassword = document.querySelector(
25
+ "#confirmPasswordInput"
26
+ ).value;
27
+ confirmPassword === ""
28
+ ? setEmptyConfirmPassword(true)
29
+ : setEmptyConfirmPassword(false);
30
+ if (password === confirmPassword) {
31
+ setMatchPasswords(true);
32
+ } else {
33
+ setMatchPasswords(false);
34
+ }
35
+ };
36
+ const loginRight = [
37
+ <LogoImage key="1" />,
38
+ <div className="credenciales" key={"2"}>
39
+ <ScreenHeader
40
+ fontFamily={FontFamily.AvenirNext}
41
+ color={GlobalColors.s5}
42
+ text={textHeaderRight}
43
+ />
44
+ </div>,
45
+ <LoginPasswordStrength
46
+ emptyPassword={emptyPassword}
47
+ emptyConfirmPassword={emptyConfirmPassword}
48
+ matchPasswords={matchPasswords}
49
+ textTittle={textHeaderRight}
50
+ key="3"
51
+ />,
52
+ <div className="button-center" key="4">
53
+ <Button
54
+ buttonType={"general-default-button"}
55
+ label={"Enviar"}
56
+ onClick={(e) => validate(e)}
57
+ />
58
+ </div>,
59
+ ];
60
+ return (
61
+ <Container>
62
+ <div className="home-retailer">
63
+ <CarouselImagesLogin
64
+ panelImg={imageArrayCarousel}
65
+ panelText={textCarousel}
66
+ panelColor={backogroundColorCarousel}
67
+ />
68
+ </div>
69
+ <div className="home-login-retailer">
70
+ <GradientPanel
71
+ panelColor={GlobalColors.white}
72
+ componentsArray={loginRight}
73
+ panelType={"home-login"}
74
+ ></GradientPanel>
75
+ </div>
76
+ </Container>
77
+ );
78
+ };
@@ -0,0 +1,20 @@
1
+ import styled from "styled-components";
2
+
3
+ export const Container = styled.div`
4
+ display: flex;
5
+ width: 100%;
6
+ height: 100vh;
7
+ .home-login-retailer,
8
+ .home-retailer {
9
+ width: 50%;
10
+ .button-center {
11
+ text-align: center;
12
+ position: absolute;
13
+ bottom: 5%;
14
+ left: calc(75% - 80px);
15
+ .general-default-button {
16
+ width: 160px;
17
+ }
18
+ }
19
+ }
20
+ `;
@@ -0,0 +1,17 @@
1
+ import { EmailResetPassword } from "./index";
2
+ import LoginImage from "../../../assets/images/carouselImagesLogin/loginImage.svg";
3
+ import Login2 from "../../../assets/images/carouselImagesLogin/login2.svg";
4
+ import Login3 from "../../../assets/images/carouselImagesLogin/login3.svg";
5
+
6
+ export default {
7
+ title: "Components/pages/EmailResetPassword",
8
+ component: EmailResetPassword,
9
+ };
10
+ const Template = (args) => <EmailResetPassword {...args} />;
11
+
12
+ export const EmailResetPasswordDefault = Template.bind({});
13
+
14
+ EmailResetPasswordDefault.args = {
15
+ imageArrayCarousel: [LoginImage, Login2, Login3],
16
+ textCarousel: "Elige la plataforma que conecta proovedores y retailers",
17
+ };
@@ -0,0 +1,77 @@
1
+ import { Container } from "./styles";
2
+ import { GradientPanel } from "../../atoms/GradientPanel";
3
+ import { CarouselImagesLogin } from "../../molecules/CarouselImagesLogin";
4
+ import { useState } from "react";
5
+ import { LogoImage } from "../../atoms/LogoImage";
6
+ import { ScreenHeader } from "../../atoms/ScreenHeader";
7
+ import { GlobalColors, FontFamily } from "../../../global-files/variables";
8
+ import { TagAndInput } from "../../molecules/TagAndInput";
9
+ import { Button } from "../../atoms/GeneralButton";
10
+
11
+ export const EmailResetPassword = ({
12
+ imageArrayCarousel = [],
13
+ textCarousel,
14
+ backogroundColorCarousel,
15
+ }) => {
16
+ const [emptyEmail, setEmptyEmail] = useState(false);
17
+ const [invalidEmail, setInvalidEmail] = useState(false);
18
+
19
+ const validate = async (e) => {
20
+ e.preventDefault();
21
+ const email = document.querySelector("#emailInput").value;
22
+ email === "" ? setEmptyEmail(true) : setEmptyEmail(false);
23
+ !/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(
24
+ email
25
+ )
26
+ ? setInvalidEmail(true)
27
+ : setInvalidEmail(false);
28
+ };
29
+ const loginRight = [
30
+ <LogoImage key="1" />,
31
+ <div className="credenciales" key={"2"}>
32
+ <ScreenHeader
33
+ fontFamily={FontFamily.AvenirNext}
34
+ color={GlobalColors.s5}
35
+ text={"Ingresa tus credenciales"}
36
+ />
37
+ </div>,
38
+ <div className="user" key="3">
39
+ <TagAndInput
40
+ inputType={"text"}
41
+ inputId={"emailInput"}
42
+ label={"Nombre de usuario"}
43
+ inputPlaceHolder={"username@contentoh.com"}
44
+ />
45
+ {emptyEmail && <label>Ingrese su correo</label>}
46
+ {invalidEmail && !emptyEmail && <label>Ingrese un correo válido</label>}
47
+ </div>,
48
+ <div className="button-center" key="4">
49
+ <Button
50
+ buttonType={"general-default-button"}
51
+ label={"Enviar"}
52
+ onClick={(e) => validate(e)}
53
+ />
54
+ </div>,
55
+ <div className="back-login" key="5">
56
+ <p>Regresar...</p>
57
+ </div>,
58
+ ];
59
+ return (
60
+ <Container>
61
+ <div className="home-retailer">
62
+ <CarouselImagesLogin
63
+ panelImg={imageArrayCarousel}
64
+ panelText={textCarousel}
65
+ panelColor={backogroundColorCarousel}
66
+ />
67
+ </div>
68
+ <div className="home-login-retailer">
69
+ <GradientPanel
70
+ componentsArray={loginRight}
71
+ panelType={"home-login"}
72
+ panelColor={GlobalColors.white}
73
+ />
74
+ </div>
75
+ </Container>
76
+ );
77
+ };
@@ -0,0 +1,27 @@
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
+ width: 100%;
7
+ height: 100vh;
8
+ .home-login-retailer,
9
+ .home-retailer {
10
+ width: 50%;
11
+ .button-center {
12
+ text-align: center;
13
+ .general-default-button {
14
+ width: 160px;
15
+ }
16
+ }
17
+ .back-login {
18
+ text-align: center;
19
+ margin: 15px !important;
20
+ color: ${GlobalColors.secondary_magenta};
21
+ cursor: pointer;
22
+ font-weight: bold;
23
+ font-family: ${FontFamily.Raleway};
24
+ font-size: 13px;
25
+ }
26
+ }
27
+ `;
@@ -0,0 +1,17 @@
1
+ import { RegistrationLoginFirstStep } from "./index";
2
+ import LoginImage from "../../../assets/images/carouselImagesLogin/loginImage.svg";
3
+ import Login2 from "../../../assets/images/carouselImagesLogin/login2.svg";
4
+ import Login3 from "../../../assets/images/carouselImagesLogin/login3.svg";
5
+
6
+ export default {
7
+ title: "Components/pages/RegistrationLoginFirstStep",
8
+ component: RegistrationLoginFirstStep,
9
+ };
10
+ const Template = (args) => <RegistrationLoginFirstStep {...args} />;
11
+
12
+ export const RegistrationLoginFirstStepDefault = Template.bind({});
13
+
14
+ RegistrationLoginFirstStepDefault.args = {
15
+ imageArrayCarousel: [LoginImage, Login2, Login3],
16
+ textCarousel: "Elige la plataforma que conecta proovedores y retailers",
17
+ };
@@ -0,0 +1,160 @@
1
+ import { Container } from "./styles";
2
+ import { GradientPanel } from "../../atoms/GradientPanel";
3
+ import { CarouselImagesLogin } from "../../molecules/CarouselImagesLogin";
4
+ import { useState } from "react";
5
+ import { LogoImage } from "../../atoms/LogoImage";
6
+ import { ScreenHeader } from "../../atoms/ScreenHeader";
7
+ import { GlobalColors, FontFamily } from "../../../global-files/variables";
8
+ import { TagAndInput } from "../../molecules/TagAndInput";
9
+ import { Button } from "../../atoms/GeneralButton";
10
+ import { GeneralInput } from "../../atoms/GeneralInput";
11
+
12
+ export const RegistrationLoginFirstStep = ({
13
+ imageArrayCarousel = [],
14
+ textCarousel,
15
+ backogroundColorCarousel,
16
+ }) => {
17
+ const [emptyName, setEmptyName] = useState(false);
18
+ const [emptyLastName, setEmptyLastName] = useState(false);
19
+ const [emptyEmail, setEmptyEmail] = useState(false);
20
+ const [emptyJob, setEmptyJob] = useState(false);
21
+ const [emptyPhone, setEmptyPhone] = useState(false);
22
+ const [invalidEmail, setInvalidEmail] = useState(false);
23
+
24
+ const validate = async (e) => {
25
+ e.preventDefault();
26
+ const name = document.querySelector("#nameInput").value;
27
+ const lastName = document.querySelector("#lastNameInput").value;
28
+ const email = document.querySelector("#emailInput").value;
29
+ const job = document.querySelector("#jobInput").value;
30
+ const phone = document.querySelector("#phoneInput").value;
31
+ name === "" ? setEmptyName(true) : setEmptyName(false);
32
+ lastName === "" ? setEmptyLastName(true) : setEmptyLastName(false);
33
+ email === "" ? setEmptyEmail(true) : setEmptyEmail(false);
34
+ job === "" ? setEmptyJob(true) : setEmptyJob(false);
35
+ phone === "" ? setEmptyPhone(true) : setEmptyPhone(false);
36
+ !/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/.test(
37
+ email
38
+ )
39
+ ? setInvalidEmail(true)
40
+ : setInvalidEmail(false);
41
+ };
42
+ const loginRight = [
43
+ <LogoImage key="1" />,
44
+ <div className="credenciales" key={"2"}>
45
+ <ScreenHeader
46
+ fontFamily={FontFamily.AvenirNext}
47
+ color={GlobalColors.s5}
48
+ text={"Ingresa tus credenciales"}
49
+ />
50
+ </div>,
51
+ <div className="user" key="3">
52
+ <div className="name-registration-user">
53
+ <TagAndInput
54
+ inputType={"text"}
55
+ inputId={"nameInput"}
56
+ label={"Nombre"}
57
+ inputPlaceHolder={"Nombre"}
58
+ />
59
+ <TagAndInput
60
+ inputType={"text"}
61
+ inputId={"lastNameInput"}
62
+ label={"Apellido"}
63
+ inputPlaceHolder={"Apellido"}
64
+ />
65
+ </div>
66
+ {emptyName && <label>Ingrese su nombre</label>}
67
+ {emptyLastName && <label>Ingrese sus apellidos</label>}
68
+ <TagAndInput
69
+ inputType={"text"}
70
+ inputId={"emailInput"}
71
+ label={"Correo electrónico"}
72
+ inputPlaceHolder={"username@contentoh.com"}
73
+ />
74
+ {emptyEmail && <label>Ingrese su correo</label>}
75
+ {invalidEmail && !emptyEmail && <label>Ingrese un correo válido</label>}
76
+ <TagAndInput
77
+ inputType={"text"}
78
+ inputId={"jobInput"}
79
+ label={"Puesto laboral"}
80
+ inputPlaceHolder={"Puesto dentro de la empresa"}
81
+ />
82
+ {emptyJob && <label>Ingrese su puesto</label>}
83
+ <ScreenHeader text={"Teléfono"} headerType={"input-name-header"} />
84
+ <div className="phone-registration-user">
85
+ <select name="select" className="phone-options">
86
+ <option>+52</option>
87
+ <option>+54</option>
88
+ <option>+57</option>
89
+ <option>+506</option>
90
+ <option>+593</option>
91
+ <option>+503</option>
92
+ <option>+504</option>
93
+ <option>+507</option>
94
+ <option>+51</option>
95
+ </select>
96
+ <GeneralInput
97
+ inputId={"phoneInput"}
98
+ inputType={"text"}
99
+ inputPlaceholder={"Teléfono"}
100
+ />
101
+ </div>
102
+ {emptyPhone && <label>Ingrese su número de teléfono</label>}
103
+ <ScreenHeader text={"País"} headerType={"input-name-header"} />
104
+ <select name="select" className="country-options">
105
+ <option value="value1" selected>
106
+ Selecciona tu país
107
+ </option>
108
+ <option value="value2">Argentina</option>
109
+ <option value="value3">Colombia</option>
110
+ <option value="value2">Ecuador</option>
111
+ <option value="value3">El Salvador</option>
112
+ <option value="value2">Honduras</option>
113
+ <option value="value3">México</option>
114
+ <option value="value2">Panamá</option>
115
+ <option value="value3">Perú</option>
116
+ </select>
117
+ {emptyEmail && <label>Seleccione su país</label>}
118
+ </div>,
119
+ <div className="button-end" key="4">
120
+ <Button
121
+ buttonType={"general-default-button"}
122
+ label={"Enviar"}
123
+ onClick={(e) => validate(e)}
124
+ />
125
+ </div>,
126
+ <div className="progress-bar" key="5">
127
+ <div className="progress-bar-first-step"></div>
128
+ <div className="progress-bar-registration"></div>
129
+ </div>,
130
+ <ScreenHeader
131
+ text={"Paso 1"}
132
+ headerType={"date-header"}
133
+ color={GlobalColors.s4}
134
+ key="6"
135
+ />,
136
+ <div className="new-login" key="7">
137
+ <p className="pre-registro">
138
+ ¿Ya tienes una cuenta?<span> Inicia Sesión</span>
139
+ </p>
140
+ </div>,
141
+ ];
142
+ return (
143
+ <Container>
144
+ <div className="home-retailer">
145
+ <CarouselImagesLogin
146
+ panelImg={imageArrayCarousel}
147
+ panelText={textCarousel}
148
+ panelColor={backogroundColorCarousel}
149
+ />
150
+ </div>
151
+ <div className="home-login-retailer">
152
+ <GradientPanel
153
+ componentsArray={loginRight}
154
+ panelType={"home-login"}
155
+ panelColor={GlobalColors.white}
156
+ />
157
+ </div>
158
+ </Container>
159
+ );
160
+ };
@@ -0,0 +1,85 @@
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
+ width: 100%;
7
+ height: 100vh;
8
+ .user {
9
+ .name-registration-user {
10
+ display: flex;
11
+ justify-content: space-between;
12
+ input {
13
+ width: 160px;
14
+ }
15
+ }
16
+ .input-name-header {
17
+ margin-bottom: 4px;
18
+ margin-top: 12px;
19
+ }
20
+ .phone-registration-user {
21
+ display: flex;
22
+ justify-content: space-between;
23
+ .phone-options {
24
+ width: 80px;
25
+ }
26
+ input {
27
+ width: 100%;
28
+ }
29
+ & + * {
30
+ margin-top: 10px;
31
+ }
32
+ }
33
+ .country-options,
34
+ .phone-options {
35
+ width: 100%;
36
+ border: 1px solid ${GlobalColors.s2};
37
+ font-family: ${FontFamily.AvenirNext};
38
+ color: ${GlobalColors.s4};
39
+ font-weight: normal;
40
+ font-size: 12px;
41
+ line-height: 15px;
42
+ padding: 10px;
43
+ outline: none;
44
+ border-radius: 2px;
45
+ resize: none;
46
+ &:focus {
47
+ border: 1px solid ${GlobalColors.magenta_s2};
48
+ }
49
+ }
50
+ }
51
+ .button-end {
52
+ text-align: end;
53
+ .general-default-button {
54
+ width: 160px;
55
+ }
56
+ & + * {
57
+ margin-top: 10px;
58
+ }
59
+ }
60
+ .progress-bar {
61
+ width: 100%;
62
+ height: 8px;
63
+ display: flex;
64
+ justify-content: space-between;
65
+ .progress-bar-first-step {
66
+ width: 33.33%;
67
+ background-color: rgb(196, 196, 196);
68
+ }
69
+ .progress-bar-registration {
70
+ background-color: rgb(226, 226, 226);
71
+ width: 66.66%;
72
+ }
73
+ }
74
+ .date-header {
75
+ .new-login {
76
+ & + * {
77
+ margin-top: 20px;
78
+ }
79
+ }
80
+ }
81
+ .home-login-retailer,
82
+ .home-retailer {
83
+ width: 50%;
84
+ }
85
+ `;
@@ -0,0 +1,18 @@
1
+ import { RegistrationLoginSecondStep } from "./index";
2
+ import LoginImage from "../../../assets/images/carouselImagesLogin/loginImage.svg";
3
+ import Login2 from "../../../assets/images/carouselImagesLogin/login2.svg";
4
+ import Login3 from "../../../assets/images/carouselImagesLogin/login3.svg";
5
+
6
+ export default {
7
+ title: "Components/pages/RegistrationLoginSecondStep",
8
+ component: RegistrationLoginSecondStep,
9
+ };
10
+ const Template = (args) => <RegistrationLoginSecondStep {...args} />;
11
+
12
+ export const RegistrationLoginSecondStepDefault = Template.bind({});
13
+
14
+ RegistrationLoginSecondStepDefault.args = {
15
+ imageArrayCarousel: [LoginImage, Login2, Login3],
16
+ textCarousel: "Elige la plataforma que conecta proovedores y retailers",
17
+ textHeaderRight: "Ingresa tus credenciales",
18
+ };
@@ -0,0 +1,111 @@
1
+ import { Container } from "./styles";
2
+ import { GradientPanel } from "../../atoms/GradientPanel";
3
+ import { CarouselImagesLogin } from "../../molecules/CarouselImagesLogin";
4
+ import { useState } from "react";
5
+ import { ScreenHeader } from "../../atoms/ScreenHeader";
6
+ import { GlobalColors, FontFamily } from "../../../global-files/variables";
7
+ import { Button } from "../../atoms/GeneralButton";
8
+ import { CheckBox } from "../../atoms/CheckBox";
9
+ import { LoginPasswordStrength } from "../../molecules/LoginPasswordStrength";
10
+ import { LogoImage } from "../../atoms/LogoImage";
11
+ export const RegistrationLoginSecondStep = ({
12
+ imageArrayCarousel = [],
13
+ textCarousel,
14
+ backogroundColorCarousel,
15
+ textHeaderRight,
16
+ }) => {
17
+ const [emptyPassword, setEmptyPassword] = useState(false);
18
+ const [emptyConfirmPassword, setEmptyConfirmPassword] = useState(false);
19
+ const [matchPasswords, setMatchPasswords] = useState(true);
20
+ const validate = async (e) => {
21
+ e.preventDefault();
22
+ const password = document.querySelector("#newPasswordInput").value;
23
+ password.length < 8 ? setEmptyPassword(true) : setEmptyPassword(false);
24
+ const confirmPassword = document.querySelector(
25
+ "#confirmPasswordInput"
26
+ ).value;
27
+ confirmPassword === ""
28
+ ? setEmptyConfirmPassword(true)
29
+ : setEmptyConfirmPassword(false);
30
+ if (password === confirmPassword) {
31
+ setMatchPasswords(true);
32
+ } else {
33
+ setMatchPasswords(false);
34
+ }
35
+ };
36
+ const loginRight = [
37
+ <LogoImage key="1" />,
38
+ <div className="credenciales" key={"2"}>
39
+ <ScreenHeader
40
+ fontFamily={FontFamily.AvenirNext}
41
+ color={GlobalColors.s5}
42
+ text={textHeaderRight}
43
+ />
44
+ </div>,
45
+ <LoginPasswordStrength
46
+ key={"3"}
47
+ emptyPassword={emptyPassword}
48
+ emptyConfirmPassword={emptyConfirmPassword}
49
+ matchPasswords={matchPasswords}
50
+ textTittle={textHeaderRight}
51
+ />,
52
+ <label className="label-terms">Términos y condiciones</label>,
53
+ <div className="checkbox-terms">
54
+ <input type="checkbox" />
55
+ <ScreenHeader
56
+ text={
57
+ "Conoce nuestros termnios y condiciones de cada uno de nuestros servicios. Si tienes algunda duda o comentario escríbenos."
58
+ }
59
+ headerType={"date-header"}
60
+ />
61
+ </div>,
62
+ <label className="label-terms">Aviso de privacidad</label>,
63
+ <div className="checkbox-terms">
64
+ <input type="checkbox" />
65
+ <ScreenHeader
66
+ text={"Todos los datos estan protegidos."}
67
+ headerType={"date-header"}
68
+ />
69
+ </div>,
70
+ <div className="button-end" key="6">
71
+ <Button
72
+ buttonType={"general-default-button"}
73
+ label={"Enviar"}
74
+ onClick={(e) => validate(e)}
75
+ />
76
+ </div>,
77
+ <div className="progress-bar">
78
+ <div className="progress-bar-first-step-check"></div>
79
+ <div className="progress-bar-second-step"></div>
80
+ <div className="progress-bar-registration"></div>
81
+ </div>,
82
+ <ScreenHeader
83
+ text={"Paso 2"}
84
+ headerType={"date-header"}
85
+ color={GlobalColors.s4}
86
+ />,
87
+ <div className="new-login" key="7">
88
+ <p className="pre-registro">
89
+ ¿Aún no tienes cuenta?<span> Regístrate</span>
90
+ </p>
91
+ </div>,
92
+ ];
93
+ return (
94
+ <Container>
95
+ <div className="home-retailer">
96
+ <CarouselImagesLogin
97
+ panelImg={imageArrayCarousel}
98
+ panelText={textCarousel}
99
+ panelColor={backogroundColorCarousel}
100
+ />
101
+ </div>
102
+ <div className="home-login-retailer">
103
+ <GradientPanel
104
+ panelColor={GlobalColors.white}
105
+ componentsArray={loginRight}
106
+ panelType={"home-login"}
107
+ ></GradientPanel>
108
+ </div>
109
+ </Container>
110
+ );
111
+ };
@@ -0,0 +1,64 @@
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
+ width: 100%;
7
+ height: 100vh;
8
+ .button-end {
9
+ text-align: end;
10
+ .general-default-button {
11
+ width: 160px;
12
+ }
13
+ & + * {
14
+ margin-top: 10px;
15
+ }
16
+ }
17
+ .progress-bar {
18
+ width: 100%;
19
+ height: 8px;
20
+ display: flex;
21
+ justify-content: space-between;
22
+ .progress-bar-first-step-check {
23
+ width: 33.33%;
24
+ background-color: ${GlobalColors.exported};
25
+ }
26
+ .progress-bar-second-step {
27
+ width: 33.33%;
28
+ background-color: rgb(196, 196, 196);
29
+ }
30
+ .progress-bar-registration {
31
+ background-color: rgb(226, 226, 226);
32
+ width: 33.33%;
33
+ }
34
+ }
35
+ .date-header {
36
+ margin-left: 33.33%;
37
+ }
38
+ .home-login-retailer,
39
+ .home-retailer {
40
+ width: 50%;
41
+ }
42
+ .checkbox-terms {
43
+ display: flex;
44
+ margin-bottom: 5px;
45
+ input {
46
+ cursor: pointer;
47
+ & + * {
48
+ margin-left: 15px;
49
+ }
50
+ }
51
+ }
52
+ .label-terms {
53
+ //color: ${GlobalColors.original_purpura};
54
+ color: rgb(129, 115, 147);
55
+ font-size: 13px;
56
+ line-height: 24px;
57
+ font-weight: 700;
58
+ cursor: pointer;
59
+ margin-left: 25px;
60
+ & + * {
61
+ margin-top: 5px;
62
+ }
63
+ }
64
+ `;