@visiion/forms-library 1.1.3 → 1.1.4

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
@@ -36827,7 +36827,7 @@ var GenericForm = function (_a) {
36827
36827
  if (loading) {
36828
36828
  return (jsxs("div", { className: "min-h-[550px] flex flex-col justify-between gap-10 ".concat(className), children: [jsxs("div", { className: "flex flex-col gap-10", children: [jsxs("div", { id: "title", children: [jsx("div", { className: "h-8 bg-gray-200 rounded animate-pulse w-3/4 mb-2" }), jsx("div", { className: "w-full h-[3px] bg-gray-200 rounded-full animate-pulse" })] }), jsxs("div", { className: "text-gray-500 text-lg font-normal flex flex-col gap-2", children: [jsx("div", { className: "h-6 bg-gray-200 rounded animate-pulse w-1/2 ml-5" }), jsx("div", { className: "w-full h-[1px] bg-gray-200 animate-pulse" })] }), jsx("div", { children: jsx("div", { className: "flex max-w-1xl mx-auto flex-col gap-4", children: jsx("div", { className: "grid grid-cols-12 gap-4", children: (_b = config === null || config === void 0 ? void 0 : config.fields) === null || _b === void 0 ? void 0 : _b.map(function (field) { return (jsxs("div", { className: "col-span-12 md:col-span-6", children: [jsx("div", { className: "h-4 bg-gray-200 rounded animate-pulse w-1/3 mb-2" }), jsx("div", { className: "h-10 bg-gray-200 rounded animate-pulse w-full" })] }, field.id)); }) }) }) })] }), jsxs("div", { className: "flex justify-between", children: [jsxs("div", { className: "flex gap-2", children: [jsx("div", { className: "h-10 bg-gray-200 rounded animate-pulse w-20" }), jsx("div", { className: "h-10 bg-gray-200 rounded animate-pulse w-20" })] }), jsx("div", { className: "h-10 bg-gray-200 rounded animate-pulse w-24" })] })] }));
36829
36829
  }
36830
- var formContent = (jsxs("div", { className: "min-h-[550px] flex flex-col justify-between gap-10 ".concat(className), children: [jsxs("div", { className: "flex flex-col gap-10", children: [jsxs("div", { id: "title", children: [jsx("h1", { className: "text-text text-3xl font-bold font-roboto", children: config.title }), jsx("div", { className: "w-full h-[3px] bg-orange-500 rounded-full mt-2" })] }), (config === null || config === void 0 ? void 0 : config.steps) && (jsx(FormStepper, { steps: (_c = config === null || config === void 0 ? void 0 : config.steps) === null || _c === void 0 ? void 0 : _c.obj, activeStep: (_d = config === null || config === void 0 ? void 0 : config.steps) === null || _d === void 0 ? void 0 : _d.activeStep, completedSteps: (_e = config === null || config === void 0 ? void 0 : config.steps) === null || _e === void 0 ? void 0 : _e.completedSteps, changeActiveStep: (_f = config === null || config === void 0 ? void 0 : config.steps) === null || _f === void 0 ? void 0 : _f.changeActiveStep })), "hola2", (config === null || config === void 0 ? void 0 : config.subtitle) && (jsx(Fragment, { children: jsxs("div", { className: "text-gray-500 text-lg font-normal flex flex-col gap-2", children: [jsx("h3", { className: "pl-5 text-[24px] text-text text-xl font-bold font-roboto", children: config.subtitle }), jsx("hr", { className: "w-full border-gray-400" })] }) })), config.showInfoAlert && config.infoMessage && (jsx(Alert, { type: (_g = config.infoMessage.type) !== null && _g !== void 0 ? _g : "info", text: config.infoMessage.message })), jsx("div", { children: jsx("form", { className: "flex max-w-1xl mx-auto flex-col gap-4", children: jsx("div", { className: "grid grid-cols-12 gap-4", children: config.fields.map(renderField) }) }) })] }), ((_h = config === null || config === void 0 ? void 0 : config.navigation) === null || _h === void 0 ? void 0 : _h.buttons) && (jsx("div", { className: (_k = (_j = config.navigation) === null || _j === void 0 ? void 0 : _j.containerClass) !== null && _k !== void 0 ? _k : "flex justify-between", children: (_m = (_l = config === null || config === void 0 ? void 0 : config.navigation) === null || _l === void 0 ? void 0 : _l.buttons) === null || _m === void 0 ? void 0 : _m.map(function (btn, index) {
36830
+ var formContent = (jsxs("div", { className: "min-h-[550px] flex flex-col justify-between gap-10 ".concat(className), children: [jsxs("div", { className: "flex flex-col gap-10", children: [jsxs("div", { id: "title", children: [jsx("h1", { className: "text-text text-3xl font-bold font-roboto", children: config.title }), jsx("div", { className: "w-full h-[3px] bg-orange-500 rounded-full mt-2" })] }), (config === null || config === void 0 ? void 0 : config.steps) && (jsx(FormStepper, { steps: (_c = config === null || config === void 0 ? void 0 : config.steps) === null || _c === void 0 ? void 0 : _c.obj, activeStep: (_d = config === null || config === void 0 ? void 0 : config.steps) === null || _d === void 0 ? void 0 : _d.activeStep, completedSteps: (_e = config === null || config === void 0 ? void 0 : config.steps) === null || _e === void 0 ? void 0 : _e.completedSteps, changeActiveStep: (_f = config === null || config === void 0 ? void 0 : config.steps) === null || _f === void 0 ? void 0 : _f.changeActiveStep })), (config === null || config === void 0 ? void 0 : config.subtitle) && (jsx(Fragment, { children: jsxs("div", { className: "text-gray-500 text-lg font-normal flex flex-col gap-2", children: [jsx("h3", { className: "pl-5 text-[24px] text-text text-xl font-bold font-roboto", children: config.subtitle }), jsx("hr", { className: "w-full border-gray-400" })] }) })), config.showInfoAlert && config.infoMessage && (jsx(Alert, { type: (_g = config.infoMessage.type) !== null && _g !== void 0 ? _g : "info", text: config.infoMessage.message })), jsx("div", { children: jsx("form", { className: "flex max-w-1xl mx-auto flex-col gap-4", children: jsx("div", { className: "grid grid-cols-12 gap-4", children: config.fields.map(renderField) }) }) })] }), ((_h = config === null || config === void 0 ? void 0 : config.navigation) === null || _h === void 0 ? void 0 : _h.buttons) && (jsx("div", { className: (_k = (_j = config.navigation) === null || _j === void 0 ? void 0 : _j.containerClass) !== null && _k !== void 0 ? _k : "flex justify-between", children: (_m = (_l = config === null || config === void 0 ? void 0 : config.navigation) === null || _l === void 0 ? void 0 : _l.buttons) === null || _m === void 0 ? void 0 : _m.map(function (btn, index) {
36831
36831
  var _a;
36832
36832
  return btn.show ? (jsx("div", { className: (_a = btn.className) !== null && _a !== void 0 ? _a : "", children: jsx(NavigationButton, { direction: btn.direction, onClick: buttonHandlers[btn.onClick], disabled: isButtonDisabled(btn), label: btn.label }) }, index)) : null;
36833
36833
  }) }))] }));
package/dist/index.js CHANGED
@@ -36847,7 +36847,7 @@ var GenericForm = function (_a) {
36847
36847
  if (loading) {
36848
36848
  return (jsxRuntime.jsxs("div", { className: "min-h-[550px] flex flex-col justify-between gap-10 ".concat(className), children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-10", children: [jsxRuntime.jsxs("div", { id: "title", children: [jsxRuntime.jsx("div", { className: "h-8 bg-gray-200 rounded animate-pulse w-3/4 mb-2" }), jsxRuntime.jsx("div", { className: "w-full h-[3px] bg-gray-200 rounded-full animate-pulse" })] }), jsxRuntime.jsxs("div", { className: "text-gray-500 text-lg font-normal flex flex-col gap-2", children: [jsxRuntime.jsx("div", { className: "h-6 bg-gray-200 rounded animate-pulse w-1/2 ml-5" }), jsxRuntime.jsx("div", { className: "w-full h-[1px] bg-gray-200 animate-pulse" })] }), jsxRuntime.jsx("div", { children: jsxRuntime.jsx("div", { className: "flex max-w-1xl mx-auto flex-col gap-4", children: jsxRuntime.jsx("div", { className: "grid grid-cols-12 gap-4", children: (_b = config === null || config === void 0 ? void 0 : config.fields) === null || _b === void 0 ? void 0 : _b.map(function (field) { return (jsxRuntime.jsxs("div", { className: "col-span-12 md:col-span-6", children: [jsxRuntime.jsx("div", { className: "h-4 bg-gray-200 rounded animate-pulse w-1/3 mb-2" }), jsxRuntime.jsx("div", { className: "h-10 bg-gray-200 rounded animate-pulse w-full" })] }, field.id)); }) }) }) })] }), jsxRuntime.jsxs("div", { className: "flex justify-between", children: [jsxRuntime.jsxs("div", { className: "flex gap-2", children: [jsxRuntime.jsx("div", { className: "h-10 bg-gray-200 rounded animate-pulse w-20" }), jsxRuntime.jsx("div", { className: "h-10 bg-gray-200 rounded animate-pulse w-20" })] }), jsxRuntime.jsx("div", { className: "h-10 bg-gray-200 rounded animate-pulse w-24" })] })] }));
36849
36849
  }
36850
- var formContent = (jsxRuntime.jsxs("div", { className: "min-h-[550px] flex flex-col justify-between gap-10 ".concat(className), children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-10", children: [jsxRuntime.jsxs("div", { id: "title", children: [jsxRuntime.jsx("h1", { className: "text-text text-3xl font-bold font-roboto", children: config.title }), jsxRuntime.jsx("div", { className: "w-full h-[3px] bg-orange-500 rounded-full mt-2" })] }), (config === null || config === void 0 ? void 0 : config.steps) && (jsxRuntime.jsx(FormStepper, { steps: (_c = config === null || config === void 0 ? void 0 : config.steps) === null || _c === void 0 ? void 0 : _c.obj, activeStep: (_d = config === null || config === void 0 ? void 0 : config.steps) === null || _d === void 0 ? void 0 : _d.activeStep, completedSteps: (_e = config === null || config === void 0 ? void 0 : config.steps) === null || _e === void 0 ? void 0 : _e.completedSteps, changeActiveStep: (_f = config === null || config === void 0 ? void 0 : config.steps) === null || _f === void 0 ? void 0 : _f.changeActiveStep })), "hola2", (config === null || config === void 0 ? void 0 : config.subtitle) && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "text-gray-500 text-lg font-normal flex flex-col gap-2", children: [jsxRuntime.jsx("h3", { className: "pl-5 text-[24px] text-text text-xl font-bold font-roboto", children: config.subtitle }), jsxRuntime.jsx("hr", { className: "w-full border-gray-400" })] }) })), config.showInfoAlert && config.infoMessage && (jsxRuntime.jsx(Alert, { type: (_g = config.infoMessage.type) !== null && _g !== void 0 ? _g : "info", text: config.infoMessage.message })), jsxRuntime.jsx("div", { children: jsxRuntime.jsx("form", { className: "flex max-w-1xl mx-auto flex-col gap-4", children: jsxRuntime.jsx("div", { className: "grid grid-cols-12 gap-4", children: config.fields.map(renderField) }) }) })] }), ((_h = config === null || config === void 0 ? void 0 : config.navigation) === null || _h === void 0 ? void 0 : _h.buttons) && (jsxRuntime.jsx("div", { className: (_k = (_j = config.navigation) === null || _j === void 0 ? void 0 : _j.containerClass) !== null && _k !== void 0 ? _k : "flex justify-between", children: (_m = (_l = config === null || config === void 0 ? void 0 : config.navigation) === null || _l === void 0 ? void 0 : _l.buttons) === null || _m === void 0 ? void 0 : _m.map(function (btn, index) {
36850
+ var formContent = (jsxRuntime.jsxs("div", { className: "min-h-[550px] flex flex-col justify-between gap-10 ".concat(className), children: [jsxRuntime.jsxs("div", { className: "flex flex-col gap-10", children: [jsxRuntime.jsxs("div", { id: "title", children: [jsxRuntime.jsx("h1", { className: "text-text text-3xl font-bold font-roboto", children: config.title }), jsxRuntime.jsx("div", { className: "w-full h-[3px] bg-orange-500 rounded-full mt-2" })] }), (config === null || config === void 0 ? void 0 : config.steps) && (jsxRuntime.jsx(FormStepper, { steps: (_c = config === null || config === void 0 ? void 0 : config.steps) === null || _c === void 0 ? void 0 : _c.obj, activeStep: (_d = config === null || config === void 0 ? void 0 : config.steps) === null || _d === void 0 ? void 0 : _d.activeStep, completedSteps: (_e = config === null || config === void 0 ? void 0 : config.steps) === null || _e === void 0 ? void 0 : _e.completedSteps, changeActiveStep: (_f = config === null || config === void 0 ? void 0 : config.steps) === null || _f === void 0 ? void 0 : _f.changeActiveStep })), (config === null || config === void 0 ? void 0 : config.subtitle) && (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: "text-gray-500 text-lg font-normal flex flex-col gap-2", children: [jsxRuntime.jsx("h3", { className: "pl-5 text-[24px] text-text text-xl font-bold font-roboto", children: config.subtitle }), jsxRuntime.jsx("hr", { className: "w-full border-gray-400" })] }) })), config.showInfoAlert && config.infoMessage && (jsxRuntime.jsx(Alert, { type: (_g = config.infoMessage.type) !== null && _g !== void 0 ? _g : "info", text: config.infoMessage.message })), jsxRuntime.jsx("div", { children: jsxRuntime.jsx("form", { className: "flex max-w-1xl mx-auto flex-col gap-4", children: jsxRuntime.jsx("div", { className: "grid grid-cols-12 gap-4", children: config.fields.map(renderField) }) }) })] }), ((_h = config === null || config === void 0 ? void 0 : config.navigation) === null || _h === void 0 ? void 0 : _h.buttons) && (jsxRuntime.jsx("div", { className: (_k = (_j = config.navigation) === null || _j === void 0 ? void 0 : _j.containerClass) !== null && _k !== void 0 ? _k : "flex justify-between", children: (_m = (_l = config === null || config === void 0 ? void 0 : config.navigation) === null || _l === void 0 ? void 0 : _l.buttons) === null || _m === void 0 ? void 0 : _m.map(function (btn, index) {
36851
36851
  var _a;
36852
36852
  return btn.show ? (jsxRuntime.jsx("div", { className: (_a = btn.className) !== null && _a !== void 0 ? _a : "", children: jsxRuntime.jsx(NavigationButton, { direction: btn.direction, onClick: buttonHandlers[btn.onClick], disabled: isButtonDisabled(btn), label: btn.label }) }, index)) : null;
36853
36853
  }) }))] }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visiion/forms-library",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Librería de componentes de formularios reutilizables",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",