contentoh-components-library 21.4.14 → 21.4.16
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/SliderToolTip/styles.js +1 -1
- package/dist/components/organisms/PanelLayout/PanelLayout.stories.js +87 -0
- package/dist/components/organisms/PanelLayout/index.js +27 -0
- package/dist/components/organisms/PanelLayout/styles.js +32 -0
- package/dist/index.js +13 -0
- package/package.json +1 -1
- package/src/components/atoms/SliderToolTip/styles.js +1 -1
- package/src/components/organisms/PanelLayout/PanelLayout.stories.js +63 -0
- package/src/components/organisms/PanelLayout/index.js +11 -0
- package/src/components/organisms/PanelLayout/styles.js +33 -0
- package/src/index.js +1 -0
|
@@ -19,6 +19,6 @@ var Container = _styledComponents.default.div(_templateObject || (_templateObjec
|
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
21
21
|
|
|
22
|
-
var Slider = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n font-family: sans-serif;\n margin: auto;\n background: #281f33;\n border-radius: 6px;\n width: 310px;\n padding: 16px;\n padding-top: 20px;\n box-sizing: border-box;\n position: absolute;\n cursor: default;\n z-index: 2;\n width: 310px;\n &.top-slide {\n top: calc(100% - 370px);\n left: calc(100% - 175px);\n }\n &.bottom-slide {\n top: 100%;\n right: calc(100% + -
|
|
22
|
+
var Slider = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n font-family: sans-serif;\n margin: auto;\n background: #281f33;\n border-radius: 6px;\n width: 310px;\n padding: 16px;\n padding-top: 20px;\n box-sizing: border-box;\n position: absolute;\n cursor: default;\n z-index: 2;\n width: 310px;\n &.top-slide {\n top: calc(100% - 370px);\n left: calc(100% - 175px);\n }\n &.bottom-slide {\n top: 100%;\n right: calc(100% + -100px);\n }\n ul,\n li {\n padding: 0;\n margin: 0;\n list-style: none;\n }\n .slider {\n position: relative;\n max-width: 300px;\n width: 100%;\n height: 270px;\n margin: 0;\n li {\n position: absolute;\n left: 0px;\n top: 0px;\n opacity: 0;\n width: inherit;\n height: inherit;\n transition: opacity 0.5s;\n background: transparent;\n img {\n width: 100%;\n height: 180px;\n border-radius: 4px;\n background-color: #fafafa;\n & + * {\n margin-top: 10px;\n }\n }\n p {\n font-family: \"Avenir Next\";\n font-style: normal;\n font-weight: 400;\n font-size: 10px;\n line-height: 12px;\n text-align: center;\n letter-spacing: -0.015em;\n color: #fafafa;\n background-color: #281f33;\n }\n div {\n background-color: #fafafa;\n height: 180px;\n border-radius: 4px;\n display: flex;\n justify-content: center;\n flex-direction: column;\n align-items: center;\n img {\n width: 90%;\n }\n & + * {\n margin-top: 13px;\n }\n }\n span {\n font-family: \"Avenir Next\";\n font-style: normal;\n font-weight: 500;\n font-size: 15px;\n line-height: 15px;\n text-align: center;\n letter-spacing: -0.015em;\n color: #fafafa;\n display: flex;\n justify-content: center;\n background-color: #281f33;\n & + * {\n margin-top: 10px;\n }\n }\n }\n .end-div {\n div {\n height: 130px;\n width: 100%;\n background-color: #fafafa;\n display: flex;\n align-items: center;\n border-radius: 4px;\n img {\n width: 100%;\n height: 115px;\n object-fit: contain;\n }\n }\n .lema-end {\n justify-content: center;\n justify-content: space-evenly;\n height: 110px;\n background-color: #281f33;\n flex-direction: column;\n justify-content: space-evenly;\n border-radius: inherit;\n }\n button {\n display: none;\n justify-content: center;\n align-items: center;\n padding: 10px;\n width: 160px;\n height: 30px;\n border: 1px solid #d4d1d7;\n border-radius: 15px;\n color: #fafafa;\n background-color: #281f33;\n font-family: \"Avenir Next\";\n font-style: normal;\n font-weight: 400;\n font-size: 18px;\n line-height: 25px;\n letter-spacing: -0.015em;\n position: absolute;\n left: 22%;\n top: 90%;\n cursor: pointer;\n }\n }\n }\n li:first-child {\n opacity: 1;\n }\n .menu {\n margin: 0;\n text-align: center;\n li {\n display: inline-block;\n text-align: center;\n & + * {\n margin-left: 15px;\n }\n a {\n display: inline-block;\n text-decoration: none;\n background-color: #c4c4c4;\n width: 10px;\n height: 10px;\n border-radius: 100%;\n cursor: pointer;\n }\n #slidea1 {\n background-color: #e33aa9;\n }\n }\n }\n"])));
|
|
23
23
|
|
|
24
24
|
exports.Slider = Slider;
|
|
@@ -0,0 +1,87 @@
|
|
|
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.PanelLayoutDefault = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
13
|
+
|
|
14
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
|
+
|
|
16
|
+
var _ButtonV = require("../../atoms/ButtonV2");
|
|
17
|
+
|
|
18
|
+
var _index = require("./index");
|
|
19
|
+
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
|
|
22
|
+
var _templateObject;
|
|
23
|
+
|
|
24
|
+
var TwoColumns = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: grid;\n width: 100%;\n grid-auto-rows: 1fr;\n grid-template-columns: 85% 15%;\n grid-template-rows: 100%;\n gap: 0px 10px;\n grid-template-areas: \"first second\";\n .first {\n grid-area: first;\n width: 100%;\n margin-left: 50px;\n display: flex;\n }\n .second {\n grid-area: second;\n width: 100%;\n }\n"])));
|
|
25
|
+
|
|
26
|
+
var _default = {
|
|
27
|
+
title: "Components/organisms/PanelLayout",
|
|
28
|
+
component: _index.PanelLayout
|
|
29
|
+
};
|
|
30
|
+
exports.default = _default;
|
|
31
|
+
|
|
32
|
+
var Template = function Template(args) {
|
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.PanelLayout, (0, _objectSpread2.default)({}, args));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
var PanelLayoutDefault = Template.bind({});
|
|
37
|
+
exports.PanelLayoutDefault = PanelLayoutDefault;
|
|
38
|
+
PanelLayoutDefault.args = {
|
|
39
|
+
header: /*#__PURE__*/(0, _jsxRuntime.jsxs)(TwoColumns, {
|
|
40
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
41
|
+
className: "first",
|
|
42
|
+
children: "Productos"
|
|
43
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
44
|
+
className: "second",
|
|
45
|
+
children: "Precio"
|
|
46
|
+
})]
|
|
47
|
+
}),
|
|
48
|
+
body: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
49
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(TwoColumns, {
|
|
50
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
51
|
+
className: "first",
|
|
52
|
+
children: "Nombre de producto 1"
|
|
53
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
54
|
+
className: "second",
|
|
55
|
+
children: "Precio de producto 1"
|
|
56
|
+
})]
|
|
57
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(TwoColumns, {
|
|
58
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
59
|
+
className: "first",
|
|
60
|
+
children: "Nombre de producto 1"
|
|
61
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
62
|
+
className: "second",
|
|
63
|
+
children: "Precio de producto 1"
|
|
64
|
+
})]
|
|
65
|
+
})]
|
|
66
|
+
}),
|
|
67
|
+
footer: /*#__PURE__*/(0, _jsxRuntime.jsxs)(TwoColumns, {
|
|
68
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
69
|
+
className: "first",
|
|
70
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
71
|
+
id: "1",
|
|
72
|
+
label: "Seleccionar todos",
|
|
73
|
+
type: "pink"
|
|
74
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
75
|
+
id: "2",
|
|
76
|
+
label: "Manual"
|
|
77
|
+
})]
|
|
78
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
79
|
+
className: "second",
|
|
80
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
81
|
+
id: "3",
|
|
82
|
+
label: "Siguiente",
|
|
83
|
+
type: "pink"
|
|
84
|
+
})
|
|
85
|
+
})]
|
|
86
|
+
})
|
|
87
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PanelLayout = void 0;
|
|
7
|
+
|
|
8
|
+
var _styles = require("./styles");
|
|
9
|
+
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
|
|
12
|
+
var PanelLayout = function PanelLayout(_ref) {
|
|
13
|
+
var header = _ref.header,
|
|
14
|
+
body = _ref.body,
|
|
15
|
+
footer = _ref.footer;
|
|
16
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
17
|
+
children: [header ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Header, {
|
|
18
|
+
children: header
|
|
19
|
+
}) : null, body ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Body, {
|
|
20
|
+
children: body
|
|
21
|
+
}) : null, footer ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Footer, {
|
|
22
|
+
children: footer
|
|
23
|
+
}) : null]
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
exports.PanelLayout = PanelLayout;
|
|
@@ -0,0 +1,32 @@
|
|
|
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.Header = exports.Footer = exports.Container = exports.Body = 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, _templateObject2, _templateObject3, _templateObject4;
|
|
17
|
+
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: grid;\n grid-auto-rows: 1fr;\n grid-template-columns: 1fr;\n grid-template-rows: 34px 1fr 300px;\n gap: 0px 0px;\n grid-template-areas:\n \"header\"\n \"body\"\n \"footer\";\n font-family: ", ", sans-serif;\n font-size: 12px;\n"])), _variables.FontFamily.RobotoMedium);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
21
|
+
|
|
22
|
+
var Header = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n grid-area: header;\n background: #8a6caa;\n color: #ffffff;\n border-radius: 5px 5px 0px 0px;\n display: flex;\n align-items: center;\n"])));
|
|
23
|
+
|
|
24
|
+
exports.Header = Header;
|
|
25
|
+
|
|
26
|
+
var Body = _styledComponents.default.div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n grid-area: body;\n"])));
|
|
27
|
+
|
|
28
|
+
exports.Body = Body;
|
|
29
|
+
|
|
30
|
+
var Footer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n grid-area: footer;\n"])));
|
|
31
|
+
|
|
32
|
+
exports.Footer = Footer;
|
package/dist/index.js
CHANGED
|
@@ -1174,6 +1174,19 @@ Object.keys(_index87).forEach(function (key) {
|
|
|
1174
1174
|
});
|
|
1175
1175
|
});
|
|
1176
1176
|
|
|
1177
|
+
var _PanelLayout = require("./components/organisms/PanelLayout");
|
|
1178
|
+
|
|
1179
|
+
Object.keys(_PanelLayout).forEach(function (key) {
|
|
1180
|
+
if (key === "default" || key === "__esModule") return;
|
|
1181
|
+
if (key in exports && exports[key] === _PanelLayout[key]) return;
|
|
1182
|
+
Object.defineProperty(exports, key, {
|
|
1183
|
+
enumerable: true,
|
|
1184
|
+
get: function get() {
|
|
1185
|
+
return _PanelLayout[key];
|
|
1186
|
+
}
|
|
1187
|
+
});
|
|
1188
|
+
});
|
|
1189
|
+
|
|
1177
1190
|
var _ChangePasswordLogin = require("./components/pages/ChangePasswordLogin");
|
|
1178
1191
|
|
|
1179
1192
|
Object.keys(_ChangePasswordLogin).forEach(function (key) {
|
package/package.json
CHANGED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { ButtonV2 } from "../../atoms/ButtonV2";
|
|
3
|
+
import { PanelLayout } from "./index";
|
|
4
|
+
|
|
5
|
+
const TwoColumns = styled.div`
|
|
6
|
+
display: grid;
|
|
7
|
+
width: 100%;
|
|
8
|
+
grid-auto-rows: 1fr;
|
|
9
|
+
grid-template-columns: 85% 15%;
|
|
10
|
+
grid-template-rows: 100%;
|
|
11
|
+
gap: 0px 10px;
|
|
12
|
+
grid-template-areas: "first second";
|
|
13
|
+
.first {
|
|
14
|
+
grid-area: first;
|
|
15
|
+
width: 100%;
|
|
16
|
+
margin-left: 50px;
|
|
17
|
+
display: flex;
|
|
18
|
+
}
|
|
19
|
+
.second {
|
|
20
|
+
grid-area: second;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
title: "Components/organisms/PanelLayout",
|
|
27
|
+
component: PanelLayout,
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const Template = (args) => <PanelLayout {...args} />;
|
|
31
|
+
|
|
32
|
+
export const PanelLayoutDefault = Template.bind({});
|
|
33
|
+
PanelLayoutDefault.args = {
|
|
34
|
+
header: (
|
|
35
|
+
<TwoColumns>
|
|
36
|
+
<div className="first">Productos</div>
|
|
37
|
+
<div className="second">Precio</div>
|
|
38
|
+
</TwoColumns>
|
|
39
|
+
),
|
|
40
|
+
body: (
|
|
41
|
+
<>
|
|
42
|
+
<TwoColumns>
|
|
43
|
+
<div className="first">Nombre de producto 1</div>
|
|
44
|
+
<div className="second">Precio de producto 1</div>
|
|
45
|
+
</TwoColumns>
|
|
46
|
+
<TwoColumns>
|
|
47
|
+
<div className="first">Nombre de producto 1</div>
|
|
48
|
+
<div className="second">Precio de producto 1</div>
|
|
49
|
+
</TwoColumns>
|
|
50
|
+
</>
|
|
51
|
+
),
|
|
52
|
+
footer: (
|
|
53
|
+
<TwoColumns>
|
|
54
|
+
<div className="first">
|
|
55
|
+
<ButtonV2 id="1" label="Seleccionar todos" type="pink" />
|
|
56
|
+
<ButtonV2 id="2" label="Manual" />
|
|
57
|
+
</div>
|
|
58
|
+
<div className="second">
|
|
59
|
+
<ButtonV2 id="3" label="Siguiente" type="pink" />
|
|
60
|
+
</div>
|
|
61
|
+
</TwoColumns>
|
|
62
|
+
),
|
|
63
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Container, Header, Body, Footer } from "./styles";
|
|
2
|
+
|
|
3
|
+
export const PanelLayout = ({ header, body, footer }) => {
|
|
4
|
+
return (
|
|
5
|
+
<Container>
|
|
6
|
+
{header ? <Header>{header}</Header> : null}
|
|
7
|
+
{body ? <Body>{body}</Body> : null}
|
|
8
|
+
{footer ? <Footer>{footer}</Footer> : null}
|
|
9
|
+
</Container>
|
|
10
|
+
);
|
|
11
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { FontFamily } from "../../../global-files/variables";
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
display: grid;
|
|
6
|
+
grid-auto-rows: 1fr;
|
|
7
|
+
grid-template-columns: 1fr;
|
|
8
|
+
grid-template-rows: 34px 1fr 300px;
|
|
9
|
+
gap: 0px 0px;
|
|
10
|
+
grid-template-areas:
|
|
11
|
+
"header"
|
|
12
|
+
"body"
|
|
13
|
+
"footer";
|
|
14
|
+
font-family: ${FontFamily.RobotoMedium}, sans-serif;
|
|
15
|
+
font-size: 12px;
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
export const Header = styled.div`
|
|
19
|
+
grid-area: header;
|
|
20
|
+
background: #8a6caa;
|
|
21
|
+
color: #ffffff;
|
|
22
|
+
border-radius: 5px 5px 0px 0px;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
export const Body = styled.div`
|
|
28
|
+
grid-area: body;
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
export const Footer = styled.div`
|
|
32
|
+
grid-area: footer;
|
|
33
|
+
`;
|
package/src/index.js
CHANGED
|
@@ -94,6 +94,7 @@ export * from "./components/organisms/RangeCalendar";
|
|
|
94
94
|
export * from "./components/organisms/TableResizable";
|
|
95
95
|
export * from "./components/organisms/SideModal/index";
|
|
96
96
|
export * from "./components/organisms/GridProducts/index";
|
|
97
|
+
export * from "./components/organisms/PanelLayout";
|
|
97
98
|
|
|
98
99
|
//pages
|
|
99
100
|
export * from "./components/pages/ChangePasswordLogin";
|