@lideralia/alife-uikit 1.2.21 → 1.2.23
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/atoms/Input/Input.js +6 -3
- package/dist/organisms/Cards/PersonalData.js +4 -4
- package/dist/organisms/Modals/Cookies.js +1 -0
- package/dist/organisms/Modals/Login.js +1 -0
- package/dist/organisms/Modals/LoginPassCode.js +15 -6
- package/dist/organisms/Modals/Register.js +2 -1
- package/dist/organisms/Navbar/Default/Navbar.js +1 -0
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ var _styles = require("./styles");
|
|
|
23
23
|
|
|
24
24
|
var _Layout = require("../Layout");
|
|
25
25
|
|
|
26
|
-
var _excluded = ["borderless", "hasError", "placeholderMessage", "onChange"];
|
|
26
|
+
var _excluded = ["borderless", "hasError", "placeholderMessage", "onChange", "onKeyUp"];
|
|
27
27
|
|
|
28
28
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
29
29
|
|
|
@@ -179,6 +179,7 @@ var InputMono = (0, _react.forwardRef)(function (props, ref) {
|
|
|
179
179
|
hasError = props.hasError,
|
|
180
180
|
placeholderMessage = props.placeholderMessage,
|
|
181
181
|
_onChange2 = props.onChange,
|
|
182
|
+
onKeyUp = props.onKeyUp,
|
|
182
183
|
rest = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
183
184
|
return _react.default.createElement(_react.default.Fragment, null, _react.default.createElement(_styles.InputMonoContainerStyled, (0, _extends2.default)({
|
|
184
185
|
borderless: false,
|
|
@@ -194,11 +195,13 @@ var InputMono = (0, _react.forwardRef)(function (props, ref) {
|
|
|
194
195
|
marginX: "auto",
|
|
195
196
|
onChange: function onChange(e) {
|
|
196
197
|
return _onChange2 && _onChange2(e.target.name, e.target.value);
|
|
197
|
-
}
|
|
198
|
+
},
|
|
199
|
+
onKeyUp: onKeyUp
|
|
198
200
|
}))));
|
|
199
201
|
});
|
|
200
202
|
exports.InputMono = InputMono;
|
|
201
203
|
InputMono.defaultProps = {
|
|
202
204
|
borderless: false,
|
|
203
|
-
hasError: false
|
|
205
|
+
hasError: false,
|
|
206
|
+
onKeyUp: null
|
|
204
207
|
};
|
|
@@ -200,8 +200,8 @@ CardPersonalData.Body = function (_ref3) {
|
|
|
200
200
|
onChange: function onChange(id, content) {
|
|
201
201
|
return handleChange(id, content);
|
|
202
202
|
},
|
|
203
|
-
id: "
|
|
204
|
-
name: "
|
|
203
|
+
id: "name",
|
|
204
|
+
name: "name",
|
|
205
205
|
sizeInput: "big",
|
|
206
206
|
defaultValue: name,
|
|
207
207
|
iconLeft: _react.default.createElement(_IconUser.default, null),
|
|
@@ -303,8 +303,8 @@ CardPersonalData.BodyEditMode = function (_ref4) {
|
|
|
303
303
|
onChange: function onChange(id, content) {
|
|
304
304
|
return handleChange(id, content);
|
|
305
305
|
},
|
|
306
|
-
id: "
|
|
307
|
-
name: "
|
|
306
|
+
id: "name",
|
|
307
|
+
name: "name",
|
|
308
308
|
sizeInput: "big",
|
|
309
309
|
defaultValue: name,
|
|
310
310
|
iconLeft: _react.default.createElement(_IconUser.default, null)
|
|
@@ -122,6 +122,7 @@ var ModalCookies = function ModalCookies(_ref) {
|
|
|
122
122
|
gridTemplateRows: "1fr",
|
|
123
123
|
gridColumnGap: 3
|
|
124
124
|
}, _react.default.createElement(_Button.Button, {
|
|
125
|
+
id: "cookies-accept-button",
|
|
125
126
|
colorType: "orange",
|
|
126
127
|
action: function action() {
|
|
127
128
|
return onSubmit();
|
|
@@ -136,6 +136,7 @@ var ModalLogin = function ModalLogin(_ref) {
|
|
|
136
136
|
size: "invisible",
|
|
137
137
|
onChange: onChangeCaptcha
|
|
138
138
|
}), _react.default.createElement(_Button.Button, {
|
|
139
|
+
id: "main-login-button",
|
|
139
140
|
sizeButton: "big",
|
|
140
141
|
backgroundColor: customColor,
|
|
141
142
|
colorType: customColor || 'green',
|
|
@@ -60,8 +60,9 @@ var ModalLoginPassCode = function ModalLoginPassCode(_ref) {
|
|
|
60
60
|
onSubmit = _ref.onSubmit,
|
|
61
61
|
tokenCaptcha = _ref.tokenCaptcha,
|
|
62
62
|
onModalClose = _ref.onModalClose,
|
|
63
|
-
onModalBack = _ref.onModalBack
|
|
64
|
-
|
|
63
|
+
onModalBack = _ref.onModalBack,
|
|
64
|
+
seconds = _ref.seconds,
|
|
65
|
+
hasWrongCodeError = _ref.hasWrongCodeError;
|
|
65
66
|
var pass1Ref = (0, _react.useRef)(null);
|
|
66
67
|
var pass2Ref = (0, _react.useRef)(null);
|
|
67
68
|
var pass3Ref = (0, _react.useRef)(null);
|
|
@@ -86,6 +87,11 @@ var ModalLoginPassCode = function ModalLoginPassCode(_ref) {
|
|
|
86
87
|
actionRetry(valueToken);
|
|
87
88
|
};
|
|
88
89
|
|
|
90
|
+
(0, _react.useEffect)(function () {
|
|
91
|
+
setIsCountdown(false);
|
|
92
|
+
setCountdown(seconds);
|
|
93
|
+
setIsCountdown(true);
|
|
94
|
+
}, [seconds]);
|
|
89
95
|
(0, _react.useEffect)(function () {
|
|
90
96
|
var timer = countdown > 0 && isCountdown && setInterval(function () {
|
|
91
97
|
return setCountdown(countdown - 1);
|
|
@@ -206,6 +212,7 @@ var ModalLoginPassCode = function ModalLoginPassCode(_ref) {
|
|
|
206
212
|
display: 'none'
|
|
207
213
|
}
|
|
208
214
|
}, "send")), hasError && errorMessage && _react.default.createElement(_Typography.Text, {
|
|
215
|
+
textAlign: "center",
|
|
209
216
|
sizeText: "display14",
|
|
210
217
|
color: "red",
|
|
211
218
|
marginY: 1
|
|
@@ -217,15 +224,15 @@ var ModalLoginPassCode = function ModalLoginPassCode(_ref) {
|
|
|
217
224
|
sitekey: tokenCaptcha,
|
|
218
225
|
size: "invisible",
|
|
219
226
|
onChange: onChangeCaptcha
|
|
220
|
-
}), _react.default.createElement(_Layout.Box, {
|
|
227
|
+
}), !hasWrongCodeError && _react.default.createElement(_Layout.Box, {
|
|
221
228
|
width: "100%",
|
|
222
229
|
textAlign: "center"
|
|
223
|
-
}, _react.default.createElement(_Typography.Text, {
|
|
230
|
+
}, labelRetry && _react.default.createElement(_Typography.Text, {
|
|
224
231
|
sizeText: "display13",
|
|
225
232
|
textAlign: "center",
|
|
226
233
|
color: "black60",
|
|
227
234
|
marginY: 2
|
|
228
|
-
}, labelRetry), isCountdown ? _react.default.createElement(_Typography.Text, {
|
|
235
|
+
}, labelRetry.replace('{countdown}', seconds)), isCountdown ? _react.default.createElement(_Typography.Text, {
|
|
229
236
|
sizeText: "display13",
|
|
230
237
|
textAlign: "center",
|
|
231
238
|
color: "black60",
|
|
@@ -287,5 +294,7 @@ ModalLoginPassCode.defaultProps = {
|
|
|
287
294
|
errorMessage: '',
|
|
288
295
|
title: 'Verifica tu cuenta',
|
|
289
296
|
onModalClose: function onModalClose() {},
|
|
290
|
-
onModalBack: function onModalBack() {}
|
|
297
|
+
onModalBack: function onModalBack() {},
|
|
298
|
+
seconds: 60,
|
|
299
|
+
hasWrongCodeError: false
|
|
291
300
|
};
|
|
@@ -232,7 +232,8 @@ var ModalRegister = function ModalRegister(_ref) {
|
|
|
232
232
|
color: "black60",
|
|
233
233
|
underline: true,
|
|
234
234
|
onClick: (_footer$action = footer.action) === null || _footer$action === void 0 ? void 0 : _footer$action.to,
|
|
235
|
-
href: null
|
|
235
|
+
href: null,
|
|
236
|
+
id: "login-link-from-register"
|
|
236
237
|
}, (_footer$action2 = footer.action) === null || _footer$action2 === void 0 ? void 0 : _footer$action2.label))));
|
|
237
238
|
};
|
|
238
239
|
|
|
@@ -63,6 +63,7 @@ var Navbar = function Navbar(props) {
|
|
|
63
63
|
"data-testid": "test-Navbar"
|
|
64
64
|
}, props), navItems === null || navItems === void 0 ? void 0 : navItems.map(function (element, key) {
|
|
65
65
|
return _react.default.createElement(_Button.Button, {
|
|
66
|
+
id: "navbar-".concat(element.id),
|
|
66
67
|
key: "".concat(element.id, "-").concat(key),
|
|
67
68
|
action: function action(e) {
|
|
68
69
|
if (history && element.path) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lideralia/alife-uikit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.23",
|
|
4
4
|
"description": "Librería y documentación de componentes, basada en el Design System de Alife.",
|
|
5
5
|
"homepage": "https://github.com/lideralia/alife-frontend-components#readme",
|
|
6
6
|
"bugs": {
|