contentoh-components-library 21.0.21 → 21.0.22
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/molecules/CarouselImagesLogin/index.js +40 -42
- package/dist/components/molecules/Login/Login.stories.js +28 -0
- package/dist/components/molecules/Login/index.js +79 -0
- package/dist/components/molecules/Login/styles.js +20 -0
- package/package.json +2 -2
- package/src/components/molecules/CarouselImagesLogin/index.js +34 -37
- package/src/components/molecules/Login/Login.stories.js +11 -0
- package/src/components/molecules/Login/index.js +57 -0
- package/src/components/molecules/Login/styles.js +73 -0
|
@@ -22,50 +22,48 @@ var CarouselImagesLogin = function CarouselImagesLogin(_ref) {
|
|
|
22
22
|
panelColor = _ref.panelColor;
|
|
23
23
|
|
|
24
24
|
var carouselStart = function carouselStart() {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
var images = panelImg;
|
|
26
|
+
var i = 1;
|
|
27
|
+
var img1 = document.querySelector("#img1");
|
|
28
|
+
var img2 = document.querySelector("#img2");
|
|
29
|
+
var divIndicadores = document.querySelector("#indicadores");
|
|
30
|
+
|
|
31
|
+
for (var index = 0; index < images.length; index++) {
|
|
32
|
+
var div = document.createElement("div");
|
|
33
|
+
div.classList.add("circles");
|
|
34
|
+
div.id = index;
|
|
35
|
+
divIndicadores.appendChild(div);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
img1.src = images[0];
|
|
39
|
+
var circulos = document.querySelectorAll(".circles");
|
|
40
|
+
circulos[0].classList.add("resaltado");
|
|
41
|
+
|
|
42
|
+
var slideshow = function slideshow() {
|
|
43
|
+
img2.src = images[i];
|
|
44
|
+
var circulo_actual = Array.from(circulos).find(function (el) {
|
|
45
|
+
return el.id == i;
|
|
46
|
+
});
|
|
47
|
+
Array.from(circulos).forEach(function (cir) {
|
|
48
|
+
return cir.classList.remove("resaltado");
|
|
49
|
+
});
|
|
50
|
+
circulo_actual.classList.add("resaltado");
|
|
51
|
+
img1.classList.add("right");
|
|
52
|
+
img2.classList.add("active");
|
|
53
|
+
i++;
|
|
54
|
+
|
|
55
|
+
if (i == images.length) {
|
|
56
|
+
i = 0;
|
|
37
57
|
}
|
|
38
58
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
});
|
|
48
|
-
Array.from(circulos).forEach(function (cir) {
|
|
49
|
-
return cir.classList.remove("resaltado");
|
|
50
|
-
});
|
|
51
|
-
circulo_actual.classList.add("resaltado");
|
|
52
|
-
img1.classList.add("right");
|
|
53
|
-
img2.classList.add("active");
|
|
54
|
-
i++;
|
|
55
|
-
|
|
56
|
-
if (i == images.length) {
|
|
57
|
-
i = 0;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
setTimeout(function () {
|
|
61
|
-
img1.src = img2.src;
|
|
62
|
-
img2.classList.remove("active");
|
|
63
|
-
img1.classList.remove("right");
|
|
64
|
-
}, 1000);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
setInterval(slideshow, 4000);
|
|
68
|
-
});
|
|
59
|
+
setTimeout(function () {
|
|
60
|
+
img1.src = img2.src;
|
|
61
|
+
img2.classList.remove("active");
|
|
62
|
+
img1.classList.remove("right");
|
|
63
|
+
}, 1000);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
setInterval(slideshow, 4000);
|
|
69
67
|
};
|
|
70
68
|
|
|
71
69
|
(0, _react.useEffect)(function () {
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = exports.LoginDefault = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _index = require("./index");
|
|
13
|
+
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
|
|
16
|
+
var _default = {
|
|
17
|
+
title: "Components/molecules/Login",
|
|
18
|
+
component: _index.Login
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
|
|
22
|
+
var Template = function Template(args) {
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Login, (0, _objectSpread2.default)({}, args));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var LoginDefault = Template.bind({});
|
|
27
|
+
exports.LoginDefault = LoginDefault;
|
|
28
|
+
LoginDefault.args = {};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Login = void 0;
|
|
7
|
+
|
|
8
|
+
var _styles = require("./styles");
|
|
9
|
+
|
|
10
|
+
var _index = require("../../atoms/LogoImage/index");
|
|
11
|
+
|
|
12
|
+
var _index2 = require("../../atoms/ScreenHeader/index");
|
|
13
|
+
|
|
14
|
+
var _index3 = require("../../atoms/GeneralButton/index");
|
|
15
|
+
|
|
16
|
+
var _index4 = require("../../atoms/CheckBox/index");
|
|
17
|
+
|
|
18
|
+
var _TagAndInput = require("../TagAndInput");
|
|
19
|
+
|
|
20
|
+
var _variables = require("../../../global-files/variables");
|
|
21
|
+
|
|
22
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
+
|
|
24
|
+
var Login = function Login() {
|
|
25
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
26
|
+
className: "home-login",
|
|
27
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
28
|
+
className: "main-container",
|
|
29
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.LogoImage, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
30
|
+
className: "credenciales",
|
|
31
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.ScreenHeader, {
|
|
32
|
+
fontFamily: _variables.FontFamily.AvenirNext,
|
|
33
|
+
color: _variables.GlobalColors.s5,
|
|
34
|
+
text: "Ingresa tus credenciales"
|
|
35
|
+
})
|
|
36
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
37
|
+
className: "user",
|
|
38
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
|
|
39
|
+
inputType: "text",
|
|
40
|
+
label: "Nombre de usuario",
|
|
41
|
+
inputPlaceHolder: "username@contentoh.com"
|
|
42
|
+
})
|
|
43
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
44
|
+
className: "password",
|
|
45
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
|
|
46
|
+
inputType: "text",
|
|
47
|
+
label: "Contraseña",
|
|
48
|
+
inputPlaceHolder: "Escribe tu contraseña"
|
|
49
|
+
})
|
|
50
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
51
|
+
className: "select",
|
|
52
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index4.CheckBox, {
|
|
53
|
+
label: "Mantener sesión activada",
|
|
54
|
+
id: "chk-default",
|
|
55
|
+
className: "active-left"
|
|
56
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
57
|
+
className: "active-right",
|
|
58
|
+
children: "Olvide mi contrase\xF1a"
|
|
59
|
+
})]
|
|
60
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
61
|
+
className: "button-right",
|
|
62
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.Button, {
|
|
63
|
+
buttonType: "general-default-button",
|
|
64
|
+
label: "Iniciar sesión"
|
|
65
|
+
})
|
|
66
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
67
|
+
className: "new-login",
|
|
68
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
|
|
69
|
+
className: "pre-registro",
|
|
70
|
+
children: ["\xBFA\xFAn no tienes cuenta?", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
71
|
+
children: " Reg\xEDstrate"
|
|
72
|
+
})]
|
|
73
|
+
})
|
|
74
|
+
})]
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
exports.Login = Login;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.Container = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
13
|
+
|
|
14
|
+
var _variables = require("../../../global-files/variables");
|
|
15
|
+
|
|
16
|
+
var _templateObject;
|
|
17
|
+
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: \"white\";\n display: flex;\n height: 100%;\n justify-content: center;\n align-items: center;\n label {\n color: red;\n margin-top: 3px;\n margin-left: 15px;\n font-family: ", ";\n font-size: 11px;\n }\n\n &.home-login {\n .credenciales {\n & + * {\n margin-top: 30px;\n }\n }\n .user {\n & + * {\n margin-top: 20px;\n }\n }\n .password {\n & + * {\n margin-top: 20px;\n }\n }\n .select {\n display: flex;\n justify-content: space-between;\n .active-right {\n font-family: ", ";\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n letter-spacing: -0.015em;\n color: ", ";\n }\n & + * {\n margin-top: 50px;\n }\n }\n .button-right {\n text-align: right;\n & + * {\n margin-top: 55px;\n }\n }\n .new-login {\n p {\n font-family: ", ";\n text-align: right;\n font-weight: 500;\n font-size: 13px;\n line-height: 24px;\n color: ", ";\n span {\n color: ", ";\n }\n }\n }\n }\n .main-container {\n max-width: 80%;\n max-height: 80%;\n }\n"])), _variables.FontFamily.Raleway_700, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.GlobalColors.secondary_magenta);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentoh-components-library",
|
|
3
|
-
"version": "21.0.
|
|
3
|
+
"version": "21.0.22",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@babel/runtime": "^7.17.2",
|
|
6
6
|
"@storybook/addon-postcss": "^2.0.0",
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"axios": "^0.25.0",
|
|
11
11
|
"babel-preset-react-app": "^10.0.1",
|
|
12
12
|
"chart.js": "^3.7.1",
|
|
13
|
-
"contentoh-components-library": "^21.0.18",
|
|
14
13
|
"js-base64": "^3.7.2",
|
|
15
14
|
"prop-types": "^15.7.2",
|
|
16
15
|
"react": "^17.0.2",
|
|
@@ -71,6 +70,7 @@
|
|
|
71
70
|
"auto": "^10.36.5",
|
|
72
71
|
"babel-loader": "^8.2.3",
|
|
73
72
|
"chromatic": "^6.3.3",
|
|
73
|
+
"contentoh-components-library": "^21.0.21",
|
|
74
74
|
"cross-env": "^7.0.3",
|
|
75
75
|
"storybook-css-modules-preset": "^1.1.1"
|
|
76
76
|
},
|
|
@@ -9,46 +9,43 @@ export const CarouselImagesLogin = ({
|
|
|
9
9
|
panelColor,
|
|
10
10
|
}) => {
|
|
11
11
|
const carouselStart = () => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
const images = panelImg;
|
|
13
|
+
let i = 1;
|
|
14
|
+
const img1 = document.querySelector("#img1");
|
|
15
|
+
const img2 = document.querySelector("#img2");
|
|
16
|
+
const divIndicadores = document.querySelector("#indicadores");
|
|
17
|
+
for (let index = 0; index < images.length; index++) {
|
|
18
|
+
const div = document.createElement("div");
|
|
19
|
+
div.classList.add("circles");
|
|
20
|
+
div.id = index;
|
|
21
|
+
divIndicadores.appendChild(div);
|
|
22
|
+
}
|
|
23
|
+
img1.src = images[0];
|
|
24
|
+
const circulos = document.querySelectorAll(".circles");
|
|
25
|
+
circulos[0].classList.add("resaltado");
|
|
26
|
+
const slideshow = () => {
|
|
27
|
+
img2.src = images[i];
|
|
28
|
+
const circulo_actual = Array.from(circulos).find((el) => el.id == i);
|
|
29
|
+
Array.from(circulos).forEach((cir) => cir.classList.remove("resaltado"));
|
|
30
|
+
circulo_actual.classList.add("resaltado");
|
|
31
|
+
img1.classList.add("right");
|
|
32
|
+
img2.classList.add("active");
|
|
33
|
+
i++;
|
|
34
|
+
if (i == images.length) {
|
|
35
|
+
i = 0;
|
|
23
36
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
cir.classList.remove("resaltado")
|
|
32
|
-
);
|
|
33
|
-
circulo_actual.classList.add("resaltado");
|
|
34
|
-
img1.classList.add("right");
|
|
35
|
-
img2.classList.add("active");
|
|
36
|
-
i++;
|
|
37
|
-
if (i == images.length) {
|
|
38
|
-
i = 0;
|
|
39
|
-
}
|
|
40
|
-
setTimeout(() => {
|
|
41
|
-
img1.src = img2.src;
|
|
42
|
-
img2.classList.remove("active");
|
|
43
|
-
img1.classList.remove("right");
|
|
44
|
-
}, 1000);
|
|
45
|
-
};
|
|
46
|
-
setInterval(slideshow, 4000);
|
|
47
|
-
});
|
|
37
|
+
setTimeout(() => {
|
|
38
|
+
img1.src = img2.src;
|
|
39
|
+
img2.classList.remove("active");
|
|
40
|
+
img1.classList.remove("right");
|
|
41
|
+
}, 1000);
|
|
42
|
+
};
|
|
43
|
+
setInterval(slideshow, 4000);
|
|
48
44
|
};
|
|
49
|
-
|
|
45
|
+
|
|
46
|
+
useEffect(() => {
|
|
50
47
|
carouselStart();
|
|
51
|
-
},[])
|
|
48
|
+
}, []);
|
|
52
49
|
|
|
53
50
|
return (
|
|
54
51
|
<Container panelColor={panelColor}>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Container } from "./styles";
|
|
2
|
+
import { LogoImage } from "../../atoms/LogoImage/index";
|
|
3
|
+
import { ScreenHeader } from "../../atoms/ScreenHeader/index";
|
|
4
|
+
import { Button } from "../../atoms/GeneralButton/index";
|
|
5
|
+
import { CheckBox } from "../../atoms/CheckBox/index";
|
|
6
|
+
import { TagAndInput } from "../TagAndInput";
|
|
7
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
8
|
+
|
|
9
|
+
export const Login = () => {
|
|
10
|
+
return (
|
|
11
|
+
<Container className={"home-login"}>
|
|
12
|
+
<div className="main-container">
|
|
13
|
+
<LogoImage />
|
|
14
|
+
<div className="credenciales">
|
|
15
|
+
<ScreenHeader
|
|
16
|
+
fontFamily={FontFamily.AvenirNext}
|
|
17
|
+
color={GlobalColors.s5}
|
|
18
|
+
text={"Ingresa tus credenciales"}
|
|
19
|
+
/>
|
|
20
|
+
</div>
|
|
21
|
+
<div className="user">
|
|
22
|
+
<TagAndInput
|
|
23
|
+
inputType={"text"}
|
|
24
|
+
label={"Nombre de usuario"}
|
|
25
|
+
inputPlaceHolder={"username@contentoh.com"}
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
<div className="password">
|
|
29
|
+
<TagAndInput
|
|
30
|
+
inputType={"text"}
|
|
31
|
+
label={"Contraseña"}
|
|
32
|
+
inputPlaceHolder={"Escribe tu contraseña"}
|
|
33
|
+
/>
|
|
34
|
+
</div>
|
|
35
|
+
<div className="select">
|
|
36
|
+
<CheckBox
|
|
37
|
+
label={"Mantener sesión activada"}
|
|
38
|
+
id={"chk-default"}
|
|
39
|
+
className="active-left"
|
|
40
|
+
/>
|
|
41
|
+
<p className="active-right">Olvide mi contraseña</p>
|
|
42
|
+
</div>
|
|
43
|
+
<div className="button-right">
|
|
44
|
+
<Button
|
|
45
|
+
buttonType={"general-default-button"}
|
|
46
|
+
label={"Iniciar sesión"}
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
<div className="new-login">
|
|
50
|
+
<p className="pre-registro">
|
|
51
|
+
¿Aún no tienes cuenta?<span> Regístrate</span>
|
|
52
|
+
</p>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</Container>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { FontFamily, GlobalColors } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
background: "white";
|
|
6
|
+
display: flex;
|
|
7
|
+
height: 100%;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
align-items: center;
|
|
10
|
+
label {
|
|
11
|
+
color: red;
|
|
12
|
+
margin-top: 3px;
|
|
13
|
+
margin-left: 15px;
|
|
14
|
+
font-family: ${FontFamily.Raleway_700};
|
|
15
|
+
font-size: 11px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&.home-login {
|
|
19
|
+
.credenciales {
|
|
20
|
+
& + * {
|
|
21
|
+
margin-top: 30px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.user {
|
|
25
|
+
& + * {
|
|
26
|
+
margin-top: 20px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
.password {
|
|
30
|
+
& + * {
|
|
31
|
+
margin-top: 20px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
.select {
|
|
35
|
+
display: flex;
|
|
36
|
+
justify-content: space-between;
|
|
37
|
+
.active-right {
|
|
38
|
+
font-family: ${FontFamily.AvenirNext};
|
|
39
|
+
font-weight: 500;
|
|
40
|
+
font-size: 13px;
|
|
41
|
+
line-height: 24px;
|
|
42
|
+
letter-spacing: -0.015em;
|
|
43
|
+
color: ${GlobalColors.s5};
|
|
44
|
+
}
|
|
45
|
+
& + * {
|
|
46
|
+
margin-top: 50px;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
.button-right {
|
|
50
|
+
text-align: right;
|
|
51
|
+
& + * {
|
|
52
|
+
margin-top: 55px;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
.new-login {
|
|
56
|
+
p {
|
|
57
|
+
font-family: ${FontFamily.AvenirNext};
|
|
58
|
+
text-align: right;
|
|
59
|
+
font-weight: 500;
|
|
60
|
+
font-size: 13px;
|
|
61
|
+
line-height: 24px;
|
|
62
|
+
color: ${GlobalColors.s5};
|
|
63
|
+
span {
|
|
64
|
+
color: ${GlobalColors.secondary_magenta};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
.main-container {
|
|
70
|
+
max-width: 80%;
|
|
71
|
+
max-height: 80%;
|
|
72
|
+
}
|
|
73
|
+
`;
|