contentoh-components-library 6.0.0 → 7.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/dist/components/atoms/AsignationOption/index.js +10 -5
- package/dist/components/atoms/AsignationOption/styles.js +1 -1
- package/dist/components/atoms/AtomList/index.js +5 -3
- package/dist/components/atoms/AtomList/styles.js +1 -1
- package/dist/components/atoms/Avatar/index.js +4 -2
- package/dist/components/atoms/Card/Card.stories.js +22 -0
- package/dist/components/atoms/Card/index.js +19 -0
- package/dist/components/atoms/Card/styles.js +18 -0
- package/dist/components/atoms/CheckBox/index.js +3 -1
- package/dist/components/atoms/Commentary/Commentary.stories.js +1 -0
- package/dist/components/atoms/Commentary/index.js +15 -0
- package/dist/components/atoms/Commentary/styles.js +20 -0
- package/dist/components/atoms/CustomerTypeImage/index.js +2 -1
- package/dist/components/atoms/EditField/EditField.stories.js +24 -0
- package/dist/components/atoms/EditField/index.js +29 -0
- package/dist/components/atoms/EditField/styles.js +20 -0
- package/dist/components/atoms/GeneralButton/GeneralButton.stories.js +1 -1
- package/dist/components/atoms/GeneralButton/index.js +3 -1
- package/dist/components/atoms/GeneralButton/styles.js +12 -2
- package/dist/components/atoms/GeneralInput/index.js +60 -8
- package/dist/components/atoms/GeneralInput/styles.js +4 -1
- package/dist/components/atoms/GeneralTextBox/styles.js +1 -1
- package/dist/components/atoms/GenericModal/GenericModal.stories.js +171 -0
- package/dist/components/atoms/GenericModal/index.js +23 -0
- package/dist/components/atoms/GenericModal/styles.js +22 -0
- package/dist/components/atoms/GradientPanel/GradientPanel.stories.js +135 -4
- package/dist/components/atoms/GradientPanel/index.js +4 -2
- package/dist/components/atoms/GradientPanel/styles.js +2 -2
- package/dist/components/atoms/Graphic/Graphic.stories.js +30 -0
- package/dist/components/atoms/Graphic/index.js +30 -0
- package/dist/components/atoms/Graphic/styles.js +18 -0
- package/dist/components/atoms/Input/index.js +19 -0
- package/dist/components/atoms/Input/style.js +26 -0
- package/dist/components/atoms/LabelToInput/index.js +48 -0
- package/dist/components/atoms/LabelToInput/style.js +22 -0
- package/dist/components/atoms/LoadImageMenu/LoadImageMenu.stories.js +29 -0
- package/dist/components/atoms/LoadImageMenu/index.js +74 -0
- package/dist/components/atoms/LoadImageMenu/styles.js +20 -0
- package/dist/components/atoms/LogoImage/LogoImage.stories.js +22 -0
- package/dist/components/atoms/LogoImage/index.js +23 -0
- package/dist/components/atoms/LogoImage/styles.js +18 -0
- package/dist/components/atoms/MenuNotification/MenuNotification.stories.js +33 -0
- package/dist/components/atoms/MenuNotification/index.js +35 -0
- package/dist/components/atoms/MenuNotification/styles.js +20 -0
- package/dist/components/atoms/MenuProfile/MenuProfile.stories.js +24 -0
- package/dist/components/atoms/MenuProfile/index.js +47 -0
- package/dist/components/atoms/MenuProfile/styles.js +20 -0
- package/dist/components/atoms/Notification/Notification.stories.js +30 -0
- package/dist/components/atoms/Notification/index.js +27 -0
- package/dist/components/atoms/Notification/styles.js +20 -0
- package/dist/components/atoms/Percent/Percent.stories.js +33 -0
- package/dist/components/atoms/Percent/index.js +32 -0
- package/dist/components/atoms/Percent/styles.js +20 -0
- package/dist/components/atoms/PriorityFlag/index.js +1 -1
- package/dist/components/atoms/ProductImage/styles.js +1 -1
- package/dist/components/atoms/ProgressBar/index.js +2 -2
- package/dist/components/atoms/ProgressBar/styles.js +3 -5
- package/dist/components/atoms/ScreenHeader/ScreenHeader.stories.js +9 -2
- package/dist/components/atoms/ScreenHeader/index.js +5 -3
- package/dist/components/atoms/ScreenHeader/styles.js +17 -2
- package/dist/components/atoms/Select/index.js +32 -0
- package/dist/components/atoms/Select/style.js +32 -0
- package/dist/components/atoms/StatusTag/styles.js +1 -1
- package/dist/components/atoms/ValidationPanel/index.js +4 -3
- package/dist/components/molecules/AddProvidersAndProducts/AddProvidersAndProducts.stories.js +28 -0
- package/dist/components/molecules/AddProvidersAndProducts/index.js +36 -0
- package/dist/components/molecules/AddProvidersAndProducts/styles.js +20 -0
- package/dist/components/molecules/AssignedWork/AssignedWork.stories.js +44 -0
- package/dist/components/molecules/AssignedWork/index.js +55 -0
- package/dist/components/molecules/AssignedWork/styles.js +20 -0
- package/dist/components/molecules/AvatarAndValidation/index.js +17 -7
- package/dist/components/molecules/AvatarAndValidation/styles.js +1 -1
- package/dist/components/molecules/EditionActiveImage/index.js +6 -2
- package/dist/components/molecules/FeaturesBar/index.js +21 -2
- package/dist/components/molecules/FeaturesBar/styles.js +1 -1
- package/dist/components/molecules/GalleryElement/index.js +51 -20
- package/dist/components/molecules/GalleryElement/styles.js +1 -1
- package/dist/components/molecules/GalleryHeader/GalleryHeader.stories.js +22 -0
- package/dist/components/molecules/GalleryHeader/index.js +30 -0
- package/dist/components/molecules/GalleryHeader/styles.js +20 -0
- package/dist/components/molecules/ImageSelector/index.js +8 -5
- package/dist/components/molecules/ParentComponent/ParentComponent.stories.js +25 -0
- package/dist/components/molecules/ParentComponent/index.js +67 -0
- package/dist/components/molecules/ParentComponent/styles.js +18 -0
- package/dist/components/molecules/PayMethod/PayMethod.stories.js +22 -0
- package/dist/components/molecules/PayMethod/index.js +61 -0
- package/dist/components/molecules/PayMethod/styles.js +20 -0
- package/dist/components/molecules/PlanSelection/PlanSelection.stories.js +0 -3
- package/dist/components/molecules/PlanSelection/index.js +1 -1
- package/dist/components/molecules/PlanSelection/styles.js +1 -1
- package/dist/components/molecules/ProductNameHeader/index.js +1 -2
- package/dist/components/molecules/ProductNotification/ProductNotification.stories.js +24 -0
- package/dist/components/molecules/ProductNotification/index.js +71 -0
- package/dist/components/molecules/ProductNotification/styles.js +20 -0
- package/dist/components/molecules/ProfileHeader/ProfileHeader.stories.js +30 -0
- package/dist/components/molecules/ProfileHeader/index.js +73 -0
- package/dist/components/molecules/ProfileHeader/styles.js +20 -0
- package/dist/components/molecules/RetailerSelector/RetailerSelector.stories.js +42 -0
- package/dist/components/molecules/RetailerSelector/index.js +71 -0
- package/dist/components/molecules/RetailerSelector/styles.js +20 -0
- package/dist/components/molecules/SidebarNotification/SidebarNotification.stories.js +98 -0
- package/dist/components/molecules/SidebarNotification/index.js +105 -0
- package/dist/components/molecules/SidebarNotification/styles.js +20 -0
- package/dist/components/molecules/StatusAsignationInfo/index.js +51 -12
- package/dist/components/molecules/StatusAsignationInfo/styles.js +1 -1
- package/dist/components/molecules/TableHeader/index.js +5 -4
- package/dist/components/molecules/TabsMenu/index.js +4 -2
- package/dist/components/molecules/TagAndInput/index.js +28 -3
- package/dist/components/molecules/TagAndInput/styles.js +1 -1
- package/dist/components/organisms/FullProductNameHeader/index.js +32 -8
- package/dist/components/organisms/FullTabsMenu/index.js +17 -5
- package/dist/components/organisms/FullTabsMenu/styles.js +1 -1
- package/dist/components/organisms/Fullplan/FullPlan.stories.js +13 -15
- package/dist/components/organisms/Fullplan/index.js +1 -1
- package/dist/components/organisms/Fullplan/styles.js +1 -1
- package/dist/components/organisms/ImageDataTable/index.js +77 -15
- package/dist/components/organisms/ImageDataTable/styles.js +7 -1
- package/dist/components/organisms/ImagePreviewer/index.js +6 -19
- package/dist/components/organisms/InputGroup/index.js +53 -8
- package/dist/components/organisms/InputGroup/styles.js +1 -1
- package/dist/components/organisms/ProductImageModal/ProductImageModal.stories.js +122 -120
- package/dist/components/organisms/ProductImageModal/index.js +28 -12
- package/dist/components/organisms/ProductImageModal/styles.js +1 -1
- package/dist/components/pages/CustomerLogin/CustomerLogin.stories.js +95 -0
- package/dist/components/pages/CustomerLogin/index.js +29 -0
- package/dist/components/pages/CustomerLogin/styles.js +18 -0
- package/dist/components/pages/CustomerPayMethod/CustomerPayMethod.stories.js +72 -0
- package/dist/components/pages/CustomerPayMethod/index.js +29 -0
- package/dist/components/pages/CustomerPayMethod/styles.js +18 -0
- package/dist/components/pages/CustomerType/CustomerType.stories.js +16 -5
- package/dist/components/pages/CustomerType/styles.js +1 -3
- package/dist/components/pages/OnboardPlan/OnboardPlan.stories.js +24 -10
- package/dist/components/pages/OnboardPlan/index.js +8 -10
- package/dist/components/pages/OnboardPlan/styles.js +1 -1
- package/dist/components/pages/RetailerPlan/RetailerPlan.stories.js +59 -0
- package/dist/components/pages/RetailerPlan/index.js +31 -0
- package/dist/components/pages/RetailerPlan/styles.js +18 -0
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +101 -313
- package/dist/components/pages/RetailerProductEdition/index.js +1071 -39
- package/dist/components/pages/RetailerProductEdition/styles.js +1 -1
- package/dist/global-files/data.js +219 -0
- package/dist/global-files/variables.js +1 -0
- package/dist/index.js +7 -2
- package/package.json +1 -1
- package/src/index.js +2 -1
|
@@ -23,12 +23,15 @@ var AsignationOption = function AsignationOption(_ref) {
|
|
|
23
23
|
var profileImage = _ref.profileImage,
|
|
24
24
|
_ref$asignationType = _ref.asignationType,
|
|
25
25
|
asignationType = _ref$asignationType === void 0 ? "available" : _ref$asignationType,
|
|
26
|
+
_ref$imageType = _ref.imageType,
|
|
27
|
+
imageType = _ref$imageType === void 0 ? "profile-image" : _ref$imageType,
|
|
26
28
|
name = _ref.name,
|
|
27
29
|
team = _ref.team,
|
|
28
|
-
onClick = _ref.onClick
|
|
30
|
+
onClick = _ref.onClick,
|
|
31
|
+
btnOnClick = _ref.btnOnClick;
|
|
29
32
|
var iconsAsignation = {
|
|
30
33
|
assigned: /*#__PURE__*/React.createElement("button", {
|
|
31
|
-
onClick:
|
|
34
|
+
onClick: btnOnClick
|
|
32
35
|
}, /*#__PURE__*/React.createElement("img", {
|
|
33
36
|
src: _removeAsigned.default,
|
|
34
37
|
alt: "remove asigned"
|
|
@@ -46,8 +49,10 @@ var AsignationOption = function AsignationOption(_ref) {
|
|
|
46
49
|
alt: "green circle icon"
|
|
47
50
|
})
|
|
48
51
|
};
|
|
49
|
-
return /*#__PURE__*/React.createElement(_styles.Container,
|
|
50
|
-
|
|
52
|
+
return /*#__PURE__*/React.createElement(_styles.Container, {
|
|
53
|
+
onClick: onClick
|
|
54
|
+
}, /*#__PURE__*/React.createElement(_Avatar.Avatar, {
|
|
55
|
+
imageType: imageType,
|
|
51
56
|
image: profileImage === null || profileImage === void 0 ? void 0 : profileImage.image,
|
|
52
57
|
altText: "profile image"
|
|
53
58
|
}), /*#__PURE__*/React.createElement("div", {
|
|
@@ -56,7 +61,7 @@ var AsignationOption = function AsignationOption(_ref) {
|
|
|
56
61
|
className: "name-label"
|
|
57
62
|
}, name), /*#__PURE__*/React.createElement("p", {
|
|
58
63
|
className: "team-label"
|
|
59
|
-
}, team)), iconsAsignation[asignationType]);
|
|
64
|
+
}, team)), asignationType && iconsAsignation[asignationType]);
|
|
60
65
|
};
|
|
61
66
|
|
|
62
67
|
exports.AsignationOption = AsignationOption;
|
|
@@ -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 display: flex;\n width: fit-content;\n align-items: center;\n\n .profile-image {\n & + * {\n margin-left: 15px;\n }\n }\n\n .labels-container {\n font-family: ", ";\n font-weight: 500;\n font-size: 14px;\n line-height: 16px;\n\n .name-label,\n .team-label {\n inline-size: 100px;\n overflow: hidden;\n }\n\n .name-label {\n color: ", ";\n }\n\n .team-label {\n color: ", ";\n }\n\n & + * {\n margin-left: 11px;\n }\n }\n\n button {\n background-color: transparent;\n cursor: pointer;\n border: none;\n }\n\n & + * {\n margin-top: 10px;\n }\n"])), _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.GlobalColors.s4);
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n width: fit-content;\n align-items: center;\n cursor: pointer;\n\n .profile-image,\n .medium-image {\n & + * {\n margin-left: 15px;\n }\n }\n\n .labels-container {\n font-family: ", ";\n font-weight: 500;\n font-size: 14px;\n line-height: 16px;\n\n .name-label,\n .team-label {\n inline-size: 100px;\n overflow: hidden;\n }\n\n .name-label {\n color: ", ";\n }\n\n .team-label {\n color: ", ";\n }\n\n & + * {\n margin-left: 11px;\n }\n }\n\n button {\n background-color: transparent;\n cursor: pointer;\n border: none;\n }\n\n & + * {\n margin-top: 10px;\n }\n"])), _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.GlobalColors.s4);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
@@ -9,13 +9,15 @@ var _styles = require("./styles");
|
|
|
9
9
|
|
|
10
10
|
var AtomList = function AtomList(_ref) {
|
|
11
11
|
var content = _ref.content;
|
|
12
|
-
return /*#__PURE__*/React.createElement(_styles.Container,
|
|
12
|
+
return /*#__PURE__*/React.createElement(_styles.Container, {
|
|
13
|
+
key: "list-".concat(content.length)
|
|
14
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("ul", {
|
|
13
15
|
className: "listaGeneral"
|
|
14
16
|
}, content.map(function (item, index) {
|
|
15
17
|
return /*#__PURE__*/React.createElement("li", {
|
|
16
|
-
key: index
|
|
18
|
+
key: "item" + index
|
|
17
19
|
}, item);
|
|
18
|
-
})));
|
|
20
|
+
}))));
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
exports.AtomList = AtomList;
|
|
@@ -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 display: flex;\n background-color: transparent;\n
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\n display: flex;\n background-color: transparent;\n justify-content:center ;\n\n .listaGeneral {\n color: ", ";\n font-family: ", ";\n font-style: normal;\n font-weight: 500;\n font-size: 18px;\n line-height: 40px;\n text-align: left;\n }\n"])), _variables.GlobalColors.white, _variables.FontFamily.Raleway);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|
|
@@ -16,13 +16,15 @@ var _defaultProfileImage = _interopRequireDefault(require("../../../assets/image
|
|
|
16
16
|
var Avatar = function Avatar(_ref) {
|
|
17
17
|
var image = _ref.image,
|
|
18
18
|
altText = _ref.altText,
|
|
19
|
-
imageType = _ref.imageType
|
|
19
|
+
imageType = _ref.imageType,
|
|
20
|
+
onClick = _ref.onClick;
|
|
20
21
|
return /*#__PURE__*/React.createElement(_styles.Container, {
|
|
21
22
|
className: imageType
|
|
22
23
|
}, /*#__PURE__*/React.createElement(_reactImageFallback.default, {
|
|
23
24
|
src: image,
|
|
24
25
|
fallbackImage: _defaultProfileImage.default,
|
|
25
|
-
alt: altText
|
|
26
|
+
alt: altText,
|
|
27
|
+
onClick: onClick
|
|
26
28
|
}));
|
|
27
29
|
};
|
|
28
30
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.CardDefault = void 0;
|
|
7
|
+
|
|
8
|
+
var _index = require("./index");
|
|
9
|
+
|
|
10
|
+
var _default = {
|
|
11
|
+
title: "Components/atoms/Card",
|
|
12
|
+
component: _index.Card
|
|
13
|
+
};
|
|
14
|
+
exports.default = _default;
|
|
15
|
+
|
|
16
|
+
var Template = function Template(args) {
|
|
17
|
+
return /*#__PURE__*/React.createElement(_index.Card, args);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var CardDefault = Template.bind({});
|
|
21
|
+
exports.CardDefault = CardDefault;
|
|
22
|
+
CardDefault.args = {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Card = void 0;
|
|
7
|
+
|
|
8
|
+
var _styles = require("./styles");
|
|
9
|
+
|
|
10
|
+
var Card = function Card(_ref) {
|
|
11
|
+
var cardIcon = _ref.cardIcon,
|
|
12
|
+
altText = _ref.altText;
|
|
13
|
+
return /*#__PURE__*/React.createElement(_styles.Container, null, /*#__PURE__*/React.createElement("img", {
|
|
14
|
+
src: cardIcon,
|
|
15
|
+
alt: altText
|
|
16
|
+
}));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.Card = Card;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 _templateObject;
|
|
15
|
+
|
|
16
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\nimg {\n width: 100%;\n margin:auto;\n}\n"])));
|
|
17
|
+
|
|
18
|
+
exports.Container = Container;
|
|
@@ -12,7 +12,9 @@ var CheckBox = function CheckBox(_ref) {
|
|
|
12
12
|
label = _ref.label,
|
|
13
13
|
onChange = _ref.onChange,
|
|
14
14
|
isFilter = _ref.isFilter;
|
|
15
|
-
return /*#__PURE__*/React.createElement(_styles.Container,
|
|
15
|
+
return /*#__PURE__*/React.createElement(_styles.Container, {
|
|
16
|
+
key: "check-".concat(id)
|
|
17
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
16
18
|
type: "checkbox",
|
|
17
19
|
name: id,
|
|
18
20
|
id: id,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Commentary = void 0;
|
|
7
|
+
|
|
8
|
+
var _styles = require("./styles");
|
|
9
|
+
|
|
10
|
+
var Commentary = function Commentary(_ref) {
|
|
11
|
+
var comment = _ref.comment;
|
|
12
|
+
return /*#__PURE__*/React.createElement(_styles.Container, null, /*#__PURE__*/React.createElement("p", null, comment));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
exports.Commentary = Commentary;
|
|
@@ -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 width: 500px;\n height: 80px;\n border: 1px solid ", ";\n padding: 10px;\n p {\n font-family: ", ";\n font-size: 12px;\n line-height: 15px;\n color: ", ";\n }\n"])), _variables.GlobalColors.s2, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s4);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
@@ -17,7 +17,8 @@ var CustomerTypeImages = function CustomerTypeImages(_ref) {
|
|
|
17
17
|
var _ref$imageType = _ref.imageType,
|
|
18
18
|
imageType = _ref$imageType === void 0 ? "retailer" : _ref$imageType;
|
|
19
19
|
return /*#__PURE__*/React.createElement(_styles.Container, {
|
|
20
|
-
imageType: imageType
|
|
20
|
+
imageType: imageType,
|
|
21
|
+
key: "image-".concat(imageType)
|
|
21
22
|
}, /*#__PURE__*/React.createElement("img", {
|
|
22
23
|
src: imageType === "retailer" ? _Cadena.default : _Proveedor.default,
|
|
23
24
|
alt: imageType === "retailer" ? "Cadena" : "Proveedor"
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.EditFieldDefault = void 0;
|
|
7
|
+
|
|
8
|
+
var _index = require("./index");
|
|
9
|
+
|
|
10
|
+
var _default = {
|
|
11
|
+
title: "Components/atoms/EditField",
|
|
12
|
+
component: _index.EditField
|
|
13
|
+
};
|
|
14
|
+
exports.default = _default;
|
|
15
|
+
|
|
16
|
+
var Template = function Template(args) {
|
|
17
|
+
return /*#__PURE__*/React.createElement(_index.EditField, args);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
var EditFieldDefault = Template.bind({});
|
|
21
|
+
exports.EditFieldDefault = EditFieldDefault;
|
|
22
|
+
EditFieldDefault.args = {
|
|
23
|
+
placeHolder: "Text to edit"
|
|
24
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
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.EditField = void 0;
|
|
9
|
+
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
|
|
12
|
+
var _editField = _interopRequireDefault(require("../../../assets/images/editField/editField.svg"));
|
|
13
|
+
|
|
14
|
+
var EditField = function EditField(_ref) {
|
|
15
|
+
var placeHolder = _ref.placeHolder,
|
|
16
|
+
value = _ref.value;
|
|
17
|
+
return /*#__PURE__*/React.createElement(_styles.Container, null, /*#__PURE__*/React.createElement("input", {
|
|
18
|
+
type: "text",
|
|
19
|
+
placeHolder: placeHolder,
|
|
20
|
+
value: value
|
|
21
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
className: "button-container"
|
|
23
|
+
}, /*#__PURE__*/React.createElement("button", null, /*#__PURE__*/React.createElement("img", {
|
|
24
|
+
src: _editField.default,
|
|
25
|
+
alt: "save changes icon"
|
|
26
|
+
}))));
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
exports.EditField = EditField;
|
|
@@ -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 width: 100%;\n input {\n background-color: ", ";\n height: 32px;\n width: 100%;\n border: 2px solid ", ";\n border-bottom: none;\n font-size: 15px;\n font-family: ", ";\n color: ", ";\n font-weight: normal;\n line-height: 18px;\n padding-left: 5px;\n color: ", ";\n }\n .button-container {\n background-color: ", ";\n display: flex;\n justify-content: end;\n align-items: center;\n padding: 3px;\n button {\n height: 20px;\n width: 20px;\n border: none;\n background-color: ", ";\n padding: 0%;\n cursor: pointer;\n }\n }\n"])), _variables.GlobalColors.s2, _variables.GlobalColors.s3, _variables.FontFamily.Lato, _variables.GlobalColors.s4, _variables.GlobalColors.s4, _variables.GlobalColors.magenta_s2, _variables.GlobalColors.white);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
@@ -15,7 +15,7 @@ var _default = {
|
|
|
15
15
|
component: _index.Button,
|
|
16
16
|
argTypes: {
|
|
17
17
|
buttonType: {
|
|
18
|
-
options: ["general-default-button", "general-green-button", "general-white-button", "general-purple-button", "general-transparent-button", "open-modal-button", "close-button", "circular-button accept-button", "circular-button reject-button", "circular-button null-button", "grid-layout", "row-layout"],
|
|
18
|
+
options: ["general-default-button", "general-green-button", "general-white-button", "general-purple-button", "general-transparent-button", "general-arrow-button", "open-modal-button", "close-button", "circular-button accept-button", "circular-button reject-button", "circular-button null-button", "circular-button save-button", "circular-button delete-button", "grid-layout", "row-layout"],
|
|
19
19
|
control: {
|
|
20
20
|
type: "select"
|
|
21
21
|
}
|
|
@@ -17,7 +17,9 @@ var Button = function Button(_ref) {
|
|
|
17
17
|
return /*#__PURE__*/React.createElement(_styles.Container, {
|
|
18
18
|
className: buttonType,
|
|
19
19
|
buttonFont: buttonFont,
|
|
20
|
-
onClick: onClick
|
|
20
|
+
onClick: onClick,
|
|
21
|
+
key: "button-".concat(buttonType),
|
|
22
|
+
disabled: buttonType === "general-button-disabled"
|
|
21
23
|
}, buttonType.includes("general") && label, image && /*#__PURE__*/React.createElement("img", {
|
|
22
24
|
src: image,
|
|
23
25
|
alt: altText
|
|
@@ -27,12 +27,22 @@ var _rowLayout = _interopRequireDefault(require("../../../assets/images/generalB
|
|
|
27
27
|
|
|
28
28
|
var _gridLayout = _interopRequireDefault(require("../../../assets/images/generalButton/gridLayout.svg"));
|
|
29
29
|
|
|
30
|
+
var _arrowIcon = _interopRequireDefault(require("../../../assets/images/arrow/arrowIcon.svg"));
|
|
31
|
+
|
|
32
|
+
var _saveIcon = _interopRequireDefault(require("../../../assets/images/generalButton/saveIcon.svg"));
|
|
33
|
+
|
|
34
|
+
var _saveIconHover = _interopRequireDefault(require("../../../assets/images/generalButton/saveIconHover.svg"));
|
|
35
|
+
|
|
36
|
+
var _deleteIcon = _interopRequireDefault(require("../../../assets/images/generalButton/deleteIcon.svg"));
|
|
37
|
+
|
|
38
|
+
var _deleteIconHover = _interopRequireDefault(require("../../../assets/images/generalButton/deleteIconHover.svg"));
|
|
39
|
+
|
|
30
40
|
var _variables = require("../../../global-files/variables");
|
|
31
41
|
|
|
32
42
|
var _templateObject;
|
|
33
43
|
|
|
34
|
-
var Container = _styledComponents.default.button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: #e33aa9;\n border: none;\n border-radius: 30px;\n color: #fff;\n font-family: ", ";\n font-style: normal;\n font-weight: normal;\n font-size: 18px;\n line-height: 22px;\n padding: 10px 25px;\n cursor: pointer;\n\n &:hover {\n opacity: 0.7;\n }\n\n &.general-purple-button {\n background-color: #603888;\n }\n\n &.general-transparent-button {\n background-color: transparent;\n border: 1px solid #503d66;\n color: #503d66;\n }\n &.general-white-button {\n background-color: ", ";\n color: ", "
|
|
44
|
+
var Container = _styledComponents.default.button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: #e33aa9;\n border: none;\n border-radius: 30px;\n color: #fff;\n font-family: ", ";\n font-style: normal;\n font-weight: normal;\n font-size: 18px;\n line-height: 22px;\n padding: 10px 25px;\n cursor: pointer;\n\n &:hover {\n opacity: 0.7;\n }\n\n &.general-purple-button {\n background-color: #603888;\n }\n\n &.general-transparent-button {\n background-color: transparent;\n border: 1px solid #503d66;\n color: #503d66;\n }\n &.general-white-button {\n background-color: ", ";\n color: ", ";\n }\n\n &.general-green-button {\n background-color: #71de56;\n }\n\n &.circular-button {\n width: 25px;\n height: 25px;\n padding: 0;\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center;\n &.accept-button {\n background-image: url(", ");\n }\n\n &.reject-button {\n background-image: url(", ");\n }\n\n &.null-button {\n background-image: url(", ");\n }\n\n &.save-button {\n background-image: url(", ");\n border: 1px solid ", ";\n border-radius: 15px;\n\n &:hover {\n background-image: url(", ");\n background-color: ", ";\n border: 1px solid ", ";\n }\n }\n\n &.delete-button {\n background-image: url(", ");\n border: 1px solid ", ";\n border-radius: 15px;\n background-size: 15px;\n\n &:hover {\n background-image: url(", ");\n background-color: ", ";\n border: 1px solid ", ";\n }\n }\n }\n\n &.general-arrow-button {\n background-image: url(", ");\n width: 27px;\n height: 27px;\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center;\n }\n\n &.close-button {\n width: 52px;\n height: 52px;\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center;\n background-image: url(", ");\n }\n\n &.open-modal-button {\n background-color: transparent;\n border: none;\n cursor: pointer;\n position: absolute;\n right: 10px;\n bottom: 10px;\n background-color: transparent;\n background-repeat: no-repeat;\n background-position: center;\n width: 21px;\n height: 21px;\n padding: 0;\n border-radius: 0;\n background-image: url(", ");\n }\n\n &.grid-layout,\n &.row-layout {\n background-color: transparent;\n background-repeat: no-repeat;\n width: 24px;\n height: 24px;\n padding: 0;\n }\n\n &.grid-layout {\n background-image: url(", ");\n }\n\n &.row-layout {\n background-image: url(", ");\n }\n\n &.general-button-disabled {\n background-color: grey;\n color: ", ";\n\n &:hover {\n opacity: 1;\n }\n }\n"])), function (props) {
|
|
35
45
|
return props.buttonFont;
|
|
36
|
-
}, _variables.GlobalColors.s1, _variables.GlobalColors.original_purpura, _acceptIcon.default, _rejectIcon.default, _nullIcon.default, _closeIcon.default, _openModal.default, _rowLayout.default, _gridLayout.default);
|
|
46
|
+
}, _variables.GlobalColors.s1, _variables.GlobalColors.original_purpura, _acceptIcon.default, _rejectIcon.default, _nullIcon.default, _saveIcon.default, _variables.GlobalColors.s3, _saveIconHover.default, _variables.GlobalColors.magenta_s2, _variables.GlobalColors.magenta_s2, _deleteIcon.default, _variables.GlobalColors.s3, _deleteIconHover.default, _variables.GlobalColors.magenta_s2, _variables.GlobalColors.magenta_s2, _arrowIcon.default, _closeIcon.default, _openModal.default, _rowLayout.default, _gridLayout.default, _variables.GlobalColors.white);
|
|
37
47
|
|
|
38
48
|
exports.Container = Container;
|
|
@@ -9,8 +9,12 @@ exports.GeneralInput = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
11
|
|
|
12
|
+
var _jsBase = require("js-base64");
|
|
13
|
+
|
|
12
14
|
var _react = require("react");
|
|
13
15
|
|
|
16
|
+
var _styledComponents = require("styled-components");
|
|
17
|
+
|
|
14
18
|
var _styles = require("./styles");
|
|
15
19
|
|
|
16
20
|
var GeneralInput = function GeneralInput(_ref) {
|
|
@@ -20,10 +24,19 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
20
24
|
inputRows = _ref.inputRows,
|
|
21
25
|
inputName = _ref.inputName,
|
|
22
26
|
inputValue = _ref.inputValue,
|
|
23
|
-
|
|
27
|
+
articleId = _ref.articleId,
|
|
28
|
+
isRequired = _ref.isRequired,
|
|
29
|
+
version = _ref.version,
|
|
30
|
+
inputPlaceholder = _ref.inputPlaceholder,
|
|
31
|
+
updatedDescriptions = _ref.updatedDescriptions,
|
|
32
|
+
setUpdatedDescriptions = _ref.setUpdatedDescriptions,
|
|
33
|
+
updatedDatasheets = _ref.updatedDatasheets,
|
|
34
|
+
setUpdatedDatasheets = _ref.setUpdatedDatasheets,
|
|
35
|
+
index = _ref.index,
|
|
36
|
+
dinamicHeight = _ref.dinamicHeight;
|
|
24
37
|
|
|
25
38
|
var _useState = (0, _react.useState)({
|
|
26
|
-
value: inputValue
|
|
39
|
+
value: inputValue ? inputValue : ""
|
|
27
40
|
}),
|
|
28
41
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
29
42
|
textValue = _useState2[0],
|
|
@@ -34,23 +47,62 @@ var GeneralInput = function GeneralInput(_ref) {
|
|
|
34
47
|
var value = _ref2.value;
|
|
35
48
|
return value = e.target.value;
|
|
36
49
|
});
|
|
50
|
+
addTextAreaToArray(e.target.value, updatedDatasheets, setUpdatedDatasheets);
|
|
37
51
|
};
|
|
38
52
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
53
|
+
var onHandleTextAreaChange = function onHandleTextAreaChange(e) {
|
|
54
|
+
setTextValue(function (_ref3) {
|
|
55
|
+
var value = _ref3.value;
|
|
56
|
+
return value = e.target.value;
|
|
57
|
+
});
|
|
58
|
+
addTextAreaToArray(e.target.value, updatedDescriptions, setUpdatedDescriptions);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
(0, _react.useEffect)(function () {
|
|
62
|
+
if (dinamicHeight) {
|
|
63
|
+
var input = document.querySelector("textarea#description-".concat(inputId, "-").concat(index));
|
|
64
|
+
|
|
65
|
+
if (input) {
|
|
66
|
+
input.style.cssText = "height:" + input.scrollHeight + "px";
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}, [textValue]);
|
|
70
|
+
|
|
71
|
+
var addTextAreaToArray = function addTextAreaToArray(textValue, array, setArray) {
|
|
72
|
+
var tempDescriptions = array;
|
|
73
|
+
var newArticle = {
|
|
74
|
+
articleId: articleId,
|
|
75
|
+
attributeId: inputId,
|
|
76
|
+
value: textValue,
|
|
77
|
+
versionId: version
|
|
78
|
+
};
|
|
79
|
+
var isOnArray = tempDescriptions.some(function (desc, index) {
|
|
80
|
+
if (desc.attributeId === newArticle.attributeId) {
|
|
81
|
+
tempDescriptions[index] = newArticle;
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
!isOnArray && tempDescriptions.push(newArticle);
|
|
86
|
+
setArray(tempDescriptions);
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
return /*#__PURE__*/React.createElement(_styles.Container, {
|
|
90
|
+
isRequired: isRequired && !textValue
|
|
91
|
+
}, inputType !== "textarea" ? /*#__PURE__*/React.createElement("input", {
|
|
92
|
+
type: inputType,
|
|
93
|
+
id: "datasheet-" + inputId + "-" + index,
|
|
42
94
|
className: "general-input",
|
|
43
95
|
placeholder: inputPlaceholder,
|
|
44
|
-
value: textValue.value,
|
|
96
|
+
value: textValue === null || textValue === void 0 ? void 0 : textValue.value,
|
|
45
97
|
onChange: onHandleChange
|
|
46
98
|
}) : /*#__PURE__*/React.createElement("textarea", {
|
|
47
99
|
name: inputName,
|
|
48
|
-
id: inputId,
|
|
100
|
+
id: "description-" + inputId + "-" + index,
|
|
49
101
|
cols: inputCols,
|
|
50
102
|
rows: inputRows,
|
|
51
103
|
placeholder: inputPlaceholder,
|
|
52
104
|
value: textValue.value,
|
|
53
|
-
onChange:
|
|
105
|
+
onChange: onHandleTextAreaChange
|
|
54
106
|
}));
|
|
55
107
|
};
|
|
56
108
|
|
|
@@ -15,6 +15,9 @@ 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 width: 100%;\n\n input,\n textarea {\n width: 100%;\n border: 1px solid
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n\n input,\n textarea {\n width: 100%;\n border: 1px solid\n ", ";\n font-family: ", ";\n color: ", ";\n font-weight: normal;\n font-size: 12px;\n line-height: 15px;\n padding: 10px;\n outline: none;\n border-radius: 2px;\n resize: none;\n\n &:focus {\n border: 1px solid ", ";\n }\n }\n"])), function (_ref) {
|
|
19
|
+
var isRequired = _ref.isRequired;
|
|
20
|
+
return isRequired ? "red" : "".concat(_variables.GlobalColors.s2);
|
|
21
|
+
}, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s4, _variables.GlobalColors.magenta_s2);
|
|
19
22
|
|
|
20
23
|
exports.Container = Container;
|
|
@@ -15,6 +15,6 @@ var _variables = require("../../../global-files/variables");
|
|
|
15
15
|
|
|
16
16
|
var _templateObject;
|
|
17
17
|
|
|
18
|
-
var Container = _styledComponents.default.button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-wrap: wrap;\n border: 1px solid ", ";\n border-radius: 10px;\n flex-direction: column;\n align-items: center;\n padding:
|
|
18
|
+
var Container = _styledComponents.default.button(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-wrap: wrap;\n border: 1px solid ", ";\n border-radius: 10px;\n flex-direction: column;\n align-items: center;\n padding: 15px;\n background-color: transparent;\n .number-text{\n color: ", "; \n font-family: ", ";\n font-style: normal;\n font-weight: normal;\n font-size: 36px;\n line-height: 42px;\n font-feature-settings: 'pnum' on, 'lnum' on;\n }\n .name-text{\n color: ", ";\n font-family: ", ";\n font-style: normal;\n font-weight: 500;\n font-size: 18px;\n line-height: 21px;\n }\n &:hover{ \n border: 2px solid ", ";\n }\n &.active{\n border: 1px solid ", ";\n }\n"])), _variables.GlobalColors.s3, _variables.GlobalColors.original_purpura, _variables.FontFamily.Raleway, _variables.GlobalColors.s4, _variables.FontFamily.Raleway, _variables.GlobalColors.magenta_s2, _variables.GlobalColors.magenta_s2);
|
|
19
19
|
|
|
20
20
|
exports.Container = Container;
|