@visiion/forms-library 1.4.11 → 1.4.12

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/index.esm.js CHANGED
@@ -10165,7 +10165,7 @@ var RadioOption = function (_a) {
10165
10165
 
10166
10166
  var TextInput = function (_a) {
10167
10167
  var field = _a.field, value = _a.value, onChange = _a.onChange, error = _a.error;
10168
- return (jsx(TextInputField, { id: field.id, name: field.name, label: field.label, type: "text", placeholder: field.placeholder, value: value, onChange: onChange, helperText: error, disabled: field.disabled, color: error ? "failure" : undefined, addon: field.addon, required: field.required }));
10168
+ return (jsx(TextInputField, __assign({ id: field.id, name: field.name, label: field.label, type: field.type || "text", placeholder: field.placeholder, value: value, onChange: onChange, helperText: error, disabled: field.disabled, color: error ? "failure" : undefined, addon: field.addon, required: field.required }, field.props)));
10169
10169
  };
10170
10170
 
10171
10171
  // THIS FILE IS AUTO GENERATED
@@ -22800,6 +22800,7 @@ var createValidationSchema = function (fields) {
22800
22800
  return true;
22801
22801
  });
22802
22802
  validFields.forEach(function (field) {
22803
+ var _a, _b, _c;
22803
22804
  if (field.validations && field.validations.length > 0) {
22804
22805
  // Determinar el tipo de esquema basado en el tipo de campo
22805
22806
  var fieldSchema_1;
@@ -22808,7 +22809,7 @@ var createValidationSchema = function (fields) {
22808
22809
  case "checklist":
22809
22810
  fieldSchema_1 = create$2()
22810
22811
  .of(create$6())
22811
- .min(1, field.validations[0].params[0] ||
22812
+ .min(1, ((_c = (_b = (_a = field.validations) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.params) === null || _c === void 0 ? void 0 : _c[0]) ||
22812
22813
  "El campo ".concat(field.label || field.name || "sin nombre", " es requerido"));
22813
22814
  break;
22814
22815
  case "declaration":
package/dist/index.js CHANGED
@@ -10184,7 +10184,7 @@ var RadioOption = function (_a) {
10184
10184
 
10185
10185
  var TextInput = function (_a) {
10186
10186
  var field = _a.field, value = _a.value, onChange = _a.onChange, error = _a.error;
10187
- return (jsxRuntime.jsx(TextInputField, { id: field.id, name: field.name, label: field.label, type: "text", placeholder: field.placeholder, value: value, onChange: onChange, helperText: error, disabled: field.disabled, color: error ? "failure" : undefined, addon: field.addon, required: field.required }));
10187
+ return (jsxRuntime.jsx(TextInputField, __assign({ id: field.id, name: field.name, label: field.label, type: field.type || "text", placeholder: field.placeholder, value: value, onChange: onChange, helperText: error, disabled: field.disabled, color: error ? "failure" : undefined, addon: field.addon, required: field.required }, field.props)));
10188
10188
  };
10189
10189
 
10190
10190
  // THIS FILE IS AUTO GENERATED
@@ -22819,6 +22819,7 @@ var createValidationSchema = function (fields) {
22819
22819
  return true;
22820
22820
  });
22821
22821
  validFields.forEach(function (field) {
22822
+ var _a, _b, _c;
22822
22823
  if (field.validations && field.validations.length > 0) {
22823
22824
  // Determinar el tipo de esquema basado en el tipo de campo
22824
22825
  var fieldSchema_1;
@@ -22827,7 +22828,7 @@ var createValidationSchema = function (fields) {
22827
22828
  case "checklist":
22828
22829
  fieldSchema_1 = create$2()
22829
22830
  .of(create$6())
22830
- .min(1, field.validations[0].params[0] ||
22831
+ .min(1, ((_c = (_b = (_a = field.validations) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.params) === null || _c === void 0 ? void 0 : _c[0]) ||
22831
22832
  "El campo ".concat(field.label || field.name || "sin nombre", " es requerido"));
22832
22833
  break;
22833
22834
  case "declaration":
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visiion/forms-library",
3
- "version": "1.4.11",
3
+ "version": "1.4.12",
4
4
  "description": "Librería de componentes de formularios reutilizables",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",