contentoh-components-library 21.4.37 → 21.4.39
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/assets/images/Icons/delete.svg +8 -0
- package/dist/assets/images/Icons/edit.svg +3 -0
- package/dist/assets/images/Icons/info.svg +8 -0
- package/dist/components/molecules/BoxAttribute/BoxAttribute.stories.js +33 -0
- package/dist/components/molecules/BoxAttribute/index.js +73 -0
- package/dist/components/molecules/BoxAttribute/styles.js +23 -0
- package/dist/components/molecules/BoxButtons/BoxButtons.stories.js +31 -0
- package/dist/components/molecules/BoxButtons/index.js +56 -0
- package/dist/components/molecules/BoxButtons/styles.js +24 -0
- package/dist/components/molecules/ButtonsAssignation/ButtonsAssignation.stories.js +34 -0
- package/dist/components/molecules/ButtonsAssignation/index.js +142 -0
- package/dist/components/molecules/ButtonsAssignation/styles.js +20 -0
- package/dist/components/molecules/ButtonsEdition/ButtonsEdition.stories.js +34 -0
- package/dist/components/molecules/ButtonsEdition/index.js +182 -0
- package/dist/components/molecules/ButtonsEdition/styles.js +24 -0
- package/dist/components/molecules/ProductSkuStatus/ProductSkuStatus.stories.js +64 -0
- package/dist/components/molecules/ProductSkuStatus/index.js +36 -0
- package/dist/components/molecules/ProductSkuStatus/styles.js +18 -0
- package/dist/components/molecules/Validation/Validation.stories.js +28 -0
- package/dist/components/molecules/Validation/index.js +77 -0
- package/dist/components/molecules/Validation/styles.js +18 -0
- package/dist/components/organisms/BarButtons/BarButtons.stories.js +30 -0
- package/dist/components/organisms/BarButtons/index.js +61 -0
- package/dist/components/organisms/BarButtons/styles.js +18 -0
- package/dist/components/organisms/Box/Box.stories.js +37 -0
- package/dist/components/organisms/Box/index.js +99 -0
- package/dist/components/organisms/Box/styles.js +20 -0
- package/dist/components/organisms/BoxOnboarding/BoxOnboarding.stories.js +37 -0
- package/dist/components/organisms/BoxOnboarding/index.js +69 -0
- package/dist/components/organisms/BoxOnboarding/styles.js +20 -0
- package/dist/components/organisms/InputGroup/index.js +83 -48
- package/dist/components/pages/ProviderProductEdition/index.js +4 -2
- package/dist/components/pages/ProviderProductEdition1/ProviderProductEdition.stories.js +222 -0
- package/dist/components/pages/ProviderProductEdition1/index.js +2339 -0
- package/dist/components/pages/ProviderProductEdition1/styles.js +23 -0
- package/dist/global-files/data.js +4 -4
- package/dist/global-files/variables.js +5 -1
- package/package.json +1 -1
- package/src/assets/images/Icons/info.svg +8 -0
- package/src/components/molecules/BoxAttribute/BoxAttribute.stories.js +17 -0
- package/src/components/molecules/BoxAttribute/index.js +71 -0
- package/src/components/molecules/BoxAttribute/styles.js +35 -0
- package/src/components/molecules/BoxButtons/BoxButtons.stories.js +15 -0
- package/src/components/molecules/BoxButtons/index.js +32 -0
- package/src/components/molecules/BoxButtons/styles.js +43 -0
- package/src/components/organisms/Box/Box.stories.js +17 -0
- package/src/components/organisms/Box/index.js +61 -0
- package/src/components/organisms/Box/styles.js +48 -0
- package/src/components/organisms/BoxOnboarding/BoxOnboarding.stories.js +17 -0
- package/src/components/organisms/BoxOnboarding/index.js +63 -0
- package/src/components/organisms/BoxOnboarding/styles.js +44 -0
- package/src/components/organisms/InputGroup/index.js +31 -0
- package/src/components/pages/ProviderProductEdition/index.js +4 -1
- package/src/global-files/data.js +3 -2
- package/src/global-files/variables.js +4 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<mask id="mask0_37_469" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="14" height="14">
|
|
3
|
+
<rect width="14" height="14" fill="#D9D9D9"/>
|
|
4
|
+
</mask>
|
|
5
|
+
<g mask="url(#mask0_37_469)">
|
|
6
|
+
<path d="M4.76875 10.5194L7 8.16667L9.25 10.5194L10.1313 9.58611L7.9 7.23333L10.1313 4.88056L9.25 3.94722L7 6.3L4.76875 3.94722L3.86875 4.88056L6.11875 7.23333L3.86875 9.58611L4.76875 10.5194ZM2.89375 14C2.59375 14 2.33125 13.8833 2.10625 13.65C1.88125 13.4167 1.76875 13.1444 1.76875 12.8333V1.75H1V0.583333H4.525V0H9.475V0.583333H13V1.75H12.2313V12.8333C12.2313 13.1444 12.1188 13.4167 11.8938 13.65C11.6688 13.8833 11.4062 14 11.1063 14H2.89375ZM11.1063 1.75H2.89375V12.8333H11.1063V1.75Z" fill="#B64545"/>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M1.14598 12.854H1.98636L10.4475 4.39291L9.60709 3.55252L1.14598 12.0136V12.854ZM12.8731 3.57162L10.4284 1.12688L11.2306 0.324693C11.447 0.108231 11.7144 0 12.0327 0C12.3511 0 12.6185 0.108231 12.8349 0.324693L13.6753 1.16507C13.8918 1.38154 14 1.64893 14 1.96726C14 2.28558 13.8918 2.55298 13.6753 2.76944L12.8731 3.57162ZM12.0709 4.37381L2.44475 14H0V11.5553L9.62619 1.92906L12.0709 4.37381Z" fill="#707070"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="8" height="8" viewBox="0 0 8 8" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<mask id="mask0_37_379" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="8" height="8">
|
|
3
|
+
<rect width="8" height="8" fill="#D9D9D9"/>
|
|
4
|
+
</mask>
|
|
5
|
+
<g mask="url(#mask0_37_379)">
|
|
6
|
+
<path d="M3.63807 5.98825H4.40893V3.62867H3.63807V5.98825ZM3.99596 3.07403C4.124 3.07403 4.2311 3.03169 4.31727 2.947C4.40345 2.86232 4.44653 2.75738 4.44653 2.6322C4.44653 2.49463 4.40331 2.38347 4.31685 2.29871C4.2304 2.21394 4.12327 2.17156 3.99547 2.17156C3.86061 2.17156 3.75166 2.21394 3.66863 2.29871C3.58559 2.38347 3.54407 2.49307 3.54407 2.6275C3.54407 2.7566 3.58737 2.8633 3.67398 2.94759C3.7606 3.03188 3.86792 3.07403 3.99596 3.07403ZM3.9991 8C3.44212 8 2.92156 7.89633 2.43741 7.68899C1.95324 7.48165 1.52964 7.19646 1.16659 6.83341C0.803541 6.47036 0.518349 6.04696 0.311013 5.5632C0.103671 5.07943 0 4.5588 0 4.0013C0 3.44379 0.103671 2.92273 0.311013 2.4381C0.518349 1.95348 0.803049 1.53104 1.16511 1.1708C1.52718 0.810554 1.95032 0.525358 2.43455 0.315215C2.91877 0.105072 3.43989 0 3.99792 0C4.55595 0 5.07764 0.10483 5.56301 0.314491C6.04837 0.524146 6.47094 0.80868 6.83072 1.16809C7.1905 1.52751 7.47533 1.95015 7.6852 2.43603C7.89507 2.92191 8 3.44396 8 4.0022C8 4.56004 7.89493 5.08098 7.68479 5.56504C7.47464 6.04909 7.18945 6.47169 6.8292 6.83282C6.46896 7.19395 6.04646 7.47876 5.56169 7.68726C5.07694 7.89575 4.55607 8 3.9991 8ZM4 7.11633C4.86173 7.11633 5.59499 6.81435 6.19977 6.21037C6.80454 5.60639 7.10693 4.8696 7.10693 4C7.10693 3.13827 6.80513 2.40501 6.20153 1.80024C5.59793 1.19546 4.86095 0.893067 3.9906 0.893067C3.12887 0.893067 2.39561 1.19487 1.79083 1.79847C1.18606 2.40207 0.883666 3.13905 0.883666 4.0094C0.883666 4.87113 1.18565 5.60439 1.78963 6.20917C2.39361 6.81394 3.1304 7.11633 4 7.11633Z" fill="#ECDD1D"/>
|
|
7
|
+
</g>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,33 @@
|
|
|
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.BoxAttributeDefault = 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/BoxAttribute",
|
|
18
|
+
component: _index.BoxAttribute
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
|
|
22
|
+
var Template = function Template(args) {
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxAttribute, (0, _objectSpread2.default)({}, args));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var BoxAttributeDefault = Template.bind({});
|
|
27
|
+
exports.BoxAttributeDefault = BoxAttributeDefault;
|
|
28
|
+
BoxAttributeDefault.args = {
|
|
29
|
+
text: "texto prueba",
|
|
30
|
+
isEditEnabled: true,
|
|
31
|
+
titletool: "Porcentaje de requeridos",
|
|
32
|
+
texttool: "Este porcentaje indica la completitud de los atributos requeridos para todos los servicios."
|
|
33
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
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.BoxAttribute = void 0;
|
|
9
|
+
|
|
10
|
+
var _styles = require("./styles");
|
|
11
|
+
|
|
12
|
+
var _info = _interopRequireDefault(require("../../../assets/images/Icons/info.svg"));
|
|
13
|
+
|
|
14
|
+
var _Tooltip = require("../../atoms/Tooltip");
|
|
15
|
+
|
|
16
|
+
var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
|
|
17
|
+
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
|
|
20
|
+
var BoxAttribute = function BoxAttribute(props) {
|
|
21
|
+
var id = props.id,
|
|
22
|
+
key = props.key,
|
|
23
|
+
className = props.className,
|
|
24
|
+
text = props.text,
|
|
25
|
+
borderType = props.borderType,
|
|
26
|
+
isEditEnabled = props.isEditEnabled,
|
|
27
|
+
titletool = props.titletool,
|
|
28
|
+
texttool = props.texttool;
|
|
29
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
30
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
31
|
+
id: id,
|
|
32
|
+
className: className,
|
|
33
|
+
borderType: borderType,
|
|
34
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
|
|
35
|
+
componentTooltip: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
36
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
37
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("b", {
|
|
38
|
+
children: titletool
|
|
39
|
+
})
|
|
40
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
41
|
+
children: texttool
|
|
42
|
+
})]
|
|
43
|
+
}),
|
|
44
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
45
|
+
className: "",
|
|
46
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
|
|
47
|
+
className: "icon",
|
|
48
|
+
src: _info.default,
|
|
49
|
+
alt: "iconInfo"
|
|
50
|
+
})
|
|
51
|
+
}),
|
|
52
|
+
classNameTooltip: "container-tooltip"
|
|
53
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
54
|
+
children: text
|
|
55
|
+
}), isEditEnabled ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, {
|
|
56
|
+
hiddenLabel: true,
|
|
57
|
+
id: "caja-borde",
|
|
58
|
+
defaultValue: text,
|
|
59
|
+
variant: "outlined",
|
|
60
|
+
size: "small"
|
|
61
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, {
|
|
62
|
+
hiddenLabel: true,
|
|
63
|
+
id: "caja-borde",
|
|
64
|
+
defaultValue: text,
|
|
65
|
+
variant: "outlined",
|
|
66
|
+
size: "small",
|
|
67
|
+
disabled: true
|
|
68
|
+
})]
|
|
69
|
+
}, key)
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
exports.BoxAttribute = BoxAttribute;
|
|
@@ -0,0 +1,23 @@
|
|
|
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 display: flex;\n align-items: center;\n gap:4px;\n #atr-alto {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n #caja-borde {\n font-family: ", ", sans-serif;\n font-size: 12px;\n line-height: 1.2;\n border-radius: ", ";\n }\n span {\n font-family: ", ", sans-serif;\n font-size: 12px;\n line-height: 1.2;\n font-weight: 600;\n }\n .icon {\n width: 8px;\n height: 8px;\n }\n"])), _variables.FontFamily.RobotoMedium, function (_ref) {
|
|
19
|
+
var borderType = _ref.borderType;
|
|
20
|
+
return (borderType === null || borderType === void 0 ? void 0 : borderType.toLowerCase()) === "rectangle" ? "5px" : (borderType === null || borderType === void 0 ? void 0 : borderType.toLowerCase()) === "circle" ? "50%" : "none";
|
|
21
|
+
}, _variables.FontFamily.RobotoMedium);
|
|
22
|
+
|
|
23
|
+
exports.Container = Container;
|
|
@@ -0,0 +1,31 @@
|
|
|
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.BoxButtonsDefault = 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/BoxButtons",
|
|
18
|
+
component: _index.BoxButtons
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
|
|
22
|
+
var Template = function Template(args) {
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.BoxButtons, (0, _objectSpread2.default)({}, args));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var BoxButtonsDefault = Template.bind({});
|
|
27
|
+
exports.BoxButtonsDefault = BoxButtonsDefault;
|
|
28
|
+
BoxButtonsDefault.args = {
|
|
29
|
+
text: "texto prueba",
|
|
30
|
+
showAdd: true
|
|
31
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BoxButtons = void 0;
|
|
7
|
+
|
|
8
|
+
var _styles = require("./styles");
|
|
9
|
+
|
|
10
|
+
var _material = require("@mui/material");
|
|
11
|
+
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
|
|
14
|
+
var BoxButtons = function BoxButtons(_ref) {
|
|
15
|
+
var showAdd = _ref.showAdd,
|
|
16
|
+
onAdd = _ref.onAdd,
|
|
17
|
+
onDelete = _ref.onDelete,
|
|
18
|
+
isTheFirstBox = _ref.isTheFirstBox,
|
|
19
|
+
onToggleEdit = _ref.onToggleEdit,
|
|
20
|
+
isEditEnabled = _ref.isEditEnabled;
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
23
|
+
variant: "outlined",
|
|
24
|
+
className: "button-circle",
|
|
25
|
+
onClick: onToggleEdit,
|
|
26
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ContainerIcon, {
|
|
27
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
28
|
+
className: "iconos-out ".concat(isEditEnabled ? "iconos-grises" : ""),
|
|
29
|
+
children: "edit"
|
|
30
|
+
})
|
|
31
|
+
})
|
|
32
|
+
}), !isTheFirstBox && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
33
|
+
variant: "outlined",
|
|
34
|
+
className: "button-circle",
|
|
35
|
+
onClick: onDelete,
|
|
36
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ContainerIcon, {
|
|
37
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
38
|
+
className: "iconos-out",
|
|
39
|
+
children: "delete_forever"
|
|
40
|
+
})
|
|
41
|
+
})
|
|
42
|
+
}), showAdd && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
43
|
+
onClick: onAdd,
|
|
44
|
+
variant: "outlined",
|
|
45
|
+
className: "button-circle",
|
|
46
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ContainerIcon, {
|
|
47
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
48
|
+
className: "iconos-out iconos-grises",
|
|
49
|
+
children: "add"
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
exports.BoxButtons = BoxButtons;
|
|
@@ -0,0 +1,24 @@
|
|
|
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.ContainerIcon = 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, _templateObject2;
|
|
17
|
+
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display:flex;\n flex-direction:row;\n gap:8px;\n .button-circle{\n width:30px;\n height:30px;\n padding:2px;\n border-radius:100%;\n min-width:30px;\n border: 1px solid #F0F0F0;\n }\n .button-circle:hover {\n border: 1px solid #F0F0F0;\n }\n\n"])));
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
21
|
+
|
|
22
|
+
var ContainerIcon = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\ncursor: pointer;\n@font-face {\n font-family: \"Material Symbols Outlined\";\n font-style: normal;\n font-weight: 100 700;\n src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v68/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsLjBuVY.woff2)\n format(\"woff2\");\n}\n.iconos-out {\n font-family: \"Material Symbols Outlined\";\n font-size: 20px;\n //line-height: 1;\n margin-top: 10px;\n}\n.iconos-out {\n font-variation-settings: \"FILL\" 0, \"wght\" 400, \"GRAD\" 0, \"opsz\" 48;\n color: #B64545;\n}\n.iconos-grises {\n font-variation-settings: \"FILL\" 0, \"wght\" 400, \"GRAD\" 0, \"opsz\" 48;\n color: ", ";\n}"])), _variables.GlobalColors.gray);
|
|
23
|
+
|
|
24
|
+
exports.ContainerIcon = ContainerIcon;
|
|
@@ -0,0 +1,34 @@
|
|
|
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.ButtonsAssignationDefault = 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/ButtonsAssignation",
|
|
18
|
+
component: _index.ButtonsAssignation
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
|
|
22
|
+
var Template = function Template(args) {
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ButtonsAssignation, (0, _objectSpread2.default)({}, args));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var ButtonsAssignationDefault = Template.bind({});
|
|
27
|
+
exports.ButtonsAssignationDefault = ButtonsAssignationDefault;
|
|
28
|
+
ButtonsAssignationDefault.args = {
|
|
29
|
+
status: "AA",
|
|
30
|
+
image: {
|
|
31
|
+
src: "https://image.shutterstock.com/image-illustration/3d-render-generic-drug-pills-260nw-709112806.jpg"
|
|
32
|
+
},
|
|
33
|
+
imagesSection: true
|
|
34
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
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.ButtonsAssignation = void 0;
|
|
9
|
+
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
|
+
|
|
12
|
+
var _styles = require("./styles");
|
|
13
|
+
|
|
14
|
+
var _index = require("../../atoms/ScreenHeader/index");
|
|
15
|
+
|
|
16
|
+
var _Avatar = require("../../atoms/Avatar");
|
|
17
|
+
|
|
18
|
+
var _index2 = require("../../atoms/Status/index");
|
|
19
|
+
|
|
20
|
+
var _react = require("react");
|
|
21
|
+
|
|
22
|
+
var _index3 = require("../../atoms/AsignationOption/index");
|
|
23
|
+
|
|
24
|
+
var _data = require("../../../global-files/data");
|
|
25
|
+
|
|
26
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
+
|
|
28
|
+
var ButtonsAssignation = function ButtonsAssignation(_ref) {
|
|
29
|
+
var _assignationsImages$a, _assignationsImages$c;
|
|
30
|
+
|
|
31
|
+
var _ref$status = _ref.status,
|
|
32
|
+
status = _ref$status === void 0 ? "-" : _ref$status,
|
|
33
|
+
_ref$percent = _ref.percent,
|
|
34
|
+
percent = _ref$percent === void 0 ? 0 : _ref$percent,
|
|
35
|
+
assignationsImages = _ref.assignationsImages,
|
|
36
|
+
setAssignation = _ref.setAssignation,
|
|
37
|
+
isRetailer = _ref.isRetailer,
|
|
38
|
+
_ref$id = _ref.id,
|
|
39
|
+
id = _ref$id === void 0 ? "default-id" : _ref$id,
|
|
40
|
+
canAssign = _ref.canAssign;
|
|
41
|
+
|
|
42
|
+
var _useState = (0, _react.useState)(false),
|
|
43
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
44
|
+
showAsignationPanel = _useState2[0],
|
|
45
|
+
setShowAsignationPanel = _useState2[1];
|
|
46
|
+
|
|
47
|
+
var _useState3 = (0, _react.useState)(false),
|
|
48
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
49
|
+
layout = _useState4[0],
|
|
50
|
+
setLayout = _useState4[1];
|
|
51
|
+
|
|
52
|
+
var _useState5 = (0, _react.useState)("facilitator"),
|
|
53
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
54
|
+
assignationType = _useState6[0],
|
|
55
|
+
setAssignationType = _useState6[1];
|
|
56
|
+
|
|
57
|
+
var closeAsignations = function closeAsignations(e) {
|
|
58
|
+
if (!e.target.closest("#default-id") && showAsignationPanel) {
|
|
59
|
+
document.removeEventListener("click", closeAsignations, false);
|
|
60
|
+
setShowAsignationPanel(false);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
(0, _react.useEffect)(function () {
|
|
65
|
+
if (showAsignationPanel) {
|
|
66
|
+
document.addEventListener("click", closeAsignations, false);
|
|
67
|
+
}
|
|
68
|
+
}, [showAsignationPanel]);
|
|
69
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
|
|
70
|
+
id: id,
|
|
71
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
72
|
+
className: "assignations-container",
|
|
73
|
+
children: assignationsImages === null || assignationsImages === void 0 ? void 0 : (_assignationsImages$a = assignationsImages.assignations) === null || _assignationsImages$a === void 0 ? void 0 : _assignationsImages$a.map(function (assignation, index) {
|
|
74
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.Avatar, {
|
|
75
|
+
imageType: "small-image",
|
|
76
|
+
image: (0, _data.getProfilePicture)(assignation.id, 20, 20),
|
|
77
|
+
altText: "user profile image",
|
|
78
|
+
onClick: function onClick(e) {
|
|
79
|
+
e.preventDefault();
|
|
80
|
+
e.stopPropagation();
|
|
81
|
+
setShowAsignationPanel(true);
|
|
82
|
+
setAssignationType(assignation === null || assignation === void 0 ? void 0 : assignation.collaboratorType);
|
|
83
|
+
}
|
|
84
|
+
}, index + "-" + assignation.id);
|
|
85
|
+
})
|
|
86
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
|
|
87
|
+
text: "Asig.",
|
|
88
|
+
color: "#969696",
|
|
89
|
+
fontFamily: "Avenir Next",
|
|
90
|
+
headerType: "input-name-header"
|
|
91
|
+
}), showAsignationPanel && canAssign && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
92
|
+
className: "asignation-panel",
|
|
93
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
94
|
+
className: "asignation-header",
|
|
95
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
96
|
+
className: "asignation-status",
|
|
97
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
98
|
+
children: "Estatus"
|
|
99
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.Status, {
|
|
100
|
+
statusType: status,
|
|
101
|
+
ovalForm: true
|
|
102
|
+
})]
|
|
103
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
104
|
+
className: "asignation-percent",
|
|
105
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
106
|
+
children: "Estatus"
|
|
107
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
|
|
108
|
+
className: "percent",
|
|
109
|
+
children: [percent, "%"]
|
|
110
|
+
})]
|
|
111
|
+
})]
|
|
112
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
113
|
+
className: "asignations-list",
|
|
114
|
+
children: (assignationsImages === null || assignationsImages === void 0 ? void 0 : assignationsImages.collaborators) !== undefined ? assignationsImages === null || assignationsImages === void 0 ? void 0 : (_assignationsImages$c = assignationsImages.collaborators[assignationType]) === null || _assignationsImages$c === void 0 ? void 0 : _assignationsImages$c.map(function (asignation, index) {
|
|
115
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.AsignationOption, {
|
|
116
|
+
profileImage: (0, _data.getProfilePicture)(asignation === null || asignation === void 0 ? void 0 : asignation.id_user, 40, 40),
|
|
117
|
+
onClick: function onClick() {
|
|
118
|
+
setAssignation(assignationType, asignation === null || asignation === void 0 ? void 0 : asignation.id_user);
|
|
119
|
+
},
|
|
120
|
+
name: asignation.name
|
|
121
|
+
}, index + "-" + asignation.name);
|
|
122
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
|
|
123
|
+
className: "no-asignations",
|
|
124
|
+
children: "Sin personas para asignar"
|
|
125
|
+
})
|
|
126
|
+
}), isRetailer === 1 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
127
|
+
className: "default-asignations-list",
|
|
128
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.AsignationOption, {
|
|
129
|
+
asignationType: "provider",
|
|
130
|
+
name: "Solicitar a",
|
|
131
|
+
team: "Proveedor"
|
|
132
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.AsignationOption, {
|
|
133
|
+
asignationType: "team",
|
|
134
|
+
name: "Solicitar a",
|
|
135
|
+
team: "Content-oh!"
|
|
136
|
+
})]
|
|
137
|
+
})]
|
|
138
|
+
})]
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
exports.ButtonsAssignation = ButtonsAssignation;
|
|
@@ -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 display: flex;\n height: 34px;\n align-items: center;\n position: relative;\n border-radius: 117px;\n padding: 4px 5px;\n display: flex;\n border: 1px solid #F0F0F0;\n min-width:78px;\n\n > * + * {\n margin-left: 8px;\n }\n\n .images-buttons {\n display:flex;\n button + * {\n margin-left: 8px;\n }\n }\n\n .assignations-container {\n display: flex;\n cursor: pointer;\n }\n\n .asignation-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 8px;\n position: absolute;\n top: calc(100% + 10px);\n right: 0;\n z-index: 10;\n\n .asignation-header {\n display: flex;\n justify-content: space-between;\n\n .asignation-status,\n .asignation-percent {\n & > p {\n font-family: ", ";\n font-weight: 500;\n font-size: 14px;\n line-height: 16px;\n color: ", ";\n }\n }\n\n .asignation-percent {\n text-align: right;\n }\n\n & + * {\n margin-top: 10px;\n }\n }\n\n .asignations-list {\n min-height: 40px;\n\n .no-asignations {\n padding: 5px;\n font-family: ", ";\n font-weight: 500;\n font-size: 14px;\n line-height: 16px;\n color: ", ";\n }\n\n & + * {\n margin-top: 10px;\n border-top: 1px solid ", ";\n }\n }\n\n .default-asignations-list {\n padding-top: 10px;\n }\n }\n"])), _variables.GlobalColors.s2, _variables.GlobalColors.s3, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.FontFamily.AvenirNext, _variables.GlobalColors.s5, _variables.GlobalColors.s3);
|
|
19
|
+
|
|
20
|
+
exports.Container = Container;
|
|
@@ -0,0 +1,34 @@
|
|
|
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.ButtonsEditionDefault = 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/ButtonsEdition",
|
|
18
|
+
component: _index.ButtonsEdition
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
|
|
22
|
+
var Template = function Template(args) {
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ButtonsEdition, (0, _objectSpread2.default)({}, args));
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var ButtonsEditionDefault = Template.bind({});
|
|
27
|
+
exports.ButtonsEditionDefault = ButtonsEditionDefault;
|
|
28
|
+
ButtonsEditionDefault.args = {
|
|
29
|
+
status: "AA",
|
|
30
|
+
image: {
|
|
31
|
+
src: "https://image.shutterstock.com/image-illustration/3d-render-generic-drug-pills-260nw-709112806.jpg"
|
|
32
|
+
},
|
|
33
|
+
imagesSection: true
|
|
34
|
+
};
|