contentoh-components-library 21.2.93 → 21.2.95
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/ButtonV2/ButtonV2.stories.js +1 -1
- package/dist/components/atoms/ButtonV2/index.js +1 -1
- package/dist/components/atoms/ButtonV2/styles.js +1 -1
- package/dist/components/atoms/Image/Image.stories.js +15 -5
- package/dist/components/atoms/Image/index.js +3 -1
- package/dist/components/atoms/Image/styles.js +10 -7
- package/dist/components/atoms/SelectItemV2/SelectItemV2.stories.js +45 -0
- package/dist/components/atoms/SelectItemV2/index.js +46 -0
- package/dist/components/atoms/SelectItemV2/styles.js +23 -0
- package/dist/components/molecules/SelectV2/SelectV2.stories.js +119 -0
- package/dist/components/molecules/SelectV2/index.js +298 -0
- package/dist/components/molecules/SelectV2/styles.js +42 -0
- package/dist/components/organisms/OrderDetail/OrderDetail.stories.js +3 -3
- package/dist/components/organisms/OrderDetail/index.js +5 -3
- package/dist/index.js +25 -12
- package/package.json +1 -1
- package/src/assets/fonts/{Roboto → roboto}/LICENSE.txt +0 -0
- package/src/assets/fonts/{Roboto → roboto}/Roboto-Black.ttf +0 -0
- package/src/assets/fonts/{Roboto → roboto}/Roboto-BlackItalic.ttf +0 -0
- package/src/assets/fonts/{Roboto → roboto}/Roboto-Bold.ttf +0 -0
- package/src/assets/fonts/{Roboto → roboto}/Roboto-BoldItalic.ttf +0 -0
- package/src/assets/fonts/{Roboto → roboto}/Roboto-Italic.ttf +0 -0
- package/src/assets/fonts/{Roboto → roboto}/Roboto-Light.ttf +0 -0
- package/src/assets/fonts/{Roboto → roboto}/Roboto-LightItalic.ttf +0 -0
- package/src/assets/fonts/{Roboto → roboto}/Roboto-Medium.ttf +0 -0
- package/src/assets/fonts/{Roboto → roboto}/Roboto-MediumItalic.ttf +0 -0
- package/src/assets/fonts/{Roboto → roboto}/Roboto-Regular.ttf +0 -0
- package/src/assets/fonts/{Roboto → roboto}/Roboto-Thin.ttf +0 -0
- package/src/assets/fonts/{Roboto → roboto}/Roboto-ThinItalic.ttf +0 -0
- package/src/components/atoms/ButtonV2/ButtonV2.stories.js +1 -0
- package/src/components/atoms/ButtonV2/index.js +11 -6
- package/src/components/atoms/ButtonV2/styles.js +9 -1
- package/src/components/atoms/Image/Image.stories.js +10 -2
- package/src/components/atoms/Image/index.js +2 -1
- package/src/components/atoms/Image/styles.js +9 -0
- package/src/components/atoms/SelectItemV2/SelectItemV2.stories.js +26 -0
- package/src/components/atoms/SelectItemV2/index.js +45 -0
- package/src/components/atoms/SelectItemV2/styles.js +55 -0
- package/src/components/molecules/SelectV2/SelectV2.stories.js +114 -0
- package/src/components/molecules/SelectV2/index.js +332 -0
- package/src/components/molecules/SelectV2/styles.js +100 -0
- package/src/components/organisms/OrderDetail/OrderDetail.stories.js +1 -1
- package/src/components/organisms/OrderDetail/index.js +2 -2
- package/src/index.js +1 -0
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports.SelectV2 = void 0;
|
|
11
|
+
|
|
12
|
+
var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createForOfIteratorHelper"));
|
|
13
|
+
|
|
14
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
15
|
+
|
|
16
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
17
|
+
|
|
18
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
19
|
+
|
|
20
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
+
|
|
22
|
+
var _material = require("@mui/material");
|
|
23
|
+
|
|
24
|
+
var _styles = require("./styles");
|
|
25
|
+
|
|
26
|
+
var _ButtonV = require("../../atoms/ButtonV2");
|
|
27
|
+
|
|
28
|
+
var _freeSolidSvgIcons = require("@fortawesome/free-solid-svg-icons");
|
|
29
|
+
|
|
30
|
+
var _utils = require("../../../global-files/utils");
|
|
31
|
+
|
|
32
|
+
var _SelectItemV = require("../../atoms/SelectItemV2");
|
|
33
|
+
|
|
34
|
+
var _InputText = require("../../atoms/InputText");
|
|
35
|
+
|
|
36
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
37
|
+
|
|
38
|
+
var SelectV2 = function SelectV2(props) {
|
|
39
|
+
var _positions$positionDr;
|
|
40
|
+
|
|
41
|
+
var items = props.items,
|
|
42
|
+
triggerType = props.triggerType,
|
|
43
|
+
selectButton = props.selectButton,
|
|
44
|
+
defaultItem = props.defaultItem,
|
|
45
|
+
inputSearch = props.inputSearch,
|
|
46
|
+
maxWidthSelect = props.maxWidthSelect,
|
|
47
|
+
maxWidthDropdown = props.maxWidthDropdown,
|
|
48
|
+
maxHeightDropdown = props.maxHeightDropdown,
|
|
49
|
+
maxWidthItems = props.maxWidthItems,
|
|
50
|
+
alignmentItemsOverflow = props.alignmentItemsOverflow,
|
|
51
|
+
typeSelectItems = props.typeSelectItems,
|
|
52
|
+
multiple = props.multiple,
|
|
53
|
+
borderType = props.borderType,
|
|
54
|
+
classNameSelect = props.classNameSelect,
|
|
55
|
+
classNameDropdown = props.classNameDropdown,
|
|
56
|
+
positionDropdown = props.positionDropdown,
|
|
57
|
+
onChange = props.onChange;
|
|
58
|
+
var positions = {
|
|
59
|
+
topStart: "top-start",
|
|
60
|
+
topEnd: "top-end",
|
|
61
|
+
topCenter: "top",
|
|
62
|
+
rightStart: "right-start",
|
|
63
|
+
rightEnd: "right-end",
|
|
64
|
+
rightCenter: "right",
|
|
65
|
+
bottomStart: "bottom-start",
|
|
66
|
+
bottomEnd: "bottom-end",
|
|
67
|
+
bottomCenter: "bottom",
|
|
68
|
+
leftStart: "left-start",
|
|
69
|
+
leftEnd: "left-end",
|
|
70
|
+
leftCenter: "left"
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
var _useState = (0, _react.useState)(),
|
|
74
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
75
|
+
selectedItems = _useState2[0],
|
|
76
|
+
setSelectedItems = _useState2[1]; // { .. }
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
var _useState3 = (0, _react.useState)([]),
|
|
80
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
81
|
+
customItems = _useState4[0],
|
|
82
|
+
setCustomItems = _useState4[1];
|
|
83
|
+
|
|
84
|
+
var _useState5 = (0, _react.useState)(false),
|
|
85
|
+
_useState6 = (0, _slicedToArray2.default)(_useState5, 2),
|
|
86
|
+
showDropdown = _useState6[0],
|
|
87
|
+
setShowDropdown = _useState6[1];
|
|
88
|
+
|
|
89
|
+
var _useState7 = (0, _react.useState)("Sin titulo"),
|
|
90
|
+
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
91
|
+
labelSelect = _useState8[0],
|
|
92
|
+
setLabelSelect = _useState8[1];
|
|
93
|
+
|
|
94
|
+
var _useState9 = (0, _react.useState)(""),
|
|
95
|
+
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
96
|
+
textInputSearch = _useState10[0],
|
|
97
|
+
setTextInputSearch = _useState10[1];
|
|
98
|
+
|
|
99
|
+
var refInputTextSearch = (0, _react.useRef)(); // cada que cambie la lista de items
|
|
100
|
+
|
|
101
|
+
(0, _react.useEffect)(function () {
|
|
102
|
+
if ((0, _utils.isArrayEmpty)(items)) {
|
|
103
|
+
setSelectedItems({});
|
|
104
|
+
return;
|
|
105
|
+
} // items iniciales seleccionados
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
var initialSelectedItems = {};
|
|
109
|
+
items.forEach(function (item) {
|
|
110
|
+
if (item.selected) {
|
|
111
|
+
if (multiple) initialSelectedItems[item.value] = item.value;else initialSelectedItems = (0, _defineProperty2.default)({}, item.value, item.value);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
setSelectedItems(initialSelectedItems);
|
|
115
|
+
}, [items]); // cada que cambien los items seleccionados
|
|
116
|
+
|
|
117
|
+
(0, _react.useEffect)(function () {
|
|
118
|
+
if (!selectedItems) return;
|
|
119
|
+
renderItems();
|
|
120
|
+
renderLabelSelect();
|
|
121
|
+
onChange && onChange(Object.values(selectedItems));
|
|
122
|
+
}, [selectedItems]); // evento click de cada item de la lista
|
|
123
|
+
|
|
124
|
+
var onClickItem = function onClickItem(isSelected, value) {
|
|
125
|
+
var selectedItemsCopy = (0, _objectSpread2.default)({}, selectedItems);
|
|
126
|
+
|
|
127
|
+
if (isSelected) {
|
|
128
|
+
multiple ? selectedItemsCopy[value] = value : selectedItemsCopy = (0, _defineProperty2.default)({}, value, value);
|
|
129
|
+
} else delete selectedItemsCopy[value];
|
|
130
|
+
|
|
131
|
+
setSelectedItems(selectedItemsCopy);
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
var onClickSearch = function onClickSearch() {
|
|
135
|
+
setTextInputSearch(textInputSearch.trim());
|
|
136
|
+
(refInputTextSearch === null || refInputTextSearch === void 0 ? void 0 : refInputTextSearch.current) && refInputTextSearch.current.blur();
|
|
137
|
+
renderItems(textInputSearch.trim());
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
var renderLabelSelect = function renderLabelSelect() {
|
|
141
|
+
if (!selectedItems) return;
|
|
142
|
+
var selectedItemsCopy = Object.values(selectedItems);
|
|
143
|
+
|
|
144
|
+
if (selectedItemsCopy.length > 1) {
|
|
145
|
+
setLabelSelect("Personalizado");
|
|
146
|
+
} else if (selectedItemsCopy.length === 1) {
|
|
147
|
+
var labelItem = undefined;
|
|
148
|
+
|
|
149
|
+
var _iterator = (0, _createForOfIteratorHelper2.default)(items),
|
|
150
|
+
_step;
|
|
151
|
+
|
|
152
|
+
try {
|
|
153
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
154
|
+
var item = _step.value;
|
|
155
|
+
|
|
156
|
+
if (item.value == selectedItemsCopy[0]) {
|
|
157
|
+
labelItem = item.label;
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
} catch (err) {
|
|
162
|
+
_iterator.e(err);
|
|
163
|
+
} finally {
|
|
164
|
+
_iterator.f();
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
!(0, _utils.isStringEmpty)(labelItem) ? setLabelSelect(labelItem) : setLabelSelect("Sin titulo");
|
|
168
|
+
} else {
|
|
169
|
+
if (!(0, _utils.isStringEmpty)(defaultItem === null || defaultItem === void 0 ? void 0 : defaultItem.label) && defaultItem !== null && defaultItem !== void 0 && defaultItem.showLabelInSelect) {
|
|
170
|
+
setLabelSelect(defaultItem.label);
|
|
171
|
+
} else if (!(0, _utils.isStringEmpty)(selectButton === null || selectButton === void 0 ? void 0 : selectButton.label)) {
|
|
172
|
+
setLabelSelect(selectButton.label);
|
|
173
|
+
} else {
|
|
174
|
+
setLabelSelect("Sin titulo");
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
var renderItems = function renderItems() {
|
|
180
|
+
var textSearch = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
181
|
+
if ((0, _utils.isArrayEmpty)(items)) setCustomItems([]);
|
|
182
|
+
setCustomItems(items.map(function (item, index) {
|
|
183
|
+
if (!(0, _utils.isStringEmpty)(textSearch) && !item.label.trim().toLowerCase().includes(textSearch.trim().toLowerCase())) {
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectItemV.SelectItemV2, {
|
|
188
|
+
label: item.label,
|
|
189
|
+
value: item.value,
|
|
190
|
+
checkbox: typeSelectItems === "checkbox" ? true : typeSelectItems === "marginCheckbox" ? false : undefined,
|
|
191
|
+
selected: selectedItems && selectedItems[item.value] ? true : false,
|
|
192
|
+
onClick: onClickItem
|
|
193
|
+
}, classNameSelect + "_item" + index);
|
|
194
|
+
}));
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.ClickAwayListener, {
|
|
198
|
+
onClickAway: function onClickAway(event) {
|
|
199
|
+
if (triggerType !== "hover") setShowDropdown(false);
|
|
200
|
+
},
|
|
201
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
|
|
202
|
+
className: !(0, _utils.isStringEmpty)(classNameSelect) ? classNameSelect : "",
|
|
203
|
+
borderType: borderType,
|
|
204
|
+
maxWidthSelect: maxWidthSelect,
|
|
205
|
+
maxWidthDropdown: maxWidthDropdown,
|
|
206
|
+
maxHeightDropdown: maxHeightDropdown,
|
|
207
|
+
alignmentItemsOverflow: alignmentItemsOverflow,
|
|
208
|
+
maxWidthItems: maxWidthItems,
|
|
209
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Tooltip, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
|
|
210
|
+
placement: (_positions$positionDr = positions[positionDropdown]) !== null && _positions$positionDr !== void 0 ? _positions$positionDr : positions.bottomCenter,
|
|
211
|
+
open: triggerType !== "hover" ? showDropdown : undefined,
|
|
212
|
+
arrow: false,
|
|
213
|
+
componentsProps: {
|
|
214
|
+
tooltip: {
|
|
215
|
+
className: "dropdownSelect" + ((0, _utils.isStringEmpty)(classNameDropdown) ? "" : " " + classNameDropdown)
|
|
216
|
+
},
|
|
217
|
+
popper: {
|
|
218
|
+
disablePortal: true
|
|
219
|
+
},
|
|
220
|
+
transition: {
|
|
221
|
+
timeout: 300
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
TransitionComponent: _material.Fade,
|
|
225
|
+
enterDelay: 100,
|
|
226
|
+
followCursor: false,
|
|
227
|
+
disableFocusListener: true,
|
|
228
|
+
disableTouchListener: true,
|
|
229
|
+
disableHoverListener: triggerType !== "hover",
|
|
230
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
231
|
+
children: [inputSearch && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
232
|
+
className: "container-inputSearch" + (!(0, _utils.isStringEmpty)(inputSearch === null || inputSearch === void 0 ? void 0 : inputSearch.className) ? " " + inputSearch.className : ""),
|
|
233
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
234
|
+
className: "buttonSearch",
|
|
235
|
+
type: "gray",
|
|
236
|
+
transparent: true,
|
|
237
|
+
size: 14,
|
|
238
|
+
icon: _freeSolidSvgIcons.faSearch,
|
|
239
|
+
onClick: function onClick(event) {
|
|
240
|
+
if ((0, _utils.isStringEmpty)(textInputSearch) && refInputTextSearch !== null && refInputTextSearch !== void 0 && refInputTextSearch.current) {
|
|
241
|
+
setTextInputSearch("");
|
|
242
|
+
refInputTextSearch.current.focus();
|
|
243
|
+
} else {
|
|
244
|
+
onClickSearch();
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputText.InputText, {
|
|
248
|
+
className: "inputSearch",
|
|
249
|
+
type: "black",
|
|
250
|
+
transparent: true,
|
|
251
|
+
size: 12,
|
|
252
|
+
placeHolder: (0, _utils.isStringEmpty)(inputSearch === null || inputSearch === void 0 ? void 0 : inputSearch.defaultText) ? "Texto a buscar" : inputSearch.defaultText,
|
|
253
|
+
text: textInputSearch,
|
|
254
|
+
onChangeText: function onChangeText(newValue) {
|
|
255
|
+
return setTextInputSearch(newValue);
|
|
256
|
+
},
|
|
257
|
+
onEnter: function onEnter(event) {
|
|
258
|
+
return onClickSearch();
|
|
259
|
+
},
|
|
260
|
+
refInputText: refInputTextSearch
|
|
261
|
+
})]
|
|
262
|
+
}), defaultItem && /*#__PURE__*/(0, _jsxRuntime.jsx)(_SelectItemV.SelectItemV2, {
|
|
263
|
+
label: defaultItem.label,
|
|
264
|
+
value: null,
|
|
265
|
+
checkbox: defaultItem.itemType === "checkbox" ? true : defaultItem.itemType === "marginCheckbox" ? false : undefined,
|
|
266
|
+
selected: selectedItems && Object.keys(selectedItems).length ? false : true,
|
|
267
|
+
onClick: function onClick(isSelected, value) {
|
|
268
|
+
selectedItems && Object.keys(selectedItems).length && setSelectedItems({});
|
|
269
|
+
}
|
|
270
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
271
|
+
className: "container-items",
|
|
272
|
+
children: customItems
|
|
273
|
+
})]
|
|
274
|
+
}),
|
|
275
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.ContainerSelect, {
|
|
276
|
+
className: "container-buttonSelect",
|
|
277
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
|
|
278
|
+
className: "buttonSelect" + (!(0, _utils.isStringEmpty)(selectButton === null || selectButton === void 0 ? void 0 : selectButton.className) ? " " + selectButton.className : ""),
|
|
279
|
+
disabled: selectButton === null || selectButton === void 0 ? void 0 : selectButton.disabled,
|
|
280
|
+
type: selectButton === null || selectButton === void 0 ? void 0 : selectButton.type,
|
|
281
|
+
transparent: selectButton === null || selectButton === void 0 ? void 0 : selectButton.transparent,
|
|
282
|
+
label: labelSelect,
|
|
283
|
+
size: selectButton === null || selectButton === void 0 ? void 0 : selectButton.size,
|
|
284
|
+
icon: _freeSolidSvgIcons.faCaretDown,
|
|
285
|
+
iconPosition: "end",
|
|
286
|
+
onClick: function onClick(event) {
|
|
287
|
+
if (triggerType !== "hover") setShowDropdown(function (prev) {
|
|
288
|
+
return !prev;
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
})
|
|
292
|
+
})
|
|
293
|
+
}))
|
|
294
|
+
})
|
|
295
|
+
});
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
exports.SelectV2 = SelectV2;
|
|
@@ -0,0 +1,42 @@
|
|
|
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.ContainerSelect = exports.Container = void 0;
|
|
9
|
+
|
|
10
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
|
|
11
|
+
|
|
12
|
+
var _variables = require("../../../global-files/variables");
|
|
13
|
+
|
|
14
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
15
|
+
|
|
16
|
+
var _templateObject, _templateObject2;
|
|
17
|
+
|
|
18
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: fit-content;\n max-width: ", ";\n //border: 1px solid red;\n border-radius: ", ";\n"])), function (_ref) {
|
|
19
|
+
var maxWidthSelect = _ref.maxWidthSelect;
|
|
20
|
+
return maxWidthSelect ? maxWidthSelect : "unset";
|
|
21
|
+
}, function (_ref2) {
|
|
22
|
+
var borderType = _ref2.borderType;
|
|
23
|
+
return (borderType === null || borderType === void 0 ? void 0 : borderType.toLowerCase()) === "rectangle" ? "6px" : (borderType === null || borderType === void 0 ? void 0 : borderType.toLowerCase()) === "oval" ? "17px" : "0px"; // default none
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
exports.Container = Container;
|
|
27
|
+
|
|
28
|
+
var ContainerSelect = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n border-radius: inherit;\n\n .buttonSelect {\n width: 100%;\n border-radius: inherit;\n\n .button {\n padding: 10px 16px;\n gap: 10px;\n .icon {\n font-size: 13px;\n }\n }\n }\n\n + .MuiTooltip-popper {\n background-color: transparent;\n\n .dropdownSelect {\n --background: white;\n box-shadow: 0px 0px 10px 1px gray;\n background-color: var(--background);\n padding: 6px 0px;\n border-radius: 7px;\n display: flex;\n flex-direction: column;\n gap: 0px;\n max-width: ", ";\n max-height: ", ";\n\n .container-inputSearch {\n width: 100%;\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n align-items: center;\n gap: 0px;\n padding: 0px 10px 8px 10px;\n border-bottom: 1px solid #f0f0f0;\n\n .inputSearch {\n padding-left: 8px;\n flex-grow: 2;\n }\n }\n\n .selectItemV2 {\n width: 100%;\n }\n\n .container-items {\n flex-grow: 2;\n display: flex;\n flex-direction: column;\n flex-wrap: ", ";\n overflow: auto;\n\n .selectItemV2 {\n width: ", ";\n }\n }\n }\n\n &[data-popper-placement*=\"bottom\"] .dropdownSelect {\n margin-top: 10px;\n }\n &[data-popper-placement*=\"top\"] .dropdownSelect {\n margin-bottom: 10px;\n }\n &[data-popper-placement*=\"left\"] .dropdownSelect {\n margin-right: 10px;\n }\n &[data-popper-placement*=\"right\"] .dropdownSelect {\n margin-left: 10px;\n }\n }\n"])), function (_ref3) {
|
|
29
|
+
var maxWidthDropdown = _ref3.maxWidthDropdown;
|
|
30
|
+
return maxWidthDropdown ? maxWidthDropdown : "400px";
|
|
31
|
+
}, function (_ref4) {
|
|
32
|
+
var maxHeightDropdown = _ref4.maxHeightDropdown;
|
|
33
|
+
return maxHeightDropdown ? maxHeightDropdown : "80vh";
|
|
34
|
+
}, function (_ref5) {
|
|
35
|
+
var alignmentItemsOverflow = _ref5.alignmentItemsOverflow;
|
|
36
|
+
return alignmentItemsOverflow === "columns" ? "wrap" : "nowrap";
|
|
37
|
+
}, function (_ref6) {
|
|
38
|
+
var maxWidthItems = _ref6.maxWidthItems;
|
|
39
|
+
return maxWidthItems ? maxWidthItems : "100%";
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
exports.ContainerSelect = ContainerSelect;
|
|
@@ -15,7 +15,7 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm
|
|
|
15
15
|
|
|
16
16
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
17
17
|
|
|
18
|
-
var _index =
|
|
18
|
+
var _index = require("./index.js");
|
|
19
19
|
|
|
20
20
|
var _axios = _interopRequireDefault(require("axios"));
|
|
21
21
|
|
|
@@ -23,12 +23,12 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
23
23
|
|
|
24
24
|
var _default = {
|
|
25
25
|
title: "Components/organisms/OrderDetail",
|
|
26
|
-
component: _index.
|
|
26
|
+
component: _index.OrderDetail
|
|
27
27
|
};
|
|
28
28
|
exports.default = _default;
|
|
29
29
|
|
|
30
30
|
var Template = function Template(args) {
|
|
31
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.OrderDetail, (0, _objectSpread2.default)({}, args));
|
|
32
32
|
};
|
|
33
33
|
|
|
34
34
|
var objToQueryString = function objToQueryString(obj) {
|
|
@@ -7,7 +7,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
|
8
8
|
value: true
|
|
9
9
|
});
|
|
10
|
-
exports.
|
|
10
|
+
exports.OrderDetail = void 0;
|
|
11
11
|
|
|
12
12
|
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
13
13
|
|
|
@@ -33,7 +33,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
33
33
|
|
|
34
34
|
_moment.default.locale("es");
|
|
35
35
|
|
|
36
|
-
function OrderDetail(props) {
|
|
36
|
+
var OrderDetail = function OrderDetail(props) {
|
|
37
37
|
var order = props.order;
|
|
38
38
|
|
|
39
39
|
var _useState = (0, _react.useState)(order.payment !== "pagado"),
|
|
@@ -246,4 +246,6 @@ function OrderDetail(props) {
|
|
|
246
246
|
})]
|
|
247
247
|
})]
|
|
248
248
|
});
|
|
249
|
-
}
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
exports.OrderDetail = OrderDetail;
|
package/dist/index.js
CHANGED
|
@@ -784,7 +784,7 @@ Object.keys(_index59).forEach(function (key) {
|
|
|
784
784
|
});
|
|
785
785
|
});
|
|
786
786
|
|
|
787
|
-
var _index60 = require("./components/
|
|
787
|
+
var _index60 = require("./components/molecules/SelectV2/index");
|
|
788
788
|
|
|
789
789
|
Object.keys(_index60).forEach(function (key) {
|
|
790
790
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -797,7 +797,7 @@ Object.keys(_index60).forEach(function (key) {
|
|
|
797
797
|
});
|
|
798
798
|
});
|
|
799
799
|
|
|
800
|
-
var _index61 = require("./components/organisms/
|
|
800
|
+
var _index61 = require("./components/organisms/ChangePassword/index");
|
|
801
801
|
|
|
802
802
|
Object.keys(_index61).forEach(function (key) {
|
|
803
803
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -810,7 +810,7 @@ Object.keys(_index61).forEach(function (key) {
|
|
|
810
810
|
});
|
|
811
811
|
});
|
|
812
812
|
|
|
813
|
-
var _index62 = require("./components/organisms/
|
|
813
|
+
var _index62 = require("./components/organisms/Fullplan/index");
|
|
814
814
|
|
|
815
815
|
Object.keys(_index62).forEach(function (key) {
|
|
816
816
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -823,7 +823,7 @@ Object.keys(_index62).forEach(function (key) {
|
|
|
823
823
|
});
|
|
824
824
|
});
|
|
825
825
|
|
|
826
|
-
var _index63 = require("./components/organisms/
|
|
826
|
+
var _index63 = require("./components/organisms/FullProductNameHeader/index");
|
|
827
827
|
|
|
828
828
|
Object.keys(_index63).forEach(function (key) {
|
|
829
829
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -836,7 +836,7 @@ Object.keys(_index63).forEach(function (key) {
|
|
|
836
836
|
});
|
|
837
837
|
});
|
|
838
838
|
|
|
839
|
-
var _index64 = require("./components/organisms/
|
|
839
|
+
var _index64 = require("./components/organisms/FullTabsMenu/index");
|
|
840
840
|
|
|
841
841
|
Object.keys(_index64).forEach(function (key) {
|
|
842
842
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -849,7 +849,7 @@ Object.keys(_index64).forEach(function (key) {
|
|
|
849
849
|
});
|
|
850
850
|
});
|
|
851
851
|
|
|
852
|
-
var _index65 = require("./components/organisms/
|
|
852
|
+
var _index65 = require("./components/organisms/ImageDataTable/index");
|
|
853
853
|
|
|
854
854
|
Object.keys(_index65).forEach(function (key) {
|
|
855
855
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -862,7 +862,7 @@ Object.keys(_index65).forEach(function (key) {
|
|
|
862
862
|
});
|
|
863
863
|
});
|
|
864
864
|
|
|
865
|
-
var _index66 = require("./components/organisms/
|
|
865
|
+
var _index66 = require("./components/organisms/ImagePreviewer/index");
|
|
866
866
|
|
|
867
867
|
Object.keys(_index66).forEach(function (key) {
|
|
868
868
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -875,7 +875,7 @@ Object.keys(_index66).forEach(function (key) {
|
|
|
875
875
|
});
|
|
876
876
|
});
|
|
877
877
|
|
|
878
|
-
var _index67 = require("./components/organisms/
|
|
878
|
+
var _index67 = require("./components/organisms/ImagesGroup/index");
|
|
879
879
|
|
|
880
880
|
Object.keys(_index67).forEach(function (key) {
|
|
881
881
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -888,7 +888,7 @@ Object.keys(_index67).forEach(function (key) {
|
|
|
888
888
|
});
|
|
889
889
|
});
|
|
890
890
|
|
|
891
|
-
var _index68 = require("./components/organisms/
|
|
891
|
+
var _index68 = require("./components/organisms/InputGroup/index");
|
|
892
892
|
|
|
893
893
|
Object.keys(_index68).forEach(function (key) {
|
|
894
894
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -901,7 +901,7 @@ Object.keys(_index68).forEach(function (key) {
|
|
|
901
901
|
});
|
|
902
902
|
});
|
|
903
903
|
|
|
904
|
-
var _index69 = require("./components/organisms/
|
|
904
|
+
var _index69 = require("./components/organisms/ProductImageModal/index");
|
|
905
905
|
|
|
906
906
|
Object.keys(_index69).forEach(function (key) {
|
|
907
907
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -914,7 +914,7 @@ Object.keys(_index69).forEach(function (key) {
|
|
|
914
914
|
});
|
|
915
915
|
});
|
|
916
916
|
|
|
917
|
-
var _index70 = require("./components/organisms/
|
|
917
|
+
var _index70 = require("./components/organisms/Chat/index");
|
|
918
918
|
|
|
919
919
|
Object.keys(_index70).forEach(function (key) {
|
|
920
920
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -927,7 +927,7 @@ Object.keys(_index70).forEach(function (key) {
|
|
|
927
927
|
});
|
|
928
928
|
});
|
|
929
929
|
|
|
930
|
-
var _index71 = require("./components/organisms/
|
|
930
|
+
var _index71 = require("./components/organisms/Modal/index");
|
|
931
931
|
|
|
932
932
|
Object.keys(_index71).forEach(function (key) {
|
|
933
933
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -940,6 +940,19 @@ Object.keys(_index71).forEach(function (key) {
|
|
|
940
940
|
});
|
|
941
941
|
});
|
|
942
942
|
|
|
943
|
+
var _index72 = require("./components/organisms/OrderDetail/index");
|
|
944
|
+
|
|
945
|
+
Object.keys(_index72).forEach(function (key) {
|
|
946
|
+
if (key === "default" || key === "__esModule") return;
|
|
947
|
+
if (key in exports && exports[key] === _index72[key]) return;
|
|
948
|
+
Object.defineProperty(exports, key, {
|
|
949
|
+
enumerable: true,
|
|
950
|
+
get: function get() {
|
|
951
|
+
return _index72[key];
|
|
952
|
+
}
|
|
953
|
+
});
|
|
954
|
+
});
|
|
955
|
+
|
|
943
956
|
var _ChangePasswordLogin = require("./components/pages/ChangePasswordLogin");
|
|
944
957
|
|
|
945
958
|
Object.keys(_ChangePasswordLogin).forEach(function (key) {
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -10,7 +10,7 @@ export const ButtonV2 = (props) => {
|
|
|
10
10
|
keyId,
|
|
11
11
|
className,
|
|
12
12
|
disabled,
|
|
13
|
-
type, // white | whiteS2 | pink | gray | purple | black => por default (white)
|
|
13
|
+
type, // white | whiteS2 | whiteS3 | pink | gray | purple | black => por default (white)
|
|
14
14
|
transparent, // boolean => por default (NO transparent)
|
|
15
15
|
label,
|
|
16
16
|
size, // number ... label? size -> label && icon adaptable : size -> icon
|
|
@@ -39,13 +39,18 @@ export const ButtonV2 = (props) => {
|
|
|
39
39
|
<ButtonMUI
|
|
40
40
|
className={
|
|
41
41
|
"button " +
|
|
42
|
-
([
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
([
|
|
43
|
+
"white",
|
|
44
|
+
"whiteS2",
|
|
45
|
+
"whiteS3",
|
|
46
|
+
"pink",
|
|
47
|
+
"gray",
|
|
48
|
+
"purple",
|
|
49
|
+
"black",
|
|
50
|
+
].includes(type)
|
|
45
51
|
? type
|
|
46
52
|
: "white") +
|
|
47
|
-
(transparent ? " transparent
|
|
48
|
-
className
|
|
53
|
+
(transparent ? " transparent" : " fill")
|
|
49
54
|
}
|
|
50
55
|
variant={"text"}
|
|
51
56
|
disabled={disabled || isLoading}
|
|
@@ -49,7 +49,7 @@ export const Container = styled.div`
|
|
|
49
49
|
}};
|
|
50
50
|
font-family: ${FontFamily.RobotoMedium}, sans-serif;
|
|
51
51
|
font-size: var(--size);
|
|
52
|
-
line-height: 1;
|
|
52
|
+
line-height: 1.2;
|
|
53
53
|
text-transform: none;
|
|
54
54
|
|
|
55
55
|
// tipos de botones fill
|
|
@@ -70,6 +70,14 @@ export const Container = styled.div`
|
|
|
70
70
|
background-color: #f4f4f4;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
+
&.whiteS3 {
|
|
74
|
+
background-color: white;
|
|
75
|
+
color: #262626;
|
|
76
|
+
border-color: #f0f0f0;
|
|
77
|
+
&:hover {
|
|
78
|
+
background-color: #f4f4f4;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
73
81
|
&.pink {
|
|
74
82
|
background-color: #e33aa9;
|
|
75
83
|
color: white;
|
|
@@ -3,14 +3,19 @@ import { Image } from "./index";
|
|
|
3
3
|
export default {
|
|
4
4
|
title: "Components/atoms/Image",
|
|
5
5
|
component: Image,
|
|
6
|
-
argTypes: {
|
|
6
|
+
argTypes: {
|
|
7
|
+
borderType: {
|
|
8
|
+
options: [undefined, "rectangle", "circle"],
|
|
9
|
+
control: { type: "select" },
|
|
10
|
+
},
|
|
11
|
+
},
|
|
7
12
|
};
|
|
8
13
|
|
|
9
14
|
const Template = (args) => <Image {...args} />;
|
|
10
15
|
|
|
11
16
|
const keyS3_test =
|
|
12
17
|
"84300/1/chat/playa-213f791b-d890-48e1-be19-28bf5a95d517.jpeg";
|
|
13
|
-
const srcTest = `https://content-management-
|
|
18
|
+
const srcTest = `https://content-management-profile.s3.amazonaws.com/id-59/59.png`;
|
|
14
19
|
export const ImageTest = Template.bind({});
|
|
15
20
|
ImageTest.args = {
|
|
16
21
|
width: "200px",
|
|
@@ -18,6 +23,7 @@ ImageTest.args = {
|
|
|
18
23
|
colorLoading: "#bbbbbb",
|
|
19
24
|
src: srcTest,
|
|
20
25
|
componentDefault: <label> test error </label>,
|
|
26
|
+
borderType: undefined,
|
|
21
27
|
};
|
|
22
28
|
|
|
23
29
|
const keyS3_OK =
|
|
@@ -29,6 +35,7 @@ ImageOK.args = {
|
|
|
29
35
|
sizeLoading: "40",
|
|
30
36
|
src: srcOK,
|
|
31
37
|
componentDefault: <label> img no cargada </label>,
|
|
38
|
+
borderType: undefined,
|
|
32
39
|
};
|
|
33
40
|
|
|
34
41
|
const keyS3_ERROR =
|
|
@@ -40,4 +47,5 @@ ImageERROR.args = {
|
|
|
40
47
|
sizeLoading: "60",
|
|
41
48
|
src: srcERROR,
|
|
42
49
|
componentDefault: <label> ERROR al cargar </label>,
|
|
50
|
+
borderType: undefined,
|
|
43
51
|
};
|