@visiion/forms-library 1.4.13 → 1.4.15
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 +1 -2
- package/dist/index.js +1 -2
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -10329,7 +10329,6 @@ function maskRut(rut) {
|
|
|
10329
10329
|
|
|
10330
10330
|
var RutInput = function (_a) {
|
|
10331
10331
|
var field = _a.field, value = _a.value, onChange = _a.onChange, error = _a.error, onSearch = _a.onSearch, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.placeholder, placeholder = _c === void 0 ? "0.000.000-0" : _c, _d = _a.minLength, minLength = _d === void 0 ? 12 : _d, _e = _a.maxLength, maxLength = _e === void 0 ? 12 : _e;
|
|
10332
|
-
console.log(value);
|
|
10333
10332
|
// crear variable que si value tiene -error-no-empleador sea true
|
|
10334
10333
|
var errorEmpleador = value.includes("-error-no-empleador") ? true : false;
|
|
10335
10334
|
//sacar el -error-no-empleador de value
|
|
@@ -19964,7 +19963,7 @@ var Alert = function (_a) {
|
|
|
19964
19963
|
|
|
19965
19964
|
var DatePicker = function (_a) {
|
|
19966
19965
|
var id = _a.id, name = _a.name, label = _a.label, value = _a.value, onChange = _a.onChange, error = _a.error, disabled = _a.disabled, required = _a.required, placeholder = _a.placeholder, props = _a.props;
|
|
19967
|
-
return (
|
|
19966
|
+
return (jsxs(InputWrapper, { id: id, label: label, error: error, children: [jsx("input", { id: id, name: name, type: "date", value: value || "", onChange: onChange, disabled: disabled, required: required, placeholder: placeholder, max: props === null || props === void 0 ? void 0 : props.maxDate, min: props === null || props === void 0 ? void 0 : props.minDate, className: "w-full px-3 py-2 font-roboto font-normal text-gray-800 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500 ".concat(error ? "border-red-500" : "border-gray-300", " ").concat(disabled ? "bg-gray-100 cursor-not-allowed" : "") }), error && jsx("p", { className: "text-red-500 text-sm", children: error })] }));
|
|
19968
19967
|
};
|
|
19969
19968
|
|
|
19970
19969
|
var SwornDeclaration = function (_a) {
|
package/dist/index.js
CHANGED
|
@@ -10348,7 +10348,6 @@ function maskRut(rut) {
|
|
|
10348
10348
|
|
|
10349
10349
|
var RutInput = function (_a) {
|
|
10350
10350
|
var field = _a.field, value = _a.value, onChange = _a.onChange, error = _a.error, onSearch = _a.onSearch, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.placeholder, placeholder = _c === void 0 ? "0.000.000-0" : _c, _d = _a.minLength, minLength = _d === void 0 ? 12 : _d, _e = _a.maxLength, maxLength = _e === void 0 ? 12 : _e;
|
|
10351
|
-
console.log(value);
|
|
10352
10351
|
// crear variable que si value tiene -error-no-empleador sea true
|
|
10353
10352
|
var errorEmpleador = value.includes("-error-no-empleador") ? true : false;
|
|
10354
10353
|
//sacar el -error-no-empleador de value
|
|
@@ -19983,7 +19982,7 @@ var Alert = function (_a) {
|
|
|
19983
19982
|
|
|
19984
19983
|
var DatePicker = function (_a) {
|
|
19985
19984
|
var id = _a.id, name = _a.name, label = _a.label, value = _a.value, onChange = _a.onChange, error = _a.error, disabled = _a.disabled, required = _a.required, placeholder = _a.placeholder, props = _a.props;
|
|
19986
|
-
return (jsxRuntime.
|
|
19985
|
+
return (jsxRuntime.jsxs(InputWrapper, { id: id, label: label, error: error, children: [jsxRuntime.jsx("input", { id: id, name: name, type: "date", value: value || "", onChange: onChange, disabled: disabled, required: required, placeholder: placeholder, max: props === null || props === void 0 ? void 0 : props.maxDate, min: props === null || props === void 0 ? void 0 : props.minDate, className: "w-full px-3 py-2 font-roboto font-normal text-gray-800 text-sm border rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500 ".concat(error ? "border-red-500" : "border-gray-300", " ").concat(disabled ? "bg-gray-100 cursor-not-allowed" : "") }), error && jsxRuntime.jsx("p", { className: "text-red-500 text-sm", children: error })] }));
|
|
19987
19986
|
};
|
|
19988
19987
|
|
|
19989
19988
|
var SwornDeclaration = function (_a) {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
export interface IFormField {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
|
-
type: "radio" | "text" | "select" | "textarea" | "checkbox" | "checklist" | "upload" | "rut" | "address" | "subtitle" | "alert" | "date" | "declaration" | "typography" | "status";
|
|
5
|
+
type: "radio" | "text" | "number" | "select" | "textarea" | "checkbox" | "checklist" | "upload" | "rut" | "address" | "subtitle" | "alert" | "date" | "declaration" | "typography" | "status";
|
|
6
6
|
label: string;
|
|
7
7
|
value?: string | number | any;
|
|
8
8
|
options?: Array<{
|