shadcn-zod-formkit 1.17.0 → 1.18.0

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.cjs CHANGED
@@ -5620,14 +5620,16 @@ var DynamicForm = ({
5620
5620
  readOnly = false,
5621
5621
  record = {},
5622
5622
  onSubmit,
5623
+ onClick,
5623
5624
  extraValidations,
5624
5625
  children,
5625
5626
  childrenHeader,
5626
- showIcon = true,
5627
+ showIcon = false,
5627
5628
  showFormHeader = true,
5628
5629
  withErrorsAlert = true,
5629
5630
  errorAlertPosition = "up",
5630
5631
  withCard = false,
5632
+ // btnType = 'submit',
5631
5633
  submitBtnClass = "",
5632
5634
  submitBtnLabel = "Guardar"
5633
5635
  }) => {
@@ -5658,7 +5660,7 @@ var DynamicForm = ({
5658
5660
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row items-center gap-2 w-full", children: [
5659
5661
  showIcon && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "h-5 w-5" }),
5660
5662
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
5661
- /* @__PURE__ */ jsxRuntime.jsxs(CardTitle, { className: "text-xl", children: [
5663
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-xl", children: [
5662
5664
  formTitle,
5663
5665
  " "
5664
5666
  ] }),
@@ -5678,7 +5680,7 @@ var DynamicForm = ({
5678
5680
  /* @__PURE__ */ jsxRuntime.jsx(FormFieldsGrid, { fields, form, readOnly }),
5679
5681
  children && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row items-center gap-2 w-full h-full", children })
5680
5682
  ] }),
5681
- !readOnly && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row gap-2 justify-end items-end", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", size: "lg", className: submitBtnClass, disabled: isPending, children: isPending ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5683
+ !readOnly && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-row gap-2 justify-end items-end", children: /* @__PURE__ */ jsxRuntime.jsx(Button, { type: onClick ? "button" : "submit", size: "lg", className: submitBtnClass, disabled: isPending, onClick, children: isPending ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5682
5684
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 mr-2 animate-spin" }),
5683
5685
  "Guardando..."
5684
5686
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [