contentoh-components-library 21.0.86 → 21.0.89

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.
@@ -13,6 +13,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
13
 
14
14
  var _templateObject;
15
15
 
16
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: 22px;\n width: 10px;\n border-left: 1px solid #342b3f;\n padding-left: 3px;\n\n img {\n width: 7px;\n vertical-align: middle;\n }\n"])));
16
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: 22px;\n width: 10px;\n border-left: 1px solid #342b3f;\n padding-left: 3px;\n\n img {\n width: 7px;\n vertical-align: middle;\n }\n\n &.active {\n img {\n transform: rotate(180deg);\n }\n }\n"])));
17
17
 
18
18
  exports.Container = Container;
@@ -13,10 +13,6 @@ var _react = require("react");
13
13
 
14
14
  var _styles = require("./styles");
15
15
 
16
- var _Avatar = require("../../atoms/Avatar");
17
-
18
- var _DropDownButton = require("../../atoms/DropDownButton");
19
-
20
16
  var _GeneralButton = require("../../atoms/GeneralButton");
21
17
 
22
18
  var _ValidationPanel = require("../../atoms/ValidationPanel");
@@ -64,7 +60,7 @@ var AvatarAndValidation = function AvatarAndValidation(_ref) {
64
60
  retailers: retailers,
65
61
  activeRetailer: activeRetailer,
66
62
  setActiveRetailer: setActiveRetailer
67
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_DropDownButton.DropDownButton, {}), showValidationButtons && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
63
+ }), showValidationButtons && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
68
64
  buttonType: "circular-button ".concat(buttonType),
69
65
  onClick: function onClick() {
70
66
  return setShowValidationPanel(true);
@@ -17,6 +17,8 @@ var _react = require("react");
17
17
 
18
18
  var _AsignationOption = require("../../atoms/AsignationOption");
19
19
 
20
+ var _DropDownButton = require("../../atoms/DropDownButton");
21
+
20
22
  var _jsxRuntime = require("react/jsx-runtime");
21
23
 
22
24
  var RetailerSelector = function RetailerSelector(_ref) {
@@ -51,6 +53,8 @@ var RetailerSelector = function RetailerSelector(_ref) {
51
53
  (retailers === null || retailers === void 0 ? void 0 : retailers.length) > 0 && setRetailersPanel(!retailersPanel);
52
54
  if (retailersPanel) document.removeEventListener("click", closeRetailersPanel, false);
53
55
  }
56
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_DropDownButton.DropDownButton, {
57
+ active: retailersPanel
54
58
  }), retailersPanel && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
55
59
  className: "retailers-panel",
56
60
  children: retailers.map(function (retailer, index) {
@@ -15,6 +15,6 @@ var _variables = require("../../../global-files/variables");
15
15
 
16
16
  var _templateObject;
17
17
 
18
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n cursor: pointer;\n\n .retailers-panel {\n background: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.25);\n border-radius: 4px;\n padding: 10px;\n position: absolute;\n top: calc(100% + 10px);\n right: 0;\n z-index: 10;\n }\n"])), _variables.GlobalColors.s2, _variables.GlobalColors.s3);
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n cursor: pointer;\n display: flex;\n\n .retailers-panel {\n background: ", ";\n border: 1px solid ", ";\n box-sizing: border-box;\n box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.25);\n border-radius: 4px;\n padding: 10px;\n position: absolute;\n top: calc(100% + 10px);\n right: 0;\n z-index: 10;\n }\n"])), _variables.GlobalColors.s2, _variables.GlobalColors.s3);
19
19
 
20
20
  exports.Container = Container;
@@ -1929,7 +1929,15 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1929
1929
  children: "Los atributos son requeridos por las plataformas de las cadenas, es muy importante completar los campos requeridos ya que pueden rechazar el producto por falta de informaci\xF3n."
1930
1930
  })
1931
1931
  }), inCart ? /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
1932
- type: "button"
1932
+ type: "button",
1933
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactRouterDom.Link, {
1934
+ to: "/checkout",
1935
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
1936
+ children: "Articulo en carrito"
1937
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
1938
+ children: "Ir a checkout"
1939
+ })]
1940
+ })
1933
1941
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
1934
1942
  onClick: function onClick() {
1935
1943
  setShowContentohRequestModal && setShowContentohRequestModal(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.0.86",
3
+ "version": "21.0.89",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -10,4 +10,10 @@ export const Container = styled.div`
10
10
  width: 7px;
11
11
  vertical-align: middle;
12
12
  }
13
+
14
+ &.active {
15
+ img {
16
+ transform: rotate(180deg);
17
+ }
18
+ }
13
19
  `;
@@ -2,8 +2,6 @@ import { useState } from "react";
2
2
 
3
3
  //Components
4
4
  import { Container } from "./styles";
5
- import { Avatar } from "../../atoms/Avatar";
6
- import { DropDownButton } from "../../atoms/DropDownButton";
7
5
  import { Button } from "../../atoms/GeneralButton";
8
6
  import { ValidationPanel } from "../../atoms/ValidationPanel";
9
7
  import { useEffect } from "react";
@@ -47,7 +45,6 @@ export const AvatarAndValidation = ({
47
45
  activeRetailer={activeRetailer}
48
46
  setActiveRetailer={setActiveRetailer}
49
47
  />
50
- <DropDownButton />
51
48
  {showValidationButtons && (
52
49
  <Button
53
50
  buttonType={`circular-button ${buttonType}`}
@@ -2,6 +2,7 @@ import { Container } from "./styles";
2
2
  import { Avatar } from "../../atoms/Avatar";
3
3
  import { useEffect, useState } from "react";
4
4
  import { AsignationOption } from "../../atoms/AsignationOption";
5
+ import { DropDownButton } from "../../atoms/DropDownButton";
5
6
 
6
7
  export const RetailerSelector = ({
7
8
  retailers,
@@ -35,6 +36,7 @@ export const RetailerSelector = ({
35
36
  document.removeEventListener("click", closeRetailersPanel, false);
36
37
  }}
37
38
  />
39
+ <DropDownButton active={retailersPanel} />
38
40
  {retailersPanel && (
39
41
  <div className="retailers-panel">
40
42
  {retailers.map((retailer, index) => (
@@ -4,6 +4,7 @@ import { GlobalColors } from "../../../global-files/variables";
4
4
  export const Container = styled.div`
5
5
  position: relative;
6
6
  cursor: pointer;
7
+ display: flex;
7
8
 
8
9
  .retailers-panel {
9
10
  background: ${GlobalColors.s2};
@@ -1437,10 +1437,10 @@ export const ProviderProductEdition = ({
1437
1437
  </div>
1438
1438
  {inCart ? (
1439
1439
  <button type="button">
1440
- {/* <Link to="/checkout">
1440
+ <Link to="/checkout">
1441
1441
  <p>Articulo en carrito</p>
1442
1442
  <p>Ir a checkout</p>
1443
- </Link> */}
1443
+ </Link>
1444
1444
  </button>
1445
1445
  ) : (
1446
1446
  <Button