@lideralia/alife-uikit 1.1.364 → 1.1.366
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.
|
@@ -37,7 +37,8 @@ var Checkbox = function Checkbox(props) {
|
|
|
37
37
|
isDisabled = props.isDisabled,
|
|
38
38
|
name = props.name,
|
|
39
39
|
label = props.label,
|
|
40
|
-
labelPosition = props.labelPosition
|
|
40
|
+
labelPosition = props.labelPosition,
|
|
41
|
+
isActiveCheckbox = props.isActiveCheckbox;
|
|
41
42
|
|
|
42
43
|
var _useState = (0, _react.useState)(defaultChecked),
|
|
43
44
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -63,7 +64,10 @@ var Checkbox = function Checkbox(props) {
|
|
|
63
64
|
setChecked(!isChecked);
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
if (action)
|
|
67
|
+
if (action) {
|
|
68
|
+
action(name, !isChecked, !isChecked);
|
|
69
|
+
isActiveCheckbox(isChecked);
|
|
70
|
+
}
|
|
67
71
|
},
|
|
68
72
|
title: name,
|
|
69
73
|
zIndex: 2
|
|
@@ -67,11 +67,21 @@ var ModalRegister = function ModalRegister(_ref) {
|
|
|
67
67
|
prefixDefault = _useState2[0],
|
|
68
68
|
setPrefixDefault = _useState2[1];
|
|
69
69
|
|
|
70
|
+
var _useState3 = (0, _react.useState)(true),
|
|
71
|
+
_useState4 = (0, _slicedToArray2.default)(_useState3, 2),
|
|
72
|
+
activeCheckbox = _useState4[0],
|
|
73
|
+
setActiveCheckbox = _useState4[1];
|
|
74
|
+
|
|
70
75
|
(0, _react.useEffect)(function () {
|
|
71
76
|
if (prefix != null && (prefix === null || prefix === void 0 ? void 0 : prefix.defaultValue) != null) {
|
|
72
77
|
setPrefixDefault(prefix === null || prefix === void 0 ? void 0 : prefix.defaultValue);
|
|
73
78
|
}
|
|
74
79
|
}, [prefix]);
|
|
80
|
+
|
|
81
|
+
var _isActiveCheckbox = function isActiveCheckbox(value) {
|
|
82
|
+
setActiveCheckbox(value);
|
|
83
|
+
};
|
|
84
|
+
|
|
75
85
|
return _react.default.createElement(_Modal.Modal, {
|
|
76
86
|
width: "339px",
|
|
77
87
|
id: id,
|
|
@@ -145,6 +155,9 @@ var ModalRegister = function ModalRegister(_ref) {
|
|
|
145
155
|
id: idCheckInput,
|
|
146
156
|
action: function action(name, value) {
|
|
147
157
|
return actionInput(name, value);
|
|
158
|
+
},
|
|
159
|
+
isActiveCheckbox: function isActiveCheckbox(value) {
|
|
160
|
+
return _isActiveCheckbox(value);
|
|
148
161
|
}
|
|
149
162
|
})), lastLineHaveCompanyOption && _react.default.createElement(_Layout.Box, {
|
|
150
163
|
marginBottom: 3
|
|
@@ -169,7 +182,8 @@ var ModalRegister = function ModalRegister(_ref) {
|
|
|
169
182
|
action: function action(e) {
|
|
170
183
|
e.preventDefault();
|
|
171
184
|
actionButton.action();
|
|
172
|
-
}
|
|
185
|
+
},
|
|
186
|
+
disabled: activeCheckbox
|
|
173
187
|
}, actionButton.label)))), _react.default.createElement(_Modal.Modal.Footer, null, _react.default.createElement(_Typography.Text, {
|
|
174
188
|
sizeText: "display14",
|
|
175
189
|
color: "black36"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lideralia/alife-uikit",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.366",
|
|
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": {
|